diff options
Diffstat (limited to 'tests/plugins/pack/xmake.lua')
| -rw-r--r-- | tests/plugins/pack/xmake.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/plugins/pack/xmake.lua b/tests/plugins/pack/xmake.lua index 5b34dec36..e8d2cdd53 100644 --- a/tests/plugins/pack/xmake.lua +++ b/tests/plugins/pack/xmake.lua @@ -19,17 +19,25 @@ target("foo") add_packages("zlib") xpack("test") - set_formats("nsis", "zip", "targz", "runself") + set_formats("nsis", "zip", "targz", "srczip", "srctargz", "runself") set_title("hello") set_description("A test installer.") set_homepage("https://xmake.io") set_licensefile("LICENSE.md") add_targets("test", "foo") - set_basename("test-$(plat)-$(arch)-v$(version)") add_installfiles("src/(assets/*.png)", {prefixdir = "images"}) + add_sourcefiles("(src/**)") set_iconfile("src/assets/xmake.ico") add_components("LongPath") + on_load(function (package) + if package:from_source() then + package:set("basename", "test-$(plat)-src-v$(version)") + else + package:set("basename", "test-$(plat)-$(arch)-v$(version)") + end + end) + after_installcmd(function (package, batchcmds) batchcmds:mkdir(package:installdir("resources")) batchcmds:cp("src/assets/*.txt", package:installdir("resources"), {rootdir = "src"}) |
