Giter Club home page Giter Club logo

winsteamonmac's Introduction

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.

Latest tested versions

  • 2024-03-24: Note: Apple's game-porting-toolkit currently requires an older version of Apple's command line tool (version 15.1) in order to install successfully! Current Xcode 15.3 will not work!
  • 2024-03-08: the combination of macOS Sonoma 14.4 and Apple Game Porting Toolkit 1.1 (release of 2023-11-15), Xcode 15.

Preparations:

  • Go to Apple Games in order to download the Game Porting Toolkit
  • Command Line Tools for Xcode 15.1 are required to be able to install Game Porting Toolkit. WARNING Apple's game-porting-toolkit fails to build with current Xcode or Command line tools 15.3, you must use the older version 15.1 to be able to build the toolkit successfully. You can decide to keep the recent Xcode, and install the older command line tools additionally and use xcode-select -s to switch between versions.

Get the correct command line tools

Get the command line tools here Command line tools 15.1

If you have Xcode concurrent to command line tools installed, you can use xcode-select -p to check which version is active. The correct output after installation of command line tools 15.1 should be: /Library/Developer/CommandLineTools. In case a path to Xcode is shown, you can can correct the path with xcode-select -s /Library/Developer/CommandLineTools.

Continue with installation

The Game Porting Toolkit contains a Readme that outlines the installation process, but here we will customize it, in order to run Steam.

  • Download Steam. Make sure to download the Windows setup, and not the (default) Mac version. You should now have a file SteamSetup.exe.

Step-by-step installation

Note: See Update notes below, if you did already install an older version!

  • The minimum macOS version is macOS Sonoma 14.1, Xcode 15.1 (or Command Line Tools 15.1, newer versions not supported), Game Porting Toolkit v1.1
  • This guide only applies to Apple Silicon Macs. No Intel support.
  • Open a terminal (or iTerm2)
  • Make sure that rosetta is installed by entering:
softwareupdate --install-rosetta

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

  • Now switch to a x86 shell by entering:
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.

Now we install Apple's homebrew tap:

brew86 tap apple/apple http://github.com/apple/homebrew-apple
brew86 -v install apple/apple/game-porting-toolkit

Note: This starts a rather lengthy install- and compilation process that takes a long time! The compilation process (which can take an hour or more depending on your machine) finished with:

==> game-porting-toolkit
Please follow the instructions in the Game Porting Toolkit README to complete installation.

Instead, in order to continue the initial installation, skip down to Continue with initial installation

Update notes

Note: This section is only for updates to a new version, once the complete installation was finished successfully before. For initial installation, continue with Continue with initial installation.

  • Make sure to use both the latest release of macOS Sonoma, the latest latest release of game-porting-toolkit, and updated versions of Command Line Tools for Xcode (or full Xcode itself) together.

If you want to update your x86 homebrew at a later point, start an x86 shell in Terminal with:

arch -x86_64 zsh

then in the x86 shell:

alias brew86=/usr/local/bin/brew
brew86 update
brew86 upgrade

This will update your x86 homebrew environment and automatically build the latest game-porting-toolkit. Remember, the build process will take about 30min even on a very fast machine!

Then you will need to download the latest Game Porting Toolkit from apple to update the libraries in your wine prefix. Open the download and:

ditto /Volumes/Game\ Porting\ Toolkit-1.1/redist/lib/ `brew86 --prefix game-porting-toolkit`/lib/

Note: The layout of the game porting toolkit changed between beta 3 and beta 4, since beta 4 the libraries are now in redist/lib (beta3 and earlier: just lib). Also adapt the version of the Toolkit, if necessary.

That's all that's needed for an update. Below information applies only to the initial installation.

When starting the Steam client after an update, remember that the initial first start might take several minutes (patience!), and is not always successful without 'retry': see below for common issues.

Update trouble

If steam doesn't start after an update:

  • have patience! First startup of steam seems to take several minutes. Sometimes a huge error-box displayed. Click on the box to make sure it has active input focus and press Enter to make it vanish.
  • When asked, select 'restart Steam' as response to possible errors. In many cases, the steam client at some point does appear!
Last resort on failed updates
  • try to re-install steam: WINEPREFIX=~/Win10 /usr/local/opt/game-porting-toolkit/bin/wine64 SteamSetup.exe, or:
  • completely remove your homebrew x86 installation at /usr/local/ and start over. (See below 'Uninstallation Notes' for proper removal.)

Problems after Steam Client self-update

  • Self-update of steam client gets stuck. Wait for things to 'settle', then restart your computer to eliminate old rogue processes. It might be necessary to manually kill wine64-preloader instances before a restart is possible. After restart, the Steam Client update should work fine.

Continue with initial installation

Now create a directory that will contain all the Windows stuff, Steam and any games you download. Here we'll use ~/Win10, which is our wine prefix (Apple uses the example of my-game-prefix, we'll go with Win10):

