domschl / WinSteamOnMac

Run the Windows version of Steam on macOS Sonoma with Apple's Game Porting Toolkit
161 stars 6 forks source link
game-porting-toolkit macos sonoma steam

Howto install the Windows version of Steam on macOS Sonoma

We will install the x86 version Homebrew in order to be able to use Apple's modified version of Wine and to install the Windows version Steam.

We will make sure that our existing environment (and the Apple silicon version of Homebrew we need for 'serious' work) remains undisturbed.

This guide is only tested for Apple Silicon machines.

Security warning:: Apple's homebrew recipe uses heavily patched infrastructure components and is currently broken. This guide uses a prebuilt toolkit.

Latest tested versions

Preparations:

Step-by-step installation

softwareupdate --install-rosetta

Now your Mac is able to execute x86_64 code. This is the basis for all the following installation.

arch -x86_64 zsh 

Type arch again, to make sure that you are using Intel. It should not show arm64, but i386 ( ;-) )

Now, from a terminal that uses x86_64 arch, install homebrew for x86:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This will install the Intel x86 version of homebrew to /usr/local. If you already installed homebrew for Apple Silicon, then that version resides in /opt/homebrew and won't be touched. This guide will assume that the Apple Silicon homebrew is your important version, and will remain the default when working with terminal or using brew. If you do not have an Apple Silicon version of homebrew installed, don't worry, nothing we do here requires that or modifies any of it.

Do not follow the recommendation at the end of the x86-homebrew install script to put shellenv into .zprofile. (That would put the x86 Version of Homebrew into your paths, conflicting with an Apple Silicon version of homebrew. No paths or environment modifications are needed in order to proceed!)

In order not to mess up the two homebrew versions, we create an alias for the Intel homebrew:

alias brew86=/usr/local/bin/brew

Note: if you are following Apple's readme, make sure to replace all instances of brew in Apple's doc with brew86 from now on.

Installation using a pre-built toolkit

Use Dean Greer's (GCenX) versions of the toolkit that have been prebuilt. This is the faster installation method (and currently the only non-broken one):

brew86 install --cask --no-quarantine gcenx/wine/game-porting-toolkit

This installs a macOS Application "Game Porting Toolkit" based on the old working binaries that opens a pre-configured terminal with all the game-porting tools. Go to macOS 'Applications' and open "Game Porting Toolkit". In the terminal window that gets started by the application, enter:

wine winecfg

to verify everything is working. Close Winecfg and start with the update procedure to the latest drivers.

Updating the drivers (OPTIONAL, currently not necessary)

Since CGenc's toolkit already contains the 2.0 beta drivers, it's currently not necessary to manually update the drivers. Skip to Steam installation, if current version of toolkit is 2.0 beta.

Make sure that you have opened the "Evaluation environment for Windows Games". You should see a folder at /Volumes/Evaluation environment for Windows games 2.0. Then start the update:

cd /Applications/Game\ Porting\ Toolkit.app/Contents/Resources/wine/lib/external

mv D3DMetal.framework D3DMetal.framework-old; mv libd3dshared.dylib libd3dshared.dylib-old

ditto /Volumes/Evaluation\ environment\ for\ Windows\ games\ 2.0/redist/lib/external/ .

This is silent on success.

Steam installation

Now you are ready to install Steam. Again, use a Terminal that is opened by the "Game Porting Toolkit" application in your Applications folder, not the default terminal. Enter:

MTL_HUD_ENABLED=0 WINEESYNC=1 wine ~/Downloads/SteamSetup.exe

After some time, the Steam login appears!

Steam has been installed into the wine prefix at ~/.wine and your Toolkit software resides within the application "Game Porting Toolkit". From any Terminal, you can now start Steam directly with:

MTL_HUD_ENABLED=0 WINEESYNC=1 /Applications/Game\ Porting\ Toolkit.app/Contents/Resources/wine/bin/wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/steam.exe

This takes some times, but then Steam starts.

Create a shortcut for Steam

We can use Apple's 'Shortcuts' app to automate the process of launching Wine & Steam Windows. Start the Shortcuts app, create a new shortcut and add the action 'Run Shell Script'.

The script text is:

cd ~/.wine/drive_c
MTL_HUD_ENABLED=0 WINEESYNC=1 /Applications/Game\ Porting\ Toolkit.app/Contents/Resources/wine/bin/wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/steam.exe

Note: 'Shortcut' might ask you for confirmation, if you want to run scripts, and you need to enable that via the settings-link provided.

Add an icon to the shortcut, and you are ready to go. The shortcut can be put into the dock, and now you simply can directly start Steam for Windows! (Right-click the shortcut script in the 'Shortcuts' app and select 'Add to dock' to create shortcut for your shortcut in the Shortcuts app...)

Just be patient when starting Steam, it takes quite a long time!

References

History