diff --git a/.github/workflows/build_win.yml b/.github/workflows/build_win.yml index 7880296a2a..2e27938bf4 100644 --- a/.github/workflows/build_win.yml +++ b/.github/workflows/build_win.yml @@ -48,7 +48,11 @@ jobs: run: | cd ${{ matrix.deps_dir }} Get-ChildItem -Path . -Filter 'cache-*.zip' | ForEach-Object { - 7z x $_.FullName + Write-Host "Extracting $($_.Name)" + 7z x -bso0 -bsp0 $_.FullName + if ($LASTEXITCODE -ne 0) { + throw "Failed to extract $($_.Name) with 7z exit code $LASTEXITCODE." + } } - name: ccache diff --git a/win/build-deps.cmd b/win/build-deps.cmd index 55f109ff56..66378c06da 100644 --- a/win/build-deps.cmd +++ b/win/build-deps.cmd @@ -105,7 +105,7 @@ set MSBUILD_CMD=MSBuild.exe /nologo %MSBUILD_MULTIPROC% echo. :: Check that required tools are in PATH -FOR %%i IN (powershell git cmake) DO ( +FOR %%i IN (powershell git cmake 7z) DO ( where.exe %%i 1> NUL 2> NUL || call cecho.cmd 0 12 "Required tool `'%%i`' not installed or not added to PATH" && goto :ErrorAndPrintUsage ) @@ -1066,12 +1066,14 @@ echo 1. Install PowerShell (preinstalled in Windows ^>= 7) version 5 or higher echo - https://support.microsoft.com/en-us/kb/968929 echo 2. Install Git and make sure 'git' is accessible from PATH. echo - https://git-for-windows.github.io/ -echo 3. Install CMake and make sure 'cmake' is accessible from PATH. -echo - http://www.cmake.org/ -echo 4. Visual Studio 2013 or newer with C++ toolset. -echo - https://www.visualstudio.com/ -echo 5. Run this batch script with Visual Studio environment variables set. -echo - https://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx +echo 3. Install CMake and make sure 'cmake' is accessible from PATH. +echo - http://www.cmake.org/ +echo 4. Install 7-Zip and make sure '7z' is accessible from PATH. +echo - https://www.7-zip.org/ +echo 5. Visual Studio 2013 or newer with C++ toolset. +echo - https://www.visualstudio.com/ +echo 6. Run this batch script with Visual Studio environment variables set. +echo - https://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx echo. echo NB: This script needs to be ran from the directory directly containing it. echo. diff --git a/win/utils/license.txt b/win/utils/license.txt deleted file mode 100644 index 530ff3684d..0000000000 --- a/win/utils/license.txt +++ /dev/null @@ -1,29 +0,0 @@ - 7-Zip Command line version - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - License for use and distribution - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - 7-Zip Copyright (C) 1999-2010 Igor Pavlov. - - 7za.exe is distributed under the GNU LGPL license - - Notes: - You can use 7-Zip on any computer, including a computer in a commercial - organization. You don't need to register or pay for 7-Zip. - - - GNU LGPL information - -------------------- - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You can receive a copy of the GNU Lesser General Public License from - http://www.gnu.org/ diff --git a/win/utils/tools.ps1 b/win/utils/tools.ps1 index ad7f04de5d..d6dca85d3f 100644 --- a/win/utils/tools.ps1 +++ b/win/utils/tools.ps1 @@ -141,7 +141,10 @@ function extract_file { return } . $cecho 0 13 "Extracting $dependency_name into '$destination_dir' from '$filename'." - 7za x "$filename" -o"$destination_dir" + 7z x -bso0 -bsp0 "$filename" -o"$destination_dir" + if ($LASTEXITCODE -ne 0) { + throw "Failed to extract '$filename' for '$dependency_name' with 7z exit code $LASTEXITCODE." + } }