Skip to content

[FIX] Use gameportingtoolkit exectutable rather than wine to launch games #2879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

Alexandre2006
Copy link

@Alexandre2006 Alexandre2006 commented Jul 21, 2023

Previously, when launching games using Apple's new Game Porting Toolkit, Heroic would launch by finding GPTK's copy of wine. This would cause file explorer to open instead of the game (as stated in #2832 and #2858).

With this fix, heroic uses the "gameportingtoolkit" executable to launch games, apps, and all wine commands (except for winetricks).


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

I've been able to run a few games using the Game Porting Toolkit, and have had no issues with running winecfg, winetricks, or installing, moving, verifying, and uninstalling games.

I have however noticed that many games do not work with the Game Porting Toolkit, although this is most likely a compatibility issue between the games and the toolkit (I've had trouble running many UE4/5 games).

@Alexandre2006 Alexandre2006 marked this pull request as draft July 21, 2023 17:14
@Alexandre2006 Alexandre2006 marked this pull request as ready for review July 21, 2023 17:22
@pakkographic
Copy link

I'm not sure what you're referring to, but there is a fix for GPTK running the wine explorer instead of the game: #2880, if you'd like to execute GPTK, just replace the WinePrefix path with your GPTK prefix path.

@Alexandre2006
Copy link
Author

#2832 offered a fix as to how to how to fix explorer being launched instead of the game by launching programs the way Apple intended, by using the gameportingtoolkit executable rather than running the programs through GPTK's copy of wine @pakkographic.

This fix worked flawlessly for me, however #2880 seems to work as well. I think both PRs are fine solutions to the problem.

@Artoria2e5
Copy link

Artoria2e5 commented Sep 6, 2023

For what is worth, the gameportingtoolkit executable is really bare-bones. Here's its entire content:

#!/bin/zsh
# Copyright (c) 2023 Apple Inc. All right reserved.

if [ -z "$1" ];  then
	echo "Usage: $0 <wine-prefix-path> <executable>"
fi

exe_path="cmd.exe"
if [ ! -z "$2" ]; then
	exe_path="$2"
fi

MTL_HUD_ENABLED=1 WINEESYNC=1 WINEPREFIX="$1" `brew --prefix game-porting-toolkit`/bin/wine64 "$exe_path" 2>&1 | grep "D3DM"

It's not even that well written: it does not allow you to give any extra argument to the exe provided like wine's executable does, and gamers throw in extra arguments a lot for flags like -dx12!

The point is: it's not that good, we don't need to stick to "intended" here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants