Skip to content

Commit

Permalink
Merge pull request #5876 from jinke18/dev-1123-2
Browse files Browse the repository at this point in the history
add symlink support for installfiles when using xpack
  • Loading branch information
waruqi authored Nov 23, 2024
2 parents 8913dcb + a14bc8f commit 63c60de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xmake/plugins/pack/batchcmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ function _install_target_files(target, batchcmds_, opt)
local srcfiles, dstfiles = target:installfiles(_get_target_installdir(package, target))
if srcfiles and dstfiles then
for idx, srcfile in ipairs(srcfiles) do
batchcmds_:cp(srcfile, dstfiles[idx])
batchcmds_:cp(srcfile, dstfiles[idx], {symlink = true})
end
end
for _, dep in ipairs(target:orderdeps()) do
local srcfiles, dstfiles = dep:installfiles(_get_target_installdir(package, dep), {interface = true})
if srcfiles and dstfiles then
for idx, srcfile in ipairs(srcfiles) do
batchcmds_:cp(srcfile, dstfiles[idx])
batchcmds_:cp(srcfile, dstfiles[idx], {symlink = true})
end
end
end
Expand Down Expand Up @@ -564,7 +564,7 @@ end
function _on_installcmd(package, batchcmds_)
local srcfiles, dstfiles = package:installfiles()
for idx, srcfile in ipairs(srcfiles) do
batchcmds_:cp(srcfile, dstfiles[idx])
batchcmds_:cp(srcfile, dstfiles[idx], {symlink = true})
end
for _, target in ipairs(package:targets()) do
_get_target_installcmds(target, batchcmds_, {package = package})
Expand Down

0 comments on commit 63c60de

Please sign in to comment.