From b323e9cf2f9bb6d4f55072e2b1ebc87f621f5113 Mon Sep 17 00:00:00 2001 From: oddMLan Date: Sun, 29 Sep 2019 19:14:53 -0700 Subject: [PATCH] [build] Try to find 7z.exe on PATH first This ensures compatibility with AppVeyor without breaking the Jenkins buildbot --- Source/Script/package_zip.cmd | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/Script/package_zip.cmd b/Source/Script/package_zip.cmd index 759f11e48..780342059 100644 --- a/Source/Script/package_zip.cmd +++ b/Source/Script/package_zip.cmd @@ -1,12 +1,15 @@ @ECHO OFF SETLOCAL -if exist "C:\Program Files\7-Zip\7z.exe" ( set zip="C:\Program Files\7-Zip\7z.exe") +for /f "delims=" %%a in ('WHERE 7z 2^>nul') do set "zip=%%a" - -if %zip% == "" ( - echo can not find 7z.exe - goto :EndErr +if "%zip%" == "" ( + if exist "C:\Program Files\7-Zip\7z.exe" ( + set "zip=C:\Program Files\7-Zip\7z.exe" + ) else ( + echo can not find 7z.exe + goto :EndErr + ) ) set ZipFileName=project64 @@ -49,7 +52,7 @@ copy "%base_dir%\Plugin\Input\PJ64_NRage.dll" "%base_dir%\Bin\Package\Plugin\Inp copy "%base_dir%\Plugin\RSP\RSP 1.7.dll" "%base_dir%\Bin\Package\Plugin\RSP" cd %base_dir%\Bin\Package -%zip% a -tzip -r "%base_dir%\Package\%ZipFileName%" * +"%zip%" a -tzip -r "%base_dir%\Package\%ZipFileName%" * cd /d %current_dir% echo Package %ZipFileName% created