本文整理汇总了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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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
示例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))
示例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'
#.........这里部分代码省略.........