diff options
| author | ruki <[email protected]> | 2023-11-16 23:36:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-16 23:36:15 +0800 |
| commit | d0f5f984219c480112a941d9de520254a844757a (patch) | |
| tree | 00095948c674cd339c6b40cba691f9218d14b6f5 /xmake/plugins/pack/xpack.lua | |
| parent | 2013ee491dbc719aa674d4d8be5d40a2408b5213 (diff) | |
install winenv
Diffstat (limited to 'xmake/plugins/pack/xpack.lua')
| -rw-r--r-- | xmake/plugins/pack/xpack.lua | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/xmake/plugins/pack/xpack.lua b/xmake/plugins/pack/xpack.lua index 9e747cc0a..ce81cba8a 100644 --- a/xmake/plugins/pack/xpack.lua +++ b/xmake/plugins/pack/xpack.lua @@ -36,17 +36,24 @@ function xpack:name() return self._name end --- get value +-- get values function xpack:get(name) if self._info then return self._info:get(name) end end --- set value +-- set values function xpack:set(name, ...) if self._info then - self._info:set(name, ...) + self._info:apival_set(name, ...) + end +end + +-- add values +function xpack:add(name, ...) + if self._info then + self._info:apival_add(name, ...) end end @@ -167,6 +174,14 @@ function xpack:targets() return targets end +-- get the given target +function xpack:target(name) + local targetnames = self:get("targets") + if targetnames and table.contains(table.wrap(targetnames), name) then + return project.target(name) + end +end + -- get formats function xpack:formats() local formats = self._formats @@ -386,6 +401,9 @@ function xpack:_copiedfiles(filetype, outputdir) -- get the prefix directory local prefixdir = fileinfo.prefixdir + if fileinfo.rootdir then + rootdir = fileinfo.rootdir + end -- add the destinate copied files for _, srcpath in ipairs(srcpaths) do |
