summaryrefslogtreecommitdiff
path: root/tests/plugins/pack/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-24 22:34:15 +0800
committerruki <[email protected]>2023-11-24 22:34:15 +0800
commitafbbacc9085b29e39cc13e00d5673202a70f7645 (patch)
tree6c5bbad30be4b526500989de84c617f0a0af1f40 /tests/plugins/pack/xmake.lua
parent9217b528138fe4384403c0b573e8617bdcc18358 (diff)
add sourcefiles for xpack
Diffstat (limited to 'tests/plugins/pack/xmake.lua')
-rw-r--r--tests/plugins/pack/xmake.lua12
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"})