From 6a3e7b08da3e333b0a63b4230f5dbf79df684728 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 14 Nov 2023 00:57:41 +0800 Subject: fix unknown vars --- tests/plugins/pack/assets/file1.txt | 0 tests/plugins/pack/assets/file2.txt | 0 tests/plugins/pack/assets/img1.png | 0 tests/plugins/pack/assets/img2.png | 0 tests/plugins/pack/xmake.lua | 11 +++++++++-- 5 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 tests/plugins/pack/assets/file1.txt create mode 100644 tests/plugins/pack/assets/file2.txt create mode 100644 tests/plugins/pack/assets/img1.png create mode 100644 tests/plugins/pack/assets/img2.png (limited to 'tests/plugins') diff --git a/tests/plugins/pack/assets/file1.txt b/tests/plugins/pack/assets/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/plugins/pack/assets/file2.txt b/tests/plugins/pack/assets/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/plugins/pack/assets/img1.png b/tests/plugins/pack/assets/img1.png new file mode 100644 index 000000000..e69de29bb diff --git a/tests/plugins/pack/assets/img2.png b/tests/plugins/pack/assets/img2.png new file mode 100644 index 000000000..e69de29bb diff --git a/tests/plugins/pack/xmake.lua b/tests/plugins/pack/xmake.lua index 7ae6a6cfc..a19dcd021 100644 --- a/tests/plugins/pack/xmake.lua +++ b/tests/plugins/pack/xmake.lua @@ -11,7 +11,14 @@ xpack("test") set_formats("nsis") set_description("hello") add_targets("test") - - on_installcmd(function (package) + add_installfiles("assets/*.png") + set_installdir("assets") + on_installcmd(function (package, batchcmds) + batchcmds:cp("assets/*.txt", "assets") + batchcmds:mkdir("stub") + end) + on_uninstallcmd(function (package, batchcmds) + batchcmds:rm("assets") + batchcmds:rm("stub") end) -- cgit v1.3.1