This repository contains a shell script for injecting Apple Game Porting Toolkit 4.0 binaries into CrossOver Preview.
script-1781332905960.sh
The script locates D3DMetal.framework and libd3dshared.dylib from a mounted
Game Porting Toolkit volume, backs up any existing CrossOver copies to the
Desktop, replaces the binaries inside CrossOver, clears quarantine attributes,
and applies an ad-hoc code signature.
- macOS
- CrossOver Preview installed at
/Applications/CrossOver Preview.app, or a custom path supplied with--crossover - Apple Game Porting Toolkit 4.0 mounted at
/Volumes/Game Porting Toolkit, or a custom path supplied with--gptk-volume - Administrator access for
xattrandcodesign
Run a verification pass first:
./script-1781332905960.sh --verify-onlyPatch CrossOver using the default paths:
./script-1781332905960.shUse custom paths:
./script-1781332905960.sh \
--crossover "/Applications/CrossOver Preview.app" \
--gptk-volume "/Volumes/Game Porting Toolkit"You can also configure paths with environment variables:
CROSSOVER_PATH="/Applications/CrossOver Preview.app" \
GPTK_MOUNT_DIR="/Volumes/Game Porting Toolkit" \
./script-1781332905960.shThe script modifies the CrossOver application bundle by replacing:
D3DMetal.frameworklibd3dshared.dylib
Before replacing files, it creates a backup folder on the Desktop named like:
CrossOver_GPTK_Backup_YYYYMMDDHHMMSS
Open CrossOver, go to the target bottle settings, and add this environment variable:
D3DM_MTL4=1
- CrossOver is force-closed with
killall "CrossOver"before patching. - If the mounted GPTK volume contains a nested evaluation DMG, the script mounts
it automatically and resolves
redist/lib/externalfrom that volume. - The script's built-in help text uses the repository filename:
script-1781332905960.sh.