mkdir ~/Win10
WINEPREFIX=~/Win10 `brew86 --prefix game-porting-toolkit`/bin/wine64 winecfg

Note: we use the alias brew86 we defined above.

This should start the winecfg program, a small setup for our wine environment.

  • In WineCfg, select Windows 10, and Apply,

  • Now open the Game Porting Toolkit which you downloaded above in Finder to verify it's mounted.

From your Terminal, it should be available at:

ls /Volumes/Game\ Porting\ Toolkit-1.1/

Make sure you see the files of the toolkit and then:

ditto /Volumes/Game\ Porting\ Toolkit-1.1/redist/lib/ `brew86 --prefix game-porting-toolkit`/lib/

This (silently) copies the required apple libraries into your wine installation. Note that since beta-4, the libs on the image from Apple are in redist/lib (older Beta versions: lib)

Now copy the Windows setup of steam (we assume you downloaded into the default ~/Downloads folder) into your new Windows drive:

cp ~/Downloads/SteamSetup.exe ~/Win10/drive_c

Now enter your Win10 directory and note the full path of this directory:

cd ~/Win10
pwd

It should say something like /Users/you-user-name/Win10. This is your wine-prefix, which you need to use below.

Apple provides a few scripts to start games, which we will not use: gameportingtoolkit, gameportingtoolkit-no-esync, and gameportingtoolkit-no-hud. Open those script with your favorite editor to learn how to configure wine. The Readme.rtf or the Game Porting Toolkit explains the differences.

We use what we learned from inspecting the scripts and directly start the Steam setup with:

cd ~/Win10/drive_c
MTL_HUD_ENABLED=0 WINEESYNC=1 WINEPREFIX=~/Win10 /usr/local/opt/game-porting-toolkit/bin/wine64 SteamSetup.exe

This should now start the Steam setup process. Be patient.

  • If you get a failure dialog box with several options, as "Restart Steam?", try that, and on continued failure exit the dialog,
  • Reboot(!) (There seem to be rogue processes that prevent successful retries without reboot)
  • And after reboot, open 'Terminal' and start Steam directly:
cd ~/Win10/drive_c
MTL_HUD_ENABLED=0 WINEESYNC=1 WINEPREFIX=~/Win10 /usr/local/opt/game-porting-toolkit/bin/wine64 Program\ Files\ \(x86\)/Steam/Steam.exe

This took some time (patience!), but then the Steam logon appears! Horray!

Login, and start installing your favorite Windows games...

Quality of life enhancement.

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 ~/Win10/drive_c
MTL_HUD_ENABLED=0 WINEESYNC=1 WINEPREFIX=~/Win10 /usr/local/opt/game-porting-toolkit/bin/wine64 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...)

