diff options
| author | ruki <[email protected]> | 2020-04-23 23:46:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-23 16:36:46 +0800 |
| commit | 18cc36cae0dd5938574fe395a5d0745a39c5685c (patch) | |
| tree | 59d99f1d12fdce147ed14fa8823b5d2c1a0137e8 /xmake/rules/xcode/application/build.lua | |
| parent | 976084c2a96e63e481cf101ba2013130a6ff44b3 (diff) | |
improve xcode.xxx rules
Diffstat (limited to 'xmake/rules/xcode/application/build.lua')
| -rw-r--r-- | xmake/rules/xcode/application/build.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/rules/xcode/application/build.lua b/xmake/rules/xcode/application/build.lua index 3ff16dcb0..6c5b69e9d 100644 --- a/xmake/rules/xcode/application/build.lua +++ b/xmake/rules/xcode/application/build.lua @@ -29,6 +29,7 @@ function main (target, opt) -- get app and resources directory local bundledir = path.absolute(target:data("xcode.bundle.rootdir")) + local contentsdir = path.absolute(target:data("xcode.bundle.contentsdir")) local resourcesdir = path.absolute(target:data("xcode.bundle.resourcesdir")) -- need re-compile it? @@ -46,6 +47,13 @@ function main (target, opt) cprint("${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) end + -- copy target file + if is_plat("macosx") then + os.vcp(target:targetfile(), path.join(contentsdir, "MacOS", path.filename(target:targetfile()))) + else + os.vcp(target:targetfile(), path.join(contentsdir, path.filename(target:targetfile()))) + end + -- copy PkgInfo to the contents directory os.cp(path.join(os.programdir(), "scripts", "PkgInfo"), resourcesdir) |
