Refactor #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Wine | |
on: | |
push: | |
branches: | |
- '7.7' | |
workflow_dispatch: | |
env: | |
CC: clang | |
CXX: clang++ | |
CPATH: /usr/local/include | |
LIBRARY_PATH: /usr/local/lib | |
CFLAGS: -g -O2 -Wno-deprecated-declarations | |
CROSSCFLAGS: -g -O2 | |
LDFLAGS: -Wl,-headerpad_max_install_names -Wl,-rpath,@loader_path/../../ -Wl,-rpath,/usr/local/lib -Wl,-rpath,/opt/local/lib -Wl,-rpath,/opt/X11/lib | |
MACOSX_DEPLOYMENT_TARGET: 10.14 | |
WINE_CONFIGURE: $GITHUB_WORKSPACE/wine/configure | |
BUILDROOT: $GITHUB_WORKSPACE/build | |
WINE_INSTALLROOT: install | |
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" | |
"gcenx/wine/cx-llvm" | |
# Utilities (DXVK) | |
"jq" | |
# Dependencies | |
"freetype" | |
"gettext" | |
"gnutls" | |
"gstreamer" | |
"sdl2" | |
"molten-vk" | |
"winetricks" | |
) | |
brew install "${REQUIRED_PACKAGES[@]}" | |
- name: Add bison & cx-llvm to $PATH | |
run: | | |
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
echo "$(brew --prefix cx-llvm)/bin" >> $GITHUB_PATH | |
- name: Create the Build Directory | |
run: | | |
mkdir -p $BUILD_DIR | |
mkdir -p $WINE_FINAL_DIR | |
mkdir -p $WINE64_BUILD_DIR | |
mkdir -p $DXVK_BUILD_DIR | |
mkdir -p $WINETRICKS_DATA_DIR | |
mkdir -p $FINAL_DIR | |
mkdir -p $OUTPUT_DIR | |
- name: Configure Wine64 | |
run: | | |
set -x | |
export ac_cv_lib_soname_MoltenVK="libMoltenVK.dylib" | |
export ac_cv_lib_soname_vulkan="" | |
mkdir -p ${{ env.BUILDROOT }}/wine64 | |
pushd ${{ env.BUILDROOT }}/wine64 | |
${{ env.WINE_CONFIGURE }} \ | |
--prefix= | |
--disable-tests \ | |
--disable-winedbg \ | |
--enable-win64 \ | |
--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 | |
--with-mingw \ | |
--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 | |
popd | |
- name: Build wine64 | |
run: | | |
pushd ${{ env.BUILDROOT }}/wine64 | |
make -j$(sysctl -n hw.ncpu 2>/dev/null) | |
popd | |
- name: Install wine64 | |
run: | | |
pushd ${{ env.BUILDROOT }}/wine64 | |
make install-lib DESTDIR="$GITHUB_WORKSPACE/${{ env.WINE_INSTALLROOT }}" | |
popd | |
- name: Configure wine32on64 | |
run: | | |
set -x | |
export ac_cv_lib_soname_MoltenVK="libMoltenVK.dylib" | |
export ac_cv_lib_soname_vulkan="" | |
mkdir -p ${{ env.BUILDROOT }}/wine32on64 | |
pushd ${{ env.BUILDROOT }}/wine32on64 | |
${{ env.WINE_CONFIGURE }} \ | |
--prefix= \ | |
--disable-loader \ | |
--disable-tests \ | |
--disable-winedbg \ | |
--enable-win32on64 \ | |
--without-alsa \ | |
--without-capi \ | |
--with-coreaudio \ | |
--with-cups \ | |
--without-dbus \ | |
--without-fontconfig \ | |
--with-freetype \ | |
--with-gettext \ | |
--without-gettextpo \ | |
--without-gphoto \ | |
--with-gnutls \ | |
--without-gssapi \ | |
--without-gstreamer \ | |
--without-inotify \ | |
--without-krb5 \ | |
--with-mingw \ | |
--without-netapi \ | |
--without-openal \ | |
--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 \ | |
--with-wine64=${{ env.BUILDROOT }}/wine64 \ | |
--without-x | |
popd | |
- name: Build wine32on64 | |
run: | | |
pushd ${{ env.BUILDROOT }}/wine32on64 | |
make -j$(sysctl -n hw.ncpu 2>/dev/null) | |
popd | |
- name: Install wine32on64 | |
run: | | |
pushd ${{ env.BUILDROOT }}/wine32on64 | |
make install-lib DESTDIR="$GITHUB_WORKSPACE/${{ env.WINE_INSTALLROOT }}" | |
popd | |
- 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 | |
tar -xzf dxvk.tar.gz --strip-components=1 -C $DXVK_BUILD_DIR | |
rm dxvk.tar.gz | |
- name: Grab Verbs From Winetricks | |
run: | | |
cd $WINETRICKS_DATA_DIR | |
curl -L -o verbs.txt https://raw.githubusercontent.com/Winetricks/winetricks/master/files/verbs/all.txt | |
- name: Copy Files | |
run: | | |
cd $FINAL_DIR | |
mkdir -p wine | |
cp -r $WINE_FINAL_DIR/* wine | |
mkdir -p dxvk | |
cp -r $DXVK_BUILD_DIR/dxvk DXVK | |
cp -a $(brew --prefix winetricks)/bin/winetricks / | |
cp $WINETRICKS_DATA_DIR/verbs.txt verbs.txt | |
- name: Homebrew Libs [DEBUG] | |
run: | | |
ls $(brew --prefix)/lib | |
- name: Zip Everything [DEBUG] | |
run: | | |
zip -r -j Everything.zip $GITHUB_WORKSPACE/* | |
- name: Create Archive | |
run: | | |
cd $OUTPUT_DIR | |
tar -zcf Libraries.tar.gz $FINAL_DIR | |
- name: Upload Everything | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Everything | |
path: Everything.zip | |
- name: Upload Libraries [DEBUG] | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Libraries | |
path: $OUTPUT_DIR/Libraries.tar.gz | |
- name: Upload config32.log | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: config32 | |
path: ${{ env.BUILDROOT }}/wine32on64/config.log | |
- name: Upload config64.log | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: config64 | |
path: ${{ env.BUILDROOT }}/wine64/config.log |