Closing Steam

  • Use Steamclient's GUI menu (Steam / Exit) or the menu bar icon (right-click, 'Exit Steam') to terminate steam. The GUI should display 'Shutting down Steam', indicating a proper termination of all Steam processes.
  • Just Ctrl-C-ing in the terminal (or other methods to 'suddenly' terminate Steam will cause crash-bug-workarounds to kick in, restarting Steam automatically again and again...

Troubleshooting

  • See the Readme.rtf, section 'Troubleshooting' in Apple's game-porting-toolkit for advice on problems with specific games.
  • In case you got stuck somewhere during install, follow the 'Uninstallation notes' below before retrying a new installation.

Uninstallation notes

  • Uninstall the Intel version of homebrew, following this link to the uninstall-script. Execute this script from a X86-64 Shell created with arch -x86_64 zsh.
  • Simply remove the directory tree that holds your wine-prefix: remove ~/Win10.
  • Note: If you want to reinstall, make sure to reboot once to remove any remaining steam or setup processes from memory.

References

  • Good collection of information: Apple Gaming Wiki
  • A 'batteries-included' GUI version to get the game-porting-toolkit running: Whisky

History

  • 2024-03-26: Apple's game_porting_toolit requires Command Line Tools version 15.1 to build successfully, newer versions are not (yet) supported.
  • 2024-03-24: Apple's game_porting_toolkit is broken, the project currently doesn't install until the build is fixed by Apple.
  • 2024-03-08: macOS 14.4 testet ok.
  • 2023-11-24: Apple Game Porting Toolkit 1.1 changes. Addressed suggestions by @mobigroup and @cdtj concerning username placeholders.
  • 2023-10-06: New installations with Xcode 15, Sonoma 14.0 release and game-porting-toolkit 1.0 retested, ok.
  • 2023-10-06: Small fixes for release version of game-porting-toolkit 1.0, Uninstallation and troubleshooting notes.
  • 2023-09-26: macOS Sonoma 14.0 Release tested ok. No changes.
  • 2023-09-24: Retest with Sonoma RC, game-porting-toolkit Beta 4 (Note: library path on Apple's IMG has changed from lib to redist/lib.
  • 2023-08-14: Updates for game-porting-tookit Beta 3 alias 1.0.3 and Sonoma Beta 5. (No significant changes to the update procedure).
  • 2023-07-04: Section Update notes added. Apple has published a new version 1.0.2 of the game-porting toolkit.

winsteamonmac's People

Contributors

domschl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

winsteamonmac's Issues

"crash server failed to launch, self-terminating"?

I followed all steps and was patience in the last steps. After I waited for around 2 hours, I realized that I kept receiving the same error message "[0122/023753.742:ERROR:crashpad_client_win.cc(132)] crash server failed to launch, self-terminating" every 1 minutes.

Is it normal? How long should I wait for the first time? I tried rebooting the Mac and started Steam again after waiting for 2 hours, but it didn't help.

Screenshot 2024-01-22 at 02 39 39

Failed to initialize NWAPI with error (OxFFFFFFFE),

hi!
I did everything according to your instructions and when starting CS:GO get the following error:
"Failed to initialize NWAPI with error (OxFFFFFFFE), which is required when running on NVIDIA hardware,
Your drivers may be corrupt or out of date."
Have you ever encountered such a problem? Mb do you know how it can be solved?

**SOLVED** Steam.exe [2023-11-15 16:31:50] Nothing to do

Following the instructions, brew downloads and compiles game-porting-toolkit ok, but when under the "Continue" header, and it asks me to run this command:

WINEPREFIX=~/Win10 brew86 --prefix game-porting-toolkit/bin/wine64 winecfg

I get an error as I have no wine64 install inside game-porting-toolkit. How can I install wine64 here?

/usr/local/opt/game-porting-toolkit-compiler/lib:
total 101224
drwxr-xr-x  3 jordan.olson  admin    96B 13 Nov 19:23 clang/
drwxr-xr-x  5 jordan.olson  admin   160B 13 Nov 19:23 ./
-r--r--r--  1 jordan.olson  admin    21M 13 Nov 19:24 libLTO.dylib
-r--r--r--  1 jordan.olson  admin    29M 13 Nov 19:24 libclang.dylib
drwxr-xr-x  9 jordan.olson  admin   288B 13 Nov 19:24 ../

Error on running setup process

Hi,

I followed all the instructions to a tee and got to the setup process. The small window for Steam Windows installation shows up and by default it chooses C://Program Files (x86)/Steam/. I did this and it said it was installed. I ran the setup process as follows:

cd ~/Win10/drive_c
MTL_HUD_ENABLED=0 WINEESYNC=1 WINEPREFIX=/Users/(myuserfolder)/Win10 /usr/local/opt/game-porting-toolkit/bin/wine64 SteamSetup.exe

Terminal then gave me the following error inexplicably

Screenshot 2023-10-06 at 00 43 48

Any help???

Installation fails on `Error: apple/apple/game-porting-toolkit 1.1 did not build`

I get the above error after running

brew86 -v install apple/apple/game-porting-toolkit

The following part of the output appears to be where the problem occurs:

/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:629:11: error: unknown type name 'SecTrustSettingsDomain'
    const SecTrustSettingsDomain domains[] = {
          ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:630:9: error: use of undeclared identifier 'kSecTrustSettingsDomainSystem'
        kSecTrustSettingsDomainSystem,
        ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:631:9: error: use of undeclared identifier 'kSecTrustSettingsDomainAdmin'
        kSecTrustSettingsDomainAdmin,
        ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:632:9: error: use of undeclared identifier 'kSecTrustSettingsDomainUser'
        kSecTrustSettingsDomainUser
        ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:640:18: warning: this function declaration is not a prototype [-Wstrict-prototypes]
        status = SecTrustSettingsCopyCertificates(domains[domain], &certs);
                 ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:641:23: error: use of undeclared identifier 'noErr'
        if (status == noErr)
                      ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:647:31: warning: this function declaration is not a prototype [-Wstrict-prototypes]
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)
                              ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:647:51: error: use of undeclared identifier 'kSecFormatX509Cert'
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)
                                                  ^
/private/tmp/game-porting-toolkit-20240311-6601-nrgwc4/wine/dlls/crypt32/unixlib.c:647:95: error: use of undeclared identifier 'noErr'
                if ((status = SecItemExport(cert, kSecFormatX509Cert, 0, NULL, &certData)) == noErr)

I'm running macOS Sonoma 14.3.1 (23D60) on an Apple M2 MacBook Pro.

How to close steam correctly?

with command Line Tools version 15.1 to build game_porting_toolit correctly.
I found even I close steam, it will appear again.
I need to kill all process start with wine in activity monitor, then the terminal process could stop with control + c
is it correctly ? or I need to follow some other steps I missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.