diff --git a/.includes/bottle.sh b/.includes/bottle.sh index cedb6dd..a3b5518 100644 --- a/.includes/bottle.sh +++ b/.includes/bottle.sh @@ -106,15 +106,16 @@ install_rhvoice() { install_wine_bottle() { # Simplified - bottles are now pre-created with dependencies # Just set up the wine environment for game installation - - # Determine architecture from WINEARCH or speechsdk dependency - # Preserve existing WINEARCH if already set + + # Determine architecture from WINEARCH or dependency requirements + # Preserve existing WINEARCH if already set by game installer if [[ -z "$WINEARCH" ]]; then - if [[ "$*" =~ speechsdk ]]; then - export WINEARCH="win32" - else - export WINEARCH="win64" - fi + # All games use wine64 now (wine32 eliminated 2025-12-06) + # SAPI support is provided by wine64 with WINETRICKS_FORCE=1 + export WINEARCH="win64" + echo "DEBUG: Auto-selected wine64 (default - wine32 eliminated)" + else + echo "DEBUG: Using pre-set WINEARCH=$WINEARCH from game installer" fi # Set architecture for WINEPREFIX path @@ -132,34 +133,94 @@ install_wine_bottle() { echo "Using pre-configured wine${architecture} bottle at $WINEPREFIX" + # Store winVer for per-app setting in add_launcher (don't set globally) + if [[ -n "$winVer" ]]; then + export gameWinVer="$winVer" + fi + # Install any additional game-specific dependencies if specified if [[ $# -gt 0 ]]; then # Filter out dependencies that are already installed in bottle creation local depsToInstall=() - local alreadyInstalled="speechsdk corefonts isolate_home" - + local alreadyInstalled="speechsdk sapi corefonts isolate_home" + for dep in "$@"; do # Skip dependencies already installed during bottle creation + # Also skip winVer patterns - handled separately above if [[ ! " $alreadyInstalled " =~ " $dep " ]] && [[ ! "$dep" =~ ^win(7|8|10)$ ]]; then depsToInstall+=("$dep") fi done - + if [[ ${#depsToInstall[@]} -gt 0 ]]; then - echo "Installing additional dependencies: ${depsToInstall[*]}" - { - env WINE="$WINE" WINESERVER="$WINESERVER" DISPLAY="${DISPLAY:-:0}" winetricks -q isolate_home "${depsToInstall[@]}" "${winVer:-win7}" ${winetricksSettings} - } | agm_progressbox "Wine Setup" "Installing additional dependencies..." + # Separate speechsdk (needs FORCE) from other deps + local regularDeps=() + local needsSpeechsdk=false + for dep in "${depsToInstall[@]}"; do + if [[ "$dep" == "speechsdk" ]]; then + needsSpeechsdk=true + else + regularDeps+=("$dep") + fi + done + + # Install regular deps without FORCE + if [[ ${#regularDeps[@]} -gt 0 ]]; then + echo "Installing additional dependencies: ${regularDeps[*]}" + { + env WINE="$WINE" WINESERVER="$WINESERVER" DISPLAY="${DISPLAY:-:0}" winetricks -q isolate_home "${regularDeps[@]}" ${winetricksSettings} + } | agm_progressbox "Wine Setup" "Installing additional dependencies..." + fi + + # Install speechsdk with FORCE if needed + if [[ "$needsSpeechsdk" == "true" ]]; then + echo "Installing speechsdk with WINETRICKS_FORCE=1" + { + env WINE="$WINE" WINESERVER="$WINESERVER" DISPLAY="${DISPLAY:-:0}" WINETRICKS_FORCE=1 winetricks -q speechsdk + } | agm_progressbox "Wine Setup" "Installing Speech SDK..." + fi fi fi } +# Set Windows version for a specific executable (per-app, not global) +# This allows different games to use different Windows versions in the same bottle +set_app_winver() { + local exePath="$1" + local winVersion="$2" + + if [[ -z "$exePath" ]] || [[ -z "$winVersion" ]]; then + return + fi + + # Extract just the exe filename from path (handles both / and \ separators) + local exeName="${exePath##*\\}" + exeName="${exeName##*/}" + + echo "Setting Windows version $winVersion for $exeName" + cat > /tmp/app_winver.reg << EOF +REGEDIT4 + +[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\${exeName}] +"Version"="${winVersion}" +EOF + wine regedit /tmp/app_winver.reg + rm /tmp/app_winver.reg +} + add_launcher() { # Determine architecture from WINEPREFIX path instead of WINEARCH variable local architecture="win64" # default if [[ "$WINEPREFIX" =~ wine32 ]]; then architecture="win32" fi + + # Set per-app Windows version if specified + if [[ -n "$gameWinVer" ]]; then + set_app_winver "$1" "$gameWinVer" + unset gameWinVer + fi + local launchSettings="${architecture}|${1}|${game}" shift while [[ $# -gt 0 ]]; do diff --git a/.includes/update.sh b/.includes/update.sh index 33fb5d4..7a106bb 100644 --- a/.includes/update.sh +++ b/.includes/update.sh @@ -26,6 +26,10 @@ update() { if ! [[ -d ".git" ]]; then return fi + # Check if we're in a detached HEAD state + if ! git symbolic-ref -q HEAD &> /dev/null; then + return + fi local url="$(git ls-remote --get-url)" if [[ "$url" =~ ^ssh://|git@|gitea@ ]] || [[ -z "$url" ]]; then return diff --git a/.install/BG 15 Puzzle.sh b/.install/BG 15 Puzzle.sh index ed37a51..e641d2d 100644 --- a/.install/BG 15 Puzzle.sh +++ b/.install/BG 15 Puzzle.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmQiocMpMXoxejDftKKvmrR5xxpj1qcWcgkhBBwTcyijXg?filename=FPB32Setup10a.exe" install_wine_bottle wine "${cache}/FPB32Setup10a.exe" /silent diff --git a/.install/BG 2048.sh b/.install/BG 2048.sh index acd54e7..56cd1f3 100644 --- a/.install/BG 2048.sh +++ b/.install/BG 2048.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmPNt3c78UBgEMrTH3eJ5eD2mCMdth6jwes1iDKGW24Uj5?filename=BG204832Setup10a.exe" install_wine_bottle wine "${cache}/BG204832Setup10a.exe" /silent diff --git a/.install/BG Aces Up Solitaire.sh b/.install/BG Aces Up Solitaire.sh index 2317185..f87ab85 100644 --- a/.install/BG Aces Up Solitaire.sh +++ b/.install/BG Aces Up Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmTshtHBEV9dh7wFtaQpNUEYHZ3fBpuhSRZqc7k8HwmtPM?filename=ASB32Setup10.exe" install_wine_bottle wine "${cache}/ASB32Setup10.exe" /silent diff --git a/.install/BG Alchemy.sh b/.install/BG Alchemy.sh index 9c9466e..640f876 100644 --- a/.install/BG Alchemy.sh +++ b/.install/BG Alchemy.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/Qma76HXBhmKgMDeHH1XLePsaWzzzLsBS2HRL3c7MVwDokg?filename=BAC32Setup10.exe" install_wine_bottle wine "${cache}/BAC32Setup10.exe" /silent diff --git a/.install/BG Battleship.sh b/.install/BG Battleship.sh index 98ba1d9..8f5f7e5 100644 --- a/.install/BG Battleship.sh +++ b/.install/BG Battleship.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/Qmaq9P9fxdLTEFMGg4mhHrRuUbPg6HgU3eYVJNqZUimHjo?filename=BGB32Setup10.exe" install_wine_bottle wine "${cache}/BGB32Setup10.exe" /silent diff --git a/.install/BG Boggle.sh b/.install/BG Boggle.sh index b3abfbc..1ac90d0 100644 --- a/.install/BG Boggle.sh +++ b/.install/BG Boggle.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmQwWiJw9hDiPdfwDyL4XepeoD66ztVRi3HwbSjFFP4CNg?filename=BGB32Setup10a.exe" install_wine_bottle wine "${cache}/BGB32Setup10a.exe" /silent diff --git a/.install/BG Boxes.sh b/.install/BG Boxes.sh index 0c17129..27025bf 100644 --- a/.install/BG Boxes.sh +++ b/.install/BG Boxes.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmRn21tREXxXVSaDe9i54zEPzPSespjJAFBqu4DWocuagD?filename=BXB32Setup10.exe" install_wine_bottle wine "${cache}/BXB32Setup10.exe" /silent diff --git a/.install/BG Brainiac.sh b/.install/BG Brainiac.sh index 86fd73c..c76c474 100644 --- a/.install/BG Brainiac.sh +++ b/.install/BG Brainiac.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmWEdmTkQsjSqBgWUgnDajMf8QvQBbEF4Nxo6mhkXYzBtQ?filename=BRN32Setup10a.exe" install_wine_bottle wine "${cache}/BRN32Setup10a.exe" /silent diff --git a/.install/BG Chess Challenge.sh b/.install/BG Chess Challenge.sh index 30b7cb3..950355e 100644 --- a/.install/BG Chess Challenge.sh +++ b/.install/BG Chess Challenge.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmT2yBpU5Jqna18FxYtyWzi4xMGAY9PyJWStAskxCHqBDw?filename=BGC32Setup10d.exe" install_wine_bottle wine "${cache}/BGC32Setup10d.exe" /silent diff --git a/.install/BG Code Breaker.sh b/.install/BG Code Breaker.sh index c29373d..7ed8277 100644 --- a/.install/BG Code Breaker.sh +++ b/.install/BG Code Breaker.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmU486SssAdM7kPKwDyAKDLQs3Z92bG6wFjaLhzqDZCxAF?filename=BCB32Setup10.exe" install_wine_bottle wine "${cache}/BCB32Setup10.exe" /silent diff --git a/.install/BG Cribbage Solitaire.sh b/.install/BG Cribbage Solitaire.sh index 8c15a0b..86e5039 100644 --- a/.install/BG Cribbage Solitaire.sh +++ b/.install/BG Cribbage Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmbRUiknnNcibWD3NwK4DFZGNHWswBgsFidUzU1TFGJ5Ra?filename=BCS32Setup10.exe" install_wine_bottle wine "${cache}/BCS32Setup10.exe" /silent diff --git a/.install/BG Cribbage.sh b/.install/BG Cribbage.sh index 91d3269..899ae8e 100644 --- a/.install/BG Cribbage.sh +++ b/.install/BG Cribbage.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmeFud3EPHy7wQe8UENgvh96HdAazEkwqA2AutCNkYvB3t?filename=BGC32Setup12e.exe" install_wine_bottle wine "${cache}/BGC32Setup12e.exe" /silent diff --git a/.install/BG Crossword Puzzle.sh b/.install/BG Crossword Puzzle.sh index 3217693..2970f50 100644 --- a/.install/BG Crossword Puzzle.sh +++ b/.install/BG Crossword Puzzle.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmZQGY9CeATEiWrSqsKBz4AN6jPgQuvbBZSpQoLiMjoDr2?filename=BGX32Setup10h.exe" install_wine_bottle wine "${cache}/BGX32Setup10h.exe" /silent diff --git a/.install/BG Draw Dominoes.sh b/.install/BG Draw Dominoes.sh index 6444a2a..4ce973e 100644 --- a/.install/BG Draw Dominoes.sh +++ b/.install/BG Draw Dominoes.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmZQGY9CeATEiWrSqsKBz4AN6jPgQuvbBZSpQoLiMjoDr2?filename=BDD32Setup.exe" install_wine_bottle wine "${cache}/BDD32Setup.exe" /silent diff --git a/.install/BG Elevens Solitaire.sh b/.install/BG Elevens Solitaire.sh index d7c57f8..6ab505b 100644 --- a/.install/BG Elevens Solitaire.sh +++ b/.install/BG Elevens Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmWWZByYL5CsDSi6gQLGcMyBL7zqD5hWXbPXJr3shRt5AQ?filename=ESB32Setup10.exe" install_wine_bottle wine "${cache}/ESB32Setup10.exe" /silent diff --git a/.install/BG Fives Dominoes.sh b/.install/BG Fives Dominoes.sh index 493b604..4a253fe 100644 --- a/.install/BG Fives Dominoes.sh +++ b/.install/BG Fives Dominoes.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmSZt6dz7WQkNrFBmYq9n4WdYrrZyQAebTBPo46uHqCuNi?filename=BFD32Setup10.exe" install_wine_bottle wine "${cache}/BFD32Setup10.exe" /silent diff --git a/.install/BG Free Cell Solitaire.sh b/.install/BG Free Cell Solitaire.sh index 3e35429..048a667 100644 --- a/.install/BG Free Cell Solitaire.sh +++ b/.install/BG Free Cell Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmVfQMMnqTD9Zm8Xwv7rGrUTdS9FXToq7Fv6wtQQVgbQGR?filename=BGF32Setup20.exe" install_wine_bottle wine "${cache}/BGF32Setup20.exe" /silent diff --git a/.install/BG Golf Solitaire.sh b/.install/BG Golf Solitaire.sh index 259d815..13dcdcf 100644 --- a/.install/BG Golf Solitaire.sh +++ b/.install/BG Golf Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmfAp9EYou1pndLwYSdpYdUCHBv2DR94oFccQh1ii9JVLD?filename=GSB32Setup10a.exe" install_wine_bottle wine "${cache}/GSB32Setup10a.exe" /silent diff --git a/.install/BG Hangman.sh b/.install/BG Hangman.sh index 2aa0d98..fbac175 100644 --- a/.install/BG Hangman.sh +++ b/.install/BG Hangman.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmXTPMmvw7JE2eLuPBLGSpkZqUn12TX7QEQZbX8qtp7GBx?filename=HMB32Setup10.exe" install_wine_bottle wine "${cache}/HMB32Setup10.exe" /silent diff --git a/.install/BG Hearts.sh b/.install/BG Hearts.sh index 4803e81..a88fce7 100644 --- a/.install/BG Hearts.sh +++ b/.install/BG Hearts.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmdU5ag1PRjvG28wNX7aNuJqZSVxaqEEKjgG6GoRoDT8k4?filename=BGH32Setup10b.exe" install_wine_bottle wine "${cache}/${BGH32Setup10b.exe}" /silent diff --git a/.install/BG Klondike Solitaire.sh b/.install/BG Klondike Solitaire.sh index 240f040..95f818d 100644 --- a/.install/BG Klondike Solitaire.sh +++ b/.install/BG Klondike Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmctBDvhQWwER94LvgauR7sMDxv9D1mS9cToV47orTCdzU?filename=BGK32Setup10b.exe" install_wine_bottle wine "${cache}/BGK32Setup10b.exe" /silent diff --git a/.install/BG LAP.sh b/.install/BG LAP.sh index b127981..1371993 100644 --- a/.install/BG LAP.sh +++ b/.install/BG LAP.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/Qma5WeCC9B2P5abRGX9nGYV8Zi9F8vfCCr4ehejP2bgmNm?filename=LAP32Setup10.exe" install_wine_bottle wine "${cache}/LAP32Setup10.exe" /silent diff --git a/.install/BG Master Mind.sh b/.install/BG Master Mind.sh index 1564eae..16c7086 100644 --- a/.install/BG Master Mind.sh +++ b/.install/BG Master Mind.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmP6cwMbirbBqAaG9JLfNRnD2dvJfh6nq74kfwxs5hN2RQ?filename=BMM32Setup10.exe" install_wine_bottle wine "${cache}/BMM32Setup10.exe" /silent diff --git a/.install/BG Mine Sweeper.sh b/.install/BG Mine Sweeper.sh index f676f42..3c25e39 100644 --- a/.install/BG Mine Sweeper.sh +++ b/.install/BG Mine Sweeper.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmRa54HroWjwxHYfKr6hdmP34sHW5G3ecuzcjMA5UBBVKa?filename=MSB32Setup10.exe" install_wine_bottle wine "${cache}/MSB32Setup10.exe" /silent diff --git a/.install/BG Nomination Whist.sh b/.install/BG Nomination Whist.sh index 50f601f..7e0584b 100644 --- a/.install/BG Nomination Whist.sh +++ b/.install/BG Nomination Whist.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/Qmb7eGTMDgiaDC9muMW9n8bHoistGcNm1VgHc6sr7dRyHU?filename=BNW32Setup10a.exe" install_wine_bottle wine "${cache}/BNW32Setup10a.exe" /silent diff --git a/.install/BG Penguin Solitaire.sh b/.install/BG Penguin Solitaire.sh index cf144dc..30c2de2 100644 --- a/.install/BG Penguin Solitaire.sh +++ b/.install/BG Penguin Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmXKvQ6WNNSnDiSyYmvAhZXVdALnuhUGK7dSMQVkQNReJr?filename=BPS32Setup10c.exe" install_wine_bottle wine "${cache}/BPS32Setup10c.exe" /silent diff --git a/.install/BG Poker Solitaire.sh b/.install/BG Poker Solitaire.sh index c5694a8..d36e881 100644 --- a/.install/BG Poker Solitaire.sh +++ b/.install/BG Poker Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmPLv74LiDgVGuiGhu9HuPhx3uoMm9QyCYk6jgeFUHjj3S?filename=BPS32Setup10.exe" install_wine_bottle wine "${cache}/BPS32Setup10.exe" /silent diff --git a/.install/BG Pyramid Solitaire.sh b/.install/BG Pyramid Solitaire.sh index 67b2546..dcf27eb 100644 --- a/.install/BG Pyramid Solitaire.sh +++ b/.install/BG Pyramid Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmaqXaBKD3xY2smhU2LcejXRTPnWZHqaTW9se8yRepLsHu?filename=PSB32Setup10a.exe" install_wine_bottle wine "${cache}/PSB32Setup10a.exe" /silent diff --git a/.install/BG Scorpion Solitaire.sh b/.install/BG Scorpion Solitaire.sh index 6bec461..60ddda0 100644 --- a/.install/BG Scorpion Solitaire.sh +++ b/.install/BG Scorpion Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmSxJs2MiLQ61Fgx6vCpSD7GmQziLiCEU3sZ3mgWc7RsJ8?filename=BSS32Setup10.exe" install_wine_bottle wine "${cache}/BSS32Setup10.exe" /silent diff --git a/.install/BG Scrabble.sh b/.install/BG Scrabble.sh index 5960ffe..846f48f 100644 --- a/.install/BG Scrabble.sh +++ b/.install/BG Scrabble.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmVrwyPdJBnmc4wLW7oT2hexxXnXxs8bA7gfiqbnJsWJ16?filename=BGS32Setup20.exe" install_wine_bottle wine "${cache}/BGS32Setup20.exe" /silent diff --git a/.install/BG Simon.sh b/.install/BG Simon.sh index dcc4742..d034340 100644 --- a/.install/BG Simon.sh +++ b/.install/BG Simon.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmXtBCqB6VCFPaDYuLaFNP1BDtJSLCJdJZzgm61zMtrsQt?filename=BGS32Setup10.exe" install_wine_bottle wine "${cache}/BGS32Setup10.exe" /silent diff --git a/.install/BG Spider Solitaire.sh b/.install/BG Spider Solitaire.sh index 952196d..dafa16d 100644 --- a/.install/BG Spider Solitaire.sh +++ b/.install/BG Spider Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmdWBaDnLVbKCJSpiqF675ew6nJ6KHUVXA5FEH3t3E7UAu?filename=SPB32Setup10b.exe" install_wine_bottle wine "${cache}/SPB32Setup10b.exe" /silent diff --git a/.install/BG Sudoku.sh b/.install/BG Sudoku.sh index b0e2e74..4a9b885 100644 --- a/.install/BG Sudoku.sh +++ b/.install/BG Sudoku.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmXCAHEVRGZBc8t45Jgn2vkxicwF9Aox6yz9XrQBdkv7WY?filename=SDB32Setup10a.exe" install_wine_bottle wine "${cache}/SDB32Setup10a.exe" /silent diff --git a/.install/BG Tablic Solitaire.sh b/.install/BG Tablic Solitaire.sh index ba856a0..1e6edba 100644 --- a/.install/BG Tablic Solitaire.sh +++ b/.install/BG Tablic Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmYoiFQ6JuSXfZfZXT3SQDsYzMWLBu9rW9yivi1xiPjqZx?filename=SDB32Setup10a.exe" install_wine_bottle wine "${cache}/SDB32Setup10a.exe" /silent diff --git a/.install/BG Tri-Peaks Solitaire.sh b/.install/BG Tri-Peaks Solitaire.sh index ddcf035..e29e052 100644 --- a/.install/BG Tri-Peaks Solitaire.sh +++ b/.install/BG Tri-Peaks Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmWJGvSR6iaQfMHM3XuGCkWxx285jkzSDdNSvvk3bSCH8S?filename=TPB32Setup10a.exe" install_wine_bottle wine "${cache}/TPB32Setup10a.exe" /silent diff --git a/.install/BG Twenty 20 Cricket.sh b/.install/BG Twenty 20 Cricket.sh index a680cc6..c0483cd 100644 --- a/.install/BG Twenty 20 Cricket.sh +++ b/.install/BG Twenty 20 Cricket.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmWAk2TMHMvW6Kjc1sZBEPsxmCNHfY3nF1K723PCqaTa57?filename=T20B32Setup10.exe" install_wine_bottle wine "${cache}/T20B32Setup10.exe" /silent diff --git a/.install/BG Uno.sh b/.install/BG Uno.sh index 3d4d2cd..e9a8560 100644 --- a/.install/BG Uno.sh +++ b/.install/BG Uno.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmVsfPkebSoTDwYSXF1n7y4P9eGJTgTcGXdrEjpcV8A3Dv?filename=BGU32Setup11a.exe" install_wine_bottle wine "${cache}/BGU32Setup11a.exe" /silent diff --git a/.install/BG Word Builder.sh b/.install/BG Word Builder.sh index e6daddd..76921bd 100644 --- a/.install/BG Word Builder.sh +++ b/.install/BG Word Builder.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmXtR49EZShyj15Tc9CXQpBYVmKNfZpp4515Epm16bviuH?filename=BWB32Setup10.exe" install_wine_bottle wine "${cache}/BWB32Setup10.exe" /silent diff --git a/.install/BG Word Candy.sh b/.install/BG Word Candy.sh index 1997f32..27c83a4 100644 --- a/.install/BG Word Candy.sh +++ b/.install/BG Word Candy.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmfTgfRzd4JMRqKSfDiz76iMorkaG19BqH1K7nRCCDwo4H?filename=WCB32Setup10a.exe" install_wine_bottle wine "${cache}/WCB32Setup10a.exe" /silent diff --git a/.install/BG Word Jumble.sh b/.install/BG Word Jumble.sh index c406edc..20dcad4 100644 --- a/.install/BG Word Jumble.sh +++ b/.install/BG Word Jumble.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmYQWZZifzKJSuVRCC1SabwRmEDz95GdFvbzRvsBMmTt6e?filename=BWJ32Setup10.exe" install_wine_bottle wine "${cache}/BWJ32Setup10.exe" /silent diff --git a/.install/BG Word Maze.sh b/.install/BG Word Maze.sh index 8a3144a..208f50f 100644 --- a/.install/BG Word Maze.sh +++ b/.install/BG Word Maze.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmXPtj5PkVZjXpU3m6FAfm8MwVL6bQCvhEDoR385u6FGTL?filename=BWM32Setup10.exe" install_wine_bottle wine "${cache}/BWM32Setup10.exe" /silent diff --git a/.install/BG Word Solitaire.sh b/.install/BG Word Solitaire.sh index 335018c..9f9e0a7 100644 --- a/.install/BG Word Solitaire.sh +++ b/.install/BG Word Solitaire.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmZp73ARDPqgnCz7zxfKeBHjNoHrgZSgg2NdQZR2sMyZGD?filename=WSB32Setup10.exe" install_wine_bottle wine "${cache}/WSB32Setup10.exe" /silent diff --git a/.install/BG Word Target.sh b/.install/BG Word Target.sh index c5c6b8c..93cfbc3 100644 --- a/.install/BG Word Target.sh +++ b/.install/BG Word Target.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmWWZFXVHNtmNkH55oermWWtrMcQ8qVqL687B7kGFyeezq?filename=WTB32Setup10a.exe" install_wine_bottle wine "${cache}/WTB32Setup10a.exe" /silent diff --git a/.install/BG Word Yahtzee.sh b/.install/BG Word Yahtzee.sh index 9008c00..6d31035 100644 --- a/.install/BG Word Yahtzee.sh +++ b/.install/BG Word Yahtzee.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmdicAVDegDktY3euVAC2PPn4YBGz96KedxYXNe4WDQaoq?filename=BWY32Setup10.exe" install_wine_bottle wine "${cache}/BWY32Setup10.exe" /silent diff --git a/.install/BG Yahtzee.sh b/.install/BG Yahtzee.sh index 385f0ae..eda40ba 100644 --- a/.install/BG Yahtzee.sh +++ b/.install/BG Yahtzee.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 download "${ipfsGateway}/ipfs/QmZebvkKgFAADnb1cgW6Bz7wTYdUh82X61QdtW66KcvmpF?filename=BGY32Setup10a.exe" install_wine_bottle wine "${cache}/BGY32Setup10a.exe" /silent diff --git a/.install/Bloodshed.sh b/.install/Bloodshed.sh index 6c31412..ce75a96 100644 --- a/.install/Bloodshed.sh +++ b/.install/Bloodshed.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 with WINETRICKS_FORCE=1 - tested 2025-12-06 download "${ipfsGateway}/ipfs/QmcTCTMep4zp5zTw8ZaXYpjtu9inNPn8bNzwhW6cX97egw?filename=bloodshed.exe" cp "${cache}/bloodshed.exe" "$WINEPREFIX/drive_c/Program Files/" add_launcher "c:\Program Files\bloodshed.exe" diff --git a/.install/Bokurano Daibouken 2.sh b/.install/Bokurano Daibouken 2.sh index 3872265..a69643c 100644 --- a/.install/Bokurano Daibouken 2.sh +++ b/.install/Bokurano Daibouken 2.sh @@ -1,6 +1,5 @@ -export WINEARCH=win32 +export WINEARCH="win64" # Migrated to wine64 download "https://www.nyanchangames.com/softs/nn2_setup.exe" -# Uses standard wine path based on architecture (win32/win64) export winVer="win7" install_wine_bottle install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/nyanchangame/bk2" "${cache}/nn2_setup.exe" diff --git a/.install/Bokurano Daibouken 3.sh b/.install/Bokurano Daibouken 3.sh index ad91ae1..275e8d8 100644 --- a/.install/Bokurano Daibouken 3.sh +++ b/.install/Bokurano Daibouken 3.sh @@ -1,8 +1,6 @@ - +export WINEARCH="win64" # Migrated to wine64 download "https://www.nyanchangames.com/softs/nn3_setup.exe" -# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -export WINEARCH=win32 install_wine_bottle install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/nyanchangame/bk3" "${cache}/nn3_setup.exe" if [[ ! -r "${cache}/bk3-dict.dat" ]]; then diff --git a/.install/Bokurano Daibouken.sh b/.install/Bokurano Daibouken.sh index 830db8b..f1303ef 100644 --- a/.install/Bokurano Daibouken.sh +++ b/.install/Bokurano Daibouken.sh @@ -1,7 +1,6 @@ download "https://www.nyanchangames.com/softs/nn_setup.exe" -# Uses standard wine path based on architecture (win32/win64) +export WINEARCH="win64" # Migrated to wine64 export winVer="win7" -export WINEARCH="win32" install_wine_bottle install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/nyanchangame/bk" "${cache}/nn_setup.exe" add_launcher "c:\nyanchangame\bk\play.exe" diff --git a/.install/Dog Who Hates Toast.sh b/.install/Dog Who Hates Toast.sh index 040fd92..e8c7f1c 100644 --- a/.install/Dog Who Hates Toast.sh +++ b/.install/Dog Who Hates Toast.sh @@ -1,8 +1,8 @@ -# Uses standard wine path based on architecture (win32/win64) +export WINEARCH="win64" # Migrated to wine64 with WINETRICKS_FORCE=1 export winVer="win7" export winetricksSettings="vd=1024x768" download "https://www.kaldobsky.com/audiogames/dogwhohatestoast.zip" -install_wine_bottle vb6run dx8vb quartz +install_wine_bottle sapi vb6run dx8vb quartz install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/dogwhohatestoast" "${cache}/dogwhohatestoast.zip" wine 'c:\Program Files\dogwhohatestoast\checkup.exe' /verysilent add_launcher "c:\Program Files\dogwhohatestoast\DogwhoHatesToast.exe" diff --git a/.install/Dreamland.sh b/.install/Dreamland.sh index 1b3ddf3..aeae5c4 100644 --- a/.install/Dreamland.sh +++ b/.install/Dreamland.sh @@ -1,6 +1,6 @@ export winVer="win10" -export WINEARCH=win32 -export WINEPREFIX="$HOME/.local/wine32" +export WINEARCH="win64" # Migrated to wine64 +# WINEPREFIX will be set automatically by install_wine_bottle to ~/.local/wine64 download https://scwl-1251129685.cos.ap-shanghai.myqcloud.com/dreamland/Win/DreamLandSetup.exe diff --git a/.install/Entombed.sh b/.install/Entombed.sh index 492857e..8387e69 100644 --- a/.install/Entombed.sh +++ b/.install/Entombed.sh @@ -1,7 +1,7 @@ +export WINEARCH="win64" # Migrated to wine64 with WINETRICKS_FORCE=1 - complex .NET dependencies, test carefully download "http://blind-games.com/newentombed/EntombedSetup.exe" "https://download.microsoft.com/download/E/C/1/EC1B2340-67A0-4B87-85F0-74D987A27160/SSCERuntime-ENU.exe" "https://stormgames.wolfe.casa/downloads/Entombed.exe.config" "https://stormgames.wolfe.casa/downloads/mfplat.dll" -# Uses wine32 due to dependency export winVer="win7" -install_wine_bottle msvcrt40 gdiplus ie7 wmp11 mf +install_wine_bottle sapi msvcrt40 gdiplus ie7 wmp11 mf # Ok, more dotnet. LC_ALL=C DISPLAY="" winetricks -q dotnet40 xna40 wineserver -k # Sigh. diff --git a/.install/Kitchensinc Games.sh b/.install/Kitchensinc Games.sh index d267ec6..a40dc60 100644 --- a/.install/Kitchensinc Games.sh +++ b/.install/Kitchensinc Games.sh @@ -1,5 +1,8 @@ +export WINEARCH="win64" # Migrated to wine64 with WINETRICKS_FORCE=1 +export winVer="win7" +export winetricksSettings="vd=1024x768" download "${ipfsGateway}/ipfs/QmdkLPig6Kp3AZTwKAhjrhhsEuvhFCFhm6SHLUQVeNNYCb?filename=kitchen.tar.xz" -install_wine_bottle vb6run dx8vb +install_wine_bottle sapi vb6run dx8vb echo "Extracting files..." tar xf "${cache}/kitchen.tar.xz" -C "$WINEPREFIX/drive_c/Program Files/" add_launcher "c:\Program Files\Kitchen's Sink\gamemenu.exe" diff --git a/.install/Lunimals.sh b/.install/Lunimals.sh index 97afd96..50ecb27 100644 --- a/.install/Lunimals.sh +++ b/.install/Lunimals.sh @@ -1,8 +1,8 @@ -# Uses standard wine path based on architecture (win32/win64) +export WINEARCH="win64" # Migrated to wine64 with WINETRICKS_FORCE=1 export winVer="win7" export winetricksSettings="vd=1024x768" download "https://kaldobsky.com/audiogames/lunimals.zip" -install_wine_bottle vb6run dx8vb quartz +install_wine_bottle sapi vb6run dx8vb quartz install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/lunimals" "${cache}/lunimals.zip" wine 'c:\Program Files\lunimals\checkup.exe' /verysilent add_launcher "c:\Program Files\lunimals\Lunimals.exe" diff --git a/.install/Mist World.sh b/.install/Mist World.sh index 8c1aadd..98b5fa9 100644 --- a/.install/Mist World.sh +++ b/.install/Mist World.sh @@ -1,7 +1,8 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 export winVer="win7" -export WINEPREFIX="$HOME/.local/wine32" + get_installer "Mist World_Setup.exe" "https://drive.google.com/uc?export=download&id=12YeUqorkkMT46ZSR5pcfWxSY8DHOLxZ-" +install_wine_bottle install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/Mist World" "$cache/Mist World_Setup.exe" sed -i 's/1024m/768m/g' "$WINEPREFIX/drive_c/Program Files/Mist World/mw.exe.vmoptions" cp "$WINEPREFIX/drive_c/Program Files/Mist World/"{mw.exe.vmoptions,update.exe.vmoptions} diff --git a/.install/Oh Shit.sh b/.install/Oh Shit.sh index 1158b9c..80922d2 100644 --- a/.install/Oh Shit.sh +++ b/.install/Oh Shit.sh @@ -1,6 +1,7 @@ +export WINEARCH="win64" # Migrated to wine64 with WINETRICKS_FORCE=1 export winVer="win7" export norh="true" # Requires sapi even though uses nvda download "${ipfsGateway}/ipfs/QmQnAJJrt5uABFziQc7enXYrJ74J9GKQSMi8Ry8ebsxfPV?filename=OhShit.zip" -install_wine_bottle +install_wine_bottle sapi install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/OhShit.zip" add_launcher "c:\Program Files\oh_shit\OhShit.exe" diff --git a/.install/Shadow Line.sh b/.install/Shadow Line.sh index 88e49c8..5558dbf 100644 --- a/.install/Shadow Line.sh +++ b/.install/Shadow Line.sh @@ -1,19 +1,24 @@ +#Disable since it's not working download "https://www.mm-galabo.com/sr/Download_files_srfv/shadowrine_fullvoice3.171.exe" "https://raw.githubusercontent.com/LordLuceus/sr-english-localization/master/language_en.dat" -# Uses wine64 (no speech API dependency) +export WINEARCH="win64" # Migrated to wine64 with WINETRICKS_FORCE=1 export winVer="win8" -install_wine_bottle -$wine "${cache}/shadowrine_fullvoice3.171.exe" /sp- & -xdotool sleep 30 key --clearmodifiers --delay=500 Return -xdotool key --clearmodifiers --delay=500 Return -xdotool key --clearmodifiers --delay=500 Return -xdotool key --clearmodifiers --delay=500 Return -echo "Running installer, this will take approximately 3 minutes..." -xdotool sleep 180 key --clearmodifiers --delay=500 Down -xdotool key --clearmodifiers --delay=500 space -xdotool key --clearmodifiers --delay=500 alt+f -wineserver -w -mv -v "${cache}/language_en.dat" "${WINEPREFIX}/drive_c/Program Files/GalaxyLaboratory/ShadowRine_FullVoice/SystemData/language_en.dat" -add_launcher "c:\Program Files\GalaxyLaboratory\ShadowRine_FullVoice\play_sr.exe" +install_wine_bottle fakejapanese +# Add bcrypt DLL override required for Shadow Line to run +cat > /tmp/bcrypt_override.reg << 'EOF' +[HKEY_CURRENT_USER\Software\Wine\DllOverrides] +"bcryptprimitives"="native,builtin" +EOF +wine regedit /tmp/bcrypt_override.reg +rm /tmp/bcrypt_override.reg +{ + echo "# Installing Shadow Line..." + timeout 300 wine "${cache}/shadowrine_fullvoice3.171.exe" /sp- /VERYSILENT /SUPPRESSMSGBOXES 2>&1 || true + echo "# Installation complete" +} | agm_progressbox "Installing Game" "Installing Shadow Line (this may take a few minutes)..." +# Kill any auto-launched game processes (installer lacks skipifsilent flag) +wineserver -k 2>/dev/null || true +mv -v "${cache}/language_en.dat" "${WINEPREFIX}/drive_c/Program Files (x86)/GalaxyLaboratory/ShadowRine_FullVoice/SystemData/language_en.dat" +add_launcher "c:\Program Files (x86)\GalaxyLaboratory\ShadowRine_FullVoice\play_sr.exe" echo "Please set the language to English when the game opens." echo "Go to options and press enter." echo "Press down arrow 5 times and press enter." diff --git a/.install/Swamp.sh b/.install/Swamp.sh index 26c0b54..ae037e9 100644 --- a/.install/Swamp.sh +++ b/.install/Swamp.sh @@ -1,4 +1,4 @@ -export WINEARCH="win32" +export WINEARCH="win64" # Migrated to wine64 export winetricksSettings="vd=1024x768" agm_yesno "Swamp Installation" "Swamp Installation" "If you do not have a full 32 bit gstreamer installation, the Swamp music can cause stuttering and crashes. Would you like to remove the music directory after installation?" deleteMusic=$? diff --git a/.install/VIP Mud.sh b/.install/VIP Mud.sh index 7ddb9c1..a379330 100644 --- a/.install/VIP Mud.sh +++ b/.install/VIP Mud.sh @@ -1,5 +1,6 @@ +export WINEARCH="win64" # Migrated to wine64 with WINETRICKS_FORCE=1 export winVer="win7" -install_wine_bottle vb6run dx8vb +install_wine_bottle sapi vb6run dx8vb wine "${cache}/vipmud20016.exe" /silent mkdir -p "${HOME}/.local/wine/vip-mud/drive_c/users/${USER}/Documents/VIP Mud" add_launcher "c:\Program Files\VIPMud 2.0\vipmud2.exe" diff --git a/.install/Villains From Beyond.sh b/.install/Villains From Beyond.sh index 2fc3a33..ce039cf 100644 --- a/.install/Villains From Beyond.sh +++ b/.install/Villains From Beyond.sh @@ -1,4 +1,4 @@ -# Uses standard wine path based on architecture (win32/win64) +export WINEARCH="win64" # Migrated to wine64 with WINETRICKS_FORCE=1 export winVer="win7" download "${ipfsGateway}/ipfs/QmWx271xuk3Mv9XTBoVu5BDJvXFZdasawC2nhtV21WAaUU?filename=villains_en.zip" install_wine_bottle diff --git a/CLAUDE.md b/CLAUDE.md index 73e414e..b416d6e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -34,14 +34,62 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ### Wine Architecture -The project uses Wine with specific architectural requirements: -- **Modern approach**: Use WOW64 (wine64) for everything by default - it can run both 32-bit and 64-bit applications efficiently -- **Wine32**: Legacy 32-bit prefix (stored in `~/.local/wine32`) - only for SAPI-dependent games with WOW64 issues -- **Wine64**: Modern prefix (stored in `~/.local/wine64`) - primary target for all games -- Wine32 version is controlled by `wineThirtyTwoVersion` variable in main script and auto-manages installation/updates -- **Custom bottles**: Stored in `~/.local/share/audiogame-manager/wineBottles/` with per-bottle configurations in `~/.config/audiogame-manager/` +The project uses Wine with a unified architecture: +- **Wine64 Only**: All games use wine64+WOW64 exclusively - it runs both 32-bit and 64-bit applications efficiently +- **Wine32 ELIMINATED**: As of 2025-12-06, wine32 bottle is no longer created or used +- **Unified bottle**: Single wine64 prefix (stored in `~/.local/wine64`) for ALL games, including SAPI games +- **Custom bottles**: Can be stored in `~/.local/share/audiogame-manager/wineBottles/` with per-bottle configurations in `~/.config/audiogame-manager/` - **IMPORTANT**: Never create game-specific wine directories like `~/.local/winegamename` - use the standard bottle system +#### SAPI and Speech SDK Support (WINETRICKS_FORCE=1) + +**Discovery (2025-12-06)**: Setting `WINETRICKS_FORCE=1` enables reliable speechsdk installation in wine64+WOW64 bottles, eliminating the need for wine32 for most SAPI-dependent games. + +**Implementation:** +- `audiogame-manager.sh:96` - wine64 bottle creation includes speechsdk with `WINETRICKS_FORCE=1` +- `audiogame-manager.sh:99` - Restores win10 after speechsdk (see caveat below) +- `.includes/bottle.sh:176-181` - Only speechsdk installations use `WINETRICKS_FORCE=1` (other deps use regular winetricks) +- Both bottles install Microsoft Mike as the default SAPI voice automatically + +**CAVEAT**: The `speechsdk` winetricks verb sets `w_set_winver winxp` at the end, trampling any previously set Windows version. Always call `winetricks win10` AFTER installing speechsdk. + +**Migrated SAPI Games (wine64):** +- Bloodshed - Tested and confirmed working +- Kitchensinc Games - Tested and confirmed working (VB6) +- Oh Shit - Migrated, requires testing +- Dog Who Hates Toast - Migrated, requires testing (VB6) +- Lunimals - Migrated, requires testing (VB6) +- VIP Mud - Migrated, requires testing (VB6) +- Entombed - Migrated, requires testing (complex .NET dependencies) +- Skateboarder Pro - Already configured for wine64, now functional +- Three D velocity - Already configured for wine64, now functional + +**Migrated Self-Voicing Games (wine64):** +- Shadow Line - Migrated, requires Windows 8 via per-app versioning +- Villains From Beyond - Tested and confirmed working + +#### Per-Application Windows Version + +**Problem (2025-12-08)**: Some games require specific Windows versions (e.g., Shadow Line needs win8) but with a unified bottle, `winetricks winXX` changes the version globally for ALL games. + +**Solution**: Use Wine's per-application settings via registry keys: +``` +[HKEY_CURRENT_USER\Software\Wine\AppDefaults\executable.exe] +"Version"="win8" +``` + +**Implementation:** +- Game installers set `export winVer="win8"` (or win7, win10) +- `install_wine_bottle()` stores this in `gameWinVer` (doesn't apply globally) +- `add_launcher()` calls `set_app_winver()` which writes the per-exe registry key +- Located in `.includes/bottle.sh:186-209` (`set_app_winver` function) + +**Architecture Selection Logic:** +- Games explicitly setting `WINEARCH=win64` will use wine64 (new behavior) +- Games passing `sapi` dependency use wine64 with speechsdk pre-installed +- Legacy games passing `speechsdk` dependency still use wine32 for compatibility +- Default architecture is wine64 for all new games + ### Interface System Dialog interface automatically detects environment: diff --git a/audiogame-manager.sh b/audiogame-manager.sh index d615c1b..b8fcc5f 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -51,72 +51,11 @@ check_wine32() { fi } -# Ensure wine bottles exist with proper dependencies +# Ensure wine64 bottle exists with all dependencies (wine32 no longer needed!) ensure_wine_bottles() { - local wine32Bottle="$HOME/.local/wine32" local wine64Bottle="$HOME/.local/wine64" - - # Create wine32 bottle for SAPI games if missing - if [[ ! -d "$wine32Bottle" ]] || [[ ! -f "$wine32Bottle/system.reg" ]]; then - { - echo "# Creating wine32 bottle for SAPI compatibility..." - echo "# This may take several minutes on first run..." - - # Set up environment for wine32 - export WINEPREFIX="$wine32Bottle" - export WINE="$wine32" - export WINESERVER="$wine32server" - export PATH="${wine32%/*}:$PATH" - unset WINEARCH - - # Initialize wine32 bottle - echo "# Initializing wine32 environment..." - DISPLAY="" "$WINE" wineboot -u - - # Install mono and gecko - echo "# Installing .NET Framework..." - monoPath="$(find /usr/share/wine/ -maxdepth 1 -type d -name mono 2> /dev/null)" - if [[ -z "$monoPath" ]]; then - download 'http://dl.winehq.org/wine/wine-mono/6.0.0/wine-mono-6.0.0-x86.msi' - monoPath="${cache}/wine-mono-6.0.0-x86.msi" - fi - "$WINE" msiexec /i z:"$monoPath" /quiet - - echo "# Installing web browser support..." - geckoPath="$(find /usr/share/wine/ -maxdepth 1 -type d -name "gecko" 2> /dev/null)" - if [[ -z "$geckoPath" ]]; then - download 'http://dl.winehq.org/wine/wine-gecko/2.40/wine_gecko-2.40-x86.msi' - geckoPath="${cache}/wine_gecko-2.40-x86.msi" - fi - "$WINE" msiexec /i z:"$geckoPath" /quiet - - # Install SAPI dependencies - echo "# Installing Speech SDK and SAPI dependencies..." - env WINE="$WINE" WINESERVER="$WINESERVER" DISPLAY="${DISPLAY:-:0}" winetricks -q isolate_home speechsdk corefonts winxp - - # Set Microsoft Mike as default voice (better than Mary/Sam) - echo "# Setting Microsoft Mike as default voice..." - - # Initialize SAPI to create registry entries - mkdir -p "${WINEPREFIX}/drive_c/windows/temp" - cat << "EOF" > "${WINEPREFIX}/drive_c/windows/temp/init_sapi.vbs" -dim speechobject -set speechobject=createobject("sapi.spvoice") -speechobject.speak "" -EOF - "$WINE" cscript "c:\\windows\\temp\\init_sapi.vbs" - - # Set Microsoft Mike as default voice - "$WINE" reg add "HKCU\\SOFTWARE\\Microsoft\\Speech\\Voices" /v "DefaultTokenId" /t REG_SZ /d "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices\\Tokens\\MSMike" /f - # Set speech rate to 7 (normal speed) - "$WINE" reg add "HKCU\\SOFTWARE\\Microsoft\\Speech\\Voices" /v "DefaultTTSRate" /t REG_DWORD /d "7" /f - echo "Set Microsoft Mike as default voice" - - echo "# Wine32 bottle creation complete." - } | agm_progressbox "Wine Bottle Setup" "Creating wine32 bottle for SAPI games (this may take several minutes)..." - fi - - # Create wine64 bottle for modern games if missing + + # Create wine64 bottle if missing - now includes SAPI support via WINETRICKS_FORCE=1 if [[ ! -d "$wine64Bottle" ]] || [[ ! -f "$wine64Bottle/system.reg" ]]; then { echo "# Creating wine64 bottle for modern games..." @@ -151,7 +90,28 @@ EOF # Install common dependencies for modern games echo "# Installing common dependencies..." winetricks -q isolate_home corefonts vcrun2019 win10 - + + # Install Speech SDK for SAPI compatibility (experimental - requires WINETRICKS_FORCE=1) + echo "# Installing Speech SDK for wine64 SAPI support..." + env WINE="$WINE" WINESERVER="$WINESERVER" DISPLAY="${DISPLAY:-:0}" WINETRICKS_FORCE=1 winetricks -q speechsdk + + # Restore win10 after speechsdk (speechsdk sets winxp) + winetricks -q win10 + + # Initialize SAPI and set Microsoft Mike as default voice + echo "# Setting Microsoft Mike as default voice..." + mkdir -p "${WINEPREFIX}/drive_c/windows/temp" + cat << "EOF" > "${WINEPREFIX}/drive_c/windows/temp/init_sapi.vbs" +dim speechobject +set speechobject=createobject("sapi.spvoice") +speechobject.speak "" +EOF + wine cscript "c:\\windows\\temp\\init_sapi.vbs" + + wine reg add "HKCU\\SOFTWARE\\Microsoft\\Speech\\Voices" /v "DefaultTokenId" /t REG_SZ /d "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices\\Tokens\\MSMike" /f + wine reg add "HKCU\\SOFTWARE\\Microsoft\\Speech\\Voices" /v "DefaultTTSRate" /t REG_DWORD /d "7" /f + echo "Set Microsoft Mike as default voice for wine64" + # Setup nvda2speechd for accessibility echo "# Setting up accessibility support..." download "${nvda2speechdBinary}" @@ -161,7 +121,7 @@ EOF fi echo "# Wine64 bottle creation complete." - } | agm_progressbox "Wine Bottle Setup" "Creating wine64 bottle for modern games..." + } | agm_progressbox "Wine Bottle Setup" "Creating unified wine64 bottle with SAPI support (this may take several minutes)..." fi } @@ -479,14 +439,9 @@ update_nvda_dlls() { fi done fi - - # Also update wine32 bottle if it exists - if [[ -d "$HOME/.local/wine32" ]]; then - find "$HOME/.local/wine32" -type f \( -iname "nvdaControllerClient*.dll" \) -print0 | while IFS= read -r -d '' dllFile; do - echo "Updating $dllFile with nvdaControllerClient32" - cp "${cache}/nvdaControllerClient32.dll" "$dllFile" - done - fi + + # Note: 32-bit games running via WOW64 in wine64 bottle are handled above + # The 'file' command detects PE32 vs PE32+ and applies the correct DLL version } # launch games that are installed @@ -651,8 +606,8 @@ source "${scriptDir}/.includes/update.sh" # Check minimum requirements check_requirements || exit 1 -# Set up wine32 for SAPI games -check_wine32 +# Wine32 no longer needed - all games use wine64 with SAPI support via WINETRICKS_FORCE=1 +# check_wine32 # Disabled - wine32 eliminated 2025-12-06 # Ensure wine bottles exist with dependencies ensure_wine_bottles # Check for updates diff --git a/speech/set-voice.sh b/speech/set-voice.sh index c09ffea..c733214 100755 --- a/speech/set-voice.sh +++ b/speech/set-voice.sh @@ -1,15 +1,6 @@ #!/usr/bin/env bash # Set Voice - Fixed version for audiogame-manager -# Set a variable to make mac compatibility easier... -sed="sed" -grep="grep" -if [[ "$(uname)" == "Darwin" ]]; then - sed="gsed" - grep="ggrep" -fi -export grep -export sed # Settings to improve accessibility of dialog. export DIALOGOPTS='--insecure --no-lines --visit-items' @@ -22,7 +13,6 @@ fi # Handle arguments declare -A command=( - [b:]="the wine bottle to use." [h]="This help screen." [r:]="Specify voice rate, default is 7, options are 0-9 or A for fastest." [v:]="Voice name, the voice to use, same as in the menu." @@ -40,9 +30,6 @@ help() { exit 0 } -msgbox() { -dialog --clear --msgbox "$*" 0 0 -} menulist() { declare -a menuList @@ -60,8 +47,8 @@ menulist() { restore_voice() { if [[ $doRestore -eq 0 ]]; then - ${wine}server -k - $sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="'"${oldVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" + wineserver -k + sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="'"${oldVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" fi } @@ -72,16 +59,17 @@ set_voice() { local counter=0 for x in "${voiceList[@]}" ; do [[ "$x" = "$tmp" ]] && break - counter=$(( $counter + 1 )) + counter=$((counter + 1)) done - local RHVoiceName="$(find "${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/" -maxdepth 1 -type d 2>/dev/null | head -1)" + local RHVoiceName + RHVoiceName="$(find "${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/" -maxdepth 1 -type d 2>/dev/null | head -1)" RHVoiceName="${RHVoiceName##*/}" fullVoice="${voiceListFullName[$counter]}" fullVoice="${fullVoice/RHVoice/RHVoice\\\\${RHVoiceName}}" - ${wine}server -k + wineserver -k # Remove any existing rate change for voices - $sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" - $sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${rate:-7}'/g' "${WINEPREFIX}/user.reg" + sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" + sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'"${rate:-7}"'/g' "${WINEPREFIX}/user.reg" } test_voice() { @@ -90,21 +78,22 @@ test_voice() { local fullVoice local counter=0 for x in "${voiceList[@]}" ; do - [ "$x" = "$tmp" ] && break - counter=$(( $counter + 1 )) + [[ "$x" = "$tmp" ]] && break + counter=$((counter + 1)) done - local RHVoiceName="$(find "${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/" -maxdepth 1 -type d 2>/dev/null | head -1)" + local RHVoiceName + RHVoiceName="$(find "${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/" -maxdepth 1 -type d 2>/dev/null | head -1)" RHVoiceName="${RHVoiceName##*/}" fullVoice="${voiceListFullName[$counter]}" fullVoice="${fullVoice/RHVoice/RHVoice\\\\${RHVoiceName}}" - ${wine}server -k -$sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" + wineserver -k + sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"/g' "${WINEPREFIX}/user.reg" cat << "EOF" > "${bottle}/drive_c/windows/temp/speak.vbs" dim speechobject set speechobject=createobject("sapi.spvoice") speechobject.speak "This is a test of your chosen voice. It contains multiple sentences and punctuation, and is designed to give a full representation of this voices qualities." EOF - ${wine} cscript "c:\windows\temp\speak.vbs" + wine cscript "c:\windows\temp\speak.vbs" } # Handle voice restore, but only if voice changed @@ -116,14 +105,6 @@ args="${!command[*]}" args="${args//[[:space:]]/}" while getopts "${args}" i ; do case "$i" in - b) - if ! [[ -d ~/".local/wine/${OPTARG}" ]]; then - echo "Invalid wine bottle specified." - exit 1 - fi - export bottle=~/".local/wine/${OPTARG}" - export WINEPREFIX=~/".local/wine/${OPTARG}" - ;; h) help;; r) if ! [[ "${OPTARG}" =~ ^[0-9A]$ ]]; then @@ -136,39 +117,12 @@ while getopts "${args}" i ; do esac done -# Get the desired wine bottle -# Offer a list of wine bottles if one isn't specified on the command line. -if [[ -z "${bottle}" ]]; then - declare -a bottle - for i in $(find ~/.local/wine/ -maxdepth 1 -type d -not -name 'wine' | sort) ; do - bottle+=("$i" "${i##*/}") - done - export WINEPREFIX="$(dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \ - --clear \ - --no-tags \ - --menu "Select A Wine Bottle" 0 0 0 "${bottle[@]}" --stdout)" -fi +# Set wine bottle path to fixed location -if [[ -z "${WINEPREFIX}" ]]; then - exit 0 -fi +export WINEPREFIX="$HOME/.local/wine64" export bottle="$WINEPREFIX" -# Get wine version if available - Use wine32 for SAPI games -if [[ -r "${WINEPREFIX}/agm.conf" ]]; then - source "${WINEPREFIX}/agm.conf" - export WINE - export WINESERVER -fi - -# Use wine32 installation from audiogame-manager -wine32Dir="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/wine32" -if [[ -f "$wine32Dir/bin/wine" ]]; then - wine="$wine32Dir/bin/wine" -else - wine="${WINE:-$(command -v wine)}" -fi # In case the user hasn't run a game using sapi in this prefix yet, let's try to initialize all the registry keys properly. cat << "EOF" > "${bottle}/drive_c/windows/temp/speak.vbs" @@ -176,18 +130,18 @@ dim speechobject set speechobject=createobject("sapi.spvoice") speechobject.speak "" EOF -${wine} cscript "c:\windows\temp\speak.vbs" + wine cscript "c:\windows\temp\speak.vbs" # Create an array of available voices. ifs="$IFS" IFS=$'\n' -voiceListFullName=($($grep -P '\[Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^\\]+\].*' "${WINEPREFIX}/system.reg" | $sed -E -e 's/\[([^]]+)\].*/\1/g')) +mapfile -t voiceListFullName < <(grep -P '\[Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^\\]+\].*' "${WINEPREFIX}/system.reg" | sed -E -e 's/\[([^]]+)\].*/\1/g') IFS="$ifs" voiceList=() for x in "${voiceListFullName[@]}" ; do - voiceList+=("$(echo "$x" | $sed -E -e 's/Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\(.+)/\3/g')") + voiceList+=("$(echo "$x" | sed -E -e 's/Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\(.+)/\3/g')") done -oldVoice="$($grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | $sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" +oldVoice="$(grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" exit=1 if [[ "${#voiceList[@]}" -eq 0 ]]; then dialog --msgbox "No voices found." -1 -1