forked from wine-mirror/wine
-
Notifications
You must be signed in to change notification settings - Fork 14
168 lines (143 loc) · 5.28 KB
/
build.yml
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
name: Build Wine
on:
push:
branches:
- '7.7'
workflow_dispatch:
jobs:
build:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Install Homebrew Packages
run: |
REQUIRED_PACKAGES=(
# Build Dependencies
"bison"
"pkg-config"
"mingw-w64"
# Utilities (DXVK)
"jq"
# Dependencies
"freetype"
"gettext"
"gnutls"
"gstreamer"
"sdl2"
"molten-vk"
)
brew tap gcenx/wine
brew install "${REQUIRED_PACKAGES[@]}"
- name: Link bison
run: |
export PATH="/usr/local/opt/bison/bin:$PATH"
- name: Build Environment Varrables
run: |
HOMEBREW_PATH=$(brew --prefix)
PACKAGES=(
"freetype"
"gettext"
"gnutls"
"gstreamer"
"sdl2"
"molten-vk"
)
LDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS"
# Create environment
for PACKAGE in ${PACKAGES[@]}; do
LDFLAGS="-L$HOMEBREW_PATH/opt/$PACKAGE/lib $LDFLAGS"
CFLAGS="-I$HOMEBREW_PATH/opt/$PACKAGE/include $CPPFLAGS"
done
# Additional flags
LDFLAGS="-Wl,-rpath,$HOMEBREW_PATH/lib $LDFLAGS"
LDFLAGS="-Wl,-rpath,@executable_path/../lib/external $LDFLAGS"
CFLAGS="-O3 -Wno-deprecated-declarations -Wno-incompatible-pointer-types $CFLAGS"
# Return the environment
echo "LDFLAGS=\"$LDFLAGS\"" >> $GITHUB_ENV
echo "CPPFLAGS=\"$CPPFLAGS\"" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=10.14" >> $GITHUB_ENV
- name: Create the Build Directory
run: |
BUILD_DIR=$(mktemp -d)
WINE_FINAL_DIR="$GITHUB_WORKSPACE/wine"
WINE64_BUILD_DIR="$GITHUB_WORKSPACE/wine64"
DXVK_BUILD_DIR="$GITHUB_WORKSPACE/dxvk"
FINAL_DIR="$GITHUB_WORKSPACE/Libraries"
mkdir -p $WINE_FINAL_DIR
mkdir -p $WINE64_BUILD_DIR
mkdir -p $DXVK_BUILD_DIR
mkdir -p $WINETRICKS_DATA_DIR
mkdir -p $FINAL_DIR
echo "BUILD_DIR=\"$BUILD_DIR\"" >> $GITHUB_ENV
echo "WINE_FINAL_DIR=\"$WINE_FINAL_DIR\"" >> $GITHUB_ENV
echo "WINE64_BUILD_DIR=\"$WINE64_BUILD_DIR\"" >> $GITHUB_ENV
echo "DXVK_BUILD_DIR=\"$DXVK_BUILD_DIR\"" >> $GITHUB_ENV
echo "FINAL_DIR=\"$FINAL_DIR\"" >> $GITHUB_ENV
- name: Set Variables
run: |
WINE_CONFIGURE_FLAGS=(
"--disable-option-checking"
"--disable-tests"
"--enable-win64"
"--enable-archs=i386,x86_64"
"--prefix=$WINE_FINAL_DIR"
"--without-alsa"
"--without-capi"
"--with-coreaudio" # Required Package: NONE - Built-in
"--with-cups" # Required Package: NONE - Built-in
"--without-dbus"
"--without-fontconfig"
"--with-freetype" # Required Package: freetype - Homebrew
"--with-gettext" # Required Package: gettext - Homebrew
"--without-gettextpo"
"--without-gphoto"
"--with-gnutls" # Required Package: gnutls - Homebrew
"--without-gssapi"
"--with-gstreamer" # Required Package: gstreamer - Homebrew
"--without-krb5"
"--with-mingw" # Required Package: mingw-w64 - Homebrew
"--without-netapi"
"--with-opencl" # Required Package: none - Built-in
"--with-opengl" # Required Package: none - Built-in
"--without-oss"
"--with-pcap" # Required Package: none - Built-in
"--with-pthread" # Required Package: none - Built-in
"--without-pulse"
"--without-sane"
"--with-sdl" # Required Package: sdl2 - Homebrew
"--without-udev"
"--with-unwind" # Required Package: None - Built-in
"--without-usb"
"--without-v4l2"
"--with-vulkan" # Required Package: molten-vk - Homebrew
"--without-x"
)
echo "WINE_CONFIGURE_FLAGS=\"${WINE_CONFIGURE_FLAGS[@]}\"" >> $GITHUB_ENV
echo "SOURCE_DIR=\"$GITHUB_WORKSPACE\""
- name: Build Wine64
run: |
cd $WINE64_BUILD_DIR
$SOURCE_DIR/configure $WINE_CONFIGURE_FLAGS $WINE_ADDITIONAL_CONFIG_64
make -j$(sysctl -n hw.logicalcpu)
if [ $? -ne 0 ]; then
echo "Failed to build Wine64... Exiting."
exit 1
fi
make install-lib
- name: Install DXVK
run: |
cd $DXVK_BUILD_DIR
DXVK_URL=$(curl -s https://api.github.com/repos/Gcenx/DXVK-MacOS/releases/latest | jq -r '.assets[] | select(.browser_download_url | contains("dxvk-macos")) | .browser_download_url')
curl -L -o dxvk.tar.gz $DXVK_URL
- name: Homebrew Libs [DEBUG]
run: |
ls $(brew --prefix)/lib
- name: Zip Everything [DEBUG]
run: |
zip -r -j Libraries.zip $GITHUB_WORKSPACE/*
- name: Upload Libraries [DEBUG]
uses: actions/upload-artifact@v4
with:
name: Libraries
path: Libraries.zip