summaryrefslogtreecommitdiff
path: root/xmake/plugins/pack/xpack_component.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-07-02 23:37:37 +0800
committerruki <[email protected]>2026-07-02 23:37:37 +0800
commit88b7498887609aa7808f68aff73c2af81918e07a (patch)
tree62b48e50438e54a74893b746213a5c307dd9c6af /xmake/plugins/pack/xpack_component.lua
parent57486069377ec952ab1e5e3288fa3d4d93d2131b (diff)
add filter support for xpackxpack
Diffstat (limited to 'xmake/plugins/pack/xpack_component.lua')
-rw-r--r--xmake/plugins/pack/xpack_component.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/plugins/pack/xpack_component.lua b/xmake/plugins/pack/xpack_component.lua
index fa12a1646..fb219cf55 100644
--- a/xmake/plugins/pack/xpack_component.lua
+++ b/xmake/plugins/pack/xpack_component.lua
@@ -25,6 +25,7 @@ import("core.project.config")
import("core.project.project")
import("private.core.base.select_script")
import("private.core.base.match_copyfiles")
+import("filter")
-- define module
local xpack_component = xpack_component or object {_init = {"_name", "_info", "_package"}}
@@ -115,7 +116,9 @@ end
-- get the install files
function xpack_component:installfiles()
- return match_copyfiles(self, "installfiles", self:package():installdir())
+ return match_copyfiles(self, "installfiles", self:package():installdir(), {filter = function (value)
+ return filter.handle(value, self:package())
+ end})
end
-- get the installed root directory, this is just a temporary sandbox installation path,
@@ -131,7 +134,9 @@ end
-- get the source files
function xpack_component:sourcefiles()
- return match_copyfiles(self, "sourcefiles", self:package():sourcedir())
+ return match_copyfiles(self, "sourcefiles", self:package():sourcedir(), {filter = function (value)
+ return filter.handle(value, self:package())
+ end})
end
-- get the source root directory