mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Make build-scripts portable for GitHub Actions
This commit is contained in:
parent
30df7c886c
commit
ba17370ff5
@ -6,12 +6,15 @@ tool=$2
|
||||
|
||||
if [[ $tool == mingw ]]; then
|
||||
pacman -Sy --noconfirm make base-devel tar zip unzip
|
||||
if [ -d /c/msys64 ]; then
|
||||
PATH="/c/msys64/mingw$wordsize/bin:$PATH"
|
||||
else
|
||||
if [[ $wordsize == 64 ]]; then
|
||||
pacman -Sy --noconfirm mingw-w64-x86_64-toolchain
|
||||
PATH="/c/tools/msys64/mingw64/bin:$PATH"
|
||||
else
|
||||
pacman -Sy --noconfirm mingw-w64-i686-toolchain
|
||||
PATH="/c/tools/msys64/mingw32/bin:$PATH"
|
||||
fi
|
||||
PATH="/c/tools/msys64/mingw$wordsize/bin:$PATH"
|
||||
fi
|
||||
g++ -v
|
||||
elif [[ $tool == msvc ]]; then
|
||||
|
@ -1,5 +1,6 @@
|
||||
@echo on
|
||||
@rem Usage: build-windows {32|64} {msvc|mingw}
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
if %2 == msvc (
|
||||
if %1 == 64 (
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
@ -9,8 +10,11 @@ if %2 == msvc (
|
||||
choco install zip
|
||||
bash ./build-scripts/build-windows %1 %2
|
||||
) else (
|
||||
@rem The vs2017-win2016 pool has an ancient 64-bit-only mingw.
|
||||
@rem Install msys2 so we can get current gcc toolchains.
|
||||
if exist C:\msys64 (
|
||||
set MSYS=C:\msys64
|
||||
) else (
|
||||
choco install msys2
|
||||
C:\tools\msys64\usr\bin\env.exe MSYSTEM=MINGW64 /bin/bash -l %CD%/build-scripts/build-windows %1 %2
|
||||
set MSYS=C:\tools\msys64
|
||||
)
|
||||
!MSYS!\usr\bin\env.exe MSYSTEM=MINGW64 /bin/bash -l %CD%/build-scripts/build-windows %1 %2
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user