diff options
| author | ruki <[email protected]> | 2023-11-14 22:54:40 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-14 22:54:40 +0800 |
| commit | a6712c961f931d3691e8ef3cf51ff3979610fec9 (patch) | |
| tree | ce44a62f2498fd16a5d8ac0d9aa069274456218d | |
| parent | a9594182fa76a1627f737c1882b961c9050b88ec (diff) | |
fix workdir for nsis
| -rw-r--r-- | xmake/plugins/pack/nsis/main.lua | 3 | ||||
| -rw-r--r-- | xmake/scripts/xpack/nsis/makensis.nsi | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/xmake/plugins/pack/nsis/main.lua b/xmake/plugins/pack/nsis/main.lua index 30f2a0f0e..fc032efca 100644 --- a/xmake/plugins/pack/nsis/main.lua +++ b/xmake/plugins/pack/nsis/main.lua @@ -61,7 +61,7 @@ function _get_command_strings(package, cmd) -- https://nsis.sourceforge.io/Reference/File local srcfiles = os.files(cmd.srcpath) for _, srcfile in ipairs(srcfiles) do - -- table.insert(result, string.format("File /oname=%s %s", cmd.dstpath, srcfile)) + table.insert(result, string.format("File /oname=%s %s", cmd.dstpath, srcfile)) end elseif kind == "rm" then -- TODO @@ -121,6 +121,7 @@ end -- get specvars function _get_specvars(package) local specvars = table.clone(package:specvars()) + specvars.PACKAGE_WORKDIR = path.absolute(os.projectdir()):gsub("\\", "/") specvars.PACKAGE_OUTPUTFILE = path.absolute(package:outputfile()):gsub("\\", "/") specvars.PACKAGE_INSTALLCMDS = function () return _get_installcmds(package) diff --git a/xmake/scripts/xpack/nsis/makensis.nsi b/xmake/scripts/xpack/nsis/makensis.nsi index 7bda3ed81..ecb1748d1 100644 --- a/xmake/scripts/xpack/nsis/makensis.nsi +++ b/xmake/scripts/xpack/nsis/makensis.nsi @@ -23,6 +23,9 @@ Name "${PACKAGE_NAME} - v${VERSION}" ; set the output file path OutFile "${PACKAGE_OUTPUTFILE}" +; set the working directory +!cd "${PACKAGE_WORKDIR}" + ; use unicode Unicode true |
