diff options
| -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 |
