diff options
| author | ruki <[email protected]> | 2023-11-25 00:42:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-25 00:42:14 +0800 |
| commit | e393610e3f53aed9293882a668045fd67f1e1cd5 (patch) | |
| tree | 33c9e6391211f514d48c5cc29f4a234ef6f4a09c | |
| parent | e297fa3482ddfd802f949ea6d5a8bb79a2fbf167 (diff) | |
fix makeself
| -rw-r--r-- | core/xpack.lua | 4 | ||||
| -rw-r--r-- | xmake/plugins/pack/xpack.lua | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/core/xpack.lua b/core/xpack.lua index d0d139317..e789423c2 100644 --- a/core/xpack.lua +++ b/core/xpack.lua @@ -79,6 +79,7 @@ xpack_component("LongPath") xpack("xmakesrc") set_formats("srczip", "srctargz", "runself") set_basename("xmake-v$(version)") + set_prefixdir("xmake-$(version)") before_package(function (package) import("devel.git") @@ -95,8 +96,7 @@ xpack("xmakesrc") end end - local prefixdir = "xmake-" .. package:version() - local extraconf = {rootdir = rootdir, prefixdir = prefixdir} + local extraconf = {rootdir = rootdir} package:add("sourcefiles", path.join(rootdir, "core/**|src/pdcurses/**|src/luajit/**|src/tbox/tbox/src/demo/**"), extraconf) package:add("sourcefiles", path.join(rootdir, "xmake/**"), extraconf) package:add("sourcefiles", path.join(rootdir, "*.md"), extraconf) diff --git a/xmake/plugins/pack/xpack.lua b/xmake/plugins/pack/xpack.lua index 2a4780945..4bea5fb86 100644 --- a/xmake/plugins/pack/xpack.lua +++ b/xmake/plugins/pack/xpack.lua @@ -511,7 +511,7 @@ end -- get the installed directory function xpack:installdir(...) local installdir = self:install_rootdir() - local prefixdir = self:get("prefixdir") + local prefixdir = self:prefixdir() if prefixdir then installdir = path.join(installdir, prefixdir) end @@ -531,13 +531,22 @@ end -- get the source directory function xpack:sourcedir(...) local sourcedir = self:source_rootdir() - local prefixdir = self:get("prefixdir") + local prefixdir = self:prefixdir() if prefixdir then sourcedir = path.join(sourcedir, prefixdir) end return path.normalize(path.join(sourcedir, ...)) end +-- get the prefixdir +function xpack:prefixdir() + local prefixdir = self:get("prefixdir") + if prefixdir then + return filter.handle(prefixdir, self) + end + return prefixdir +end + -- get the binary directory function xpack:bindir() local bindir = self:get("bindir") |
