Merge pull request #320 from chinmaygarde/skyx_review
Load SkyX files on iOS where available
This commit is contained in:
@@ -15,9 +15,24 @@ PLUTIL = [
|
||||
'plutil'
|
||||
]
|
||||
|
||||
def MakeDirectories(path):
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError as exc:
|
||||
if exc.errno == errno.EEXIST and os.path.isdir(path):
|
||||
return 0
|
||||
else:
|
||||
return -1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def ProcessInfoPlist(args):
|
||||
output_plist_file = os.path.abspath(os.path.join(args.output, 'Info.plist'))
|
||||
|
||||
if MakeDirectories(os.path.dirname(output_plist_file)) == -1:
|
||||
return -1
|
||||
|
||||
return subprocess.check_call( PLUTIL + [
|
||||
'-convert',
|
||||
'binary1',
|
||||
@@ -42,18 +57,6 @@ def PerformCodeSigning(args):
|
||||
])
|
||||
|
||||
|
||||
def MakeDirectories(path):
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError as exc:
|
||||
if exc.errno == errno.EEXIST and os.path.isdir(path):
|
||||
return 0
|
||||
else:
|
||||
return -1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def GenerateProjectStructure(args):
|
||||
application_path = os.path.join( args.dir, args.name + ".app" )
|
||||
return MakeDirectories( application_path )
|
||||
|
||||
@@ -56,6 +56,10 @@ template("resource_copy_ios") {
|
||||
set_sources_assignment_filter([])
|
||||
sources = _resources
|
||||
outputs = [ "$root_build_dir/$_app_name.app/$_bundle_directory/{{source_file_part}}" ]
|
||||
|
||||
if (defined(invoker.deps)) {
|
||||
deps = invoker.deps
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,14 +119,14 @@ template("ios_app") {
|
||||
script = ios_app_script
|
||||
|
||||
sources = [ invoker.info_plist ]
|
||||
outputs = [ "$root_build_dir/Info.plist" ]
|
||||
outputs = [ "$root_build_dir/plist/$app_name/Info.plist" ]
|
||||
|
||||
args = [
|
||||
"plist",
|
||||
"-i",
|
||||
rebase_path(invoker.info_plist, root_build_dir),
|
||||
"-o",
|
||||
rebase_path(root_build_dir),
|
||||
rebase_path("$root_build_dir/plist/$app_name"),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -131,7 +135,7 @@ template("ios_app") {
|
||||
copy_gen_target_name = target_name + "_copy"
|
||||
copy(copy_gen_target_name) {
|
||||
sources = [
|
||||
"$root_build_dir/Info.plist",
|
||||
"$root_build_dir/plist/$app_name/Info.plist",
|
||||
"$root_build_dir/$app_name",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user