Skip to content

Instantly share code, notes, and snippets.

@Frityet
Last active May 10, 2024 07:43
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

@hen12343
Copy link

@td0 - I was able to get past the error. It looks like netpbm needs to be installed separately:

arch -x86_64 /usr/local/homebrew/bin/brew install netpbm && arch -x86_64 /usr/local/homebrew/bin/brew install game-porting-toolkit

I tried this after getting the Failed to download resource "netpbm" error and got this long thing and I have no idea what to do from here

`==> /usr/local/homebrew/opt/scons/bin/scons PREFIX=/usr/local/homebrew/Cellar/su
==> /usr/local/homebrew/opt/scons/bin/scons install
==> ./configure --enable-optimize --disable-mod-activation --disable-plaintext-p
==> make
==> make install
==> make tools
==> make install-tools
==> make swig-py
Last 15 lines from /Users/NAME/Library/Logs/Homebrew/subversion/08.make:
2023-11-24 00:49:29 +0000

make
swig-py

/bin/sh "/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/libtool" --tag=CC --silent --mode=compile none -I/usr/local/homebrew/opt/apr-util/include -I/usr/local/homebrew/opt/apr/include -isystem/usr/local/homebrew/include -F/usr/local/homebrew/Frameworks -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/include -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig/include -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig/proxy -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig/proxy -I/usr/local/homebrew/opt/apr/include/apr-1 -I/usr/local/homebrew/opt/apr-util/include/apr-1 -I/usr/local/homebrew/opt/openssl@3/include none -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig/python/libsvn_swig_py -prefer-pic -c -o subversion/bindings/swig/python/svn_client.lo subversion/bindings/swig/python/svn_client.c
/bin/sh "/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/libtool" --tag=CC --silent --mode=compile none -I/usr/local/homebrew/opt/apr-util/include -I/usr/local/homebrew/opt/apr/include -isystem/usr/local/homebrew/include -F/usr/local/homebrew/Frameworks -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DSWIGPYTHON -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/include -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig/include -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig/proxy -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig/proxy -I/usr/local/homebrew/opt/apr/include/apr-1 -I/usr/local/homebrew/opt/apr-util/include/apr-1 -I/usr/local/homebrew/opt/openssl@3/include none -I/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/subversion/bindings/swig/python/libsvn_swig_py -I./subversion/include -I./subversion -I/usr/local/homebrew/opt/apr/include/apr-1 -I/usr/local/homebrew/opt/apr-util/include/apr-1 -I/usr/local/homebrew/opt/openssl@3/include -I/usr/local/homebrew/Cellar/subversion/1.14.2_4/libexec/serf/include/serf-1 -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include -o subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.lo -c subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
SWIG python disabled at configure time: no distutils found
make: *** [.swig_py_checked] Error 1
make: *** Waiting for unfinished jobs....
/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/libtool: line 1760: none: command not found
make: *** [subversion/bindings/swig/python/svn_client.lo] Error 1
/private/tmp/subversion-20231123-15696-1niojam/subversion-1.14.2/libtool: line 1760: none: command not found
make: *** [subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.lo] Error 1

Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!

`

@TalkBackJohnny
Copy link

The lib is not under the game porting toolkit not sure how to change
user@computerM3 / % ls "/Volumes/Game Porting Toolkit-1.1"
Acknowledgements.rtf Read Me.rtf gameportingtoolkit-no-esync redist
License.rtf gameportingtoolkit gameportingtoolkit-no-hud
user@computerM3 / % ditto /Volumes/Game\ Porting\ Toolkit-1.1/lib/ brew --prefix game-porting-toolkit/lib/
ditto: Cannot get the real path for source '/Volumes/Game Porting Toolkit-1.1/lib/'
jbrooksii@LapdogM3 / %

@Phoenix124
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

@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

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

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