summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-03 22:52:29 +0800
committerruki <[email protected]>2026-03-03 22:52:29 +0800
commitf144e8a5a391fcb8f457576665c57dce5acd720f (patch)
tree75c4f63ee3215f225bbef7f4f3846712d5cda737
parent78ee1e41654471d13288d56747276a2c8379cf67 (diff)
use 7z to archive .xz
-rw-r--r--xmake/modules/utils/archive/archive.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/modules/utils/archive/archive.lua b/xmake/modules/utils/archive/archive.lua
index 96d369012..cd33d34b7 100644
--- a/xmake/modules/utils/archive/archive.lua
+++ b/xmake/modules/utils/archive/archive.lua
@@ -99,6 +99,9 @@ function _archive_using_7z(archivefile, inputfiles, extension, opt)
if extension == ".tar" then
table.insert(argv, "-ttar")
end
+ if extension == ".xz" then
+ table.insert(argv, "-txz")
+ end
table.insert(argv, archivefile)
table.insert(argv, "-y")
local excludesfile
@@ -359,7 +362,7 @@ end
-- only archive tar file
function _archive_tarfile(archivefile, tarfile, opt)
local archivers = {
- [".xz"] = {_archive_using_xz}
+ [".xz"] = {_archive_using_xz, _archive_using_7z}
, [".gz"] = {_archive_using_gzip, _archive_using_7z}
}
local extension = opt.extension or path.extension(archivefile)
@@ -383,7 +386,7 @@ function main(archivefile, inputfiles, opt)
local archivers = {
[".zip"] = {_archive_using_zip, _archive_using_7z}
, [".7z"] = {_archive_using_7z}
- , [".xz"] = {_archive_using_xz}
+ , [".xz"] = {_archive_using_xz, _archive_using_7z}
, [".gz"] = {_archive_using_gzip, _archive_using_7z}
, [".tar"] = {_archive_using_tar, _archive_using_7z}
, [".tar.gz"] = {_archive_using_tar}