Last active
June 8, 2023 13:50
-
-
Save prog893/59f26d7f2b3d8743a344350f0041d54d to your computer and use it in GitHub Desktop.
Apple game-porting-toolkit steps for Japanese software
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# not intended to be run as a script, some steps require GUI actions | |
# install Rosetta 2 | |
softwareupdate --install-rosetta | |
# switch to i386 | |
# using full path here to prevent Homebrew-provided zsh, which is only arm64, to be invoked and return errors | |
arch -x86_64 /bin/zsh | |
# install x86_64 brew and alias it for easier future use | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
alias brew_x86_64="/usr/local/bin/brew" | |
# install game-porting-toolkit (takes a lot of time) | |
brew_x86_64 tap apple/apple https://github.com/apple/homebrew-apple | |
brew_x86_64 -v install apple/apple/game-porting-toolkit | |
# set up envvars and aliases for convenience | |
# WINEPREFIX can be anything you like at this point, and folder does not have to exist | |
export GAME_PORTING_TOOLKIT="/usr/local/Cellar/game-porting-toolkit/1.0" | |
export WINE="$GAME_PORTING_TOOLKIT/bin/wine64" | |
export WINEPREFIX="$HOME/gameportingtoolkit" | |
alias apple_wine="$GAME_PORTING_TOOLKIT/bin/wine64" | |
# set Windows version to Windows 10 via GUI | |
# wine prefix folder is set up at this time | |
apple_wine winecfg | |
# download toolkit and copy binary libs to brew game-porting-toolkit formula path | |
# if wget does not work: https://developer.apple.com/download/all/?q=game%20porting%20toolkit | |
wget https://download.developer.apple.com/Developer_Tools/Game_porting_toolkit_beta/Game_porting_toolkit_beta.dmg | |
open Game_porting_toolkit_beta.dmg | |
ditto /Volumes/Game\ Porting\ Toolkit-1.0/lib/ $GAME_PORTING_TOOLKIT | |
# winetricks font replacement install | |
brew_x86_64 install winetricks | |
winetricks cjkfonts fakejapanese | |
# copy game files | |
cp ~/game_path/game.exe $WINEPREFIX/drive_c/users/crossover/Desktop/game.exe | |
# execute while setting LANG and LC_ALL to ja_JP.UTF-8 to ensure Japanese text is rendered properly | |
alias apple_wine_jp="LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8 MTL_HUD_ENABLED=1 WINEESYNC=1 apple_wine" | |
apple_wine_jp "C:\users\crossover\desktop\game.exe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment