diff options
| author | ruki <[email protected]> | 2023-11-15 22:37:29 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-15 22:37:29 +0800 |
| commit | f854dd708fe2352fa9dd4a18d30c35c64fc023ca (patch) | |
| tree | 45e9a50bf604970b5d0b6e2c67f37f51584e9516 | |
| parent | 19968411074632ef2b09f09f67345e06902cb395 (diff) | |
rename instdir
| -rw-r--r-- | xmake/plugins/pack/nsis/main.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xmake/plugins/pack/nsis/main.lua b/xmake/plugins/pack/nsis/main.lua index e90805185..b7de6265c 100644 --- a/xmake/plugins/pack/nsis/main.lua +++ b/xmake/plugins/pack/nsis/main.lua @@ -76,12 +76,12 @@ function _get_command_strings(package, cmd) end srcfile = path.normalize(srcfile) local dstname = path.filename(dstfile) - local dstdir = path.normalize(path.directory(path.join("$INSTDIR", dstfile))) + local dstdir = path.normalize(path.directory(path.join("$InstDir", dstfile))) table.insert(result, string.format("SetOutPath \"%s\"", dstdir)) table.insert(result, string.format("File /oname=%s \"%s\"", dstname, srcfile)) end elseif kind == "rm" then - local filepath = path.normalize(path.join("$INSTDIR", cmd.filepath)) + local filepath = path.normalize(path.join("$InstDir", cmd.filepath)) table.insert(result, string.format("Delete \"%s\"", filepath)) elseif kind == "tryrm" then --[[ @@ -91,7 +91,7 @@ function _get_command_strings(package, cmd) goto file_not_found_or_end file_not_found_or_end: --]] - local filepath = path.normalize(path.join("$INSTDIR", cmd.filepath)) + local filepath = path.normalize(path.join("$InstDir", cmd.filepath)) local tag = hash.uuid(filepath):split("-", {plain = true})[1]:lower() table.insert(result, string.format("IfFileExists \"%s\" file_found_%s file_not_found_or_end_%s", filepath, tag, tag)) table.insert(result, string.format("file_found_%s:", tag)) @@ -99,17 +99,17 @@ function _get_command_strings(package, cmd) table.insert(result, string.format(" goto file_not_found_or_end_%s", tag)) table.insert(result, string.format("file_not_found_or_end_%s:", tag)) elseif kind == "rmdir" then - local dir = path.normalize(path.join("$INSTDIR", cmd.dir)) + local dir = path.normalize(path.join("$InstDir", cmd.dir)) table.insert(result, string.format("RMDir /r \"%s\"", dir)) elseif kind == "mv" then - local srcpath = path.normalize(path.join("$INSTDIR", cmd.srcpath)) - local dstpath = path.normalize(path.join("$INSTDIR", cmd.dstpath)) + local srcpath = path.normalize(path.join("$InstDir", cmd.srcpath)) + local dstpath = path.normalize(path.join("$InstDir", cmd.dstpath)) table.insert(result, string.format("Rename \"%s\" \"%s\"", srcpath, dstpath)) elseif kind == "cd" then - local dir = path.normalize(path.join("$INSTDIR", cmd.dir)) + local dir = path.normalize(path.join("$InstDir", cmd.dir)) table.insert(result, string.format("SetOutPath \"%s\"", dir)) elseif kind == "mkdir" then - local dir = path.normalize(path.join("$INSTDIR", cmd.dir)) + local dir = path.normalize(path.join("$InstDir", cmd.dir)) table.insert(result, string.format("CreateDirectory \"%s\"", dir)) end return result |
