diff options
author | RJ Ryan <rryan@mixxx.org> | 2018-10-11 17:48:23 -0700 |
---|---|---|
committer | RJ Ryan <rryan@mixxx.org> | 2018-10-11 17:48:23 -0700 |
commit | be86a2efeeafd9ab72707df11633465342b06329 (patch) | |
tree | a55bd7bb575c2e2883bcd73f44b161a378bdb786 /build/windows | |
parent | 4881c70f8fe532c679fe28ede0c4f08099f653d4 (diff) |
install_buildenv.bat: Detect 7z or 7za on the PATH.
Diffstat (limited to 'build/windows')
-rw-r--r-- | build/windows/install_buildenv.bat | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/build/windows/install_buildenv.bat b/build/windows/install_buildenv.bat index 4e0e6f0f5b..f15f36f1ec 100644 --- a/build/windows/install_buildenv.bat +++ b/build/windows/install_buildenv.bat @@ -13,6 +13,19 @@ SET WINLIBS_PATH=%3 REM Install build env base dir IF NOT EXIST "%WINLIBS_PATH%" MKDIR "%WINLIBS_PATH%" +where /q 7za +IF ERRORLEVEL 1 ( + where /q 7z + if ERRORLEVEL 1 ( + echo Could not find 7z or 7za on the path. + exit /b + ) else ( + set ZIP=7z + ) +) else ( + set ZIP=7za +) + IF NOT EXIST "%WINLIBS_PATH%\%WINLIB_NAME%" ( echo Installing winlib %WINLIB_NAME%. CD "%WINLIBS_PATH%" @@ -20,7 +33,7 @@ IF NOT EXIST "%WINLIBS_PATH%\%WINLIB_NAME%" ( curl -fsS -L -o %WINLIB_NAME%.zip %BASEURL%/%WINLIB_NAME%.zip REM TODO(XXX) check fingerprint on zip file. echo ..unzipping %WINLIB_NAME%.zip - 7z x %WINLIB_NAME%.zip + %ZIP% x %WINLIB_NAME%.zip DEL %WINLIB_NAME%.zip ) else ( echo %WINLIB_NAME% already exists at %WINLIBS_PATH% |