diff options
| author | ruki <[email protected]> | 2025-04-24 22:40:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-24 10:24:45 +0800 |
| commit | d75240a009a7f295e31568c83fe9e93de1be431d (patch) | |
| tree | 06bf5f1da864c1f993c2f7926a507ff43221690d /xmake/plugins | |
| parent | 9a69d05a1087691899587da2aeb1c37cea54c354 (diff) | |
rename more buildir
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/pack/main.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/pack/nsis/main.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/pack/runself/main.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/pack/srpm/main.lua | 8 | ||||
| -rw-r--r-- | xmake/plugins/pack/wix/main.lua | 4 | ||||
| -rw-r--r-- | xmake/plugins/pack/xpack.lua | 12 |
6 files changed, 18 insertions, 12 deletions
diff --git a/xmake/plugins/pack/main.lua b/xmake/plugins/pack/main.lua index b108be790..dd599a61d 100644 --- a/xmake/plugins/pack/main.lua +++ b/xmake/plugins/pack/main.lua @@ -52,7 +52,7 @@ end function _load_package(package) -- ensure build and output directories - os.tryrm(package:buildir()) + os.tryrm(package:builddir()) os.mkdir(package:outputdir()) -- load it diff --git a/xmake/plugins/pack/nsis/main.lua b/xmake/plugins/pack/nsis/main.lua index 64c002042..d252d5e4f 100644 --- a/xmake/plugins/pack/nsis/main.lua +++ b/xmake/plugins/pack/nsis/main.lua @@ -254,7 +254,7 @@ end function _pack_nsis(makensis, package) -- install the initial specfile - local specfile = path.join(package:buildir(), package:basename() .. ".nsi") + local specfile = path.join(package:builddir(), package:basename() .. ".nsi") if not os.isfile(specfile) then local specfile_template = package:get("specfile") or path.join(os.programdir(), "scripts", "xpack", "nsis", "makensis.nsi") os.cp(specfile_template, specfile) diff --git a/xmake/plugins/pack/runself/main.lua b/xmake/plugins/pack/runself/main.lua index 91284edc0..47ab74eee 100644 --- a/xmake/plugins/pack/runself/main.lua +++ b/xmake/plugins/pack/runself/main.lua @@ -108,7 +108,7 @@ end function _pack_runself(makeself, package) -- install the initial specfile - local specfile = path.join(package:buildir(), package:basename() .. ".lsm") + local specfile = path.join(package:builddir(), package:basename() .. ".lsm") if not os.isfile(specfile) then local specfile_template = package:get("specfile") or path.join(os.programdir(), "scripts", "xpack", "runself", "makeself.lsm") os.cp(specfile_template, specfile, {writeable = true}) diff --git a/xmake/plugins/pack/srpm/main.lua b/xmake/plugins/pack/srpm/main.lua index 72b76563e..e8600427a 100644 --- a/xmake/plugins/pack/srpm/main.lua +++ b/xmake/plugins/pack/srpm/main.lua @@ -57,7 +57,7 @@ end -- get archive file function _get_archivefile(package) - return path.absolute(path.join(package:buildir(), package:basename() .. ".tar.gz")) + return path.absolute(path.join(package:builddir(), package:basename() .. ".tar.gz")) end -- translate the file path @@ -202,7 +202,7 @@ function _pack_srpm(rpmbuild, package) end -- install the initial specfile - local specfile = path.join(package:buildir(), package:basename() .. ".spec") + local specfile = path.join(package:builddir(), package:basename() .. ".spec") if not os.isfile(specfile) then local specfile_template = package:get("specfile") or path.join(os.programdir(), "scripts", "xpack", "srpm", "srpm.spec") os.cp(specfile_template, specfile, {writeable = true}) @@ -263,8 +263,8 @@ function _pack_srpm(rpmbuild, package) -- pack srpm package os.vrunv(rpmbuild, {"-bs", specfile, - "--define", "_topdir " .. package:buildir(), - "--define", "_sourcedir " .. package:buildir(), + "--define", "_topdir " .. package:builddir(), + "--define", "_sourcedir " .. package:builddir(), "--define", "_srcrpmdir " .. package:outputdir()}) -- pack rpm package diff --git a/xmake/plugins/pack/wix/main.lua b/xmake/plugins/pack/wix/main.lua index a99070def..5d04eb7f5 100644 --- a/xmake/plugins/pack/wix/main.lua +++ b/xmake/plugins/pack/wix/main.lua @@ -240,7 +240,7 @@ function _get_specvars(package) rtf_string = _to_rtf_string(io.readfile(licensefile)) end - local rtf_file = path.join(package:buildir(), "license.rtf") + local rtf_file = path.join(package:builddir(), "license.rtf") io.writefile(rtf_file, rtf_string) return rtf_file end @@ -258,7 +258,7 @@ end function _pack_wix(wix, package) -- install the initial specfile - local specfile = path.join(package:buildir(), package:basename() .. ".wxs") + local specfile = path.join(package:builddir(), package:basename() .. ".wxs") if not os.isfile(specfile) then local specfile_template = package:get("specfile") or path.join(os.programdir(), "scripts", "xpack", "wix", "msi.wxs") os.cp(specfile_template, specfile) diff --git a/xmake/plugins/pack/xpack.lua b/xmake/plugins/pack/xpack.lua index c166c78d8..780d6ca36 100644 --- a/xmake/plugins/pack/xpack.lua +++ b/xmake/plugins/pack/xpack.lua @@ -256,10 +256,16 @@ function xpack:with_binary() end -- get the build directory -function xpack:buildir() +function xpack:builddir() return path.join(config.builddir(), ".xpack", self:name()) end +-- get the build directory (deprecated) +function xpack:buildir() + wprint("xpack:buildir() has been deprecated, please use xpack:builddir()") + return self:builddir() +end + -- get the output directory function xpack:outputdir() local outputdir = option.get("outputdir") @@ -420,7 +426,7 @@ end -- get the installed root directory, this is just a temporary sandbox installation path, -- we may replace it with the actual installation path in the specfile function xpack:install_rootdir() - return path.join(self:buildir(), "installed", self:format()) + return path.join(self:builddir(), "installed", self:format()) end -- get the installed directory @@ -440,7 +446,7 @@ end -- get the source root directory function xpack:source_rootdir() - return path.join(self:buildir(), "source", self:format()) + return path.join(self:builddir(), "source", self:format()) end -- get the source directory |
