Skip to content

Instantly share code, notes, and snippets.

@relalis
Created October 6, 2023 20:10
Show Gist options
  • Select an option

  • Save relalis/528c8cc79ba1c41f17eaea7bda92889a to your computer and use it in GitHub Desktop.

Select an option

Save relalis/528c8cc79ba1c41f17eaea7bda92889a to your computer and use it in GitHub Desktop.
#!/bin/bash
WINE_GIT_URL="https://gitlab.winehq.org/wine/wine.git"
STAGING_GIT_URL="https://github.com/wine-staging/wine-staging.git"
BUILD_DIR="$(pwd)/wine_staging_macos_build"
echo "** Wine build files will be saved to \`$BUILD_DIR\` **"
mkdir -p "$BUILD_DIR/wine64-build"
brew install --formula bison mingw-w64 pkgconfig freetype gnutls molten-vk sdl2
git clone "$WINE_GIT_URL" "$BUILD_DIR/wine_src"
git clone "$STAGING_GIT_URL" "$BUILD_DIR/wine_staging_src"
cd "$BUILD_DIR/wine_src"
git checkout wine-8.17
cd "$BUILD_DIR/wine_staging_src"
git checkout v8.17.1
./staging/patchinstall.py --all --backend=git-am --destdir="$BUILD_DIR/wine_src"
cd "$BUILD_DIR/wine64-build"
../wine_src/configure --enable-win64 --prefix=/usr/local --disable-tests --disable-option-checking --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-inotify --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 --without-x --enable-archs=i386,x86_64
echo "** Configuring wine64 for 32-bit support on macOS complete. Building now. **"
make -j$(nproc)
sudo make install -j$(nproc)
winecfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment