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

@Phoenix124
Copy link

Phoenix124 commented Dec 15, 2023

Who could help to resolve installation of apr-util? got error

==> ./configure --with-apr=/usr/local/homebrew/opt/apr --with-crypto --with-openssl=/usr/local/homebrew/opt/openssl@3 --wi
==> make
Last 15 lines from Library/Logs/Homebrew/apr-util/02.make:
1 error generated.
In file included from buckets/apr_buckets_pool.c:17:
/private/tmp/apr-util-20231215-51542-to8c5h/apr-util-1.6.3/include/apr_buckets.h:29:10: fatal error: 'apr_network_io.h' file not found
#include "apr_network_io.h"
         ^~~~~~~~~~~~~~~~~~
make[1]: *** [buckets/apr_buckets_heap.lo] Error 1
make[1]: *** [buckets/apr_buckets_file.lo] Error 1
make[1]: *** [buckets/apr_buckets_flush.lo] Error 1
make[1]: *** [buckets/apr_brigade.lo] Error 1
make[1]: *** [buckets/apr_buckets_alloc.lo] Error 1
1 error generated.
1 error generated.
make[1]: *** [buckets/apr_buckets_pipe.lo] Error 1
make[1]: *** [buckets/apr_buckets_pool.lo] Error 1
make: *** [all-recursive] Error 1

resolve by set HOMEBREW_CELLAR to right pass /usr/local/Cellar

@opengamer29
Copy link

Who could help to resolve installation of apr-util? got error

==> ./configure --with-apr=/usr/local/homebrew/opt/apr --with-crypto --with-openssl=/usr/local/homebrew/opt/openssl@3 --wi
==> make
Last 15 lines from Library/Logs/Homebrew/apr-util/02.make:
1 error generated.
In file included from buckets/apr_buckets_pool.c:17:
/private/tmp/apr-util-20231215-51542-to8c5h/apr-util-1.6.3/include/apr_buckets.h:29:10: fatal error: 'apr_network_io.h' file not found
#include "apr_network_io.h"
         ^~~~~~~~~~~~~~~~~~
make[1]: *** [buckets/apr_buckets_heap.lo] Error 1
make[1]: *** [buckets/apr_buckets_file.lo] Error 1
make[1]: *** [buckets/apr_buckets_flush.lo] Error 1
make[1]: *** [buckets/apr_brigade.lo] Error 1
make[1]: *** [buckets/apr_buckets_alloc.lo] Error 1
1 error generated.
1 error generated.
make[1]: *** [buckets/apr_buckets_pipe.lo] Error 1
make[1]: *** [buckets/apr_buckets_pool.lo] Error 1
make: *** [all-recursive] Error 1

resolve by set HOMEBREW_CELLAR to right pass /usr/local/Cellar

This helps me https://github.com/orgs/Homebrew/discussions/3316#discussioncomment-4620669

@minor-coder
Copy link

I'm trying to set up "nexon plug" When I finished install it , 스크린샷 2023-06-24 오후 9 19 20 Nothing Appeared;; How can I do? I'm korean and 넥슨플러그 means nexonplug

혹시 해결하셨나요?
여전히 넥슨 플러그는 투명창으로 열리네요 ㅠㅠ

@rafsimo
Copy link

rafsimo commented Jun 30, 2024

Heyyy I got this error:
Error: game-porting-toolkit: Failed to download resource "glib--gobject-introspection"
Download failed: https://download.gnome.org/sources/gobject-introspection/1.80/gobject-introspection-1.80.1.tar.xz
Could anyone help?

@xdexer
Copy link

xdexer commented Sep 26, 2024

Hi,
while installing from Homebrew the porting-toolkit I got such an error:

==> 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:

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?

@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