diff options
Diffstat (limited to 'xmake/rules/xcode/application/installcmd.lua')
| -rw-r--r-- | xmake/rules/xcode/application/installcmd.lua | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/xmake/rules/xcode/application/installcmd.lua b/xmake/rules/xcode/application/installcmd.lua index 39d64ab1c..c08a0fede 100644 --- a/xmake/rules/xcode/application/installcmd.lua +++ b/xmake/rules/xcode/application/installcmd.lua @@ -22,11 +22,16 @@ function main(target, batchcmds, opt) local package = opt.package - -- only for macosx when packing dmg + -- only for macosx when packing if not target:is_plat("macosx") then return end + -- only for xpack (package exists) + if not package then + return + end + -- get app directory local appdir = target:data("xcode.bundle.rootdir") if not appdir or not os.isdir(appdir) then @@ -44,5 +49,22 @@ function main(target, batchcmds, opt) local appname = path.filename(appdir) local dstappdir = path.join(installdir, appname) batchcmds:cp(appdir, dstappdir, {symlink = true}) + + -- install target files (skip binary installation) + local srcfiles, dstfiles = target:installfiles(installdir) + if srcfiles and dstfiles then + for idx, srcfile in ipairs(srcfiles) do + batchcmds:cp(srcfile, dstfiles[idx], {symlink = true}) + end + end + -- install dependent target files + for _, dep in ipairs(target:orderdeps()) do + local srcfiles, dstfiles = dep:installfiles(installdir, {interface = true}) + if srcfiles and dstfiles then + for idx, srcfile in ipairs(srcfiles) do + batchcmds:cp(srcfile, dstfiles[idx], {symlink = true}) + end + end + end end |
