
Ventura on Apple Silicon Mac でDiablo4 を動かす方法
Diablo4 やりたさ過ぎて、とりあえず Game porting toolkit のセットアップして battle.net のゲームできるようになったので記録しておきます。
Battle.net を動かすまでの軌跡
Xcode 15 CLI をインストールしましょう
https://developer.apple.com/download/applications/ へアクセス

Xcode の画面になったら、右上の "Download" から "Xcode 15 beta" をクリックします。なお Vivaldi ではうまくいきませんでした。Safari なら平気だったよ。

ダウンロード可能な Xcode がリストされるので、"Command Line Tools for Xcode 15 beta" をダウンロードしましょう。

あとは、フツーにダウンロードした .pkg をダブルクリックしてインストールです。そこそこ時間かかります。


Rosetta 2 と Game porting toolkit をインストール
ここでいったん "Terminal.app" を起動します。zsh あたりで起動するようにしていたほうが良さそうな気がします。
`softwareupdate --install-rosetta` で Rosetta 2 をインストールします。なんか Package Authoring Error でるの気になりすぎる
softwareupdate --install-rosetta
次は、https://developer.apple.com/download/all/?q=game%20porting%20toolkit から "Game porting toolkit beta" をダウンロードしましょう。

ダウンロードしたら開いてマウントしましょう。
"Game_porting_toolkit_beta.dmg" をダブルクリックするだけです。すると "/Volumes/Game Porting Toolkit-1.0" にマウントされます。
Intel 用 homebrew で game port toolkit をインストール
Terrminal.app 上の shell を intelコードで動くように細工します。
arch -x86_64 zsh
その後、intel platform 用の homebrew をインストールします
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
もともと Sillicon Mac 用の homebrew をインストール済みだと、この後の作業で思った通りには動きません。ので、PATH を intel homebrew へ優先させます。
export PATH="/usr/local/bin:/usr/local/sbin:${PATH}"
`which brew` の結果が '/usr/local/bin/brew' になっていれば正解です。
which brew
/usr/local/bin/brew
次に 'apple/apple' を tap します
brew tap apple/apple http://github.com/apple/homebrew-apple
次に game-porting-toolkit をインストールしましょう。相当時間かかる。なんかコンパイルとか始める。20core 全部使いやがった。M1 Ultra ありがとう。もうホントメッチャ時間かかる。寝る前に流すのが吉。
brew -v install apple/apple/game-porting-toolkit

なんかめっちゃ Warning でるけど `WINEPREFIX=~/my-game-prefix `brew --prefix game-porting-toolkit`/bin/wine64 winecfg` を実行します。
WINEPREFIX=~/my-game-prefix `brew --prefix game-porting-toolkit`/bin/wine64 winecfg
"Wine configuration" ダイアログが出ますから、"Windows Version:" を `Windows 10` にして 'Apply' & 'OK' しましょう。ここを設定してもこれだけだとダメなんですけど、まずこれ第一手。

ということで、Windows10 として認識させるためにレジストリも更新しておきます。1行ずつコピペして実行してください。これやらないと Diablo4 は動作しません。Diablo3 なら動きます。
`brew --prefix game-porting-toolkit`/bin/wine64 reg add 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' /v CurrentBuild /t REG_SZ /d 19042 /f
`brew --prefix game-porting-toolkit`/bin/wine64 reg add 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' /v CurrentBuildNumber /t REG_SZ /d 19042 /f
`brew --prefix game-porting-toolkit`/bin/wineserver -k
かなり前にダウンロードしてマウントしておいた 'Game Porting Toolkit' のライブラリを Wine のライブラリへコピーします。
ditto /Volumes/Game\ Porting\ Toolkit-1.0/lib/ `brew --prefix game-porting-toolkit`/lib/
あとで Toolkit の実行ファイルもアクセスできるように、`/usr/local/bin` へコピーしておくと良いようです。
cp -a /Volumes/Game\ Porting\ Toolkit-1.0/gameportingtoolkit* /usr/local/bin
Battle.net のインストール
さて、そろそろ Diablo4 が動きそうです。まずは Battle.net をダウンロードしましょう。次のリンクからダウンロードします。
https://www.blizzard.com/download/confirmation?platform=windows&locale=en_US&product=bnetdesk
`~/Downloads` にダウンロードしていれば問題なさそうですが、もし別の場所へダウンロードしている場合は `~/my-game-prefix/drive_c/users/crossover/Downloads/` へコピーしておきます。
cp -a ~/Downloads/Battle.net-Setup.exe ~/my-game-prefix/drive_c/users/crossover/Downloads/
さぁ、ついに Battle.net のインストール時間がやってきました。次のコマンドを打ちましょう。
gameportingtoolkit ~/my-game-prefix "C:\users\crossover\Downloads\Battle.net-Setup.exe"






Diablo をインストールする
実はしょっさん、この段階では Diablo4 を買ってないので、Diablo3 を試してみる



ということで、Diablo4 買っても良いんじゃないかと思い始めました。いや、Diablo4 動かせよ。
Diablo4 を動かしていく
ということで、Diablo3 同様 Diablo4 もインストールしていきます。しょっさん、あきらめて Diablo4 を Battle.net から購入です。
それでは、Diablo3 同様にインストールしていきましょう







ということで、フツーに Diablo4 うごきますね。
Lv10前後からやたらとメッチャ死ぬんだけど。難しすぎない?
起動用の Diablo4.App を Automator で作成する
Automator で Diablo4 の起動用アプリを作っておきましょう。Automator を起動して "Application" です。

そうしたら、"Run Shell Script" を右へドラッグ&ドロップして shell を "/bin/zsh" へ一応変更した上で、次の shell script をコピペして、適当に名前を付けて保存します。
#!/bin/zsh
export PATH="/usr/local/sbin:/usr/local/bin:${PATH}"
(arch -x86_64 /usr/local/bin/gameportingtoolkit-no-hud ~/my-game-prefix ~/my-game-prefix/drive_c/Program\ Files\ \(x86\)/Diablo\ IV/Diablo\ IV\ Launcher.exe) || true

あとはアイコンとか好きに変えて、次回以降はこのアプリを実行すれば OK です。
Steam も動く?
わたしのとこではうまく動かすに至っていません。なんかまだおまじないが必要そうです。
gameportingtoolkit ~/my-game-prefix ~/Downloads/SteamSetup.exe

ただ、インストール後の Steam ログイン画面でブラックアウトしてしまう模様。

次のコマンドを繰り返すという処置があるらしい
MTL_HUD_ENABLED=1 WINEESYNC=1 WINEPREFIX=~/my-game-prefix /usr/local/Cellar/game-porting-toolkit/1.0/bin/wine64 'C:\Program Files (x86)\Steam\steam.exe'
揚げ句の果て

steamwebhelper.exe crashes によると Ventura だと厳しいかもしれない
今のとこ感じてる不具合
たまにクラッシュする
アプリのリスタートすると、ちゃんとリスタートしてこないで、wine64-preloader がたくさん起動されたまま残る
同様に wineserver も残るので、実行に支障が出るケースがある
参考情報
reddit r/macgaming - Diablo IV on M1 MAX using MacOS Ventura 全てはここから始まったといっても過言ではない
Playing Diablo IV on macOS ここも詳しいんだけど、Sonoma (macOS 14 Developer Beta 1) で動かしているので参考程度に
Game Porting Toolkit 一番詳しいのはここ
いいなと思ったら応援しよう!
