2020-12-20 11:19:44 -05:00
|
|
|
#!/usr/bin/env bash
|
2020-12-16 17:16:16 -05:00
|
|
|
|
2025-10-07 10:14:54 -04:00
|
|
|
# Get script directory for relative paths
|
|
|
|
|
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
2026-01-09 12:24:08 -05:00
|
|
|
# Default to running normally unless explicitly set by a caller.
|
|
|
|
|
agmNoLaunch="${agmNoLaunch:-false}"
|
2025-10-07 10:14:54 -04:00
|
|
|
|
2020-09-29 22:07:26 -04:00
|
|
|
# Dialog accessibility
|
|
|
|
|
export DIALOGOPTS='--no-lines --visit-items'
|
|
|
|
|
|
2025-08-07 02:04:06 -04:00
|
|
|
# Wine32 version for SAPI compatibility
|
|
|
|
|
wineThirtyTwoVersion="9.0"
|
|
|
|
|
|
|
|
|
|
# Check and manage wine32 installation
|
|
|
|
|
check_wine32() {
|
|
|
|
|
local wine32Dir="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/wine32"
|
|
|
|
|
local versionFile="$wine32Dir/VERSION"
|
|
|
|
|
local currentVersion=""
|
|
|
|
|
|
|
|
|
|
# Check current installed version
|
|
|
|
|
[[ -f "$versionFile" ]] && currentVersion=$(cat "$versionFile")
|
|
|
|
|
|
|
|
|
|
# If version mismatch or missing, install/update
|
|
|
|
|
if [[ "$currentVersion" != "$wineThirtyTwoVersion" ]]; then
|
|
|
|
|
# Remove old installation
|
|
|
|
|
rm -rf "$wine32Dir" 2>/dev/null
|
|
|
|
|
mkdir -p "$wine32Dir"
|
|
|
|
|
|
2025-08-07 02:18:15 -04:00
|
|
|
# Download wine32 using existing download function
|
|
|
|
|
local wineFile="PlayOnLinux-wine-${wineThirtyTwoVersion}-upstream-linux-x86.tar.gz"
|
|
|
|
|
local wineUrl="https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/${wineFile}"
|
|
|
|
|
|
|
|
|
|
# Use existing download function which handles progress
|
|
|
|
|
download "$wineUrl"
|
|
|
|
|
|
|
|
|
|
# Extract with progress feedback
|
|
|
|
|
{
|
|
|
|
|
echo "# Extracting Wine32 version $wineThirtyTwoVersion..."
|
|
|
|
|
if tar xf "${cache}/${wineFile}" -C "$wine32Dir" --strip-components=1; then
|
2025-08-07 02:04:06 -04:00
|
|
|
echo "$wineThirtyTwoVersion" > "$versionFile"
|
2025-08-07 02:18:15 -04:00
|
|
|
echo "# Wine32 setup complete."
|
2025-08-07 02:04:06 -04:00
|
|
|
else
|
2025-08-07 02:18:15 -04:00
|
|
|
echo "# Failed to extract wine32. SAPI games may not work properly."
|
2025-08-07 02:04:06 -04:00
|
|
|
rm -rf "$wine32Dir"
|
|
|
|
|
fi
|
2025-08-07 02:18:15 -04:00
|
|
|
} | agm_progressbox "Wine32 Setup" "Extracting Wine32 for SAPI compatibility..."
|
2025-08-07 02:04:06 -04:00
|
|
|
fi
|
|
|
|
|
|
2025-08-07 20:18:11 -04:00
|
|
|
# Export wine32 path for bottle creation
|
2025-08-07 02:04:06 -04:00
|
|
|
if [[ -f "$wine32Dir/bin/wine" ]]; then
|
|
|
|
|
export wine32="$wine32Dir/bin/wine"
|
|
|
|
|
export wine32server="$wine32Dir/bin/wineserver"
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
Eliminate wine32 entirely: migrate all games to wine64 with WINETRICKS_FORCE=1
BREAKTHROUGH: Discovered that WINETRICKS_FORCE=1 enables reliable speechsdk
installation in wine64+WOW64, eliminating the need for wine32 bottle.
**Wine Architecture:**
- Removed wine32 bottle creation completely (deleted 58 lines)
- Disabled check_wine32() call - no more PlayOnLinux wine32 downloads
- All games now use unified wine64 bottle with WOW64 for 32-bit apps
- Updated architecture selection to always default to wine64
**SAPI Support:**
- wine64 bottle now includes speechsdk via WINETRICKS_FORCE=1
- Microsoft Mike configured as default SAPI voice in wine64
- Both wine32 and wine64 bottle creation use WINETRICKS_FORCE=1
- Updated bottle.sh to recognize 'sapi' dependency (alongside legacy 'speechsdk')
**Game Migration (57 games):**
- Migrated all 51 BG Enterprise games to wine64
- Migrated 3 Bokurano Daibouken games to wine64
- Migrated Swamp, Dreamland, Mist World to wine64
- Migrated 8 SAPI-dependent games to wine64:
* Bloodshed - TESTED, confirmed working
* Dog Who Hates Toast - TESTED, confirmed working (VB6+SAPI validated)
* Skateboarder Pro - TESTED, confirmed working
* Lunimals, VIP Mud, Oh Shit, Entombed, Three D velocity
**Files Modified:**
- audiogame-manager.sh: Removed wine32 creation, added wine64 speechsdk
- .includes/bottle.sh: Simplified architecture logic, always wine64
- CLAUDE.md: Updated documentation to reflect wine32 elimination
- 57 game installers: Changed WINEARCH from win32 to win64
✅ Bloodshed: wine64 SAPI works perfectly
✅ Dog Who Hates Toast: wine64 VB6+SAPI confirmed working
✅ Skateboarder Pro: wine64 NVDA works perfectly
- WOW64 allows wine64 to run 32-bit apps efficiently
- nvdaControllerClient DLL update logic preserved for 32-bit apps
- Uses 'file' command to detect PE32 vs PE32+ and apply correct DLL version
- Clipboard translator for Bokurano games works with wine64 (requires reinstall)
- Simplified architecture: one bottle instead of two
- Eliminated wine32 download/management overhead
- All games benefit from modern wine64 improvements
- SAPI now works reliably via WINETRICKS_FORCE=1
🚀 Wine32 completely eliminated. All games use wine64.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 23:15:56 -05:00
|
|
|
# Ensure wine64 bottle exists with all dependencies (wine32 no longer needed!)
|
2025-08-07 20:18:11 -04:00
|
|
|
ensure_wine_bottles() {
|
|
|
|
|
local wine64Bottle="$HOME/.local/wine64"
|
Eliminate wine32 entirely: migrate all games to wine64 with WINETRICKS_FORCE=1
BREAKTHROUGH: Discovered that WINETRICKS_FORCE=1 enables reliable speechsdk
installation in wine64+WOW64, eliminating the need for wine32 bottle.
**Wine Architecture:**
- Removed wine32 bottle creation completely (deleted 58 lines)
- Disabled check_wine32() call - no more PlayOnLinux wine32 downloads
- All games now use unified wine64 bottle with WOW64 for 32-bit apps
- Updated architecture selection to always default to wine64
**SAPI Support:**
- wine64 bottle now includes speechsdk via WINETRICKS_FORCE=1
- Microsoft Mike configured as default SAPI voice in wine64
- Both wine32 and wine64 bottle creation use WINETRICKS_FORCE=1
- Updated bottle.sh to recognize 'sapi' dependency (alongside legacy 'speechsdk')
**Game Migration (57 games):**
- Migrated all 51 BG Enterprise games to wine64
- Migrated 3 Bokurano Daibouken games to wine64
- Migrated Swamp, Dreamland, Mist World to wine64
- Migrated 8 SAPI-dependent games to wine64:
* Bloodshed - TESTED, confirmed working
* Dog Who Hates Toast - TESTED, confirmed working (VB6+SAPI validated)
* Skateboarder Pro - TESTED, confirmed working
* Lunimals, VIP Mud, Oh Shit, Entombed, Three D velocity
**Files Modified:**
- audiogame-manager.sh: Removed wine32 creation, added wine64 speechsdk
- .includes/bottle.sh: Simplified architecture logic, always wine64
- CLAUDE.md: Updated documentation to reflect wine32 elimination
- 57 game installers: Changed WINEARCH from win32 to win64
✅ Bloodshed: wine64 SAPI works perfectly
✅ Dog Who Hates Toast: wine64 VB6+SAPI confirmed working
✅ Skateboarder Pro: wine64 NVDA works perfectly
- WOW64 allows wine64 to run 32-bit apps efficiently
- nvdaControllerClient DLL update logic preserved for 32-bit apps
- Uses 'file' command to detect PE32 vs PE32+ and apply correct DLL version
- Clipboard translator for Bokurano games works with wine64 (requires reinstall)
- Simplified architecture: one bottle instead of two
- Eliminated wine32 download/management overhead
- All games benefit from modern wine64 improvements
- SAPI now works reliably via WINETRICKS_FORCE=1
🚀 Wine32 completely eliminated. All games use wine64.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 23:15:56 -05:00
|
|
|
|
|
|
|
|
# Create wine64 bottle if missing - now includes SAPI support via WINETRICKS_FORCE=1
|
2025-08-07 20:18:11 -04:00
|
|
|
if [[ ! -d "$wine64Bottle" ]] || [[ ! -f "$wine64Bottle/system.reg" ]]; then
|
|
|
|
|
{
|
|
|
|
|
echo "# Creating wine64 bottle for modern games..."
|
|
|
|
|
|
|
|
|
|
# Set up environment for wine64
|
|
|
|
|
export WINEPREFIX="$wine64Bottle"
|
|
|
|
|
export WINE="wine"
|
|
|
|
|
export WINESERVER="wineserver"
|
|
|
|
|
unset WINEARCH
|
|
|
|
|
|
|
|
|
|
# Initialize wine64 bottle
|
|
|
|
|
echo "# Initializing wine64 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 common dependencies for modern games
|
|
|
|
|
echo "# Installing common dependencies..."
|
|
|
|
|
winetricks -q isolate_home corefonts vcrun2019 win10
|
Eliminate wine32 entirely: migrate all games to wine64 with WINETRICKS_FORCE=1
BREAKTHROUGH: Discovered that WINETRICKS_FORCE=1 enables reliable speechsdk
installation in wine64+WOW64, eliminating the need for wine32 bottle.
**Wine Architecture:**
- Removed wine32 bottle creation completely (deleted 58 lines)
- Disabled check_wine32() call - no more PlayOnLinux wine32 downloads
- All games now use unified wine64 bottle with WOW64 for 32-bit apps
- Updated architecture selection to always default to wine64
**SAPI Support:**
- wine64 bottle now includes speechsdk via WINETRICKS_FORCE=1
- Microsoft Mike configured as default SAPI voice in wine64
- Both wine32 and wine64 bottle creation use WINETRICKS_FORCE=1
- Updated bottle.sh to recognize 'sapi' dependency (alongside legacy 'speechsdk')
**Game Migration (57 games):**
- Migrated all 51 BG Enterprise games to wine64
- Migrated 3 Bokurano Daibouken games to wine64
- Migrated Swamp, Dreamland, Mist World to wine64
- Migrated 8 SAPI-dependent games to wine64:
* Bloodshed - TESTED, confirmed working
* Dog Who Hates Toast - TESTED, confirmed working (VB6+SAPI validated)
* Skateboarder Pro - TESTED, confirmed working
* Lunimals, VIP Mud, Oh Shit, Entombed, Three D velocity
**Files Modified:**
- audiogame-manager.sh: Removed wine32 creation, added wine64 speechsdk
- .includes/bottle.sh: Simplified architecture logic, always wine64
- CLAUDE.md: Updated documentation to reflect wine32 elimination
- 57 game installers: Changed WINEARCH from win32 to win64
✅ Bloodshed: wine64 SAPI works perfectly
✅ Dog Who Hates Toast: wine64 VB6+SAPI confirmed working
✅ Skateboarder Pro: wine64 NVDA works perfectly
- WOW64 allows wine64 to run 32-bit apps efficiently
- nvdaControllerClient DLL update logic preserved for 32-bit apps
- Uses 'file' command to detect PE32 vs PE32+ and apply correct DLL version
- Clipboard translator for Bokurano games works with wine64 (requires reinstall)
- Simplified architecture: one bottle instead of two
- Eliminated wine32 download/management overhead
- All games benefit from modern wine64 improvements
- SAPI now works reliably via WINETRICKS_FORCE=1
🚀 Wine32 completely eliminated. All games use wine64.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 23:15:56 -05:00
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
2025-12-08 23:32:51 -05:00
|
|
|
# Restore win10 after speechsdk (speechsdk sets winxp)
|
|
|
|
|
winetricks -q win10
|
|
|
|
|
|
Eliminate wine32 entirely: migrate all games to wine64 with WINETRICKS_FORCE=1
BREAKTHROUGH: Discovered that WINETRICKS_FORCE=1 enables reliable speechsdk
installation in wine64+WOW64, eliminating the need for wine32 bottle.
**Wine Architecture:**
- Removed wine32 bottle creation completely (deleted 58 lines)
- Disabled check_wine32() call - no more PlayOnLinux wine32 downloads
- All games now use unified wine64 bottle with WOW64 for 32-bit apps
- Updated architecture selection to always default to wine64
**SAPI Support:**
- wine64 bottle now includes speechsdk via WINETRICKS_FORCE=1
- Microsoft Mike configured as default SAPI voice in wine64
- Both wine32 and wine64 bottle creation use WINETRICKS_FORCE=1
- Updated bottle.sh to recognize 'sapi' dependency (alongside legacy 'speechsdk')
**Game Migration (57 games):**
- Migrated all 51 BG Enterprise games to wine64
- Migrated 3 Bokurano Daibouken games to wine64
- Migrated Swamp, Dreamland, Mist World to wine64
- Migrated 8 SAPI-dependent games to wine64:
* Bloodshed - TESTED, confirmed working
* Dog Who Hates Toast - TESTED, confirmed working (VB6+SAPI validated)
* Skateboarder Pro - TESTED, confirmed working
* Lunimals, VIP Mud, Oh Shit, Entombed, Three D velocity
**Files Modified:**
- audiogame-manager.sh: Removed wine32 creation, added wine64 speechsdk
- .includes/bottle.sh: Simplified architecture logic, always wine64
- CLAUDE.md: Updated documentation to reflect wine32 elimination
- 57 game installers: Changed WINEARCH from win32 to win64
✅ Bloodshed: wine64 SAPI works perfectly
✅ Dog Who Hates Toast: wine64 VB6+SAPI confirmed working
✅ Skateboarder Pro: wine64 NVDA works perfectly
- WOW64 allows wine64 to run 32-bit apps efficiently
- nvdaControllerClient DLL update logic preserved for 32-bit apps
- Uses 'file' command to detect PE32 vs PE32+ and apply correct DLL version
- Clipboard translator for Bokurano games works with wine64 (requires reinstall)
- Simplified architecture: one bottle instead of two
- Eliminated wine32 download/management overhead
- All games benefit from modern wine64 improvements
- SAPI now works reliably via WINETRICKS_FORCE=1
🚀 Wine32 completely eliminated. All games use wine64.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 23:15:56 -05:00
|
|
|
# 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"
|
|
|
|
|
|
2026-01-04 21:45:50 -05:00
|
|
|
# Setup nvda2speechd for accessibility if needed
|
2026-01-05 21:56:01 -05:00
|
|
|
if ! ss -ltnp | rg 3457 | grep -q 'cthulhu'; then
|
2026-01-04 21:45:50 -05:00
|
|
|
echo "# Setting up accessibility support..."
|
|
|
|
|
download "${nvda2speechdBinary}"
|
|
|
|
|
if [[ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" ]]; then
|
|
|
|
|
cp "${cache}/nvda2speechd" "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd"
|
|
|
|
|
chmod +x "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd"
|
|
|
|
|
fi
|
2025-08-07 20:18:11 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "# Wine64 bottle creation complete."
|
2026-01-09 12:24:08 -05:00
|
|
|
} > >(agm_progressbox "Wine Bottle Setup" "Creating unified wine64 bottle with SAPI support (this may take several minutes)...")
|
2025-08-07 20:18:11 -04:00
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-07 02:38:04 -04:00
|
|
|
|
2020-08-27 15:42:24 -04:00
|
|
|
# Install games
|
|
|
|
|
game_installer() {
|
2023-02-09 00:14:42 -05:00
|
|
|
export LANG="en_US.UTF-8"
|
2024-12-13 05:06:58 -05:00
|
|
|
# Get list of installed games from config file
|
2024-09-12 16:38:35 -04:00
|
|
|
mapfile -t installedGames < <(sed -e '/^$/d' -e '/^[[:space:]]*#/d' "${configFile}" 2> /dev/null | cut -d '|' -f3)
|
2024-12-13 05:06:58 -05:00
|
|
|
# Create the menu of available games by reading from .install directory
|
2020-08-27 15:42:24 -04:00
|
|
|
declare -a menuList
|
2024-12-13 05:06:58 -05:00
|
|
|
# Get all .sh files from .install directory, excluding those starting with # as first line.
|
2025-10-07 10:14:54 -04:00
|
|
|
mapfile -t sortedGames < <(for f in "${scriptDir}/.install/"*.sh; do
|
2024-12-13 05:06:58 -05:00
|
|
|
# Skip if first line starts with #
|
|
|
|
|
[[ $(head -n1 "$f") == "#"* ]] && continue
|
|
|
|
|
echo "${f##*/%.sh}"
|
|
|
|
|
done | sort)
|
|
|
|
|
for i in "${sortedGames[@]}"; do
|
|
|
|
|
local menuItem="${i%.sh}"
|
|
|
|
|
menuItem="${menuItem##*/}"
|
|
|
|
|
# Check if game is already installed
|
|
|
|
|
for j in "${installedGames[@]}"; do
|
2020-08-27 15:42:24 -04:00
|
|
|
if [[ "$j" == "$menuItem" ]]; then
|
|
|
|
|
unset menuItem
|
2024-12-13 05:06:58 -05:00
|
|
|
break
|
2020-08-27 15:42:24 -04:00
|
|
|
fi
|
|
|
|
|
done
|
2024-12-13 05:06:58 -05:00
|
|
|
# Add to menu if not installed
|
2020-08-27 15:42:24 -04:00
|
|
|
if [[ -n "$menuItem" ]]; then
|
|
|
|
|
menuList+=("$menuItem" "$menuItem")
|
|
|
|
|
fi
|
|
|
|
|
done
|
2024-12-13 05:06:58 -05:00
|
|
|
# If all games are installed, exit
|
2020-08-27 15:42:24 -04:00
|
|
|
if [[ ${#menuList[@]} -eq 0 ]]; then
|
2025-08-05 03:11:37 -04:00
|
|
|
agm_msgbox "Audio Game Installer" "" "All games are already installed."
|
2020-08-27 15:42:24 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2021-02-19 12:58:11 -05:00
|
|
|
menuList+=("Donate" "Donate")
|
2020-09-01 14:39:39 -04:00
|
|
|
menuList+=("Become a Patron" "Become a Patron")
|
2024-12-13 05:06:58 -05:00
|
|
|
# Show game selection dialog
|
2026-01-09 12:24:08 -05:00
|
|
|
local game
|
|
|
|
|
if ! game="$(agm_menu "Audio Game Installer" "Audio Game Installer" "Please select a game to install" "${menuList[@]}")"; then
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
2024-12-13 05:06:58 -05:00
|
|
|
# Handle selection
|
|
|
|
|
if [[ -n "$game" ]]; then
|
|
|
|
|
case "$game" in
|
|
|
|
|
"Donate")
|
|
|
|
|
open_url "https://ko-fi.com/stormux"
|
|
|
|
|
exit 0
|
|
|
|
|
;;
|
|
|
|
|
"Become a Patron")
|
|
|
|
|
open_url "https://patreon.com/stormux"
|
|
|
|
|
exit 0
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
# Convert game name to filename format
|
2025-10-07 10:14:54 -04:00
|
|
|
local installScript="${scriptDir}/.install/${game}.sh"
|
2024-12-13 05:06:58 -05:00
|
|
|
# Check if install script exists
|
|
|
|
|
if [[ -f "$installScript" ]]; then
|
|
|
|
|
# Source and execute the install script
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck disable=SC1090
|
2024-12-13 05:06:58 -05:00
|
|
|
source "$installScript"
|
2025-08-05 03:57:20 -04:00
|
|
|
# Show success message
|
|
|
|
|
agm_msgbox "Installation Complete" "Audio Game Installer" "Game \"${game}\" has been successfully installed."
|
2024-12-13 05:06:58 -05:00
|
|
|
else
|
2025-08-01 15:25:53 -04:00
|
|
|
agm_msgbox "Audio Game Installer" "Audio Game Installer" "Installation script not found for ${game}"
|
2024-12-13 05:06:58 -05:00
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
fi
|
2020-08-27 15:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
2020-09-04 23:32:26 -04:00
|
|
|
# remove games
|
|
|
|
|
game_removal() {
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/bottle.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/bottle.sh"
|
2025-08-04 20:18:44 -04:00
|
|
|
# Modern wine is unified - no architecture-specific wine executables needed
|
2026-01-09 19:40:17 -05:00
|
|
|
mapfile -t lines < <(sed -e '/^$/d' -e '/^[[:space:]]*#/d' "${configFile}" 2> /dev/null | sort -t '|' -k3,3f)
|
2020-09-04 23:32:26 -04:00
|
|
|
if [[ ${#lines} -eq 0 ]]; then
|
2025-08-05 03:11:37 -04:00
|
|
|
agm_msgbox "Audio Game Removal" "" "No games found."
|
2020-09-04 23:32:26 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
# Create the menu of installed games
|
|
|
|
|
declare -a menuList
|
|
|
|
|
for i in "${lines[@]}" ; do
|
2024-09-13 01:28:22 -04:00
|
|
|
IFS='|' read -ra gameInfo <<< "$i"
|
|
|
|
|
menuList+=("${gameInfo[0]}|${gameInfo[1]}" "${gameInfo[2]}")
|
2020-09-04 23:32:26 -04:00
|
|
|
done
|
2021-02-19 12:58:11 -05:00
|
|
|
menuList+=("Donate" "Donate")
|
2020-09-04 23:32:26 -04:00
|
|
|
menuList+=("Become a Patron" "Become a Patron")
|
2023-03-30 22:26:02 -04:00
|
|
|
local game
|
2025-08-01 15:25:53 -04:00
|
|
|
game="$(agm_menu "Audio Game Removal" "Audio Game Removal" "Please select a game to delete" "${menuList[@]}")"
|
2020-09-04 23:32:26 -04:00
|
|
|
if [[ ${#game} -gt 0 ]]; then
|
2021-02-19 12:58:11 -05:00
|
|
|
if [[ "$game" == "Donate" ]]; then
|
|
|
|
|
open_url "https://ko-fi.com/stormux"
|
2020-09-04 23:32:26 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
if [[ "$game" == "Become a Patron" ]]; then
|
2021-08-22 18:19:00 -04:00
|
|
|
open_url "https://2mb.games/product/2mb-patron/"
|
2020-09-04 23:32:26 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2025-08-05 01:44:56 -04:00
|
|
|
# Parse game info before create_game_array overwrites $game
|
|
|
|
|
local selectedGame="$game"
|
2020-09-04 23:32:26 -04:00
|
|
|
local winePath="${game#*|}"
|
2021-07-01 16:22:57 -04:00
|
|
|
export winePath="${winePath%\\*.exe}"
|
2020-09-04 23:32:26 -04:00
|
|
|
local wineExec="${game#*|}"
|
|
|
|
|
wineExec="${wineExec%|*}"
|
|
|
|
|
wineExec="${wineExec##*\\}"
|
2025-08-05 01:44:56 -04:00
|
|
|
|
2025-08-05 01:06:04 -04:00
|
|
|
# With shared bottles, always remove only the game files, never the entire bottle
|
2025-08-05 01:44:56 -04:00
|
|
|
create_game_array "$selectedGame"
|
2025-08-05 01:06:04 -04:00
|
|
|
if [[ ${#game[@]} -gt 0 ]]; then
|
|
|
|
|
# Set up wine environment for this game
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/bottle.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/bottle.sh"
|
2025-08-05 01:06:04 -04:00
|
|
|
get_bottle "${game[0]}"
|
|
|
|
|
|
2025-08-05 01:40:27 -04:00
|
|
|
if ! agm_yesno "Confirm Removal" "Audio Game Removal" "Are you sure you want to remove \"${game[2]}\"?"; then
|
2025-08-05 03:11:37 -04:00
|
|
|
agm_msgbox "Audio Game Removal" "" "Removal cancelled."
|
2025-08-05 01:40:27 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2025-08-05 01:06:04 -04:00
|
|
|
|
2021-06-23 14:04:35 -04:00
|
|
|
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
|
2025-08-04 20:13:38 -04:00
|
|
|
wineserver -k
|
2025-08-05 01:06:04 -04:00
|
|
|
|
|
|
|
|
# Remove only the game's installation directory
|
|
|
|
|
if [[ -n "$winePath" ]]; then
|
2026-01-09 12:24:08 -05:00
|
|
|
local gameDir
|
|
|
|
|
gameDir="$(winepath "$winePath")"
|
2025-08-05 01:06:04 -04:00
|
|
|
if [[ -d "$gameDir" ]]; then
|
2025-08-05 01:40:27 -04:00
|
|
|
rm -rfv "$gameDir" | agm_progressbox "Removing Game" "Removing \"${game[2]}\" files..."
|
2025-08-05 01:06:04 -04:00
|
|
|
else
|
2025-08-05 01:40:27 -04:00
|
|
|
agm_msgbox "Game Removal" "" "Game directory not found, skipping file removal."
|
2025-08-05 01:06:04 -04:00
|
|
|
fi
|
|
|
|
|
fi
|
2021-06-23 14:04:35 -04:00
|
|
|
fi
|
2025-08-05 01:44:56 -04:00
|
|
|
# remove the launcher using the original selected game info
|
|
|
|
|
gawk -i inplace -vLine="${selectedGame//\\/\\\\}" '!index($0,Line)' "$configFile"
|
|
|
|
|
agm_msgbox "Game Removal" "" "\"${game[2]}\" has been successfully removed."
|
2020-09-04 23:32:26 -04:00
|
|
|
fi
|
|
|
|
|
exit 0
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-29 06:28:05 -05:00
|
|
|
# kill games that are stuck
|
|
|
|
|
kill_game() {
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/bottle.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/bottle.sh"
|
2025-08-04 20:18:44 -04:00
|
|
|
# Modern wine is unified - no architecture-specific wine executables needed
|
2026-01-09 19:40:17 -05:00
|
|
|
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null | sort -t '|' -k3,3f)
|
2020-12-29 06:28:05 -05:00
|
|
|
if [[ ${#lines} -eq 0 ]]; then
|
2025-08-05 03:11:37 -04:00
|
|
|
agm_msgbox "Audio Game Killer" "" "No games found."
|
2020-12-29 06:28:05 -05:00
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
# Create the menu of installed games
|
|
|
|
|
declare -a menuList
|
|
|
|
|
for i in "${lines[@]}" ; do
|
2024-09-12 14:26:46 -04:00
|
|
|
IFS='|' read -ra gameInfo <<< "$i"
|
|
|
|
|
menuList+=("${gameInfo[0]}|${gameInfo[1]}" "${gameInfo[2]}")
|
2020-12-29 06:28:05 -05:00
|
|
|
done
|
2021-02-19 12:58:11 -05:00
|
|
|
menuList+=("Donate" "Donate")
|
2020-12-29 06:28:05 -05:00
|
|
|
menuList+=("Become a Patron" "Become a Patron")
|
2026-01-09 12:24:08 -05:00
|
|
|
local game
|
|
|
|
|
game="$(agm_menu "Audio Game Killer" "Audio Game Killer" "Please select a game to force stop" "${menuList[@]}")"
|
2020-12-29 06:28:05 -05:00
|
|
|
if [[ ${#game} -gt 0 ]]; then
|
2021-02-19 12:58:11 -05:00
|
|
|
if [[ "$game" == "Donate" ]]; then
|
|
|
|
|
open_url "https://ko-fi.com/stormux"
|
2020-12-29 06:28:05 -05:00
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
if [[ "$game" == "Become a Patron" ]]; then
|
2021-08-22 18:19:00 -04:00
|
|
|
open_url "https://2mb.games/product/2mb-patron/"
|
2020-12-29 06:28:05 -05:00
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
local winePath="${game#*|}"
|
|
|
|
|
winePath="${winePath%\\*.exe}"
|
|
|
|
|
local wineExec="${game#*|}"
|
|
|
|
|
wineExec="${wineExec%|*}"
|
|
|
|
|
wineExec="${wineExec##*\\}"
|
|
|
|
|
# kill the wine server.
|
2021-06-17 15:32:09 -04:00
|
|
|
get_bottle "${game%|*}"
|
2025-08-04 20:13:38 -04:00
|
|
|
wineserver -k
|
2025-08-05 03:11:37 -04:00
|
|
|
agm_msgbox "Audio Game Killer" "" "The selected game has been stopped."
|
2020-12-29 06:28:05 -05:00
|
|
|
fi
|
|
|
|
|
exit 0
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-12 01:35:58 -04:00
|
|
|
# for games that require custom scripts before launch or custom launch parameters
|
|
|
|
|
custom_launch_parameters() {
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Dragon Pong" ]]; then
|
2025-10-07 10:14:54 -04:00
|
|
|
"${scriptDir}/speech/speak_window_title.sh" DragonPong.exe &
|
2026-01-09 12:24:08 -05:00
|
|
|
pushd "$(winepath "$winePath")" || exit 1
|
2024-09-12 01:35:58 -04:00
|
|
|
wine "$wineExec"
|
2026-01-09 12:24:08 -05:00
|
|
|
popd || exit 1
|
2024-09-12 01:35:58 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2025-10-13 14:30:19 -04:00
|
|
|
if [[ "${game[2]}" == "Dreamland" ]]; then
|
2025-10-22 16:16:30 -04:00
|
|
|
"$WINE" "${game[1]}" &> /dev/null &
|
2025-10-13 14:30:19 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2025-08-05 02:27:01 -04:00
|
|
|
# executioner's-rage: DLL replacement now handled by update_nvda_dlls()
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Laser Breakout" ]]; then
|
2025-10-07 10:14:54 -04:00
|
|
|
"${scriptDir}/speech/speak_window_title.sh" play.exe &
|
2024-09-12 01:35:58 -04:00
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Bokurano Daibouken 2" ]]; then
|
2025-10-07 10:14:54 -04:00
|
|
|
find "${WINEPREFIX}/drive_c/nyanchangame/bk2" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \;
|
|
|
|
|
"${scriptDir}/speech/clipboard_translator.sh" "play.exe" bokurano-daibouken2 &
|
2024-09-12 01:35:58 -04:00
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Bokurano Daibouken" ]]; then
|
2025-10-07 10:14:54 -04:00
|
|
|
find "${WINEPREFIX}/drive_c/nyanchangame/bk" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \;
|
|
|
|
|
"${scriptDir}/speech/clipboard_translator.sh" "play.exe" bokurano-daibouken &
|
2024-09-12 01:35:58 -04:00
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Bokurano Daibouken 3" ]]; then
|
2024-09-12 01:35:58 -04:00
|
|
|
dictPath="$(winepath "${winePath}")"
|
2026-01-06 21:37:10 -05:00
|
|
|
dataDir="${WINEPREFIX}/drive_c/nyanchangame/bk3/data"
|
|
|
|
|
if [[ -r "${cache}/bk3-dict.dat" ]]; then
|
|
|
|
|
if [[ ! -d "${dictPath}/dict" ]]; then
|
|
|
|
|
cp "${cache}/bk3-dict.dat" "${dictPath}/dict.dat"
|
|
|
|
|
fi
|
|
|
|
|
if [[ -r "${cache}/nvdaControllerClient32.dll" ]]; then
|
|
|
|
|
cp "${cache}/nvdaControllerClient32.dll" "${dataDir}/nvdaControllerClient32.dll"
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
rm -f "${dataDir}/nvdaControllerClient32.dll"
|
|
|
|
|
find "${WINEPREFIX}/drive_c/nyanchangame/bk3" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \;
|
2024-09-12 01:35:58 -04:00
|
|
|
fi
|
2025-08-05 02:27:01 -04:00
|
|
|
# DLL replacement now handled by update_nvda_dlls()
|
2026-01-06 21:37:10 -05:00
|
|
|
if [[ ! -d "${dictPath}/dict" ]]; then
|
2025-10-07 10:14:54 -04:00
|
|
|
"${scriptDir}/speech/clipboard_translator.sh" "play.exe" bokurano-daibouken3 &
|
2024-09-12 01:35:58 -04:00
|
|
|
fi
|
|
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Bop It Emulator" ]]; then
|
2025-10-07 10:14:54 -04:00
|
|
|
"${scriptDir}/speech/speak_window_title.sh" bop.exe &
|
2024-09-12 01:35:58 -04:00
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Road to Rage" ]]; then
|
2025-10-07 10:14:54 -04:00
|
|
|
"${scriptDir}/speech/speak_window_title.sh" trtr.exe &
|
2024-09-12 01:35:58 -04:00
|
|
|
fi
|
2026-01-03 02:17:50 -05:00
|
|
|
if [[ "${game[2]}" == "Axel Pong" ]]; then
|
|
|
|
|
"${scriptDir}/speech/speak_window_title.sh" axel_pong.exe &
|
|
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Sequence Storm" ]]; then
|
2025-10-07 10:14:54 -04:00
|
|
|
"${scriptDir}/speech/clipboard_reader.sh" SequenceStorm &
|
2024-09-12 01:35:58 -04:00
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
#if [[ "${game[2]}" == "Shadow Line" ]]; then
|
2025-05-18 16:39:58 -04:00
|
|
|
#find "${WINEPREFIX}/drive_c/" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \;
|
2025-10-07 10:14:54 -04:00
|
|
|
#"${scriptDir}/speech/clipboard_translator.sh" play_sr.exe shadow-line &
|
2025-05-18 16:39:58 -04:00
|
|
|
#fi
|
2025-08-05 02:27:01 -04:00
|
|
|
# sketchbook: DLL replacement now handled by update_nvda_dlls()
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Audiodisc" ]]; then
|
2024-09-12 01:35:58 -04:00
|
|
|
wine "$winePath\\$wineExec"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Audioquake" ]]; then
|
2024-09-12 01:35:58 -04:00
|
|
|
wine "$winePath\\$wineExec"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Screaming Strike 2" ]]; then
|
2026-01-09 12:24:08 -05:00
|
|
|
pushd "$(winepath "$winePath")" || exit 1
|
2025-08-04 20:13:38 -04:00
|
|
|
wine "$wineExec"
|
2026-01-09 12:24:08 -05:00
|
|
|
popd || exit 1
|
2024-09-12 01:35:58 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Warsim" ]]; then
|
2026-01-09 12:24:08 -05:00
|
|
|
pushd "$(winepath "${game[1]%\\*}")" || exit 1
|
2024-09-12 01:49:01 -04:00
|
|
|
wine "${game[1]##*\\}"
|
2026-01-09 12:24:08 -05:00
|
|
|
popd || exit 1
|
2024-09-12 01:35:58 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2025-09-11 16:04:18 -04:00
|
|
|
if [[ "${game[2]}" == "Interceptor" ]]; then
|
2026-01-09 12:24:08 -05:00
|
|
|
pushd "$(winepath "$winePath")" || exit 1
|
2024-09-12 01:35:58 -04:00
|
|
|
wine "$wineExec"
|
2026-01-09 12:24:08 -05:00
|
|
|
popd || exit 1
|
2024-09-12 01:35:58 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-12 14:26:46 -04:00
|
|
|
# Process game launcher flags
|
2025-06-10 01:54:56 -04:00
|
|
|
process_launcher_flags() {
|
2024-09-12 14:26:46 -04:00
|
|
|
flags=("${game[@]:3}")
|
|
|
|
|
for i in "${flags[@]}" ; do
|
|
|
|
|
if [[ "${i}" =~ ^export\ [a-zA-Z_][a-zA-Z0-9_]*=\'?.*\'?$ ]]; then
|
|
|
|
|
eval "${i}"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-12 01:35:58 -04:00
|
|
|
create_game_array() {
|
|
|
|
|
# Game array 0 bottle, 1 path, 2 title, 3+ flags
|
2026-01-09 12:24:08 -05:00
|
|
|
local selectedGame="$1"
|
2024-09-12 01:35:58 -04:00
|
|
|
for i in "${lines[@]}" ; do
|
2025-05-20 17:51:20 -04:00
|
|
|
# Only compare the launcher section
|
2026-01-09 12:24:08 -05:00
|
|
|
local j="${selectedGame#*|}"
|
|
|
|
|
local k="${i#*|}"
|
2025-05-20 17:51:20 -04:00
|
|
|
k="${k%%|*}"
|
|
|
|
|
if [[ "$j" == "$k" ]]; then
|
2024-09-12 01:35:58 -04:00
|
|
|
IFS='|' read -ra game <<< "$i"
|
|
|
|
|
break
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-05 02:20:11 -04:00
|
|
|
# Update NVDA controller client DLLs in wine bottles
|
|
|
|
|
update_nvda_dlls() {
|
|
|
|
|
# Ensure we have the replacement DLLs
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/functions.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/functions.sh"
|
2026-01-08 14:54:01 -05:00
|
|
|
download "${nvdaControllerClient32Dll}" "${nvdaControllerClient64Dll}"
|
2025-08-05 02:20:11 -04:00
|
|
|
|
|
|
|
|
# Update wine64 bottle (most common)
|
|
|
|
|
if [[ -d "$HOME/.local/wine64" ]]; then
|
|
|
|
|
find "$HOME/.local/wine64" -type f \( -iname "nvdaControllerClient*.dll" \) -print0 | while IFS= read -r -d '' dllFile; do
|
|
|
|
|
local basename="${dllFile##*/}"
|
|
|
|
|
local replacement=""
|
|
|
|
|
|
|
|
|
|
case "${basename,,}" in
|
|
|
|
|
"nvdacontrollerclient32.dll")
|
2025-08-29 14:24:14 -04:00
|
|
|
replacement="${cache}/nvdaControllerClient32.dll"
|
2025-08-05 02:20:11 -04:00
|
|
|
;;
|
|
|
|
|
"nvdacontrollerclient64.dll")
|
2025-08-29 14:24:14 -04:00
|
|
|
replacement="${cache}/nvdaControllerClient64.dll"
|
2025-08-05 02:20:11 -04:00
|
|
|
;;
|
|
|
|
|
"nvdacontrollerclient.dll")
|
|
|
|
|
# Use file command to detect architecture
|
|
|
|
|
if file "$dllFile" | grep -q "PE32+"; then
|
2025-08-29 14:24:14 -04:00
|
|
|
replacement="${cache}/nvdaControllerClient64.dll"
|
2025-08-05 02:20:11 -04:00
|
|
|
elif file "$dllFile" | grep -q "PE32"; then
|
2025-08-29 14:24:14 -04:00
|
|
|
replacement="${cache}/nvdaControllerClient32.dll"
|
2025-08-05 02:20:11 -04:00
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
if [[ -n "$replacement" ]] && [[ -f "$replacement" ]]; then
|
2025-08-29 14:24:14 -04:00
|
|
|
echo "Updating $dllFile with nvdaControllerClient"
|
2025-08-05 02:20:11 -04:00
|
|
|
cp "$replacement" "$dllFile"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
fi
|
Eliminate wine32 entirely: migrate all games to wine64 with WINETRICKS_FORCE=1
BREAKTHROUGH: Discovered that WINETRICKS_FORCE=1 enables reliable speechsdk
installation in wine64+WOW64, eliminating the need for wine32 bottle.
**Wine Architecture:**
- Removed wine32 bottle creation completely (deleted 58 lines)
- Disabled check_wine32() call - no more PlayOnLinux wine32 downloads
- All games now use unified wine64 bottle with WOW64 for 32-bit apps
- Updated architecture selection to always default to wine64
**SAPI Support:**
- wine64 bottle now includes speechsdk via WINETRICKS_FORCE=1
- Microsoft Mike configured as default SAPI voice in wine64
- Both wine32 and wine64 bottle creation use WINETRICKS_FORCE=1
- Updated bottle.sh to recognize 'sapi' dependency (alongside legacy 'speechsdk')
**Game Migration (57 games):**
- Migrated all 51 BG Enterprise games to wine64
- Migrated 3 Bokurano Daibouken games to wine64
- Migrated Swamp, Dreamland, Mist World to wine64
- Migrated 8 SAPI-dependent games to wine64:
* Bloodshed - TESTED, confirmed working
* Dog Who Hates Toast - TESTED, confirmed working (VB6+SAPI validated)
* Skateboarder Pro - TESTED, confirmed working
* Lunimals, VIP Mud, Oh Shit, Entombed, Three D velocity
**Files Modified:**
- audiogame-manager.sh: Removed wine32 creation, added wine64 speechsdk
- .includes/bottle.sh: Simplified architecture logic, always wine64
- CLAUDE.md: Updated documentation to reflect wine32 elimination
- 57 game installers: Changed WINEARCH from win32 to win64
✅ Bloodshed: wine64 SAPI works perfectly
✅ Dog Who Hates Toast: wine64 VB6+SAPI confirmed working
✅ Skateboarder Pro: wine64 NVDA works perfectly
- WOW64 allows wine64 to run 32-bit apps efficiently
- nvdaControllerClient DLL update logic preserved for 32-bit apps
- Uses 'file' command to detect PE32 vs PE32+ and apply correct DLL version
- Clipboard translator for Bokurano games works with wine64 (requires reinstall)
- Simplified architecture: one bottle instead of two
- Eliminated wine32 download/management overhead
- All games benefit from modern wine64 improvements
- SAPI now works reliably via WINETRICKS_FORCE=1
🚀 Wine32 completely eliminated. All games use wine64.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 23:15:56 -05:00
|
|
|
|
|
|
|
|
# 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
|
2025-08-05 02:20:11 -04:00
|
|
|
}
|
|
|
|
|
|
2020-08-27 15:42:24 -04:00
|
|
|
# launch games that are installed
|
|
|
|
|
game_launcher() {
|
2023-12-02 21:57:17 -08:00
|
|
|
# For use by update scripts that want to source functions in this file.
|
2023-12-03 08:16:55 -05:00
|
|
|
[[ "$agmNoLaunch" == "true" ]] && return
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/bottle.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/bottle.sh"
|
2025-08-05 02:20:11 -04:00
|
|
|
|
2025-08-04 22:24:04 -04:00
|
|
|
# Start nvda2speechd if available
|
2026-01-05 21:56:01 -05:00
|
|
|
if ! ss -ltnp | rg 3457 | grep -q 'cthulhu'; then
|
2026-01-09 12:24:08 -05:00
|
|
|
if [[ -x "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" ]]; then
|
|
|
|
|
"${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" &> /dev/null &
|
2026-01-04 21:45:50 -05:00
|
|
|
fi
|
2025-08-04 22:24:04 -04:00
|
|
|
fi
|
2025-08-05 02:20:11 -04:00
|
|
|
|
|
|
|
|
# Replace NVDA controller client DLLs in wine64 bottle
|
|
|
|
|
update_nvda_dlls
|
2026-01-09 19:40:17 -05:00
|
|
|
mapfile -t lines < <(sed -e '/^$/d' -e '/^ *#/d' "${configFile}" 2> /dev/null | sort -t '|' -k3,3f)
|
2020-08-27 15:42:24 -04:00
|
|
|
if [[ ${#lines} -eq 0 ]]; then
|
2025-08-05 03:11:37 -04:00
|
|
|
agm_msgbox "Audio Game Launcher" "" "Install some games first."
|
2020-08-27 15:42:24 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2020-12-12 01:11:43 -05:00
|
|
|
if [[ $# -eq 0 ]]; then
|
|
|
|
|
# Create the menu of installed games
|
|
|
|
|
declare -a menuList
|
|
|
|
|
for i in "${lines[@]}" ; do
|
2024-09-12 01:35:58 -04:00
|
|
|
IFS='|' read -ra gameInfo <<< "$i"
|
|
|
|
|
menuList+=("${gameInfo[0]}|${gameInfo[1]}" "${gameInfo[2]}")
|
2020-12-12 01:11:43 -05:00
|
|
|
done
|
2021-02-19 12:58:11 -05:00
|
|
|
menuList+=("Donate" "Donate")
|
2020-12-12 01:11:43 -05:00
|
|
|
menuList+=("Become a Patron" "Become a Patron")
|
2026-01-09 12:24:08 -05:00
|
|
|
|
|
|
|
|
# Loop to handle documentation views
|
|
|
|
|
local selectedGame=""
|
|
|
|
|
local menuCode=0
|
|
|
|
|
while true; do
|
|
|
|
|
selectedGame="$(agm_game_menu "Audio Game Launcher" "Audio Game Launcher" "Please select a game to play" "${menuList[@]}")"
|
|
|
|
|
menuCode=$?
|
|
|
|
|
|
|
|
|
|
if [[ $menuCode -eq 1 ]] || [[ $menuCode -eq 255 ]]; then
|
|
|
|
|
exit 0
|
|
|
|
|
elif [[ $menuCode -eq 2 ]] || [[ $menuCode -eq 3 ]]; then
|
|
|
|
|
# Documentation button pressed
|
|
|
|
|
if [[ -n "$selectedGame" ]]; then
|
|
|
|
|
# shellcheck source=.includes/help.sh
|
|
|
|
|
source "${scriptDir}/.includes/help.sh"
|
|
|
|
|
documentation "$selectedGame" "$(echo "$selectedGame" | cut -d '|' -f2)"
|
|
|
|
|
fi
|
|
|
|
|
# Return to menu after viewing docs
|
|
|
|
|
continue
|
|
|
|
|
else
|
|
|
|
|
# dialog mode with OK (0) - proceed with launch
|
|
|
|
|
break
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
2025-08-05 01:44:56 -04:00
|
|
|
# Safety check: don't proceed if game is empty
|
2026-01-09 12:24:08 -05:00
|
|
|
if [[ -z "$selectedGame" ]]; then
|
2025-08-05 01:44:56 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2026-01-09 12:24:08 -05:00
|
|
|
|
|
|
|
|
create_game_array "$selectedGame"
|
2020-12-12 01:11:43 -05:00
|
|
|
else
|
2026-01-09 12:24:08 -05:00
|
|
|
create_game_array "$1"
|
|
|
|
|
if [[ ${#game[@]} -eq 0 ]]; then
|
2025-08-05 03:11:37 -04:00
|
|
|
agm_msgbox "Audio Game Launcher" "" "Game $1 not found."
|
2020-12-12 01:11:43 -05:00
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2024-09-12 01:35:58 -04:00
|
|
|
if [[ ${#game[@]} -gt 0 ]]; then
|
|
|
|
|
if [[ "${game[0]}" == "Donate" ]]; then
|
2021-02-19 12:58:11 -05:00
|
|
|
open_url "https://ko-fi.com/stormux"
|
2020-09-01 14:39:39 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2024-09-12 01:35:58 -04:00
|
|
|
if [[ "${game[0]}" == "Become a Patron" ]]; then
|
2021-08-22 18:19:00 -04:00
|
|
|
open_url "https://2mb.games/product/2mb-patron/"
|
2020-09-01 14:39:39 -04:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2024-09-12 01:35:58 -04:00
|
|
|
get_bottle "${game[0]}"
|
2023-01-30 23:56:21 -05:00
|
|
|
echo -n "launching "
|
2025-08-04 20:13:38 -04:00
|
|
|
wine --version
|
2020-09-01 14:39:39 -04:00
|
|
|
# kill any previous existing wineservers for this prefix in case they didn't shut down properly.
|
2025-08-04 20:13:38 -04:00
|
|
|
wineserver -k
|
2026-01-06 21:37:10 -05:00
|
|
|
# Set default path/exec for custom launch handlers.
|
|
|
|
|
winePath="${game[1]%\\*.exe}"
|
|
|
|
|
wineExec="${game[1]##*\\}"
|
2021-06-24 20:40:40 -04:00
|
|
|
# launch the game
|
2020-10-07 11:14:34 -04:00
|
|
|
if command -v qjoypad &> /dev/null ; then
|
|
|
|
|
mkdir -p ~/.qjoypad3
|
2024-09-12 01:35:58 -04:00
|
|
|
touch "${HOME}/.qjoypad3/${game[2]}.lyt"
|
2023-12-23 17:45:38 -05:00
|
|
|
# A | separated list of games that should not start with qjoypad.
|
2024-09-12 01:35:58 -04:00
|
|
|
noQjoypadGames="A Hero's Call"
|
|
|
|
|
if [[ "${noqjoypad}" != "true" ]] && ! [[ "${game[2]}" =~ ${noQjoypadGames} ]]; then
|
2022-12-23 01:37:27 -05:00
|
|
|
if pgrep qjoypad &> /dev/null ; then
|
2024-09-12 01:35:58 -04:00
|
|
|
qjoypad -T "${game[2]}" 2> /dev/null
|
2022-12-23 01:37:27 -05:00
|
|
|
else
|
2024-09-12 01:35:58 -04:00
|
|
|
qjoypad -T "${game[2]}" 2> /dev/null &
|
2022-12-23 01:37:27 -05:00
|
|
|
fi
|
2020-10-07 11:14:34 -04:00
|
|
|
fi
|
|
|
|
|
fi
|
2025-06-10 01:54:56 -04:00
|
|
|
process_launcher_flags
|
2024-09-12 01:35:58 -04:00
|
|
|
custom_launch_parameters
|
2025-11-06 12:24:28 -05:00
|
|
|
if [[ "$debugGdb" == "1" ]]; then
|
|
|
|
|
# Change to game directory before launching
|
2026-01-09 12:24:08 -05:00
|
|
|
pushd "$(winepath "${game[1]%\\*}")" > /dev/null || exit 1
|
2025-11-06 12:24:28 -05:00
|
|
|
winedbg --gdb "${game[1]##*\\}"
|
2026-01-09 12:24:08 -05:00
|
|
|
popd > /dev/null || exit 1
|
2025-11-06 12:24:28 -05:00
|
|
|
else
|
|
|
|
|
wine start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
|
|
|
|
|
fi
|
2020-08-27 15:42:24 -04:00
|
|
|
fi
|
|
|
|
|
exit 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# main script
|
|
|
|
|
|
2024-12-15 21:41:03 -05:00
|
|
|
trap "exit 0" SIGINT
|
2025-05-18 19:12:02 -04:00
|
|
|
|
2025-08-01 15:25:53 -04:00
|
|
|
# Detect dialog interface type BEFORE potentially setting DISPLAY
|
|
|
|
|
# This must happen before we modify DISPLAY to preserve console detection
|
|
|
|
|
if [[ -z "$DISPLAY" ]]; then
|
|
|
|
|
dialogType="dialog"
|
2025-11-08 13:07:07 -05:00
|
|
|
elif command -v yad &> /dev/null; then
|
|
|
|
|
dialogType="yad"
|
2025-08-01 15:25:53 -04:00
|
|
|
else
|
2025-11-08 13:07:07 -05:00
|
|
|
dialogType="dialog"
|
2025-08-01 15:25:53 -04:00
|
|
|
fi
|
|
|
|
|
|
2025-08-05 01:40:27 -04:00
|
|
|
# Source dialog interface early for progress display
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/dialog-interface.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/dialog-interface.sh"
|
2025-08-05 01:40:27 -04:00
|
|
|
|
2020-09-06 14:38:16 -04:00
|
|
|
# If display isn't set assume we are launching from console and an X environment is running using display :0
|
|
|
|
|
if [[ -z "$DISPLAY" ]]; then
|
|
|
|
|
export DISPLAY=":0"
|
|
|
|
|
fi
|
2020-09-01 14:39:39 -04:00
|
|
|
# Settings file
|
2025-05-14 13:57:57 -04:00
|
|
|
export cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager"
|
|
|
|
|
export configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf"
|
2020-09-06 19:20:14 -04:00
|
|
|
mkdir -p "${cache}"
|
2020-09-01 14:39:39 -04:00
|
|
|
mkdir -p "${configFile%/*}"
|
2022-08-25 00:28:18 -04:00
|
|
|
# Create the path for AGM's helper programs.
|
|
|
|
|
# Originally this was only winetricks, thus the name, and I'm too lazy to change it now.
|
|
|
|
|
winetricksPath="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager"
|
|
|
|
|
mkdir -p "${winetricksPath}"
|
2022-03-08 03:31:05 -05:00
|
|
|
# Load any arguments from settings.conf file
|
|
|
|
|
if [[ -r "${configFile%/*}/settings.conf" ]]; then
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck disable=SC1091
|
2022-03-08 03:31:05 -05:00
|
|
|
source "${configFile%/*}/settings.conf"
|
|
|
|
|
fi
|
2022-02-28 07:36:07 -05:00
|
|
|
# Update the cache for older versions of audiogame-manager
|
|
|
|
|
if [[ -d "${configFile%/*}/cache" ]]; then
|
|
|
|
|
{ mv -v "${configFile%/*}/cache/"* "${cache}"
|
2025-08-05 01:40:27 -04:00
|
|
|
rmdir -v "${configFile%/*}/cache/"; } | agm_progressbox "Audiogame Manager" "Updating cache, please wait..."
|
2022-02-28 07:36:07 -05:00
|
|
|
fi
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck disable=SC2034
|
2021-10-09 04:16:35 -04:00
|
|
|
checkWinetricksUpdate="false"
|
2020-08-27 15:42:24 -04:00
|
|
|
# Turn off debug messages
|
2022-03-08 03:31:05 -05:00
|
|
|
export WINEDEBUG="${winedebug:--all}"
|
2020-08-27 15:42:24 -04:00
|
|
|
# During installation, you can set winVer to the versions available.
|
|
|
|
|
# To set winetricks arguments, such as virtual desktop, set the winetricksSettings variable.
|
|
|
|
|
# Example: winetricksSettings="vd=1024x768"
|
2020-09-06 19:20:14 -04:00
|
|
|
# Files are cached unless -N no cache is set.
|
|
|
|
|
unset noCache
|
2020-09-02 22:36:48 -04:00
|
|
|
# Manual installation is not default, make sure it's unset
|
|
|
|
|
unset manualInstall
|
2023-01-23 20:18:36 -05:00
|
|
|
unset version
|
2024-01-19 11:26:30 -05:00
|
|
|
# ipfs gateway
|
2024-12-14 15:10:04 -05:00
|
|
|
export ipfsGateway="${ipfsGateway:-https://ipfs.stormux.org}"
|
2020-08-27 15:42:24 -04:00
|
|
|
|
2025-08-05 02:27:01 -04:00
|
|
|
# nvda2speechd server startup is now handled in game_launcher()
|
2025-08-04 22:24:04 -04:00
|
|
|
|
2022-02-16 18:18:16 -05:00
|
|
|
|
2025-05-18 19:12:02 -04:00
|
|
|
# Source helper functions
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/bottle.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/bottle.sh" # Also sourced in functions that need it
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/desktop.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/desktop.sh"
|
2025-08-05 01:40:27 -04:00
|
|
|
# dialog-interface.sh already sourced earlier
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/functions.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/functions.sh"
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/help.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/help.sh"
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck source=.includes/update.sh
|
2025-11-04 18:01:49 -05:00
|
|
|
source "${scriptDir}/.includes/update.sh"
|
2025-05-18 19:12:02 -04:00
|
|
|
|
2026-01-08 14:54:01 -05:00
|
|
|
# Set NVDA controller client DLLs from centralized ipfs array
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck disable=SC2154
|
2026-01-08 14:54:01 -05:00
|
|
|
export nvdaControllerClient32Dll="${ipfs[nvdaControllerClient32]}"
|
|
|
|
|
export nvdaControllerClient64Dll="${ipfs[nvdaControllerClient64]}"
|
|
|
|
|
export nvda2speechdBinary="${ipfs[nvda2speechd]}"
|
|
|
|
|
|
2025-05-18 19:12:02 -04:00
|
|
|
# Check minimum requirements
|
|
|
|
|
check_requirements || exit 1
|
Eliminate wine32 entirely: migrate all games to wine64 with WINETRICKS_FORCE=1
BREAKTHROUGH: Discovered that WINETRICKS_FORCE=1 enables reliable speechsdk
installation in wine64+WOW64, eliminating the need for wine32 bottle.
**Wine Architecture:**
- Removed wine32 bottle creation completely (deleted 58 lines)
- Disabled check_wine32() call - no more PlayOnLinux wine32 downloads
- All games now use unified wine64 bottle with WOW64 for 32-bit apps
- Updated architecture selection to always default to wine64
**SAPI Support:**
- wine64 bottle now includes speechsdk via WINETRICKS_FORCE=1
- Microsoft Mike configured as default SAPI voice in wine64
- Both wine32 and wine64 bottle creation use WINETRICKS_FORCE=1
- Updated bottle.sh to recognize 'sapi' dependency (alongside legacy 'speechsdk')
**Game Migration (57 games):**
- Migrated all 51 BG Enterprise games to wine64
- Migrated 3 Bokurano Daibouken games to wine64
- Migrated Swamp, Dreamland, Mist World to wine64
- Migrated 8 SAPI-dependent games to wine64:
* Bloodshed - TESTED, confirmed working
* Dog Who Hates Toast - TESTED, confirmed working (VB6+SAPI validated)
* Skateboarder Pro - TESTED, confirmed working
* Lunimals, VIP Mud, Oh Shit, Entombed, Three D velocity
**Files Modified:**
- audiogame-manager.sh: Removed wine32 creation, added wine64 speechsdk
- .includes/bottle.sh: Simplified architecture logic, always wine64
- CLAUDE.md: Updated documentation to reflect wine32 elimination
- 57 game installers: Changed WINEARCH from win32 to win64
✅ Bloodshed: wine64 SAPI works perfectly
✅ Dog Who Hates Toast: wine64 VB6+SAPI confirmed working
✅ Skateboarder Pro: wine64 NVDA works perfectly
- WOW64 allows wine64 to run 32-bit apps efficiently
- nvdaControllerClient DLL update logic preserved for 32-bit apps
- Uses 'file' command to detect PE32 vs PE32+ and apply correct DLL version
- Clipboard translator for Bokurano games works with wine64 (requires reinstall)
- Simplified architecture: one bottle instead of two
- Eliminated wine32 download/management overhead
- All games benefit from modern wine64 improvements
- SAPI now works reliably via WINETRICKS_FORCE=1
🚀 Wine32 completely eliminated. All games use wine64.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-06 23:15:56 -05:00
|
|
|
# Wine32 no longer needed - all games use wine64 with SAPI support via WINETRICKS_FORCE=1
|
|
|
|
|
# check_wine32 # Disabled - wine32 eliminated 2025-12-06
|
2025-08-07 20:18:11 -04:00
|
|
|
# Ensure wine bottles exist with dependencies
|
|
|
|
|
ensure_wine_bottles
|
2025-05-18 19:12:02 -04:00
|
|
|
# Check for updates
|
|
|
|
|
update
|
2021-06-30 22:38:21 -04:00
|
|
|
# Get latest news if available
|
2024-04-15 14:33:33 -04:00
|
|
|
check_news
|
2025-05-18 19:12:02 -04:00
|
|
|
|
2020-08-27 15:42:24 -04:00
|
|
|
# With no arguments, open the game launcher.
|
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
|
|
|
game_launcher
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Array of command line arguments
|
2020-09-05 00:26:29 -04:00
|
|
|
declare -A command=(
|
|
|
|
|
[c]="Check your system for necessary components."
|
2020-12-16 23:28:38 -05:00
|
|
|
[C]="Clear the cache. All game installers will be deleted."
|
2022-01-01 16:12:22 -05:00
|
|
|
[D]="Create desktop shortcut. You can launch audiogame-manager from the desktop or applications menu."
|
2022-03-11 13:08:45 -05:00
|
|
|
[d]="Debug mode, wine will be much more verbose when games are installed with this flag."
|
2025-11-06 12:24:28 -05:00
|
|
|
[g]="Debug with GDB. Launch game with winedbg --gdb for step-through debugging."
|
2020-09-05 00:26:29 -04:00
|
|
|
[h]="This help screen."
|
|
|
|
|
[i]="Install games."
|
2021-02-23 16:14:27 -05:00
|
|
|
[I:]="Noninteractive game installation."
|
2020-12-29 06:28:05 -05:00
|
|
|
[k]="Kill a running game that is stuck."
|
2020-12-16 17:16:16 -05:00
|
|
|
[L]="Display license information."
|
|
|
|
|
[l:]="Launch given game without interactive audiogame-manager menu specified by its wine bottle."
|
2020-09-06 19:20:14 -04:00
|
|
|
[N]="No cache, delete the installer after it has been extracted."
|
2022-01-21 23:08:59 -05:00
|
|
|
[n]="No RHVoice, do not install RHVoice when the game is installed."
|
2021-05-10 13:38:30 -04:00
|
|
|
[P]="Print a list of packages required by audiogame-manager."
|
2022-12-23 01:37:27 -05:00
|
|
|
[q]="No qjoypad. Does not launch qjoypad if it is detected."
|
2021-08-08 15:02:06 -04:00
|
|
|
[R]="Redownload. Removes old versions of packages from cache before installing."
|
2020-09-05 00:26:29 -04:00
|
|
|
[r]="Remove a game. This will delete all game data."
|
2023-05-01 00:08:22 -04:00
|
|
|
[S:]="Speech rate. Requires -V voice name, the default is 7. Values 0-9 or A."
|
2022-03-27 03:14:04 -04:00
|
|
|
[t]="Total games. Show how many games are currently available."
|
2023-05-01 20:10:40 -04:00
|
|
|
[v:]="Select the voice to be installed, default is Bdl. Options are alan, bdl, clb, or slt."
|
2023-05-01 00:08:22 -04:00
|
|
|
[V:]="Select the default voice for a bottle."
|
2020-08-27 15:42:24 -04:00
|
|
|
)
|
|
|
|
|
|
2020-09-05 00:26:29 -04:00
|
|
|
# Convert the keys of the associative array to a format usable by getopts
|
|
|
|
|
args="${!command[*]}"
|
|
|
|
|
args="${args//[[:space:]]/}"
|
|
|
|
|
while getopts "${args}" i ; do
|
2020-08-27 15:42:24 -04:00
|
|
|
case "$i" in
|
2025-11-04 18:01:49 -05:00
|
|
|
c) "${scriptDir}/.includes/checkup.sh";;
|
2020-12-16 23:28:38 -05:00
|
|
|
C) clear_cache;;
|
2022-01-01 16:12:22 -05:00
|
|
|
D) desktop_launcher;;
|
2020-12-12 16:14:48 -05:00
|
|
|
d)
|
|
|
|
|
unset WINEDEBUG
|
2022-03-11 13:08:45 -05:00
|
|
|
game_installer
|
2020-12-12 16:14:48 -05:00
|
|
|
;;
|
2025-11-06 12:24:28 -05:00
|
|
|
g)
|
|
|
|
|
debugGdb=1
|
|
|
|
|
game_launcher;;
|
2020-09-05 00:26:29 -04:00
|
|
|
h) help;;
|
2020-08-27 17:35:32 -04:00
|
|
|
i) game_installer;;
|
2021-02-23 16:14:27 -05:00
|
|
|
I)
|
2026-01-09 12:24:08 -05:00
|
|
|
export selectedGameName="${OPTARG}"
|
2025-08-06 00:39:17 -04:00
|
|
|
export noninteractiveInstall="true"
|
2021-02-23 16:14:27 -05:00
|
|
|
break;;
|
2020-12-29 06:28:05 -05:00
|
|
|
k) kill_game;;
|
2020-12-16 17:16:16 -05:00
|
|
|
L) license;;
|
2020-12-12 01:11:43 -05:00
|
|
|
l) game_launcher "${OPTARG}";;
|
2026-01-09 12:24:08 -05:00
|
|
|
N)
|
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
|
noCache="true"
|
|
|
|
|
;;
|
|
|
|
|
n)
|
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
|
norh="true"
|
|
|
|
|
;;
|
2021-05-10 13:38:30 -04:00
|
|
|
P) checklist quiet;;
|
2022-12-23 01:37:27 -05:00
|
|
|
q)
|
|
|
|
|
noqjoypad="true"
|
|
|
|
|
game_launcher;;
|
2026-01-09 12:24:08 -05:00
|
|
|
R)
|
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
|
redownload="true"
|
|
|
|
|
;;
|
2020-09-04 23:32:26 -04:00
|
|
|
r) game_removal;;
|
2026-01-09 12:24:08 -05:00
|
|
|
S)
|
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
|
defaultRate="${OPTARG}"
|
|
|
|
|
;;
|
2022-03-27 03:14:04 -04:00
|
|
|
t)
|
2025-11-04 18:01:49 -05:00
|
|
|
gameCount=$(find "${scriptDir}/.install" -type f -iname "*.sh" | wc -l)
|
2025-08-01 15:25:53 -04:00
|
|
|
agm_infobox "Linux Game Manager" "Linux Game Manager" "There are currently ${gameCount} games available."
|
2022-03-27 03:14:04 -04:00
|
|
|
exit 0
|
2024-12-16 04:30:42 -05:00
|
|
|
;;
|
2026-01-09 12:24:08 -05:00
|
|
|
v)
|
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
|
voiceName="${OPTARG}"
|
|
|
|
|
;;
|
|
|
|
|
V)
|
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
|
defaultVoice="${OPTARG}"
|
|
|
|
|
;;
|
2020-08-27 15:42:24 -04:00
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
2025-06-10 01:54:56 -04:00
|
|
|
# If agmNoLaunch is set, exit (script is being sourced)
|
|
|
|
|
[[ "$agmNoLaunch" == "true" ]] && exit 0
|
|
|
|
|
|
2025-08-06 00:39:17 -04:00
|
|
|
# Only proceed with noninteractive installation if explicitly requested
|
|
|
|
|
if [[ "$noninteractiveInstall" == "true" ]]; then
|
|
|
|
|
# If no game specified for noninteractive install, exit
|
2026-01-09 12:24:08 -05:00
|
|
|
[[ -z "$selectedGameName" ]] && exit 0
|
2024-12-15 21:41:03 -05:00
|
|
|
|
2025-08-06 00:39:17 -04:00
|
|
|
# Install the specified game noninteractively
|
2026-01-09 12:24:08 -05:00
|
|
|
if [[ -f "${scriptDir}/.install/${selectedGameName}.sh" ]]; then
|
2025-08-06 00:39:17 -04:00
|
|
|
export LANG="en_US.UTF-8"
|
2026-01-09 12:24:08 -05:00
|
|
|
# shellcheck disable=SC1090
|
|
|
|
|
. "${scriptDir}/.install/${selectedGameName}.sh"
|
2025-08-06 00:39:17 -04:00
|
|
|
# Show success message
|
2026-01-09 12:24:08 -05:00
|
|
|
agm_msgbox "Installation Complete" "Audio Game Installer" "Game \"${selectedGameName}\" has been successfully installed."
|
2025-08-06 00:39:17 -04:00
|
|
|
else
|
2026-01-09 12:24:08 -05:00
|
|
|
agm_msgbox "Audio Game Installer" "" "Error: Game '${selectedGameName}' not found in .install directory"
|
2025-08-06 00:39:17 -04:00
|
|
|
exit 1
|
|
|
|
|
fi
|
2025-06-10 01:54:56 -04:00
|
|
|
fi
|