forked from wine-mirror/wine
-
Notifications
You must be signed in to change notification settings - Fork 0
203 lines (168 loc) · 6.21 KB
/
build.yml
File metadata and controls
203 lines (168 loc) · 6.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
name: Build Mythic Engine (wine-crossover 9.0)
on:
push:
pull_request:
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk
TOOLCHAINS: com.applex.dt.toolchain.Xcode13 # from gcenx
PATH: /usr/local/bin:/usr/local/opt/bison/bin:/usr/bin:/bin:/usr/sbin:/sbin
CPATH: /usr/local/include
LIBRARY_PATH: /usr/local/lib
# mingw-w64 cross-compilers
i386_CC: i686-w64-mingw32-gcc
x86_64_CC: x86_64-w64-mingw32-gcc
i386_LD: i686-w64-mingw32-ld
x86_64_LD: x86_64-w64-mingw32-ld
# compiler and linker flags
CFLAGS: -O2 -Wno-deprecated-declarations -Wno-unguarded-availability
CXXFLAGS: -O2 -Wno-deprecated-declarations -Wno-unguarded-availability
CROSSCFLAGS: -O2 -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -Wno-deprecated-declarations
CPPFLAGS: -I/usr/local/opt/libpcap/include
LDFLAGS: -Wl,-headerpad_max_install_names -Wl,-rpath,@loader_path/../../ -Wl,-rpath,@loader_path/../../external -Wl,-rpath,/usr/local/lib -L/usr/local/opt/libpcap/lib
PKG_CONFIG_PATH: /usr/local/opt/libpcap/lib/pkgconfig
# wine configure overrides
ac_cv_lib_soname_MoltenVK: libMoltenVK.dylib
ac_cv_lib_soname_vulkan: ""
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v5
with:
path: src
- name: download & add Xcode 13 toolchain
run: |
sudo mkdir -p /Library/Developer/Toolchains
curl -fL https://dl.getmythic.app/engine/toolchains/Xcode13.xctoolchain.tar.xz \
| sudo tar -xJ -C /Library/Developer/Toolchains
- name: download & add macOS 12.3 SDK
run: |
sudo mkdir -p /Library/Developer/CommandLineTools/SDKs
curl -fL https://github.com/Gcenx/macos-sdk/releases/download/12.3/MacOSX12.3.tar.bz2 \
| sudo tar -xj -C /Library/Developer/CommandLineTools/SDKs
# ensure that when updating dependencies, the dylib bundler script is also updated
- name: install build & runtime dependencies
run: |
brew install bison \
freetype \
pkg-config \
gettext \
gnutls \
gstreamer \
gst-plugins-base \
gst-plugins-good \
jpeg \
libpng \
libtiff \
libffi \
libpcap \
sdl2 \
molten-vk \
winetricks
# install mingw-w64 v12.0.0_1 from local formula w/ tap
# required, this version requires binutils 2.43.1 or older
brew tap-new local/mingw-w64
cp src/external/dependencies/mingw-w64.rb \
"$(brew --repo local/mingw-w64)/Formula/mingw-w64.rb"
brew install local/mingw-w64/mingw-w64
- name: create build directory
run: mkdir build
- name: configure wine
working-directory: build
run: |
../src/configure \
--prefix= \
--disable-tests \
--enable-archs=i386,x86_64 \
--with-mingw \
--without-alsa \
--without-capi \
--with-coreaudio \
--with-cups \
--without-dbus \
--without-fontconfig \
--with-freetype \
--with-gettext \
--without-gettextpo \
--without-gphoto \
--with-gnutls \
--without-gssapi \
--with-gstreamer \
--without-krb5 \
--without-netapi \
--with-opencl \
--with-opengl \
--without-oss \
--with-pcap \
--with-pthread \
--without-pulse \
--without-sane \
--with-sdl \
--without-udev \
--with-unwind \
--without-usb \
--without-v4l2 \
--with-vulkan \
--without-x
- name: build wine
working-directory: build
run: make -j$(sysctl -n hw.ncpu)
- name: create install directory
run: mkdir install
- name: install wine
working-directory: build
run: make install-lib DESTDIR=${{ github.workspace }}/install
- name: add wine64 as an executable wrapper for backward compatibility
working-directory: install/bin
run: |
cat > wine64 << 'EOF'
#!/usr/bin/env bash
# this is a wrapper created for Mythic to forward `wine64` calls to `wine`.
# for older versions of Mythic, which expected a wine64 binary to be present.
set -e
DIR="$(cd "$(dirname "$0")" && pwd)"
exec "$DIR/wine" "$@"
EOF
chmod +x wine64
- name: install wine mono
working-directory: install/share/wine
run: |
mkdir -p mono
curl -fL https://github.com/wine-mono/wine-mono/releases/download/wine-mono-8.1.0/wine-mono-8.1.0-x86.tar.xz \
| tar -xJ -C mono
- name: install wine gecko
working-directory: install/share/wine
run: |
mkdir -p gecko
curl -fL https://dl.winehq.org/wine/wine-gecko/2.47.4/wine-gecko-2.47.4-x86.tar.xz \
| tar -xJ -C gecko
- name: create Engine directory
run: mkdir Engine
- name: copy build artifacts
run: |
mkdir -p Engine/wine
ditto --rsrc install Engine/wine
- name: copy externals
run: |
# copy dxvk binaries
mkdir -p Engine/dxvk
ditto src/external/dxvk-* Engine/dxvk/
# copy gptk libraries
ditto src/external/gptk-*/redist/lib/ Engine/wine/lib/
- name: bundle dylib dependencies
run: |
chmod +x src/.github/dylib_bundler.zsh
ENGINE_DIR=Engine/wine src/.github/dylib_bundler.zsh
- name: copy engine properties file
run: cp -R src/Mythic/Properties.plist Engine/
- name: compress engine artifact
run: tar -cf Engine.tar.xz -C Engine --use-compress-program="xz -9 -T0" .
- name: upload engine artifact
uses: actions/upload-artifact@v5
with:
name: Engine
path: Engine.tar.xz