#!/usr/bin/env bash # Launch neoLegacy under CrossOver 26 (wine 11 + its modern D3D→Metal # translation, DXMT/DXVK on MoltenVK). This fixes the white-window present # bug from the 2023-era DXVK-macOS build. Named "-native" because it uses the # current Apple-Silicon graphics stack, not the legacy one. set -euo pipefail GAME_DIR="${GAME_DIR:-$HOME/neoLegacy/build/windows64-clang-mac/Minecraft.Client}" CX="/Applications/CrossOver.app/Contents/SharedSupport/CrossOver" BOTTLE="${CX_BOTTLE:-neolegacy}" export CX_ROOT="$CX" [[ -f "$GAME_DIR/Minecraft.Client.exe" ]] || { echo "client exe not found in $GAME_DIR" >&2; exit 1; } # The CrossOver `wine` wrapper wires up MoltenVK, the Metal backend and the # bottle env for us. --cx-app takes a full path (host or Z:\ form) and sets # the working directory to the exe's folder, which the game requires for its # relative asset paths. cd "$GAME_DIR" WINPATH="Z:$(echo "$GAME_DIR/Minecraft.Client.exe" | tr '/' '\\')" exec "$CX/bin/wine" --bottle "$BOTTLE" --no-update --cx-app "$WINPATH" "$@"