summaryrefslogtreecommitdiff
path: root/tests/plugins/pack/console/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-26 23:23:41 +0800
committerruki <[email protected]>2025-11-26 23:23:41 +0800
commit00e764947542e1d05e167b5d5f81b80dd5f054df (patch)
treef63946b0f8aaefaa17f9d52579b7426c86138fe5 /tests/plugins/pack/console/xmake.lua
parent32717cd979bfd514f9ef1242efc80f91bd261da8 (diff)
improve appimage
Diffstat (limited to 'tests/plugins/pack/console/xmake.lua')
-rw-r--r--tests/plugins/pack/console/xmake.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/plugins/pack/console/xmake.lua b/tests/plugins/pack/console/xmake.lua
index 244bcaee6..6db4316c5 100644
--- a/tests/plugins/pack/console/xmake.lua
+++ b/tests/plugins/pack/console/xmake.lua
@@ -19,7 +19,7 @@ target("foo")
add_packages("zlib")
xpack("test")
- set_formats("nsis", "srpm", "rpm", "deb", "zip", "targz", "srczip", "srctargz", "runself", "wix", "dmg")
+ set_formats("nsis", "srpm", "rpm", "deb", "zip", "targz", "srczip", "srctargz", "runself", "wix", "dmg", "appimage")
set_title("hello")
set_author("ruki <[email protected]>")
set_description("A test installer.")
@@ -30,7 +30,6 @@ xpack("test")
add_installfiles("src/(assets/*.png)", {prefixdir = "images"})
add_sourcefiles("(src/**)")
add_sourcefiles("xmake.lua")
- set_iconfile("src/assets/xmake.ico")
add_components("LongPath")
on_load(function (package)
@@ -39,6 +38,13 @@ xpack("test")
else
package:set("basename", "test-$(plat)-$(arch)-v$(version)")
end
+ -- set icon file based on format (use PNG for appimage, ICO for other formats)
+ local scriptdir = os.scriptdir()
+ if package:format() == "appimage" then
+ package:set("iconfile", path.join(scriptdir, "src/assets/xmake.png"))
+ else
+ package:set("iconfile", path.join(scriptdir, "src/assets/xmake.ico"))
+ end
end)
after_installcmd(function (package, batchcmds)