Skip to content

Commit dd53a1d

Browse files
committed
Merge branch 'lukas/gh/fix-wxwidgets-build-windows' into maint-29
2 parents 5cf5f97 + c63fd30 commit dd53a1d

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/reusable-build-windows.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
distribution: Ubuntu-18.04
5151

5252
- name: Install WSL dependencies
53-
run: apt update && apt install -y make autoconf unzip
53+
run: apt update && apt install -y g++-mingw-w64 gcc-mingw-w64 make autoconf unzip
5454

5555
- name: Install NSIS
5656
shell: cmd
@@ -63,11 +63,17 @@ jobs:
6363
choco install openssl --version=3.1.1
6464
IF EXIST "c:\\Program Files\\OpenSSL-Win64" (move "c:\\Program Files\\OpenSSL-Win64" "c:\\OpenSSL-Win64") ELSE (move "c:\\Program Files\\OpenSSL" "c:\\OpenSSL-Win64")
6565
66+
- name: Identify the runner image
67+
id: image
68+
env:
69+
WSLENV: GITHUB_OUTPUT/p:ImageOS
70+
run: echo "os=${ImageOS:-unknown}" >> "$GITHUB_OUTPUT"
71+
6672
- name: Cache wxWidgets
6773
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # ratchet:actions/cache@v5.0.3
6874
with:
6975
path: wxWidgets
70-
key: wxWidgets-${{ env.WXWIDGETS_VERSION }}-${{ runner.os }}
76+
key: wxWidgets-${{ env.WXWIDGETS_VERSION }}-${{ steps.image.outputs.os }}
7177

7278
# actions/cache on Windows sometimes does not set cache-hit even though there was one. Setting it manually.
7379
- name: Set wxWidgets cache
@@ -102,7 +108,11 @@ jobs:
102108
shell: cmd
103109
run: |
104110
cd wxWidgets\\build\\msw
105-
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\Auxiliary\\Build\\vcvars64.bat"
111+
SET VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
112+
FOR /F "delims=" %%P IN ('%VSWHERE% -latest -property installationPath') DO (
113+
SET "VCVARSALL=%%P\VC\Auxiliary\Build\vcvarsall.bat"
114+
)
115+
call "%VCVARSALL%" x64
106116
nmake TARGET_CPU=amd64 BUILD=release SHARED=0 DIR_SUFFIX_CPU= -f makefile.vc
107117
108118
- name: Download source archive
@@ -132,7 +142,6 @@ jobs:
132142
./otp_build boot -a
133143
./otp_build release -a
134144
cp /mnt/c/opt/local64/pgm/wxWidgets-${{ env.WXWIDGETS_VERSION }}/3rdparty/webview2/runtimes/win-x64/native/WebView2Loader.dll $ERL_TOP/release/win32/erts-*/bin/
135-
./otp_build debuginfo_win32
136145
./otp_build installer_win32
137146
138147
- name: Upload installer

0 commit comments

Comments
 (0)