• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python tools.ensure_dev_path函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中tools.ensure_dev_path函数的典型用法代码示例。如果您正苦于以下问题:Python ensure_dev_path函数的具体用法?Python ensure_dev_path怎么用?Python ensure_dev_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ensure_dev_path函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: build_module

def build_module(manifest,config):
	from tools import ensure_dev_path
	ensure_dev_path()

	if(cmd_exists("xctool") == True):
		rc = os.system("xctool -sdk iphoneos -configuration Release -scheme barcode")
		if rc != 0:
			die("xctool failed")
		rc = os.system("xctool -sdk iphonesimulator -configuration Release -scheme barcode")
		if rc != 0:
			die("xctool failed")
	else:
		rc = os.system("xcodebuild -sdk iphoneos -configuration Release")
		if rc != 0:
			die("xcodebuild failed")
		rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release")
		if rc != 0:
			die("xcodebuild failed")

    # build the merged library using lipo
	moduleid = manifest['moduleid']
	libpaths = ''
	for libfile in glob_libfiles():
		libpaths+='%s ' % libfile

	os.system("lipo %s -create -output build/lib%s.a" %(libpaths,moduleid))
开发者ID:Irfanrz,项目名称:ti.barcode,代码行数:26,代码来源:build.py


示例2: build_module

def build_module(manifest,config):
	from tools import ensure_dev_path
	ensure_dev_path()

	rc = os.system("xcodebuild -sdk iphoneos -configuration Release OTHER_CFLAGS=\"-fembed-bitcode\" CLANG_ENABLE_MODULE_DEBUGGING=NO GCC_PRECOMPILE_PREFIX_HEADER=NO DEBUG_INFORMATION_FORMAT=\"DWARF with dSYM\"")
	if rc != 0:
		die("xcodebuild failed")
	rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release OTHER_CFLAGS=\"-fembed-bitcode\" CLANG_ENABLE_MODULE_DEBUGGING=NO GCC_PRECOMPILE_PREFIX_HEADER=NO DEBUG_INFORMATION_FORMAT=\"DWARF with dSYM\"")
	if rc != 0:		
		die("xcodebuild failed")
    # build the merged library using lipo
	moduleid = manifest['moduleid']
	libpaths = ''
	for libfile in glob_libfiles():
		libpaths+='%s ' % libfile

	os.system("lipo %s -create -output build/lib%s.a" %(libpaths,moduleid))
开发者ID:appcelerator-forks,项目名称:appcelerator-modules.ti.urlsession,代码行数:17,代码来源:build.py


示例3: build_module

def build_module(manifest,config):
    from tools import ensure_dev_path
    ensure_dev_path()
    buildpath = os.path.join(cwd, "build")
    print(buildpath)
    rc = os.system("xcodebuild -sdk iphoneos -configuration Release clean build CONFIGURATION_BUILD_DIR=\"%s\"" % os.path.join(buildpath, "iphoneos"))
    if rc != 0:
        die("xcodebuild failed")
    rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release clean build CONFIGURATION_BUILD_DIR=\"%s\"" % os.path.join(buildpath, "iphonesimulator"))
    if rc != 0:
        die("xcodebuild failed")
    # build the merged library using lipo
    moduleid = manifest['moduleid']
    libpaths = ''
    for libfile in glob_libfiles(moduleid):
        libpaths+='%s ' % libfile
    os.system("lipo %s -create -output build/lib%s.a" %(libpaths,moduleid))
开发者ID:Akylas,项目名称:titanium_mobile,代码行数:17,代码来源:module.py


示例4: build_module

def build_module(manifest,config):
	from tools import ensure_dev_path
	ensure_dev_path()

	rc = os.system("xcodebuild -sdk iphoneos -configuration Release")
	if rc != 0:
		die("xcodebuild failed")
	rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release")
	if rc != 0:
		die("xcodebuild failed")
    # build the merged library using lipo
	moduleid = manifest['moduleid']
	libpaths = ''
	for libfile in glob_libfiles():
		libpaths+='{0!s} '.format(libfile)

	os.system("lipo {0!s} -create -output build/lib{1!s}.a".format(libpaths, moduleid))
开发者ID:runt18,项目名称:Parse,代码行数:17,代码来源:build.py


示例5: build_module

