@@ -27,8 +27,15 @@ import("detect.tools.find_tar")
27
27
import (" detect.tools.find_gzip" )
28
28
import (" detect.tools.find_unzip" )
29
29
import (" detect.tools.find_bzip2" )
30
+ import (" extract_xmz" )
30
31
import (" extension" , {alias = " get_archive_extension" })
31
32
33
+ -- extract archivefile using xmake decompress module
34
+ function _extract_using_xmz (archivefile , outputdir , extension , opt )
35
+ extract_xmz (archivefile , outputdir , opt )
36
+ return true
37
+ end
38
+
32
39
-- extract archivefile using tar
33
40
function _extract_using_tar (archivefile , outputdir , extension , opt )
34
41
@@ -394,7 +401,7 @@ function _extract(archivefile, outputdir, extension, extractors, opt)
394
401
raise (" cannot extract %s, %s!" , path .filename (archivefile ), errors or " extractors not found!" )
395
402
end
396
403
397
- -- extract archive file
404
+ -- extract file
398
405
--
399
406
-- @param archivefile the archive file. e.g. *.tar.gz, *.zip, *.7z, *.tar.bz2, ..
400
407
-- @param outputdir the output directory
@@ -423,6 +430,7 @@ function main(archivefile, outputdir, opt)
423
430
, [" .tar.bz2" ] = {_extract_using_7z , _extract_using_bzip2 }
424
431
, [" .tar.lz" ] = {_extract_using_7z }
425
432
, [" .tar.Z" ] = {_extract_using_7z }
433
+ , [" .xmz" ] = {_extract_using_xmz }
426
434
}
427
435
else
428
436
extractors =
@@ -440,6 +448,7 @@ function main(archivefile, outputdir, opt)
440
448
, [" .tar.bz2" ] = {_extract_using_tar , _extract_using_7z , _extract_using_bzip2 }
441
449
, [" .tar.lz" ] = {_extract_using_tar , _extract_using_7z }
442
450
, [" .tar.Z" ] = {_extract_using_tar , _extract_using_7z }
451
+ , [" .xmz" ] = {_extract_using_xmz }
443
452
}
444
453
end
445
454
0 commit comments