Skip to content

Instantly share code, notes, and snippets.

@Frityet
Last active November 29, 2024 03:45
Show Gist options
  • Save Frityet/448a945690bd7c8cff5fef49daae858e to your computer and use it in GitHub Desktop.
Save Frityet/448a945690bd7c8cff5fef49daae858e to your computer and use it in GitHub Desktop.

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

Why would I want this?

Playing Windows games on MacOS

How?

First, install homebrew which is an amazing macOS package manager, which is weirdly enough what Apple themselves have used for distrobution of this program

brew tap apple/homebrew-apple

This adds apple's offical "repository" for their "forumula" (package), which includes the game-porting-toolkit

AArch64 (ARM, Apple's chips, not x86_64/Intel)

Make sure that rosetta2 is installed

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

homebrew to inside Rosetta

arch -x86_64 zsh
cd /usr/local && mkdir homebrew
curl -L github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
arch -x86_64 /usr/local/homebrew/bin/brew tap apple/homebrew-apple
arch -x86_64 /usr/local/homebrew/bin/brew install game-porting-toolkit

Now, you can install the game-porting-toolkit

Warning: This will take a LONG TIME, and will use up a LOT of system resources because it needs to compile a really large project (LLVM)

brew install game-porting-toolkit

Then, go to this url (on apple.com) to download the actual toolkit, place it somewhere memorable.

How do I use it?

First, you need to create a "wine prefix" for your game.

To do this,

WINEPREFIX=~/my-game-prefix `brew --prefix game-porting-toolkit`/bin/wine64 winecfg

Where you would replace my-game-prefix with whatever you want you want it to be.

You should now change (in the window that pops up) the windows version to "windows 10"

Press ok, and then install your game into my-game-prefix

Finally, to install apple's game porting toolkit, use

ditto [REPLACE THIS WITH WHEREVER YOU PUT THE GAME PORTING TOOLKIT]/lib/ `brew --prefix game-porting-toolkit`/lib/

and finally, to run the executable,

[REPLACE THIS WITH WHEREVER YOU PUT THE GAME PORTING TOOLKIT]/gameportingtoolkit ~/my-game-prefix 'C:\\Program Files\\MyGame\\MyGame.exe'

or, for without the debug GUI

[REPLACE THIS WITH WHEREVER YOU PUT THE GAME PORTING TOOLKIT]/gameportingtoolkit-no-hud ~/my-game-prefix 'C:\\Program Files\\MyGame\\MyGame.exe'

Integration into Steam

TODO

@Pricx
Copy link

Pricx commented Nov 22, 2024

Hi, while installing from Homebrew the porting-toolkit I got such an error:你好 从 Homebrew 安装 porting-toolkit 时,我收到了这样的错误:

==> Installing game-porting-toolkit from apple/apple
==> Staging /Users/dominikmarcinkowski/Library/Caches/Homebrew/downloads/7baed2a6fd34b4a641db7d1ea1e380ccb2f457bb24cd8043c428b6c10ea22932--crossover-sources-22.1.1.tar.gz in /priv
==> Patching
==> /private/tmp/game-porting-toolkit-20240926-9411-srjp5i/wine/configure --prefix=/usr/local/homebrew/Cellar/game-porting-toolkit/1.1 --disable-win16 --disable-tests --without-x
Last 15 lines from /Users/dominikmarcinkowski/Library/Logs/Homebrew/game-porting-toolkit/01.configure:
--enable-win64
--with-gnutls
--with-freetype
--with-gstreamer
CC=/usr/local/homebrew/opt/game-porting-toolkit-compiler/bin/clang
CXX=/usr/local/homebrew/opt/game-porting-toolkit-compiler/bin/clang++

checking build system type... x86_64-apple-darwin23.6.0
checking host system type... x86_64-apple-darwin23.6.0
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/local/homebrew/opt/game-porting-toolkit-compiler/bin/clang
checking whether the C compiler works... no
configure: error: in `/private/tmp/game-porting-toolkit-20240926-9411-srjp5i/wine64-build':
configure: error: C compiler cannot create executables
See `config.log' for more details

When checking config.log:检查 config.log 时:

configure:5097: checking whether the C compiler works
configure:5119: /usr/local/homebrew/opt/game-porting-toolkit-compiler/bin/clang -I/usr/local/homebrew/opt/zlib/include -I/usr/local/homebrew/opt/freetype/include -I/usr/local/homebrew/opt/sdl2/include -I/usr/local/homebrew/opt/libgphoto2/include -I/usr/local/homebrew/opt/faudio/include -I/usr/local/homebrew/opt/jpeg/include -I/usr/local/homebrew/opt/libpng/include -I/usr/local/homebrew/opt/mpg123/include -I/usr/local/homebrew/opt/libtiff/include -I/usr/local/homebrew/opt/libgsm/include -I/usr/local/homebrew/opt/glib/include -I/usr/local/homebrew/opt/gnutls/include -I/usr/local/homebrew/opt/libusb/include -I/usr/local/homebrew/opt/gettext/include -I/usr/local/homebrew/opt/openssl@1.1/include -I/usr/local/homebrew/opt/sane-backends/include -O3 -Wno-implicit-function-declaration -Wno-format -Wno-deprecated-declarations -Wno-incompatible-pointer-types  -L/usr/local/homebrew/opt/zlib/lib -L/usr/local/homebrew/opt/freetype/lib -L/usr/local/homebrew/opt/sdl2/lib -L/usr/local/homebrew/opt/libgphoto2/lib -L/usr/local/homebrew/opt/faudio/lib -L/usr/local/homebrew/opt/jpeg/lib -L/usr/local/homebrew/opt/libpng/lib -L/usr/local/homebrew/opt/mpg123/lib -L/usr/local/homebrew/opt/libtiff/lib -L/usr/local/homebrew/opt/libgsm/lib -L/usr/local/homebrew/opt/glib/lib -L/usr/local/homebrew/opt/gnutls/lib -L/usr/local/homebrew/opt/libusb/lib -L/usr/local/homebrew/opt/gettext/lib -L/usr/local/homebrew/opt/openssl@1.1/lib -L/usr/local/homebrew/opt/sane-backends/lib -lSystem -L/usr/local/homebrew/lib -Wl,-rpath,/usr/local/homebrew/lib -Wl,-rpath,@executable_path/../lib/external conftest.c  >&5
-macosx_version_min has been renamed to -macos_version_min
dyld[9845]: Symbol not found: _lto_codegen_debug_options_array
  Referenced from: <E33DCAC4-3116-3019-8003-432FB3E66FB4> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
  Expected in:     <58E4EB64-C6CB-3C76-B1D0-2C6502EE0F4E> /usr/local/homebrew/Cellar/game-porting-toolkit-compiler/0.1/lib/libLTO.dylib
clang-8: error: unable to execute command: Abort trap: 6
clang-8: error: linker command failed due to signal (use -v to see invocation)
configure:5123: $? = 254
configure:5163: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Wine"
--
| {
|
|   ;
|   return 0;
| }
configure:5168: error: in `/private/tmp/game-porting-toolkit-20240926-9411-srjp5i/wine64-build':
configure:5170: error: C compiler cannot create executables
See `config.log' for more details

Could you please help?您能帮忙吗?

I have the same problem.

@executable_path/../lib/external conftest.c  >&5
-macosx_version_min has been renamed to -macos_version_min
dyld[1172]: Symbol not found: _lto_codegen_debug_options_array
  Referenced from: <DCCE8DC8-8CC1-3A5E-9CB4-5C97EAE2230B> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
  Expected in:     <B39FE7DD-BF97-3D65-9AD0-177C058B525B> /usr/local/Cellar/game-porting-toolkit-compiler/0.1/lib/libLTO.dylib
clang-8: error: unable to execute command: Abort trap: 6
clang-8: error: linker command failed due to signal (use -v to see invocation)
configure:5123: $? = 254
configure:5163: result: no
configure: failed program was:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment