diff options
| author | ruki <[email protected]> | 2020-04-08 23:34:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-08 15:24:59 +0800 |
| commit | 73323570007d4765824883c64036e72eabdab2cf (patch) | |
| tree | ddeaffa62543d8bdc2440f59ee700f7aaaa3c979 /xmake/rules/xcode/application/build_file.lua | |
| parent | c472bf464c4af2532d574d1063e473863f1adb54 (diff) | |
support for building xcode.app/iphoneos
Diffstat (limited to 'xmake/rules/xcode/application/build_file.lua')
| -rw-r--r-- | xmake/rules/xcode/application/build_file.lua | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/xmake/rules/xcode/application/build_file.lua b/xmake/rules/xcode/application/build_file.lua index 9045fc2d4..999dc8035 100644 --- a/xmake/rules/xcode/application/build_file.lua +++ b/xmake/rules/xcode/application/build_file.lua @@ -55,13 +55,28 @@ function _build_xcassets_file(target, sourcefile, opt) table.insert(argv, "mac") table.insert(argv, "--platform") table.insert(argv, "macosx") + elseif is_plat("iphoneos") then + table.insert(argv, "--target-device") + table.insert(argv, "iphone") + table.insert(argv, "--target-device") + table.insert(argv, "ipad") + table.insert(argv, "--platform") + table.insert(argv, "iphoneos") + else + assert("unknown device!") end table.insert(argv, "--minimum-deployment-target") table.insert(argv, get_config("target_minver")) table.insert(argv, "--app-icon") table.insert(argv, "AppIcon") - table.insert(argv, "--enable-on-demand-resources") - table.insert(argv, "NO") + if is_plat("iphoneos") then + table.insert(argv, "--enable-on-demand-resources") + table.insert(argv, "YES") + table.insert(argv, "--compress-pngs") + else + table.insert(argv, "--enable-on-demand-resources") + table.insert(argv, "NO") + end table.insert(argv, "--development-region") table.insert(argv, "en") table.insert(argv, "--product-type") @@ -109,6 +124,13 @@ function _build_storyboard_file(target, sourcefile, opt) if is_plat("macosx") then table.insert(argv, "--target-device") table.insert(argv, "mac") + elseif is_plat("iphoneos") then + table.insert(argv, "--target-device") + table.insert(argv, "iphone") + table.insert(argv, "--target-device") + table.insert(argv, "ipad") + else + assert("unknown device!") end table.insert(argv, "--minimum-deployment-target") table.insert(argv, get_config("target_minver")) |
