Initial Packaging #24
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: -O3 -Wno-deprecated-declarations -Wno-incompatible-pointer-types | |
CROSSCFLAGS: -O3 | |
LDFLAGS: -Wl,-headerpad_max_install_names -Wl,-rpath,@loader_path/../../ -Wl,-rpath,/usr/local/lib | |
MACOSX_DEPLOYMENT_TARGET: 10.14 | |
WINE_CONFIGURE: $GITHUB_WORKSPACE/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: 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: | | |
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 | |
rm dxvk.tar.gz | |
- name: Grab Verbs From Winetricks | |
run: | | |
curl -L -o verbs.txt https://raw.githubusercontent.com/Winetricks/winetricks/master/files/verbs/all.txt | |
- name: Create Final Package | |
run: | | |
mkdir -p Libraries/DXVK | |
mkdir -p Libraries/Wine/bin | |
mkdir -p Libraries/Wine/lib | |
mkdir -p Libraries/Wine/lib/wine/i386-windows | |
mkdir -p Libraries/Wine/lib/wine/x86_32on64-unix | |
mkdir -p Libraries/Wine/lib/wine/x86_64-windows | |
mkdir -p Libraries/Wine/lib/wine/x86_64-unix | |
mkdir -p Libraries/Wine/share/wine | |
cp -ra ${{ env.BUILDROOT }}/wine64/fonts Libraries/Wine/share/wine | |
cp -ra ${{ env.BUILDROOT }}/wine64/nls Libraries/Wine/share/wine | |
cp -ra ${{ env.BUILDROOT }}/wine64/loader/wine.inf Libraries/Wine/share/wine | |
cp -ra ${{ env.BUILDROOT }}/wine64/loader/wine64 Libraries/Wine/bin | |
cp -ra ${{ env.BUILDROOT }}/wine64/server/wineserver Libraries/Wine/bin | |
cp -ra $(brew --prefix winetricks)/bin/winetricks Libraries | |
cp -ra verbs.txt Libraries | |
cp -ra x32 Libraries/DXVK | |
cp -ra x64 Libraries/DXVK | |
- name: Homebrew Libs [DEBUG] | |
run: | | |
ls $(brew --prefix)/lib | |
- name: Zip Everything [DEBUG] | |
run: | | |
zip -r Everything.zip $GITHUB_WORKSPACE/* | |
- name: Upload Everything [DEBUG] | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Everything | |
path: Everything.zip |