def build_module(manifest,config):
	from tools import ensure_dev_path
	ensure_dev_path()
	
	os.system("rm -rf build/")
	os.system("xcodebuild -project PSPDFKit-Titanium-Source.xcodeproj clean")
	rc = os.system("xcodebuild -project PSPDFKit-Titanium-Source.xcodeproj -sdk iphoneos -configuration Release -target pspdfkit")
	if rc != 0:
		die("xcodebuild failed")
	rc = os.system("xcodebuild -project PSPDFKit-Titanium-Source.xcodeproj -sdk iphonesimulator -configuration Release -target pspdfkit")
	if rc != 0:
		die("xcodebuild failed")
    # build the merged library using lipo
	moduleid = manifest['moduleid']
	libpaths = ''
	for libfile in glob_libfiles():
		libpaths+='%s ' % libfile
		
	os.system("lipo %s -create -output build/lib%s.a" %(libpaths,moduleid))
开发者ID:adrianopaladini,项目名称:PSPDFKit-Titanium,代码行数:19,代码来源:build-source.py


示例6: build_module

def build_module(manifest,config):
	from tools import ensure_dev_path
	ensure_dev_path()
#xcodebuild -sdk iphoneos -configuration Release -workspace TiYandexMobileMetrica.xcworkspace -scheme TiYandexMobileMetrica
	rc = os.system("xcodebuild -sdk iphoneos -configuration Release -workspace TiYandexMobileMetrica.xcworkspace -scheme TiYandexMobileMetrica")
	#rc = os.system("xcodebuild -sdk iphoneos -configuration Release")
	if rc != 0:
		die("xcodebuild failed")
	#rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release")
	rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release -workspace TiYandexMobileMetrica.xcworkspace -scheme TiYandexMobileMetrica")
	if rc != 0:
		die("xcodebuild failed")
    # build the merged library using lipo
	moduleid = manifest['moduleid']
	libpaths = ''
	for libfile in glob_libfiles():
		libpaths+='%s ' % libfile

	print("lipo %s -create -output build/lib%s.a" %(libpaths,moduleid));
	os.system("lipo %s -create -output build/lib%s.a" %(libpaths,moduleid))
开发者ID:darknos,项目名称:TiYandexMobileMetrica,代码行数:20,代码来源:build.py


示例7: run

