summaryrefslogtreecommitdiff
path: root/xmake/actions/require/impl/environment.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-14 22:23:24 +0800
committerruki <[email protected]>2018-12-14 08:20:29 +0800
commit1912316fee7a21c13842532d316e50a315ba6e9b (patch)
treee0bad8059b2bd5fa631a38c67ad1d23635c7aaa5 /xmake/actions/require/impl/environment.lua
parentb3fa23bff3a8a34e832a10ef714224d6e728ebd3 (diff)
add 7zip package
Diffstat (limited to 'xmake/actions/require/impl/environment.lua')
-rw-r--r--xmake/actions/require/impl/environment.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/actions/require/impl/environment.lua b/xmake/actions/require/impl/environment.lua
index 3025e0459..8375f05a6 100644
--- a/xmake/actions/require/impl/environment.lua
+++ b/xmake/actions/require/impl/environment.lua
@@ -40,11 +40,21 @@ function enter()
-- set search pathes of toolchains
environment.enter("toolchains")
+ -- unzip is necessary
+ if not find_tool("unzip") then
+ raise("unzip not found! we need install it first")
+ end
+
-- git not found? install it first
if not find_tool("git") then
package.install_packages("git")
end
+ -- missing the necessary unarchivers for *.gz, *.7z? install them first, e.g. gzip, 7z, tar ..
+ if not ((find_tool("gzip") and find_tool("tar")) or find_tool("7z")) then
+ package.install_packages("7z")
+ end
+
-- get prefix directories
local plat = get_config("plat")
local arch = get_config("arch")