44
44
env :
45
45
TARGET_TRIPLE : x86_64-apple-darwin
46
46
# cross-compile from Linux to Windows using mingw
47
- # FIXME The wine version in Ubuntu 22.04 is missing ProcessPrng
48
- # - os: ubuntu-latest
49
- # env:
50
- # TARGET_TRIPLE: x86_64-pc-windows-gnu
47
+ - os : ubuntu-latest
48
+ env :
49
+ TARGET_TRIPLE : x86_64-pc-windows-gnu
51
50
- os : ubuntu-latest
52
51
env :
53
52
TARGET_TRIPLE : aarch64-unknown-linux-gnu
@@ -81,11 +80,11 @@ jobs:
81
80
if : matrix.os == 'windows-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
82
81
run : rustup set default-host x86_64-pc-windows-gnu
83
82
84
- # - name: Install MinGW toolchain and wine
85
- # if: matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
86
- # run: |
87
- # sudo apt-get update
88
- # sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
83
+ - name : Install MinGW toolchain and wine
84
+ if : matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
85
+ run : |
86
+ sudo apt-get update
87
+ sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
89
88
90
89
- name : Install AArch64 toolchain and qemu
91
90
if : matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'aarch64-unknown-linux-gnu'
@@ -108,6 +107,15 @@ jobs:
108
107
- name : Prepare dependencies
109
108
run : ./y.sh prepare
110
109
110
+ # The Wine version shipped with Ubuntu 22.04 doesn't implement bcryptprimitives.dll
111
+ - name : Build bcryptprimitives.dll shim for Wine
112
+ if : matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
113
+ run : |
114
+ rustup target add x86_64-pc-windows-gnu
115
+ mkdir wine_shims
116
+ rustc patches/bcryptprimitives.rs -Copt-level=3 -Clto=fat --out-dir wine_shims --target x86_64-pc-windows-gnu
117
+ echo "WINEPATH=$(pwd)/wine_shims" >> $GITHUB_ENV
118
+
111
119
- name : Build
112
120
run : ./y.sh build --sysroot none
113
121
@@ -234,11 +242,11 @@ jobs:
234
242
if : matrix.os == 'windows-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
235
243
run : rustup set default-host x86_64-pc-windows-gnu
236
244
237
- - name : Install MinGW toolchain and wine
245
+ - name : Install MinGW toolchain
238
246
if : matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
239
247
run : |
240
248
sudo apt-get update
241
- sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
249
+ sudo apt-get install -y gcc-mingw-w64-x86-64
242
250
243
251
- name : Prepare dependencies
244
252
run : ./y.sh prepare
0 commit comments