def run(args,ignore_error=False,debug=True,out=None):
	ensure_dev_path(debug)
	if debug:
		print "[DEBUG] executing command: %s" % " ".join(args)
		sys.stdout.flush()
	proc = subprocess.Popen(args, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
	results = ''
	errors = '';
	rc = None
	while True:
		for line in proc.stdout.readlines():
			line = unicode(line, 'utf-8')
			if out!=None:
				out.write(line)
				out.flush()
			if debug:
				s = line.strip()
				if s!='':
					if s.startswith("["):
						print s
					else:		
						print "[DEBUG] %s" % s
					sys.stdout.flush()
			results+=line
			# Imperfect, but better than nothing.
			if line.count('error:')!=0:
				errors+=line
			# Catch undefined symbol/linker errors
			if line.count('{standard input}')!=0:
				errors+=line
		rc = proc.poll()
		if rc!=None: break
	if rc!=0:
		if out!=None: out.write("EXIT CODE WAS: %d\n" % rc)
		if not ignore_error:
			print '\n'.join(["[ERROR] %s" % line for line in errors.split('\n')])
			if debug: print "[ERROR] exitcode was: %d" % rc
			sys.exit(rc)
		else:
			return None
	return results	
开发者ID:0x00evil,项目名称:titanium_mobile,代码行数:41,代码来源:run.py


示例8: build_module

def build_module(manifest, config):
    from tools import ensure_dev_path

    ensure_dev_path()

    # Use this code below when building with xcode 7. This is changed for travis as it does not have xcode 7 at the moment
    # rc = os.system("xcodebuild -sdk iphoneos -configuration Release OTHER_CFLAGS=\"-fembed-bitcode\"")
    rc = os.system("xcodebuild -sdk iphoneos -configuration Release")
    if rc != 0:
        die("xcodebuild failed")
        # Use this code below when building with xcode 7. This is changed for travis as it does not have xcode 7 at the moment
        # rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release OTHER_CFLAGS=\"-fembed-bitcode\"")
    rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release")
    if rc != 0:
        die("xcodebuild failed")
        # build the merged library using lipo
    moduleid = manifest["moduleid"]
    libpaths = ""
    for libfile in glob_libfiles():
        libpaths += "%s " % libfile

    os.system("lipo %s -create -output build/lib%s.a" % (libpaths, moduleid))
开发者ID:cheekiatng,项目名称:ti.map,代码行数:22,代码来源:build.py


示例9: main

def main(args):
	global script_ok
	argc = len(args)

	start_time = time.time()
	command = args[1].decode("utf-8")
	ensure_dev_path()

	target = 'Debug'
	deploytype = 'development'
	devicefamily = 'iphone'
	debug = False
	build_only = False
	simulator = False
	xcode_build = False
	force_xcode = False
	simtype = devicefamily

	# the run command is when you run from titanium using the run command
	# and it will run the project in the current directory immediately in the simulator
	# from the command line
	if command == 'run':
		project_dir = os.path.expanduser(dequote(args[2].decode("utf-8")))
		iphone_version = dequote(args[3].decode("utf-8"))
		iphone_dir = os.path.abspath(os.path.join(project_dir,'build','iphone'))
		tiapp_xml = os.path.join(project_dir,'tiapp.xml')
		ti = TiAppXML(tiapp_xml)
		appid = ti.properties['id']
		name = ti.properties['name']
		command = 'simulator' # switch it so that the rest of the stuff works
	else:
		iphone_version = dequote(args[2].decode("utf-8"))
		project_dir = os.path.expanduser(dequote(args[3].decode("utf-8")))
		appid = dequote(args[4].decode("utf-8"))
		name = dequote(args[5].decode("utf-8"))
		tiapp_xml = os.path.join(project_dir,'tiapp.xml')
		ti = TiAppXML(tiapp_xml)
		
	app_name = make_app_name(name)
	iphone_dir = os.path.abspath(os.path.join(project_dir,'build','iphone'))
	
	# We need to create the iphone dir if necessary, now that
	# the tiapp.xml allows build target selection
	if not os.path.isdir(iphone_dir):
		if os.path.exists(iphone_dir):
			os.remove(iphone_dir)
		os.makedirs(iphone_dir)
	
	project_xcconfig = os.path.join(iphone_dir,'project.xcconfig')
	target = 'Release'
	ostype = 'os'
	version_file = None
	log_id = None
	provisioning_profile = None
	debughost = None
	debugport = None
	postbuild_modules = []
	
	# starting in 1.4, you don't need to actually keep the build/iphone directory
	# if we don't find it, we'll just simply re-generate it
	if not os.path.exists(iphone_dir):
		from iphone import IPhone
		print "[INFO] Detected missing project but that's OK. re-creating it..."
		iphone_creator = IPhone(name,appid)
		iphone_creator.create(iphone_dir,True)
		sys.stdout.flush()
		
	# we use different arguments dependent on the command
	# pluck those out here
	if command == 'distribute':
		iphone_version = check_iphone_sdk(iphone_version)
		link_version = iphone_version
		dist_keychain = None
		appuuid = dequote(args[6].decode("utf-8"))
		dist_name = dequote(args[7].decode("utf-8"))
		devicefamily = dequote(args[8].decode("utf-8"))
		print "[INFO] Switching to production mode for distribution"
		deploytype = 'production'
	elif command in ['simulator', 'build']:
		link_version = check_iphone_sdk(iphone_version)
		deploytype = 'development'
		debug = True
		simulator = command == 'simulator'
		build_only = command == 'build'
		target = 'Debug'
		ostype = 'simulator'
		devicefamily = dequote(args[4].decode("utf-8"))
		simtype = devicefamily

	elif command in ['install', 'adhoc']:
		iphone_version = check_iphone_sdk(iphone_version)
		devicefamily = dequote(args[6].decode("utf-8"))
		link_version = iphone_version
		dist_keychain = None
		if command == 'install':
			target = 'Debug'
			deploytype = 'test'
		elif command == 'adhoc':
			target = 'Release'
			deploytype = 'production'
#.........这里部分代码省略.........
开发者ID:iamyellow,项目名称:clti,代码行数:101,代码来源:builder.py



注:本文中的tools.ensure_dev_path函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python tools.existence_check函数代码示例发布时间:2022-05-27
下一篇:
Python tools.email_send函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap