diff --git a/.gitignore b/.gitignore index d0ed1f8..20c5e8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.x.c *.x +music/ diff --git a/.includes/bottle.sh b/.includes/bottle.sh new file mode 100644 index 0000000..cedb6dd --- /dev/null +++ b/.includes/bottle.sh @@ -0,0 +1,209 @@ +#!/usr/bin/env bash + +get_bottle() { + # Simple rule: wine64 for everything, wine32 only for speech APIs + local architecture="${1:-win64}" + architecture="${architecture/win/}" + export WINEPREFIX="$HOME/.local/wine${architecture}" + + # Set wine executables based on architecture - FOR LAUNCHER + if [[ "$architecture" == "32" ]] && [[ -n "$wine32" ]]; then + # Set environment variables for winetricks compatibility + export WINE="$wine32" + export WINESERVER="$wine32server" + # Also prepend to PATH for regular wine calls + export PATH="${wine32%/*}:$PATH" + # Keep WINEARCH for compatibility + echo "DEBUG: Using managed wine32 for LAUNCHER (WINE=$WINE, PATH updated)" + else + # Clear wine variables for system wine but preserve WINEARCH if set + unset WINE WINESERVER + echo "DEBUG: Using system wine for LAUNCHER (architecture $architecture)" + fi +} + +# Set wine environment for installation (called from install_wine_bottle) +set_wine_env() { + local architecture="$1" + if [[ "$architecture" == "32" ]] && [[ -n "$wine32" ]]; then + export WINE="$wine32" + export WINESERVER="$wine32server" + export PATH="${wine32%/*}:$PATH" + # Don't unset WINEARCH - preserve it for proper architecture selection + echo "DEBUG: Set wine32 environment for INSTALLATION (WINE=$WINE, WINEARCH=$WINEARCH)" + else + unset WINE WINESERVER + # Don't unset WINEARCH - preserve it for proper architecture selection + echo "DEBUG: Set system wine environment for INSTALLATION (WINEARCH=$WINEARCH)" + fi +} + +# Note: install_wine function removed - we now use system wine with simplified bottle management + +winetricks() { + # Report used packages to the winetricks maintainer so he knows they are being used. + if ! [[ -e "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/track_usage" ]]; then + mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/" + echo "1" > "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/track_usage" + fi + # Temporary work around for winetricks git bugs. Requires winetricks be installed from package manager. + /usr/bin/winetricks "$@" + return + # Download or update agm's copy of winetricks + if [[ ! -e "${winetricksPath}/winetricks" ]]; then + checkWinetricksUpdate="true" + download "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks" + mv "${cache}/winetricks" "${winetricksPath}" + chmod 755 "${winetricksPath}/winetricks" + else + if [[ "$checkWinetricksUpdate" != "true" ]]; then + checkWinetricksUpdate="true" + ${winetricksPath}/winetricks --self-update + fi + fi + # Run the requested winetricks parameters + if command -v FEXLoader &> /dev/null ; then + WINE="" FEXLoader -- ${winetricksPath}/winetricks "$@" + else + ${winetricksPath}/winetricks "$@" + fi +} + +install_rhvoice() { + if [[ -d "${WINEPREFIX}/drive_c/Program Files/Olga Yakovleva/" ]]; then + return + fi + if [[ "$norh" == "true" ]]; then + # Try to prevent the user from breaking speech + # Also useful for games that do not work with RHVoice + if [[ "${defaultVoice}" == "RHVoice" ]]; then + unset defaultVoice + fi + return + fi + declare -A RHVoice=( + [alan]="https://github.com/RHVoice/alan-eng/releases/download/4.0/RHVoice-voice-English-Alan-v4.0.2016.21-setup.exe" + [bdl]="https://github.com/RHVoice/bdl-eng/releases/download/4.1/RHVoice-voice-English-Bdl-v4.1.2016.21-setup.exe" + [clb]="https://github.com/RHVoice/clb-eng/releases/download/4.0/RHVoice-voice-English-Clb-v4.0.2016.21-setup.exe" + [lyubov]="https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Lyubov-v4.0.2008.15-setup.exe" + [slt]="https://github.com/RHVoice/slt-eng/releases/download/4.1/RHVoice-voice-English-Slt-v4.1.2016.21-setup.exe" + ) + voiceName="${voiceName:-bdl}" + voiceName="${voiceName,,}" + if [[ "${RHVoice[${voiceName}]}" == "" ]]; then + echo "Invalid RHVoice name specified, defaulting to Bdl." + voiceName="bdl" + fi + local voiceFile="${RHVoice[${voiceName}]##*/}" + download "${RHVoice[${voiceName}]}" + winetricks -q win8 | agm_progressbox "RHVoice Setup" "Preparing Windows environment for RHVoice..." + echo "Installing RHVoice ${voiceName^}..." + wine "${cache}/${voiceFile}" & + sleep 20 | agm_progressbox "RHVoice Setup" "Installing RHVoice ${voiceName^} voice..." + wineserver -k +} + +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 + if [[ -z "$WINEARCH" ]]; then + if [[ "$*" =~ speechsdk ]]; then + export WINEARCH="win32" + else + export WINEARCH="win64" + fi + fi + + # Set architecture for WINEPREFIX path + local architecture + if [[ "$WINEARCH" == "win32" ]]; then + architecture=32 + else + architecture=64 + fi + + export WINEPREFIX="$HOME/.local/wine${architecture}" + + # Set wine environment + set_wine_env "$architecture" + + echo "Using pre-configured wine${architecture} bottle at $WINEPREFIX" + + # 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" + + for dep in "$@"; do + # Skip dependencies already installed during bottle creation + 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..." + fi + fi +} + +add_launcher() { + # Determine architecture from WINEPREFIX path instead of WINEARCH variable + local architecture="win64" # default + if [[ "$WINEPREFIX" =~ wine32 ]]; then + architecture="win32" + fi + local launchSettings="${architecture}|${1}|${game}" + shift + while [[ $# -gt 0 ]]; do + launchSettings+="|$1" + shift + done + if ! grep -F -q -x "${launchSettings}" "${configFile}" 2> /dev/null ; then + echo "${launchSettings}" >> "${configFile}" + sort -o "${configFile}" "${configFile}" + # Remove .lnk files because they don't work. + find ~/Desktop -type f -iname '*.lnk' -exec bash -c ' + for f ; do + mimeType="$(file -b "$f")" + mimeType="${mimeType%%,*}" + if [[ "$mimeType" == "MS Windows shortcut" ]]; then + rm -v "$f" + fi + done' _ {} + + if [[ "${noCache}" == "true" ]]; then + rm -f "${cache}/${1##*\\}" + fi + fi +} +# Install the Discord RPC bridge +install_discord_rpc_bridge() { + echo "Installing Discord RPC bridge for Wine compatibility..." + download "https://github.com/EnderIce2/rpc-bridge/releases/download/v1.4.0.1/bridge.zip" + if [[ -f "${cache}/bridge.zip" && ! -f "${cache}/bridge.exe" ]]; then + # the package is on the system, but not extracted just yet. + unzip "${cache}/bridge.zip" -d "${cache}" + fi + + if [[ -f "${cache}/bridge.exe" ]]; then + wine "${cache}/bridge.exe" --install 2>&1 | grep -v "fixme:" || echo "Discord bridge installation attempted" + + # Copy required bridge.sh script to Wine prefix + if [[ -f "${cache}/bridge.sh" ]]; then + cp "${cache}/bridge.sh" "${WINEPREFIX}/drive_c/windows/" + echo "Copied bridge.sh to Wine prefix" + else + echo "WARNING: bridge.sh not found in cache!" + fi + else + echo "ERROR: bridge.exe not found after extraction!" + return 1 + fi +} diff --git a/.includes/checkup.sh b/.includes/checkup.sh new file mode 100755 index 0000000..ed68e06 --- /dev/null +++ b/.includes/checkup.sh @@ -0,0 +1,109 @@ +declare -a errorList +declare -a packageList +if [[ $# -eq 0 ]]; then + echo "Checking your system..." + echo +fi +if command -v wine &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Wine is installed." +else + errorList+=("Critical: Wine is not installed. You will not be able to play any games.") +fi +packageList+=("wine") +if command -v curl &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Curl is installed." +else + errorList+=("Critical: Curl is not installed. Critical functionality will not work.") +fi +packageList+=("curl") +if command -v dialog &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Dialog is installed." +else + errorList+=("Critical: Dialog is not installed. You will not be able to install, launch, or remove any games.") +fi +packageList+=("dialog") +for i in 7z cabextract unzip xz ; do + if command -v $i &> /dev/null ; then + [[ $# -eq 0 ]] && echo "${i^} is installed." + else + errorList+=("Critical: ${i^} is not installed. You will not be able to install some games or their components.") + fi + packageList+=("$i") +done +if command -v gawk &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Gawk is installed." +else + errorList+=("Warning: gawk is not installed. Game removal with -r will not work.") +fi +packageList+=("gawk") +if command -v ocrdesktop &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Ocrdesktop is installed." +else + errorList+=("Warning: ocrdesktop is not installed. It can help if the installer gets stuck to figure out what is happening.") +fi +packageList+=("ocrdesktop") +if command -v qjoypad &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Qjoypad is installed." +else + errorList+=("Warning: qjoypad is not installed. Qjoypad allows you to play keyboard only games with a gamepad.") +fi +packageList+=("qjoypad") +if command -v sox &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Sox is installed." +else + errorList+=("Warning: Sox is not installed. Audio will not work.") +fi +packageList+=("sox") +if command -v trans &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Translate-shell is installed." +else + errorList+=("Warning: translate-shell is not installed. Games that require translation will not be translated.") +fi +packageList+=("translate-shell") +if command -v sqlite3 &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Sqlite3 is installed." +else + errorList+=("Warning: sqlite is not installed. Required for games that need to be translated.") +fi +if command -v perl &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Perl is installed." +else + errorList+=("Warning: perl is not installed. Required for games that need to be translated.") +fi +packageList+=("perl") +packageList+=("sqlite") +if command -v w3m &> /dev/null ; then + [[ $# -eq 0 ]] && echo "W3m is installed." +else + errorList+=("Warning: w3m is not installed. W3m is used to view game documentation.") +fi +packageList+=("w3m") +if command -v xclip &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Xclip is installed." +else + errorList+=("Warning: Xclip is not installed. Some games may not speak or register properly.") +fi +packageList+=("xclip") +if command -v xdotool &> /dev/null ; then + [[ $# -eq 0 ]] && echo "Xdotool is installed." +else + errorList+=("Warning: Xdotool is not installed. Some installers may not work or may need manual intervention.") +fi +packageList+=("xdotool") +# Show the results +if [[ $# -ne 0 ]]; then + for i in "${packageList[@]}" ; do + echo "$i" + done | sort + exit 0 +fi +if [[ ${#errorList[@]} -eq 0 ]]; then + echo "No problems found, you are good to go." + exit 0 +fi +echo "Errors detected, here is a list along with the severity." +echo "Note that errors marked critical mean that you will not be able to install and play games until they are resolved." +for i in "${errorList[@]}" ; do + echo "$i" +done +exit 0 diff --git a/.includes/desktop.sh b/.includes/desktop.sh new file mode 100644 index 0000000..b881de2 --- /dev/null +++ b/.includes/desktop.sh @@ -0,0 +1,35 @@ +# Create desktop launcher file +desktop_launcher() { + local desktopFile="${HOME}/audiogame-manager.desktop" + if [[ -e "${desktopFile}" ]]; then + echo "the file ${desktopFile} exists. Cannot create the launcher." + exit 1 + fi + local dotDesktop + local terminal + # Try to find an accessible terminal + for i in mate-terminal lxterminal terminator gnome-terminal ; do + if command -v $i &> /dev/null ; then + terminal="$i" + break + fi + done + dotDesktop=('[Desktop Entry]' + 'Name=Audiogame manager' + 'GenericName=Audiogame Manager' + 'Comment=Play audio games' + "Exec=${terminal} -t \"Audiogame Manager\" -e \"/usr/bin/bash -c 'nohup $(readlink -e "$0") 2> /dev/null'\"" + 'Terminal=false' + 'Type=Application' + 'StartupNotify=false' + 'Keywords=game;' + 'Categories=Game;' + 'Version=1.0') + for i in "${dotDesktop[@]}" ; do + echo "$i" >> "${desktopFile}" + done + desktop-file-install --dir "${HOME}/.local/share/applications" -m 755 "${desktopFile}" + xdg-desktop-icon install ~/.local/share/applications/audiogame-manager.desktop + rm "${desktopFile}" + exit 0 +} diff --git a/.includes/dialog-interface.sh b/.includes/dialog-interface.sh new file mode 100644 index 0000000..afda207 --- /dev/null +++ b/.includes/dialog-interface.sh @@ -0,0 +1,444 @@ +#!/usr/bin/env bash + +# Dialog interface wrapper for audiogame-manager +# Automatically switches between dialog (console) and yad (GUI) based on DISPLAY environment +# This provides better accessibility for GUI environments while maintaining console functionality + +# Note: dialogType is now detected in the main script before DISPLAY is modified +# This ensures console detection works correctly when AGM sets DISPLAY=":0" +# If dialogType is not set (e.g., when called from standalone scripts), detect it +if [[ -z "$dialogType" ]]; then + if [[ -z "$DISPLAY" ]]; then + dialogType="dialog" + elif command -v yad &> /dev/null; then + dialogType="yad" + else + dialogType="dialog" + fi +fi + +# Wrapper function for menu selection +# Usage: agm_menu "title" "backtitle" "text" option1 "description1" option2 "description2" ... +agm_menu() { + local title="$1" + local backTitle="$2" + local text="$3" + shift 3 + + if [[ "$dialogType" == "yad" ]]; then + # Build yad list format: Display only, then map back to value + local yadList="" + declare -A valueMap + while [[ $# -gt 0 ]]; do + local option="$1" + local description="$2" + valueMap["$description"]="$option" + if [[ -n "$yadList" ]]; then + yadList="$yadList\n" + fi + yadList="${yadList}${description}" + shift 2 + done + + local selectedDescription + selectedDescription=$(echo -e "$yadList" | yad --list \ + --title="$title" \ + --text="$text" \ + --column="Option" \ + --no-headers \ + --selectable-labels \ + --search-column=1 \ + --height=400 \ + --width=600) + + # Strip trailing pipes and return the mapped value + if [[ -n "$selectedDescription" ]]; then + selectedDescription="${selectedDescription%|}" + echo "${valueMap["$selectedDescription"]}" + fi + else + # Build dialog menu format with mapping (same approach as yad) + local dialogArgs=() + declare -A valueMap + while [[ $# -gt 0 ]]; do + local option="$1" + local description="$2" + valueMap["$description"]="$option" + dialogArgs+=("$description" "$description") + shift 2 + done + + local selectedDescription + selectedDescription=$(dialog --backtitle "$backTitle" \ + --title "$title" \ + --no-tags \ + --menu "$text" 0 0 0 \ + "${dialogArgs[@]}" \ + --stdout) + + # Return the mapped value + if [[ -n "$selectedDescription" ]]; then + echo "${valueMap["$selectedDescription"]}" + fi + fi +} + +# Wrapper function for checklist selection +# Usage: agm_checklist "title" "backtitle" "text" option1 "description1" "status1" option2 "description2" "status2" ... +agm_checklist() { + local title="$1" + local backTitle="$2" + local text="$3" + shift 3 + + if [[ "$dialogType" == "yad" ]]; then + local yadList="" + while [[ $# -gt 0 ]]; do + local option="$1" + local description="$2" + local status="$3" + local checked="FALSE" + [[ "$status" == "on" ]] && checked="TRUE" + + if [[ -n "$yadList" ]]; then + yadList="$yadList\n" + fi + yadList="${yadList}${checked}|${description}|${option}" + shift 3 + done + + echo -e "$yadList" | yad --list \ + --title="$title" \ + --text="$text" \ + --checklist \ + --column="Select:CHK" \ + --column="Option" \ + --column="Value:HD" \ + --hide-column=3 \ + --print-column=3 \ + --no-headers \ + --selectable-labels \ + --height=400 \ + --width=600 \ + --separator=" " + else + local dialogArgs=() + while [[ $# -gt 0 ]]; do + dialogArgs+=("$1" "$2" "$3") + shift 3 + done + + dialog --backtitle "$backTitle" \ + --title "$title" \ + --checklist "$text" 0 0 0 \ + "${dialogArgs[@]}" \ + --stdout + fi +} + +# Wrapper function for input dialog +# Usage: agm_inputbox "title" "backtitle" "text" "default_value" +agm_inputbox() { + local title="$1" + local backTitle="$2" + local text="$3" + local defaultValue="$4" + + if [[ "$dialogType" == "yad" ]]; then + yad --entry \ + --title="$title" \ + --text="$text" \ + --entry-text="$defaultValue" \ + --selectable-labels \ + --width=400 + else + dialog --backtitle "$backTitle" \ + --title "$title" \ + --inputbox "$text" 0 0 "$defaultValue" \ + --stdout + fi +} + +# Wrapper function for message box +# Usage: agm_msgbox "title" "backtitle" "text" +agm_msgbox() { + local title="$1" + local backTitle="$2" + local text="$3" + + if [[ "$dialogType" == "yad" ]]; then + echo -e "$text" | yad --text-info \ + --title="$title" \ + --show-cursor \ + --button="OK:0" \ + --width=600 \ + --height=400 + else + dialog --backtitle "$backTitle" \ + --title "$title" \ + --msgbox "$text" 0 0 + fi +} + +# Wrapper function for yes/no dialog +# Usage: agm_yesno "title" "backtitle" "text" +agm_yesno() { + local title="$1" + local backTitle="$2" + local text="$3" + + if [[ "$dialogType" == "yad" ]]; then + echo -e "$text" | yad --text-info \ + --title="$title" \ + --show-cursor \ + --button="Yes:0" \ + --button="No:1" \ + --width=600 \ + --height=400 + else + dialog --backtitle "$backTitle" \ + --title "$title" \ + --yesno "$text" 0 0 + fi +} + +# Wrapper function for info box (non-blocking message) +# Usage: agm_infobox "title" "backtitle" "text" +agm_infobox() { + local title="$1" + local backTitle="$2" + local text="$3" + + if [[ "$dialogType" == "yad" ]]; then + # For yad, we'll use a notification since infobox is non-blocking + yad --notification \ + --text="$text" \ + --timeout=3 + else + dialog --backtitle "$backTitle" \ + --title "$title" \ + --infobox "$text" 0 0 + fi +} + +# Wrapper function for progress box +# Usage: command | agm_progressbox "title" "text" +agm_progressbox() { + local title="$1" + local text="$2" + + if [[ "$dialogType" == "yad" ]]; then + # Start audio feedback for accessibility + local beepPid + local yadPid + + # Cleanup function for traps + cleanup_progress() { + [[ -n "$beepPid" ]] && kill "$beepPid" 2>/dev/null + [[ -n "$yadPid" ]] && kill "$yadPid" 2>/dev/null + } + + # Set trap to ensure cleanup on interruption + trap cleanup_progress EXIT INT TERM + + if command -v sox >/dev/null 2>&1; then + { + while true; do + # Generate a short, pleasant progress beep (440Hz for 0.1s) + sox -q -n -d synth 0.1 sine 440 vol 0.3 2>/dev/null + sleep 2 # Beep every 2 seconds + done + } & + beepPid=$! + fi + + # Start visual progress dialog with auto-close, redirect stdin to prevent conflicts + yad --progress \ + --title="$title" \ + --text="$text" \ + --auto-close \ + --pulsate \ + --width=400 \ + --height=100 /dev/null + [[ -n "$yadPid" ]] && kill "$yadPid" 2>/dev/null + } + + # Set trap to ensure cleanup on interruption + trap cleanup_simple_progress EXIT INT TERM + + if command -v sox >/dev/null 2>&1; then + { + while true; do + # Generate a short, pleasant progress beep (440Hz for 0.1s) + sox -q -n -d synth 0.1 sine 440 vol 0.3 2>/dev/null + sleep 2 # Beep every 2 seconds + done + } & + beepPid=$! + fi + + # Show progress dialog with pulsating + yad --progress \ + --title="$title" \ + --text="$text" \ + --auto-close \ + --pulsate \ + --width=400 \ + --height=100 & + yadPid=$! + + # Read from stdin and discard, but keep dialogs open until command finishes + cat > /dev/null + + # Clean up background processes + cleanup_simple_progress + trap - EXIT INT TERM # Remove traps + else + dialog --title "$title" \ + --progressbox "$text" 20 70 + fi +} + +# Alternative status box for simple operations without meaningful progress +# Usage: agm_statusbox "title" "text" & statusPid=$!; command; kill $statusPid 2>/dev/null +agm_statusbox() { + local title="$1" + local text="$2" + + if [[ "$dialogType" == "yad" ]]; then + # Show a simple status message that screen readers can access + yad --form \ + --title="$title" \ + --field="$text:LBL" \ + --selectable-labels \ + --no-buttons \ + --timeout=0 \ + --width=400 \ + --height=100 + else + # Use infobox for console + dialog --title "$title" \ + --infobox "$text" 5 50 + fi +} + +# Real progress bar with percentage updates (for operations that can report progress) +# Usage: agm_progress_with_percent "title" "text" +# Then send "percentage" or "#status text" to the returned file descriptor +agm_progress_with_percent() { + local title="$1" + local text="$2" + + if [[ "$dialogType" == "yad" ]]; then + # Start audio feedback for accessibility + local beepPid + local yadPid + + # Cleanup function for traps + cleanup_percent_progress() { + [[ -n "$beepPid" ]] && kill "$beepPid" 2>/dev/null + [[ -n "$yadPid" ]] && kill "$yadPid" 2>/dev/null + } + + # Set trap to ensure cleanup on interruption + trap cleanup_percent_progress EXIT INT TERM + + if command -v sox >/dev/null 2>&1; then + { + while true; do + # Generate a short, pleasant progress beep (440Hz for 0.1s) + sox -q -n -d synth 0.1 sine 440 vol 0.3 2>/dev/null + sleep 2 # Beep every 2 seconds + done + } & + beepPid=$! + fi + + # Create a true progress dialog that accepts percentage updates with tee for cleanup + { + cat + cleanup_percent_progress + trap - EXIT INT TERM + } | yad --progress \ + --title="$title" \ + --text="$text" \ + --auto-close \ + --width=400 \ + --height=150 + else + # For dialog, we'll simulate with a gauge + dialog --title "$title" \ + --gauge "$text" 6 50 0 + fi +} + +# Wrapper function for file selection +# Usage: agm_fselect "title" "backtitle" "default_path" +agm_fselect() { + local title="$1" + local backTitle="$2" + local defaultPath="$3" + + if [[ "$dialogType" == "yad" ]]; then + yad --file \ + --title="$title" \ + --filename="$defaultPath" \ + --width=600 \ + --height=400 + else + dialog --backtitle "$backTitle" \ + --title "$title" \ + --fselect "$defaultPath" 0 0 \ + --stdout + fi +} + +# Wrapper function for directory selection +# Usage: agm_dselect "title" "backtitle" "default_path" +agm_dselect() { + local title="$1" + local backTitle="$2" + local defaultPath="$3" + + if [[ "$dialogType" == "yad" ]]; then + yad --file \ + --directory \ + --title="$title" \ + --filename="$defaultPath" \ + --width=600 \ + --height=400 + else + dialog --backtitle "$backTitle" \ + --title "$title" \ + --dselect "$defaultPath" 0 0 \ + --stdout + fi +} \ No newline at end of file diff --git a/.includes/functions.sh b/.includes/functions.sh new file mode 100644 index 0000000..5a6d4a0 --- /dev/null +++ b/.includes/functions.sh @@ -0,0 +1,234 @@ +#!/usr/bin/env bash + +# Alerts, for when user needs to read something. +alert() { + play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t + echo + agm_msgbox "Alert" "" "Press OK to continue." +} + +check_requirements() { + # Make sure this is not ran as root + if [[ "$(whoami)" == "root" ]]; then + echo "Please do not run ${0##*/} as root." + return 1 + fi + + # Make sure the minimum dependencies are installed + if [[ "$(uname -m)" == "aarch64" ]]; then + minimumDependencies=("FEXLoader") + wine="FEXLoader -- /usr/bin/wine" + else + minimumDependencies=( + "curl" + "dialog" + "sox" + "wine" + ) + fi + for i in "${minimumDependencies[@]}" ; do + if ! command -v "$i" &> /dev/null ; then + echo "Please install $i before continuing." + return 1 + fi + done + return 0 +} + +clear_cache() { + if [[ ! -d "${cache}" ]]; then + agm_msgbox "Clear Cache" "" "No cache found at ${cache}." + return + fi + + if ! agm_yesno "Clear Cache" "" "This will delete all contents of ${cache}. Are you sure you want to continue?"; then + return + fi + + # All safety checks done. Delete the cache. + rm -rfv "${cache}" | agm_progressbox "Clear Cache" "Deleting cache files..." + agm_msgbox "Clear Cache" "" "Cache deleted." +} + +download() { + local source=($@) + for i in "${source[@]}" ; do + local dest="${i##*/}" + dest="${dest//%20/ }" + dest="${dest#*\?filename=}" + dest="${dest%\?*}" + # Remove the destination file if it is empty. + [[ -s "${cache}/${dest}" ]] || rm -f "${cache}/${dest}" 2> /dev/null + if [[ "${redownload}" == "true" ]] && [[ -e "${cache}/${dest}" ]]; then + rm -v "${cache}/${dest}" + fi + # Skip if the item is in cache. + [[ -e "${cache}/${dest}" ]] && continue + if [[ "$dialogType" == "yad" ]]; then + # Use curl's progress bar with better parsing for yad + if ! { + curl -L4 -C - --retry 10 --progress-bar --output "${cache}/${dest}" "${i}" 2>&1 | \ + stdbuf -oL grep -o '[0-9]*%' | \ + stdbuf -oL sed -u 's/%$//' | \ + while read -r percent; do + echo "$percent" + echo "# Downloading $dest - ${percent}%" + done + } | agm_progress_with_percent "Audio Game Manager" "Downloading \"$dest\"..."; then + agm_infobox "Audio Game Manager" "Audio Game Manager" "Could not download \"$dest\". Installation cannot continue." + exit 1 + fi + else + # Use the original method for dialog (console) + if ! curl -L4 -C - --retry 10 --output "${cache}/${dest}" "${i}" 2>&1 | agm_progressbox "Audio Game Manager" "Downloading \"$dest\"..."; then + agm_infobox "Audio Game Manager" "Audio Game Manager" "Could not download \"$dest\". Installation cannot continue." + exit 1 + fi + fi + local downloadError=1 + case "${dest##*.}" in + "pk3"|"zip") + unzip -tq "${cache}/${dest}" | agm_progressbox "Audio Game Manager" "Validating ${dest##*.} file" + downloadError=$? + ;; + "7z") + 7z t "${cache}/${dest}" | agm_progressbox "Audio Game Manager" "Validating 7z file" + downloadError=$? + ;; + "exe") + # Check if it's a valid Windows executable by looking at the MZ header + hexdump -n 2 -v -e '/1 "%02X"' "${cache}/${dest}" | grep -q "4D5A" + downloadError=$? + ;; + "wad") + if [[ "$(file -b --mime-type "${cache}/${dest}")" != "application/octet-stream" ]]; then + downloadError=0 + fi + ;; + *) + # Add HTML check for other file types + if file -b "${cache}/${dest}" | grep -q "HTML document" ; then + echo "File not found: \"$i\" (HTML document probably 404)" + downloadError=1 + else + downloadError=0 + fi + ;; + esac + if [[ $downloadError -ne 0 ]]; then + rm -fv "${cache}/${dest}" + agm_infobox "Audio Game Manager" "Audio Game Manager" "Error downloading \"${dest}\". Installation cannot continue." + alert + exit 1 + fi + done +} + +get_installer() { + trap "exit 0" SIGINT + # If the file is in cache nothing else needs to be done. + if [[ -f "${cache}/$1" ]]; then + return + fi + # Create message for dialog. + local message="Make sure $1 is available in either your Downloads or Desktop directory and press enter to continue." + if [[ -n "$2" ]]; then + message+="\n\nThe last good known URL for $game is:" + message+="\n$2" + fi + if echo "$2" | xclip -selection clipboard 2> /dev/null ; then + message+="\n\nThe URL has been copied to the clipboard." + fi + agm_msgbox "Audiogame Manager" "Audiogame Manager" "$message" + # Search the Desktop and Downloads directories for the installation file + for i in ~/Downloads ~/Desktop ; do + find $i -type f -name "$1" -exec cp -v {} "${cache}/" \; + done + # If the file is still not available abort. + if [[ ! -f "${cache}/$1" ]]; then + echo "couldn't find $1. Please download the file and try again." + exit 1 + fi +} + +get_steam() { + # Arguments: $1 id of item for download, $2 url for game + trap "exit 0" SIGINT + echo "manual intervention required." + alert + agm_yesno "Audiogame Manager" "Audiogame Manager" "To install the game manually, place files in \"${WINEPREFIX}/drive_c/Program Files/${game}\". Continue with Steam installation?" + case $? in + 0) echo "The next steps will install through steamcmd." ;; + 1) + mkdir -p "${WINEPREFIX}/drive_c/Program Files/${game}" + agm_msgbox "Audiogame Manager" "Audiogame Manager" "Place game files in \"${WINEPREFIX}/drive_c/Program Files/${game}\" and press enter to continue." + return + ;; + *) exit 0 ;; + esac + # Check for steamcmd + if ! command -v steamcmd &> /dev/null ; then + agm_infobox "Audiogame Manager" "Audiogame Manager" "This installer requires steamcmd. Please install steamcmd and try again." + exit 1 + fi + # Create message for dialog. + local message="Make sure ${game} is available in your Steam library and press enter to continue. The URL for ${game} is $2" + if echo "$2" | xclip -selection clipboard 2> /dev/null ; then + message+="\n\nThe URL has been copied to the clipboard." + fi + agm_msgbox "Audiogame Manager" "Audiogame Manager" "$message" + # Get Steam user name. + steamUser="$(agm_inputbox "Audiogame Manager" "Audiogame Manager" "Please enter your Steam user name:" "")" + # Download the game + mkdir -p "${WINEPREFIX}/drive_c/Program Files/${game}" + steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir "${WINEPREFIX}/drive_c/Program Files/$game" +login "$steamUser" +app_update "$1" +quit || { agm_infobox "Audiogame Manager" "Audiogame Manager" "Something went wrong. Please make sure you have a stable internet connection, and if the problem persists, contact audiogame-manager's developers." + exit 1; } +} + +# Function to open urls across OS. +open_url() { + if [[ "$(uname)" == "Darwin" ]]; then + open "${*}" 2> /dev/null + else + xdg-open "${*}" 2> /dev/null + fi +} + +unix2dos() { + if [[ $# -eq 0 ]]; then + echo "Usage: unix2dos file(s)." + exit 1 + fi + for file in "$@"; do + sed -i 's/\r\{0,\}$/\r/' "$file" + done +} + +# Progress wrapper for game installation operations +install_with_progress() { + local operation="$1" + local message="$2" + shift 2 + + case "$operation" in + "unzip") + # Always overwrite without prompting to prevent invisible terminal prompts + unzip -o "$@" | agm_progressbox "Game Installation" "$message" + ;; + "7z") + # Always overwrite without prompting for 7z as well + 7z -y "$@" | agm_progressbox "Game Installation" "$message" + ;; + "cp"|"copy") + # Always force overwrite to prevent invisible prompts in GUI mode + cp -fv "$@" | agm_progressbox "Game Installation" "$message" + ;; + "find") + find "$@" | agm_progressbox "Game Installation" "$message" + ;; + *) + # Default: run command with progress box + "$operation" "$@" | agm_progressbox "Game Installation" "$message" + ;; + esac +} diff --git a/.includes/help.sh b/.includes/help.sh new file mode 100644 index 0000000..3ee8097 --- /dev/null +++ b/.includes/help.sh @@ -0,0 +1,125 @@ +documentation() { + if [[ "$2" == "Become a Patron" ]]; then + return + fi + if [[ "$2" == "Donate" ]]; then + return + fi + if ! command -v w3m &> /dev/null ; then + echo "This feature of audiogame-manager requires w3m. Please install it before continuing." + exit 1 + fi + get_bottle "$1" +echo "Loading documentation, please wait..." + # Try to find documentation based on common naming conventions. + local gamePath="$(winepath -u "$2" 2> /dev/null)" + gamePath="${gamePath%/*}" + local gameDoc="$(find "$gamePath" -type f -iname 'user_manual.htm*' -or -iname 'user manual.htm*' -or -iname '*user guide.htm*' | head -1)" + # Game name specific docs, add the name to the for loop. + if [[ -z "$gameDoc" ]]; then + for i in "troopanum.txt" "superdeekout.txt" scw.html ; do + gameDoc="$(find "$gamePath" -type f -iname "$i" -or -iname 'manual.htm' | head -1)" + done + fi + if [[ -z "$gameDoc" ]]; then + gameDoc="$(find "$gamePath" -type f -path '*/Manual/index.html' | head -1)" + fi + if [[ -z "$gameDoc" ]]; then + gameDoc="$(find "$gamePath" -type f -iname '[A-Z]*Help.htm' -or -iname '[A-Z]*Help.html' | head -1)" + fi + if [[ -z "$gameDoc" ]]; then + gameDoc="$(find "$gamePath" -type f -iname 'manual.html' -or -iname 'manual.htm' | head -1)" + fi + if [[ -z "$gameDoc" ]]; then + gameDoc="$(find "$gamePath" -type f -iname 'en.html' -or -iname 'en.htm' | head -1)" + fi + if [[ -z "$gameDoc" ]]; then + gameDoc="$(find "$gamePath" -type f -iname 'readme.html' -or -iname 'readme.htm' | head -1)" + fi + if [[ -z "$gameDoc" ]]; then + gameDoc="$(find "$gamePath" -type f -iname 'manual.txt' | head -1)" + fi + if [[ -z "$gameDoc" ]]; then + gameDoc="$(find "$gamePath" -type f -iname 'readme.txt' -or -iname 'help.txt' | head -1)" + fi + if [[ -z "$gameDoc" ]]; then + gameDoc="$(find "$gamePath" -type f -iname '*.url' -exec grep -i 'url=' {} \; | grep -iv 'score' | head -1)" + gameDoc="${gameDoc#*=}" + gameDoc="${gameDoc//[[:cntrl:]]/}" + fi + # Display documentation if available. + if [[ -n "$gameDoc" ]]; then + w3m "$gameDoc" + else + echo "No documentation found." + fi + exit 0 +} + +help() { + echo "${0##*/}" + echo "Released under the terms of the Common Public Attribution License Version 1.0" + echo -e "This is a Stormux project: https://stormux.org\n" + echo -e "Usage:\n" + echo "With no arguments, open the game launcher." + for i in "${!command[@]}" ; do + echo "-${i/:/ }: ${command[${i}]}" + done | sort + echo + echo "Some settings that are often used can be stored in a settings.conf file." + echo "If wanted, place it at the following location:" + echo "${configFile%/*}/settings.conf" + echo "The syntax is variable=\"value\"" + echo + echo "ipfsGateway=\"https://ipfs.stormux.org\" # Gateway to be used for ipfs downloads." + echo "noCache=\"true\" # Do not keep downloaded items in the cache." + echo "noqjoypad=\"true\" # Do not launch qjoypad." + echo "norh=\"true\" # Do not install RHVoice." + echo "redownload=\"true\" # Redownload sources, do not use the version stored in cache." + echo "voiceName=\"voicename\" # Select the voice to be installed (default Bdl)." + echo "defaultVoice=\"voicename\" # Select the default voice to use for the bottle, e.g. MSMike or RHVoice." + echo "defaultRate=\"Default voice rate for the bottle, default 7, may not work in all games. Values 1-9 or A." + echo "winedebug=\"flag(s)\" # Set wine debug flags, useful for development." + exit 0 +} + +license() { + cat << EOF + ■The contents of this file are subject to the Common Public Attribution + License Version 1.0 (the ■License■); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + https://opensource.org/licenses/CPAL-1.0. The License is based on the Mozilla Public License Version + 1.1 but Sections 14 and 15 have been added to cover use of software over a + computer network and provide for limited attribution for the Original + Developer. In addition, Exhibit A has been modified to be consistent with + Exhibit B. + + Software distributed under the License is distributed on an ■AS IS■ basis, + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + for the specific language governing rights and limitations under the + License. + + The Original Code is audiogame manager. + + The Original Developer is not the Initial Developer and is . If + left blank, the Original Developer is the Initial Developer. + + The Initial Developer of the Original Code is Billy "Storm Dragon" Wolfe. All portions of + the code written by Billy Wolfe are Copyright (c) 2020, 2024. All Rights + Reserved. + + Contributor Michael Taboada. + + Attribution Copyright Notice: Audiogame manager copyright 2020 Storm Dragon. All rights reserved. + + Attribution Phrase (not exceeding 10 words): A Stormux project + + Attribution URL: https://stormgames.wolfe.casa + + Graphic Image as provided in the Covered Code, if any. + + Display of Attribution Information is required in Larger + Works which are defined in the CPAL as a work which combines Covered Code + or portions thereof with code not governed by the terms of the CPAL. +EOF +} diff --git a/.includes/update.sh b/.includes/update.sh new file mode 100644 index 0000000..33fb5d4 --- /dev/null +++ b/.includes/update.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Check for latest news +check_news() { + # For use by update scripts that want to source functions in this file. + [[ "$agmNoLaunch" == "true" ]] && return + trap return INT + # url for news file + local newsFile="https://stormgames.wolfe.casa/media/agm.ogg" + local newsPath="${configFile%/*.conf}/.news" + local newsTag="$(curl --connect-timeout 5 -sI "$newsFile" | grep -i '^etag: "' | cut -d '"' -f2)" + if [[ -z "${newsTag}" ]]; then + return + fi + local newsOldTag="$(cat "$newsPath" 2> /dev/null)" + if [[ "$newsTag" != "$newsOldTag" ]]; then + agm_yesno 'Audiogame Manager News' 'Audiogame Manager News' 'Audiogame manager news is available. Would you like to play it now?' || return + sox -qV0 "$newsFile" -d &> /dev/null + echo -n "$newsTag" > "$newsPath" + fi +} + +# Automatic update function +# Automatic update function +update() { + if ! [[ -d ".git" ]]; then + return + fi + local url="$(git ls-remote --get-url)" + if [[ "$url" =~ ^ssh://|git@|gitea@ ]] || [[ -z "$url" ]]; then + return + fi + git remote update &> /dev/null + local upstream='@{u}' + local home="$(git rev-parse @)" + local remote="$(git rev-parse "$upstream")" +if [[ "$home" == "$remote" ]]; then + return +fi + agm_yesno "Audiogame Manager" "Audiogame Manager" "Updates are available. Would you like to update now?" || return + + # Perform git pull quietly, then show only the important changes + local updateResult + git pull --quiet >/dev/null 2>&1 + updateResult=$? + + # Get the important information: commit messages and summary + local changesSummary + changesSummary=$({ + echo "UPDATE COMPLETED" + echo + echo "Recent changes:" + git log '@{1}..' --pretty=format:'• %an: %s' | tac + echo + echo "Update summary:" + git diff --stat '@{1}..' | tail -1 + } 2>/dev/null) + + # Show only the meaningful update information + agm_msgbox "Update Complete" "Audiogame Manager" "$changesSummary" + + exit $updateResult +} diff --git a/.install/A Hero's Call.sh b/.install/A Hero's Call.sh index 41aca8e..910612e 100644 --- a/.install/A Hero's Call.sh +++ b/.install/A Hero's Call.sh @@ -1,10 +1,9 @@ download "https://blindgamers.com/downloads/a-heros-call-freeware.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll" export winVer="win7" export winetricksSettings="vd=1024x768" -install_wine_bottle speechsdk corefonts +install_wine_bottle # Dotnet is evil. That is all. LC_ALL=C DISPLAY="" winetricks -q dotnet462 xna40 -${wine}server -k # Really! -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/a-heros-call-freeware.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; +wineserver -k # Really! +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/a-heros-call-freeware.zip" add_launcher "c:\Program Files\a-heros-call\A Hero's Call.exe" diff --git a/.install/Adrian's Doom.sh b/.install/Adrian's Doom.sh index 6d6167f..58c9e9e 100644 --- a/.install/Adrian's Doom.sh +++ b/.install/Adrian's Doom.sh @@ -1,4 +1,4 @@ download "https://agarchive.net/games/mt/adrian's%20doom.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/adrian's doom.exe" /silent add_launcher "c:\Program Files\Two Caring Citizens\Adrian's Doom!\adrian.exe" diff --git a/.install/Adventurers At C.sh b/.install/Adventurers At C.sh index 5ea7e8d..2cc8472 100644 --- a/.install/Adventurers At C.sh +++ b/.install/Adventurers At C.sh @@ -1,5 +1,5 @@ download "http://www.vgstorm.com/aac/aac.zip" "https://www.agarchive.net/games/vg/adventure%20at%20c%20stages.7z" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/aac" "${cache}/aac.zip" -7z x -o"$WINEPREFIX/drive_c/Program Files/aac/stages" "${cache}/adventure at c stages.7z" +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/aac" "${cache}/aac.zip" +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/aac/stages" "${cache}/adventure at c stages.7z" add_launcher "c:\Program Files\aac\aac.exe" diff --git a/.install/Alien Outback.sh b/.install/Alien Outback.sh index 1a41a7c..e8caacd 100644 --- a/.install/Alien Outback.sh +++ b/.install/Alien Outback.sh @@ -1,12 +1,12 @@ download "http://download.dracoent.com/Windows/classic/AOSetup.exe" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -install_wine_bottle vb6run dx8vb speechsdk quartz -cp -v "${cache}/AOSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" +install_wine_bottle vb6run dx8vb quartz +cp -fv "${cache}/AOSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/AOSetup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/AOSetup.exe" # warning warning warning: Do not change location, or installer will not function. # FIXME: Hacky, but it works. Install dotnet20 by itself so it actually doesn't hang. winetricks -q dotnet20 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. add_launcher "c:\Program Files\Draconis Entertainment\Alien Outback\ao.exe" diff --git a/.install/Angel Gift.sh b/.install/Angel Gift.sh index 278334a..ff34f20 100644 --- a/.install/Angel Gift.sh +++ b/.install/Angel Gift.sh @@ -1,4 +1,4 @@ download "https://erion.cf/files/ag_103.zip" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/Angel Gift" "$cache/ag_103.zip" +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/Angel Gift" "$cache/ag_103.zip" add_launcher 'c:\Program Files\Angel Gift\ag.exe' diff --git a/.install/AudioDisc.sh b/.install/AudioDisc.sh index 4b4e4dd..4cb354a 100644 --- a/.install/AudioDisc.sh +++ b/.install/AudioDisc.sh @@ -1,4 +1,4 @@ download "https://agarchive.net/games/other/audiodisc.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/audiodisc.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/audiodisc.zip" add_launcher "c:\Program Files\audiodisc\disco.exe" diff --git a/.install/AudioQuake.sh b/.install/AudioQuake.sh index 7f4f84a..4b14984 100644 --- a/.install/AudioQuake.sh +++ b/.install/AudioQuake.sh @@ -1,8 +1,8 @@ download "https://github.com/matatk/agrip/releases/download/2020.0-beta1/AudioQuake+LDL_2020.0-beta1_Windows.zip" "https://stormgames.wolfe.casa/downloads/quake.zip" export winVer="win7" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/AudioQuake+LDL_2020.0-beta1_Windows.zip" -unzip -d "$WINEPREFIX/drive_c/Program Files/AudioQuake/id1" "${cache}/quake.zip" +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/AudioQuake+LDL_2020.0-beta1_Windows.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/AudioQuake/id1" "${cache}/quake.zip" add_launcher "c:\Program Files\AudioQuake\AudioQuake.exe" echo echo "After you launch the game, press tab then enter and it should begin speaking." diff --git a/.install/BG 15 Puzzle.sh b/.install/BG 15 Puzzle.sh index 702588e..ed37a51 100644 --- a/.install/BG 15 Puzzle.sh +++ b/.install/BG 15 Puzzle.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmQiocMpMXoxejDftKKvmrR5xxpj1qcWcgkhBBwTcyijXg?filename=FPB32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/FPB32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\FifteenB\FifteenB.exe" diff --git a/.install/BG 2048.sh b/.install/BG 2048.sh index 2e8de3f..acd54e7 100644 --- a/.install/BG 2048.sh +++ b/.install/BG 2048.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmPNt3c78UBgEMrTH3eJ5eD2mCMdth6jwes1iDKGW24Uj5?filename=BG204832Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BG204832Setup10a.exe" /silent add_launcher "c:\Program Files\Games\BG2048B\BG2048.exe" diff --git a/.install/BG Aces Up Solitaire.sh b/.install/BG Aces Up Solitaire.sh index 66eabab..2317185 100644 --- a/.install/BG Aces Up Solitaire.sh +++ b/.install/BG Aces Up Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmTshtHBEV9dh7wFtaQpNUEYHZ3fBpuhSRZqc7k8HwmtPM?filename=ASB32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/ASB32Setup10.exe" /silent add_launcher "c:\Program Files\Games\AcesUpB\AcesUpB.exe" diff --git a/.install/BG Alchemy.sh b/.install/BG Alchemy.sh index 61c7640..9c9466e 100644 --- a/.install/BG Alchemy.sh +++ b/.install/BG Alchemy.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/Qma76HXBhmKgMDeHH1XLePsaWzzzLsBS2HRL3c7MVwDokg?filename=BAC32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BAC32Setup10.exe" /silent add_launcher "c:\Program Files\Games\AlchemyB\AlchemyB.exe" diff --git a/.install/BG Battleship.sh b/.install/BG Battleship.sh index 092fc96..98ba1d9 100644 --- a/.install/BG Battleship.sh +++ b/.install/BG Battleship.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/Qmaq9P9fxdLTEFMGg4mhHrRuUbPg6HgU3eYVJNqZUimHjo?filename=BGB32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGB32Setup10.exe" /silent add_launcher "c:\Program Files\Games\BattleshipB\BGBattleship.exe" diff --git a/.install/BG Boggle.sh b/.install/BG Boggle.sh index 504d952..b3abfbc 100644 --- a/.install/BG Boggle.sh +++ b/.install/BG Boggle.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmQwWiJw9hDiPdfwDyL4XepeoD66ztVRi3HwbSjFFP4CNg?filename=BGB32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGB32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\BoggleB\BoggleB.exe" diff --git a/.install/BG Boxes.sh b/.install/BG Boxes.sh index c080c97..0c17129 100644 --- a/.install/BG Boxes.sh +++ b/.install/BG Boxes.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmRn21tREXxXVSaDe9i54zEPzPSespjJAFBqu4DWocuagD?filename=BXB32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BXB32Setup10.exe" /silent add_launcher "c:\Program Files\Games\BoxesB\BoxesB.exe" diff --git a/.install/BG Brainiac.sh b/.install/BG Brainiac.sh index 7e48002..86fd73c 100644 --- a/.install/BG Brainiac.sh +++ b/.install/BG Brainiac.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmWEdmTkQsjSqBgWUgnDajMf8QvQBbEF4Nxo6mhkXYzBtQ?filename=BRN32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BRN32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\BrainiacB\BrainiacB.exe" diff --git a/.install/BG Chess Challenge.sh b/.install/BG Chess Challenge.sh index 757d0ca..30b7cb3 100644 --- a/.install/BG Chess Challenge.sh +++ b/.install/BG Chess Challenge.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmT2yBpU5Jqna18FxYtyWzi4xMGAY9PyJWStAskxCHqBDw?filename=BGC32Setup10d.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGC32Setup10d.exe" /silent add_launcher "c:\Program Files\Games\ChessB\BGChess.exe" diff --git a/.install/BG Code Breaker.sh b/.install/BG Code Breaker.sh index cdc3170..c29373d 100644 --- a/.install/BG Code Breaker.sh +++ b/.install/BG Code Breaker.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmU486SssAdM7kPKwDyAKDLQs3Z92bG6wFjaLhzqDZCxAF?filename=BCB32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BCB32Setup10.exe" /silent add_launcher "c:\Program Files\Games\CodeBreakerB\BGCodeBreaker.exe" diff --git a/.install/BG Cribbage Solitaire.sh b/.install/BG Cribbage Solitaire.sh index ffa8408..8c15a0b 100644 --- a/.install/BG Cribbage Solitaire.sh +++ b/.install/BG Cribbage Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmbRUiknnNcibWD3NwK4DFZGNHWswBgsFidUzU1TFGJ5Ra?filename=BCS32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BCS32Setup10.exe" /silent add_launcher "c:\Program Files\Games\CribSolB\CribSolB.exe" diff --git a/.install/BG Cribbage.sh b/.install/BG Cribbage.sh index fa9d97d..91d3269 100644 --- a/.install/BG Cribbage.sh +++ b/.install/BG Cribbage.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmeFud3EPHy7wQe8UENgvh96HdAazEkwqA2AutCNkYvB3t?filename=BGC32Setup12e.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGC32Setup12e.exe" /silent add_launcher "c:\Program Files\Games\CribbageB\CribbageB.exe" diff --git a/.install/BG Crossword Puzzle.sh b/.install/BG Crossword Puzzle.sh index 8608898..3217693 100644 --- a/.install/BG Crossword Puzzle.sh +++ b/.install/BG Crossword Puzzle.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmZQGY9CeATEiWrSqsKBz4AN6jPgQuvbBZSpQoLiMjoDr2?filename=BGX32Setup10h.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGX32Setup10h.exe" /silent add_launcher "c:\Program Files\Games\CrosswordB\CrosswordB.exe" diff --git a/.install/BG Draw Dominoes.sh b/.install/BG Draw Dominoes.sh index 6aab34b..6444a2a 100644 --- a/.install/BG Draw Dominoes.sh +++ b/.install/BG Draw Dominoes.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmZQGY9CeATEiWrSqsKBz4AN6jPgQuvbBZSpQoLiMjoDr2?filename=BDD32Setup.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BDD32Setup.exe" /silent add_launcher "c:\Program Files\Games\DrawDominoesB\DrawDominoesB.exe" diff --git a/.install/BG Elevens Solitaire.sh b/.install/BG Elevens Solitaire.sh index e7411a3..d7c57f8 100644 --- a/.install/BG Elevens Solitaire.sh +++ b/.install/BG Elevens Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmWWZByYL5CsDSi6gQLGcMyBL7zqD5hWXbPXJr3shRt5AQ?filename=ESB32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/ESB32Setup10.exe" /silent add_launcher "c:\Program Files\Games\ElevensB\ElevensB.exe" diff --git a/.install/BG Fives Dominoes.sh b/.install/BG Fives Dominoes.sh index cafd61a..493b604 100644 --- a/.install/BG Fives Dominoes.sh +++ b/.install/BG Fives Dominoes.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmSZt6dz7WQkNrFBmYq9n4WdYrrZyQAebTBPo46uHqCuNi?filename=BFD32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BFD32Setup10.exe" /silent add_launcher "c:\Program Files\Games\FivesDominoesB\FivesDominoesB.exe" diff --git a/.install/BG Free Cell Solitaire.sh b/.install/BG Free Cell Solitaire.sh index 93cc67d..3e35429 100644 --- a/.install/BG Free Cell Solitaire.sh +++ b/.install/BG Free Cell Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmVfQMMnqTD9Zm8Xwv7rGrUTdS9FXToq7Fv6wtQQVgbQGR?filename=BGF32Setup20.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGF32Setup20.exe" /silent add_launcher "c:\Program Files\Games\FreecellB\FreecellB.exe" diff --git a/.install/BG Golf Solitaire.sh b/.install/BG Golf Solitaire.sh index 74dbf71..259d815 100644 --- a/.install/BG Golf Solitaire.sh +++ b/.install/BG Golf Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmfAp9EYou1pndLwYSdpYdUCHBv2DR94oFccQh1ii9JVLD?filename=GSB32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/GSB32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\GolfSolitaireB\GolfSolitaireB.exe" diff --git a/.install/BG Hangman.sh b/.install/BG Hangman.sh index 73731b0..2aa0d98 100644 --- a/.install/BG Hangman.sh +++ b/.install/BG Hangman.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmXTPMmvw7JE2eLuPBLGSpkZqUn12TX7QEQZbX8qtp7GBx?filename=HMB32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/HMB32Setup10.exe" /silent add_launcher "c:\Program Files\Games\HangmanB\HangmanB.exe" diff --git a/.install/BG Hearts.sh b/.install/BG Hearts.sh index 7f199aa..4803e81 100644 --- a/.install/BG Hearts.sh +++ b/.install/BG Hearts.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmdU5ag1PRjvG28wNX7aNuJqZSVxaqEEKjgG6GoRoDT8k4?filename=BGH32Setup10b.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/${BGH32Setup10b.exe}" /silent add_launcher "c:\Program Files\Games\HeartsB\HeartsB.exe" diff --git a/.install/BG Klondike Solitaire.sh b/.install/BG Klondike Solitaire.sh index 4fd82ef..240f040 100644 --- a/.install/BG Klondike Solitaire.sh +++ b/.install/BG Klondike Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmctBDvhQWwER94LvgauR7sMDxv9D1mS9cToV47orTCdzU?filename=BGK32Setup10b.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGK32Setup10b.exe" /silent add_launcher "c:\Program Files\Games\KlondikeB\KlondikeB.exe" diff --git a/.install/BG LAP.sh b/.install/BG LAP.sh index 89c8b5b..b127981 100644 --- a/.install/BG LAP.sh +++ b/.install/BG LAP.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/Qma5WeCC9B2P5abRGX9nGYV8Zi9F8vfCCr4ehejP2bgmNm?filename=LAP32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/LAP32Setup10.exe" /silent add_launcher "c:\Program Files\Games\LAP\LAP.exe" diff --git a/.install/BG Master Mind.sh b/.install/BG Master Mind.sh index 53835cd..1564eae 100644 --- a/.install/BG Master Mind.sh +++ b/.install/BG Master Mind.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmP6cwMbirbBqAaG9JLfNRnD2dvJfh6nq74kfwxs5hN2RQ?filename=BMM32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BMM32Setup10.exe" /silent add_launcher "c:\Program Files\Games\MastermindB\BGMasterMind.exe" diff --git a/.install/BG Mine Sweeper.sh b/.install/BG Mine Sweeper.sh index e6ddce3..f676f42 100644 --- a/.install/BG Mine Sweeper.sh +++ b/.install/BG Mine Sweeper.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmRa54HroWjwxHYfKr6hdmP34sHW5G3ecuzcjMA5UBBVKa?filename=MSB32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/MSB32Setup10.exe" /silent add_launcher "c:\Program Files\Games\MinesweeperB\MinesweeperB.exe" diff --git a/.install/BG Nomination Whist.sh b/.install/BG Nomination Whist.sh index 10654ae..50f601f 100644 --- a/.install/BG Nomination Whist.sh +++ b/.install/BG Nomination Whist.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/Qmb7eGTMDgiaDC9muMW9n8bHoistGcNm1VgHc6sr7dRyHU?filename=BNW32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BNW32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\NomWhistB\NomWhistB.exe" diff --git a/.install/BG Penguin Solitaire.sh b/.install/BG Penguin Solitaire.sh index 06ff077..cf144dc 100644 --- a/.install/BG Penguin Solitaire.sh +++ b/.install/BG Penguin Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmXKvQ6WNNSnDiSyYmvAhZXVdALnuhUGK7dSMQVkQNReJr?filename=BPS32Setup10c.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BPS32Setup10c.exe" /silent add_launcher "c:\Program Files\Games\PenguinB\PenguinB.exe" diff --git a/.install/BG Poker Solitaire.sh b/.install/BG Poker Solitaire.sh index f39f52e..c5694a8 100644 --- a/.install/BG Poker Solitaire.sh +++ b/.install/BG Poker Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmPLv74LiDgVGuiGhu9HuPhx3uoMm9QyCYk6jgeFUHjj3S?filename=BPS32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BPS32Setup10.exe" /silent add_launcher "c:\Program Files\Games\PokerSolB\PokerSolB.exe" diff --git a/.install/BG Pyramid Solitaire.sh b/.install/BG Pyramid Solitaire.sh index 14e1840..67b2546 100644 --- a/.install/BG Pyramid Solitaire.sh +++ b/.install/BG Pyramid Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmaqXaBKD3xY2smhU2LcejXRTPnWZHqaTW9se8yRepLsHu?filename=PSB32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/PSB32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\PyramidB\PyramidB.exe" diff --git a/.install/BG Scorpion Solitaire.sh b/.install/BG Scorpion Solitaire.sh index 93668ec..6bec461 100644 --- a/.install/BG Scorpion Solitaire.sh +++ b/.install/BG Scorpion Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmSxJs2MiLQ61Fgx6vCpSD7GmQziLiCEU3sZ3mgWc7RsJ8?filename=BSS32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BSS32Setup10.exe" /silent add_launcher "c:\Program Files\Games\ScorpionB\ScorpionB.exe" diff --git a/.install/BG Scrabble.sh b/.install/BG Scrabble.sh index 09d42d6..5960ffe 100644 --- a/.install/BG Scrabble.sh +++ b/.install/BG Scrabble.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmVrwyPdJBnmc4wLW7oT2hexxXnXxs8bA7gfiqbnJsWJ16?filename=BGS32Setup20.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGS32Setup20.exe" /silent add_launcher "c:\Program Files\Games\ScrabbleB\ScrabbleB.exe" diff --git a/.install/BG Simon.sh b/.install/BG Simon.sh index 451175a..dcc4742 100644 --- a/.install/BG Simon.sh +++ b/.install/BG Simon.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmXtBCqB6VCFPaDYuLaFNP1BDtJSLCJdJZzgm61zMtrsQt?filename=BGS32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGS32Setup10.exe" /silent add_launcher "c:\Program Files\Games\SimonB\SimonB.exe" diff --git a/.install/BG Spider Solitaire.sh b/.install/BG Spider Solitaire.sh index 1406e10..952196d 100644 --- a/.install/BG Spider Solitaire.sh +++ b/.install/BG Spider Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmdWBaDnLVbKCJSpiqF675ew6nJ6KHUVXA5FEH3t3E7UAu?filename=SPB32Setup10b.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/SPB32Setup10b.exe" /silent add_launcher "c:\Program Files\Games\SpiderB\SpiderB.exe" diff --git a/.install/BG Sudoku.sh b/.install/BG Sudoku.sh index dc6c3b4..b0e2e74 100644 --- a/.install/BG Sudoku.sh +++ b/.install/BG Sudoku.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmXCAHEVRGZBc8t45Jgn2vkxicwF9Aox6yz9XrQBdkv7WY?filename=SDB32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/SDB32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\SudokuB\SudokuB.exe" diff --git a/.install/BG Tablic Solitaire.sh b/.install/BG Tablic Solitaire.sh index 61f57b5..ba856a0 100644 --- a/.install/BG Tablic Solitaire.sh +++ b/.install/BG Tablic Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmYoiFQ6JuSXfZfZXT3SQDsYzMWLBu9rW9yivi1xiPjqZx?filename=SDB32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/SDB32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\TabSolB\BGTabSol.exe" diff --git a/.install/BG Tri-Peaks Solitaire.sh b/.install/BG Tri-Peaks Solitaire.sh index 142c912..ddcf035 100644 --- a/.install/BG Tri-Peaks Solitaire.sh +++ b/.install/BG Tri-Peaks Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmWJGvSR6iaQfMHM3XuGCkWxx285jkzSDdNSvvk3bSCH8S?filename=TPB32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/TPB32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\TriPeaksB\TriPeaksB.exe" diff --git a/.install/BG Twenty 20 Cricket.sh b/.install/BG Twenty 20 Cricket.sh index ad3c9e0..a680cc6 100644 --- a/.install/BG Twenty 20 Cricket.sh +++ b/.install/BG Twenty 20 Cricket.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmWAk2TMHMvW6Kjc1sZBEPsxmCNHfY3nF1K723PCqaTa57?filename=T20B32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/T20B32Setup10.exe" /silent add_launcher "c:\Program Files\Games\T20CricketB\CricketB.exe" diff --git a/.install/BG Uno.sh b/.install/BG Uno.sh index 6c76415..3d4d2cd 100644 --- a/.install/BG Uno.sh +++ b/.install/BG Uno.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmVsfPkebSoTDwYSXF1n7y4P9eGJTgTcGXdrEjpcV8A3Dv?filename=BGU32Setup11a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGU32Setup11a.exe" /silent add_launcher "c:\Program Files\Games\UnoB\UnoB.exe" diff --git a/.install/BG Word Builder.sh b/.install/BG Word Builder.sh index 5d112cc..e6daddd 100644 --- a/.install/BG Word Builder.sh +++ b/.install/BG Word Builder.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmXtR49EZShyj15Tc9CXQpBYVmKNfZpp4515Epm16bviuH?filename=BWB32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BWB32Setup10.exe" /silent add_launcher "c:\Program Files\Games\WordBuilderB\WordBuilderB.exe" diff --git a/.install/BG Word Candy.sh b/.install/BG Word Candy.sh index 795dc64..1997f32 100644 --- a/.install/BG Word Candy.sh +++ b/.install/BG Word Candy.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmfTgfRzd4JMRqKSfDiz76iMorkaG19BqH1K7nRCCDwo4H?filename=WCB32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/WCB32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\WordCandyB\WordCandyB.exe" diff --git a/.install/BG Word Jumble.sh b/.install/BG Word Jumble.sh index fa6942e..c406edc 100644 --- a/.install/BG Word Jumble.sh +++ b/.install/BG Word Jumble.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmYQWZZifzKJSuVRCC1SabwRmEDz95GdFvbzRvsBMmTt6e?filename=BWJ32Setup10.exe" -install_wine_bottle speechsdk -wine "${cache}/BWJ32Setup10.wineExec" /silent +install_wine_bottle +wine "${cache}/BWJ32Setup10.exe" /silent add_launcher "c:\Program Files\Games\WordJumbleB\WordJumbleB.exe" diff --git a/.install/BG Word Maze.sh b/.install/BG Word Maze.sh index 20e019e..8a3144a 100644 --- a/.install/BG Word Maze.sh +++ b/.install/BG Word Maze.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmXPtj5PkVZjXpU3m6FAfm8MwVL6bQCvhEDoR385u6FGTL?filename=BWM32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BWM32Setup10.exe" /silent add_launcher "c:\Program Files\Games\WordMazeB\WordMazeB.exe" diff --git a/.install/BG Word Solitaire.sh b/.install/BG Word Solitaire.sh index 077146f..335018c 100644 --- a/.install/BG Word Solitaire.sh +++ b/.install/BG Word Solitaire.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmZp73ARDPqgnCz7zxfKeBHjNoHrgZSgg2NdQZR2sMyZGD?filename=WSB32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/WSB32Setup10.exe" /silent add_launcher "c:\Program Files\Games\WordSolitaireB\WordSolitaireB.exe" diff --git a/.install/BG Word Target.sh b/.install/BG Word Target.sh index 14e9bd6..c5c6b8c 100644 --- a/.install/BG Word Target.sh +++ b/.install/BG Word Target.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmWWZFXVHNtmNkH55oermWWtrMcQ8qVqL687B7kGFyeezq?filename=WTB32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/WTB32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\WordTargetB\WordTargetB.exe" diff --git a/.install/BG Word Yahtzee.sh b/.install/BG Word Yahtzee.sh index e7bc6a5..9008c00 100644 --- a/.install/BG Word Yahtzee.sh +++ b/.install/BG Word Yahtzee.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmdicAVDegDktY3euVAC2PPn4YBGz96KedxYXNe4WDQaoq?filename=BWY32Setup10.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BWY32Setup10.exe" /silent add_launcher "c:\Program Files\Games\WordYahtzeeB\BGWordYahtzee.exe" diff --git a/.install/BG Yahtzee.sh b/.install/BG Yahtzee.sh index 5ea200d..385f0ae 100644 --- a/.install/BG Yahtzee.sh +++ b/.install/BG Yahtzee.sh @@ -1,5 +1,5 @@ -export bottle="bg" +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmZebvkKgFAADnb1cgW6Bz7wTYdUh82X61QdtW66KcvmpF?filename=BGY32Setup10a.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/BGY32Setup10a.exe" /silent add_launcher "c:\Program Files\Games\yahtzeeB\BGYahtzee.exe" diff --git a/.install/Balatro.sh b/.install/Balatro.sh index df0057b..3318572 100644 --- a/.install/Balatro.sh +++ b/.install/Balatro.sh @@ -1,18 +1,15 @@ -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" "https://stormgames.wolfe.casa/downloads/Tolk.dll" "https://github.com/Aurelius7309/BlackHole/releases/download/0.3.1/BlackHole-Release.zip" export WINEARCH=win64 export winVer="win10" install_wine_bottle get_steam "2379780" "https://store.steampowered.com/app/2379780/Balatro/" mkdir -p "$WINEPREFIX/drive_c/users/$USER/AppData/Roaming/Balatro/Mods" -unzip -d "$WINEPREFIX/drive_c/users/$USER/AppData/Roaming/Balatro" "$cache/BlackHole-Release.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/users/$USER/AppData/Roaming/Balatro" "$cache/BlackHole-Release.zip" pushd "$WINEPREFIX/drive_c/users/$USER/AppData/Roaming/Balatro/Mods" (cat mod_urls.txt ; echo) | while read -r x ; do git clone "$x" done -cp -v BlackHole/bin/*.dll "$WINEPREFIX/drive_c/Program Files/Balatro" -cp -v "$cache/Tolk.dll" "$WINEPREFIX/drive_c/Program Files/Balatro/tolk.dll" -cp -v "$cache/Tolk.dll" BlackHole/bin/tolk.dll -cp -v "$cache/nvda2speechd64.dll" "$WINEPREFIX/drive_c/Program Files/Balatro/nvdaControllerClient64.dll" -cp -v "$cache/nvda2speechd64.dll" BlackHole/bin/nvdaControllerClient64.dll -cp -v ../version.dll "$WINEPREFIX/drive_c/Program Files/Balatro" +cp -fv BlackHole/bin/*.dll "$WINEPREFIX/drive_c/Program Files/Balatro" +cp -fv "$cache/Tolk.dll" "$WINEPREFIX/drive_c/Program Files/Balatro/tolk.dll" +cp -fv "$cache/Tolk.dll" BlackHole/bin/tolk.dll +cp -fv ../version.dll "$WINEPREFIX/drive_c/Program Files/Balatro" add_launcher 'c:\Program Files\Balatro\Balatro.exe' 'export WINEDLLOVERRIDES=version=n,b' diff --git a/.install/Battle Zone.sh b/.install/Battle Zone.sh index 7a12769..243ba82 100644 --- a/.install/Battle Zone.sh +++ b/.install/Battle Zone.sh @@ -1,6 +1,5 @@ download "https://www.agarchive.net/games/gameMadnessInteractive/battle%20zone%2013.5%20setup.exe" export winVer="win7" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/battle zone 13.5 setup.exe" /silent -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; add_launcher "c:\Program Files\Battle Zone\ss.exe" diff --git a/.install/Battle of the Hunter.sh b/.install/Battle of the Hunter.sh index 444a7b4..a680212 100644 --- a/.install/Battle of the Hunter.sh +++ b/.install/Battle of the Hunter.sh @@ -1,7 +1,6 @@ download "http://files.tunmi13.com/projects_archive/bth.zip" -export bottle="tunmi13" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/$game" "${cache}/bth.zip" -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/$game" "${cache}/bth.zip" add_launcher "c:\Program Files\\${game}\bth.exe" diff --git a/.install/Battlefield 2D.sh b/.install/Battlefield 2D.sh index 7914fe8..0a69452 100644 --- a/.install/Battlefield 2D.sh +++ b/.install/Battlefield 2D.sh @@ -1,9 +1,7 @@ get_installer "bf.zip" "https://tunmi13.itch.io/battlefield-2d" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" export WINEARCH=win64 export winVer="win8" -export bottle=tunmi13-64bit +# Uses standard wine path based on architecture (win32/win64) install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/bf.zip" -find "${WINEPREFIX}/drive_c/Program Files/bf" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/bf.zip" add_launcher "c:\Program Files\bf\bf.exe" diff --git a/.install/Beatstar Pro.sh b/.install/Beatstar Pro.sh index 9edfe77..d3c3805 100644 --- a/.install/Beatstar Pro.sh +++ b/.install/Beatstar Pro.sh @@ -4,5 +4,5 @@ download "https://oriolgomez.com/games/beat_windows.zip" export WINEARCH=win64 export winVer="win7" install_wine_bottle mf -unzip -d "$WINEPREFIX/drive_c/Program Files/Beatstar Pro" "${cache}/beat_windows.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/Beatstar Pro" "${cache}/beat_windows.zip" add_launcher "c:\Program Files\Beatstar Pro\beatstar.exe" diff --git a/.install/Blades of Glory.sh b/.install/Blades of Glory.sh new file mode 100644 index 0000000..e339092 --- /dev/null +++ b/.install/Blades of Glory.sh @@ -0,0 +1,6 @@ +#Disable +download "https://nibblenerds.com/static/blades_of_glory.zip" +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/Blades of Glory" "${cache}/blades_of_glory.zip" +install_discord_rpc_bridge +add_launcher "c:\Program Files\Blades of Glory\blades_of_glory.exe" diff --git a/.install/Blind Drive.sh b/.install/Blind Drive.sh index 4288450..e32c49e 100644 --- a/.install/Blind Drive.sh +++ b/.install/Blind Drive.sh @@ -1,11 +1,9 @@ get_installer "Blind Drive 1.1.112.00i-win64.zip" "https://lofipeople.itch.io/blind-drive" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" export WINEARCH=win64 export winVer="win8" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/blind-drive" "${cache}/Blind Drive 1.1.112.00i-win64.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/blind-drive" "${cache}/Blind Drive 1.1.112.00i-win64.zip" # Weird work around to get keyboard working. winetricks -q usetakefocus=y winetricks -q usetakefocus=n -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\blind-drive\Blind Drive.exe" diff --git a/.install/Bloodshed.sh b/.install/Bloodshed.sh index 87f838a..6c31412 100644 --- a/.install/Bloodshed.sh +++ b/.install/Bloodshed.sh @@ -1,5 +1,4 @@ +export WINEARCH="win32" download "${ipfsGateway}/ipfs/QmcTCTMep4zp5zTw8ZaXYpjtu9inNPn8bNzwhW6cX97egw?filename=bloodshed.exe" -export winVer="win7" -install_wine_bottle speechsdk 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 85b5e50..3872265 100644 --- a/.install/Bokurano Daibouken 2.sh +++ b/.install/Bokurano Daibouken 2.sh @@ -1,7 +1,7 @@ +export WINEARCH=win32 download "https://www.nyanchangames.com/softs/nn2_setup.exe" -export bottle="nyanchan" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" install_wine_bottle -7z x -o"$WINEPREFIX/drive_c/nyanchangame/bk2" "${cache}/nn2_setup.exe" -find "${WINEPREFIX}/drive_c/nyanchangame/bk2/" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \; +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/nyanchangame/bk2" "${cache}/nn2_setup.exe" add_launcher "c:\nyanchangame\bk2\play.exe" diff --git a/.install/Bokurano Daibouken 3.sh b/.install/Bokurano Daibouken 3.sh index 4d1ed95..ad91ae1 100644 --- a/.install/Bokurano Daibouken 3.sh +++ b/.install/Bokurano Daibouken 3.sh @@ -1,6 +1,13 @@ + +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 echo "http://www.nyanchangames.com/order/bk3translate.html" | xclip -selection clipboard 2> /dev/null - dialog --backtitle "Audiogame manager" --msgbox "If you would like English translations, the file is available at http://www.nyanchangames.com/order/bk3translate.html. Save the dict.dat file to your Downloads or Desktop directory. For convenience the url has been copied to your clipboard. Press enter when you are ready to continue." -1 -1 --stdout + agm_msgbox "Bokurano Daibouken 3" "Bokurano Daibouken 3" "If you would like English translations, the file is available at http://www.nyanchangames.com/order/bk3translate.html. Save the dict.dat file to your Downloads or Desktop directory. For convenience the url has been copied to your clipboard. Press enter when you are ready to continue." fi dictFile="" for i in "${HOME}/Downloads/dict.dat" "${HOME}/Desktop/dict.dat" ; do @@ -9,14 +16,9 @@ for i in "${HOME}/Downloads/dict.dat" "${HOME}/Desktop/dict.dat" ; do fi done if [[ "${#dictFile}" -ge 3 ]] && [[ ! -r "${cache}/bk3-dict.dat" ]]; then - dialog --backtitle "Audiogame manager" --yesno "Possible English translation file found at $dictFile. Would you like to use it for BK3?" -1 -1 --stdout && cp -v "$dictFile" "${cache}/bk3-dict.dat" + agm_yesno "Bokurano Daibouken 3" "Bokurano Daibouken 3" "Possible English translation file found at $dictFile. Would you like to use it for BK3?" && cp -fv "$dictFile" "${cache}/bk3-dict.dat" +fi +if [[ -f "${cache}/bk3-dict.dat" ]] ; then + cp -fv "${cache}/bk3-dict.dat" "${WINEPREFIX}/drive_c/nyanchangame/bk3/dict.dat" fi -download "https://www.nyanchangames.com/softs/nn3_setup.exe" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" -export bottle="nyanchan" -export winVer="win7" -install_wine_bottle -cp "${cache}/nvda2speechd" "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" -chmod +x "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" -7z x -o"$WINEPREFIX/drive_c/nyanchangame/bk3" "${cache}/nn3_setup.exe" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; add_launcher "c:\nyanchangame\bk3\play.exe" diff --git a/.install/Bokurano Daibouken.sh b/.install/Bokurano Daibouken.sh index 4402fb5..830db8b 100644 --- a/.install/Bokurano Daibouken.sh +++ b/.install/Bokurano Daibouken.sh @@ -1,7 +1,7 @@ download "https://www.nyanchangames.com/softs/nn_setup.exe" -export bottle="nyanchan" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" +export WINEARCH="win32" install_wine_bottle -7z x -o"$WINEPREFIX/drive_c/nyanchangame/bk" "${cache}/nn_setup.exe" -find "${WINEPREFIX}/drive_c/nyanchangame/bk/" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \; +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/Bombercats.sh b/.install/Bombercats.sh index 1f206fc..5adb37f 100644 --- a/.install/Bombercats.sh +++ b/.install/Bombercats.sh @@ -1,7 +1,6 @@ download "http://oriolgomez.com/games/bombercats_en.zip" -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/bomvercats" "${cache}/bombercats_en.zip" -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/bomvercats" "${cache}/bombercats_en.zip" add_launcher "c:\Program Files\bomvercats\game.exe" diff --git a/.install/Bop It Emulator.sh b/.install/Bop It Emulator.sh index a11abf7..d867b5b 100644 --- a/.install/Bop It Emulator.sh +++ b/.install/Bop It Emulator.sh @@ -1,5 +1,5 @@ download "http://www.masonasons.me/softs/BopItEmulator3.1PasswordIsBopIt.7z" export winVer="win7" install_wine_bottle -7z x -o"$WINEPREFIX/drive_c/Program Files/Bop It" "${cache}/BopItEmulator3.1PasswordIsBopIt.7z" -pBopIt +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/Bop It" "${cache}/BopItEmulator3.1PasswordIsBopIt.7z" -pBopIt add_launcher "c:\Program Files\Bop It\bop.exe" diff --git a/.install/Bounce Bounce.sh b/.install/Bounce Bounce.sh index 01ab3e3..6f588ae 100644 --- a/.install/Bounce Bounce.sh +++ b/.install/Bounce Bounce.sh @@ -1,8 +1,5 @@ -get_installer "bounce_bounce.rar" "https://kavyapriya.itch.io/bounce-bounce" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" -export winVer="win7" export WINEARCH=win64 +get_installer "bounce_bounce.rar" "https://kavyapriya.itch.io/bounce-bounce" install_wine_bottle unrar x "${cache}/bounce_bounce.rar" -op"$WINEPREFIX/drive_c/Program Files" -find "${WINEPREFIX}/drive_c/Program Files/bounce_bounce" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\bounce_bounce\bounce.exe" diff --git a/.install/Breed Memorial.sh b/.install/Breed Memorial.sh index ef9c31a..bdd5661 100644 --- a/.install/Breed Memorial.sh +++ b/.install/Breed Memorial.sh @@ -1,7 +1,6 @@ # download "https://hirotaka2014.sakura.ne.jp/mh0406/game/breed_memorial.zip" "${nvdaControllerClientDll}" export winVer="win7" -install_wine_bottle cjkfonts speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/breed_memorial.zip" -#find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; +install_wine_bottle cjkfonts +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/breed_memorial.zip" add_launcher "c:\Program Files\Breed memorial\Breed memorial\breed memorial.exe" diff --git a/.install/Breu2 Shadow Hunt.sh b/.install/Breu2 Shadow Hunt.sh index 4b2c94d..6f11a0e 100644 --- a/.install/Breu2 Shadow Hunt.sh +++ b/.install/Breu2 Shadow Hunt.sh @@ -1,8 +1,6 @@ -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" get_installer "breu2.zip" "https://breu.itch.io/shadowhunt" export WINEARCH=win64 export winVer="win8" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/breu2.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/breu2.zip" add_launcher "c:\Program Files\breu2\breu2.exe" diff --git a/.install/Castaways 2.sh b/.install/Castaways 2.sh index adeecca..7689a53 100644 --- a/.install/Castaways 2.sh +++ b/.install/Castaways 2.sh @@ -1,7 +1,7 @@ download "http://www.kaldobsky.com/audiogames/castaways2beta.zip" -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -install_wine_bottle vb6run dx8vb speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/castaways2" "${cache}/castaways2beta.zip" +install_wine_bottle vb6run dx8vb +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/castaways2" "${cache}/castaways2beta.zip" wine "c:\Program Files\castaways2\Checkup.exe" /verysilent add_launcher "c:\Program Files\castaways2\Castaways2.exe" diff --git a/.install/Castaways.sh b/.install/Castaways.sh index 82cf9ea..51fb608 100644 --- a/.install/Castaways.sh +++ b/.install/Castaways.sh @@ -1,7 +1,7 @@ download "https://www.kaldobsky.com/audiogames/castaways.zip" -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -install_wine_bottle vb6run dx8vb speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/castaways" "${cache}/castaways.zip" +install_wine_bottle vb6run dx8vb +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/castaways" "${cache}/castaways.zip" wine "c:\Program Files\castaways\Checkup.exe" /verysilent add_launcher "c:\Program Files\castaways\Castaways.exe" diff --git a/.install/Challenge of the Horse.sh b/.install/Challenge of the Horse.sh index d0a8c04..94a2907 100644 --- a/.install/Challenge of the Horse.sh +++ b/.install/Challenge of the Horse.sh @@ -1,7 +1,5 @@ download "http://files.tunmi13.com/projects_archive/coth.zip" -export bottle="tunmi13" export winVer="win7" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/$game" "${cache}/coth.zip" -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/$game" "${cache}/coth.zip" add_launcher "c:\Program Files\\${game}\game.exe" diff --git a/.install/Change Reaction.sh b/.install/Change Reaction.sh index af5df01..e4638cc 100644 --- a/.install/Change Reaction.sh +++ b/.install/Change Reaction.sh @@ -1,12 +1,12 @@ download "https://download.dracoent.com/Windows/ChangeReactionSetup.exe" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -install_wine_bottle vb6run dx8vb speechsdk quartz -cp -v "${cache}/ChangeReactionSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" +install_wine_bottle vb6run dx8vb quartz +cp -fv "${cache}/ChangeReactionSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/ChangeReactionSetup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/ChangeReactionSetup.exe" # warning warning warning: Do not change location, or installer will not function. # FIXME: Hacky, but it works. Install dotnet20 by itself so it actually doesn't hang. winetricks -q dotnet20 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. add_launcher "c:\Program Files\Draconis Entertainment\Change Reaction\ChangeReactionGui.exe" diff --git a/.install/Chillingham.sh b/.install/Chillingham.sh index 7408129..992acad 100644 --- a/.install/Chillingham.sh +++ b/.install/Chillingham.sh @@ -1,4 +1,4 @@ download "https://stormgames.wolfe.casa/downloads/chillingham.zip" install_wine_bottle vb6run mfc42 -unzip -d "$WINEPREFIX/drive_c/Program Files" "$cache/chillingham.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "$cache/chillingham.zip" add_launcher "c:\Program Files\chillingham\Chillingham.exe" diff --git a/.install/Chopper Challenge.sh b/.install/Chopper Challenge.sh index 799c91e..dad9ecf 100644 --- a/.install/Chopper Challenge.sh +++ b/.install/Chopper Challenge.sh @@ -1,9 +1,9 @@ # # Freezes at menu download "https://www.agarchive.net/games/XSight/chopper%20challenge%20setup.exe" -install_wine_bottle vb6run dx8vb speechsdk +install_wine_bottle vb6run dx8vb wine "${cache}/chopper challenge setup.exe" /silent & xdotool sleep 5 key y 2> /dev/null -${wine}server -w +wineserver -w echo "$USER|n/a" >> "$WINEPREFIX/drive_c/Program Files/x-sight interactive/chopper challenge/config.dat" add_launcher "c:\Program Files\x-sight interactive\chopper challenge\Chopper.exe" diff --git a/.install/Christmas Chaos.sh b/.install/Christmas Chaos.sh index b5a562f..e6005a7 100644 --- a/.install/Christmas Chaos.sh +++ b/.install/Christmas Chaos.sh @@ -2,6 +2,6 @@ export WINEARCH=win64 export winVer="win7" download "${ipfsGateway}/ipfs/QmYx11vsMDBgjPd1coZPGHxMXf2qtf4icqmB3Q9iUazyQv?filename=ChristmasChaos.zip" "https://stormgames.wolfe.casa/downloads/Tolk.dll" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/ChristmasChaos.zip" -find "${WINEPREFIX}" -type f -name 'Tolk.dll' -exec cp -v "${cache}/Tolk.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/ChristmasChaos.zip" +find "${WINEPREFIX}" -type f -name 'Tolk.dll' -exec cp -fv "${cache}/Tolk.dll" "{}" \; add_launcher "c:\Program Files\ChristmasChaos\ChristmasChaos.exe" diff --git a/.install/Clashes of the Sky.sh b/.install/Clashes of the Sky.sh index 94b4ee1..865304f 100644 --- a/.install/Clashes of the Sky.sh +++ b/.install/Clashes of the Sky.sh @@ -1,7 +1,6 @@ get_installer "clashes_of_the_sky.zip" "https://tunmi13.itch.io/clashes-of-the-sky" -export bottle="tunmi13" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/clashes_of_the_sky.zip" -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/clashes_of_the_sky.zip" add_launcher 'c:\Program Files\clashes_of_the_sky\clash.exe' diff --git a/.install/Code Dungeon.sh b/.install/Code Dungeon.sh index cf1055f..1d97f17 100644 --- a/.install/Code Dungeon.sh +++ b/.install/Code Dungeon.sh @@ -1,11 +1,9 @@ get_installer "codedungeon-win-64.zip" "https://stealcase.itch.io/codedungeon" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" export WINEARCH=win64 export winVer="win8" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/code-dungeon" "${cache}/codedungeon-win-64.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/code-dungeon" "${cache}/codedungeon-win-64.zip" # Weird work around to get keyboard working. winetricks -q usetakefocus=y winetricks -q usetakefocus=n -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\code-dungeon\Code Dungeon.exe" diff --git a/.install/Coin Collector.sh b/.install/Coin Collector.sh index 666ecf1..0272545 100644 --- a/.install/Coin Collector.sh +++ b/.install/Coin Collector.sh @@ -1,7 +1,5 @@ export WINEARCH=win64 export winVer="win7" -download "https://www.dropbox.com/s/v55q7t9n84otmcd/coin%20collector.rar?dl=1" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" install_wine_bottle unrar x "$cache/coin collector.rar" -op"$WINEPREFIX/drive_c/Program Files" -find "$WINEPREFIX/drive_c/Program Files/coin collector" -type f -name "nvdaControllerClient64.dll" -exec cp -v "$cache/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\coin collector\game.exe" diff --git a/.install/Conjury.sh b/.install/Conjury.sh index 234fd43..46c00ef 100644 --- a/.install/Conjury.sh +++ b/.install/Conjury.sh @@ -1,8 +1,5 @@ -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" export WINEARCH=win64 export winVer="win8" install_wine_bottle get_steam 2684520 "https://store.steampowered.com/app/2684520/Conjury/" -find "$WINEPREFIX/drive_c/Program Files/Conjury" -type f -path '*/x86_64/nvdaControllerClient.dll' -exec cp -v "$cache/nvda2speechd64.dll" "{}" \; -find "$WINEPREFIX/drive_c/Program Files/Conjury" -type f -path '*/x86/nvdaControllerClient.dll' -exec cp -v "$cache/nvda2speechd32.dll" "{}" \; add_launcher 'c:\Program Files\Conjury\release\Conjury.exe' diff --git a/.install/Constant Battle.sh b/.install/Constant Battle.sh index 7bafb60..014b895 100644 --- a/.install/Constant Battle.sh +++ b/.install/Constant Battle.sh @@ -1,6 +1,6 @@ # export winVer="win7" download "https://renovagames.com/bc/BC-Setup.exe" -install_wine_bottle cjkfonts speechsdk +install_wine_bottle cjkfonts wine "${cache}/BC-Setup.exe" /silent #add_launcher "c:\Program Files\" diff --git a/.install/Constant Motion.sh b/.install/Constant Motion.sh index bc72f38..f8e39ad 100644 --- a/.install/Constant Motion.sh +++ b/.install/Constant Motion.sh @@ -1,7 +1,6 @@ export WINEARCH=win64 export winVer="win7" -download "https://samtupy.com/games/cm.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" +download "https://samtupy.com/games/cm.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/ConstantMotion" "$cache/cm.zip" -find "$WINEPREFIX/drive_c/Program Files/ConstantMotion" -name "nvdaControllerClient64.dll" -exec cp -v "$cache/nvda2speechd64.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/ConstantMotion" "$cache/cm.zip" add_launcher 'c:\Program Files\ConstantMotion\cm.exe' diff --git a/.install/Copter Mission.sh b/.install/Copter Mission.sh index 14ac50e..909adad 100644 --- a/.install/Copter Mission.sh +++ b/.install/Copter Mission.sh @@ -1,6 +1,6 @@ -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "http://oriolgomez.com/games/copter_en.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/copter mission" "${cache}/copter_en.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/copter mission" "${cache}/copter_en.zip" add_launcher "c:\Program Files\copter mission\game.exe" diff --git a/.install/Crazy Party.sh b/.install/Crazy Party.sh index 53abb00..156f6a6 100644 --- a/.install/Crazy Party.sh +++ b/.install/Crazy Party.sh @@ -1,8 +1,7 @@ +download "http://pragmapragma.free.fr/crazy-party/Crazy-Party-beta82.zip" "https://stormgames.wolfe.casa/downloads/Tolk.dll" export WINEARCH=win64 export winVer="win8" -download "http://pragmapragma.free.fr/crazy-party/Crazy-Party-beta82.zip" "https://stormgames.wolfe.casa/downloads/Tolk.dll" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/Crazy-Party-beta82.zip" -find "${WINEPREFIX}" -type f -name 'Tolk.dll' -exec cp -v "${cache}/Tolk.dll" "{}" \; -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/Crazy-Party-beta82.zip" +find "${WINEPREFIX}" -type f -name 'Tolk.dll' -exec cp -fv "${cache}/Tolk.dll" "{}" \; add_launcher "c:\Program Files\Crazy-Party-beta82\Crazy Party.exe" diff --git a/.install/Crazy Tennis.sh b/.install/Crazy Tennis.sh index 24b3188..592e06b 100644 --- a/.install/Crazy Tennis.sh +++ b/.install/Crazy Tennis.sh @@ -1,4 +1,4 @@ download "https://www.agarchive.net/games/VIP/crazy%20tennis%20setup.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/crazy tennis setup.exe" /sp- /silent add_launcher "c:\Program Files\Crazytennis\crazytennis.exe" diff --git a/.install/Crime Hunter.sh b/.install/Crime Hunter.sh index 3f9fa78..9de71d2 100644 --- a/.install/Crime Hunter.sh +++ b/.install/Crime Hunter.sh @@ -1,7 +1,6 @@ export WINEARCH=win64 export winVer="win7" -download "http://masonasons.me/softs/CH2.0Win.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" +download "http://masonasons.me/softs/CH2.0Win.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/crime-hunter" "${cache}/CH2.0Win.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/crime-hunter" "${cache}/CH2.0Win.zip" add_launcher "c:\Program Files\crime-hunter\ch.exe" diff --git a/.install/Danger City.sh b/.install/Danger City.sh index bfcb3d2..71c0820 100644 --- a/.install/Danger City.sh +++ b/.install/Danger City.sh @@ -5,5 +5,5 @@ xdotool sleep 15 key --clearmodifiers --delay 200 Return 2> /dev/null xdotool sleep 5 key --clearmodifiers --delay 200 Return 2> /dev/null xdotool sleep 5key --clearmodifiers --delay 200 Return 2> /dev/null xdotool sleep 10 --clearmodifiers --delay 200 Return 2> /dev/null -${wine}server -w +wineserver -w add_launcher 'c:\Program Files\Danger City\dc.exe' diff --git a/.install/Danger on the Wheel.sh b/.install/Danger on the Wheel.sh index 0dfe23b..6cc3fd7 100644 --- a/.install/Danger on the Wheel.sh +++ b/.install/Danger on the Wheel.sh @@ -1,7 +1,6 @@ download "http://oriolgomez.com/games/wheel_en.zip" -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/danger on the wheel" "${cache}/wheel_en.zip" -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/danger on the wheel" "${cache}/wheel_en.zip" add_launcher "c:\Program Files\danger on the wheel\game.exe" diff --git a/.install/Dark Destroyer.sh b/.install/Dark Destroyer.sh index dc8c70f..ee372c1 100644 --- a/.install/Dark Destroyer.sh +++ b/.install/Dark Destroyer.sh @@ -1,6 +1,6 @@ # -export bottle=pbgames +# No custom bottle needed - use standard wine path based on architecture download "https://www.agarchive.net/games/pb/Dark-Destroyer-Setup.exe" -install_wine_bottle speechsdk ie6 +install_wine_bottle ie6 wine "$cache/Dark-Destroyer-Setup.exe" /silent add_launcher 'c:\Pbgames\Dark_destroyer\darkdestroyer.exe' diff --git a/.install/Daytona and the Book of Gold.sh b/.install/Daytona and the Book of Gold.sh index 1e3c61d..7cc6e0f 100644 --- a/.install/Daytona and the Book of Gold.sh +++ b/.install/Daytona and the Book of Gold.sh @@ -1,8 +1,8 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" export winetricksSettings="vd=1024x768" download "https://kaldobsky.com/audiogames/Daytona.zip" -install_wine_bottle vb6run dx8vb quartz corefonts -unzip -d "$WINEPREFIX/drive_c/Program Files/daytona" "${cache}/Daytona.zip" +install_wine_bottle vb6run dx8vb quartz +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/daytona" "${cache}/Daytona.zip" wine 'c:\Program Files\daytona\checkup.exe' /verysilent add_launcher "c:\Program Files\daytona\Daytona.exe" diff --git a/.install/Death on the Road.sh b/.install/Death on the Road.sh index e6d8ff0..120156c 100644 --- a/.install/Death on the Road.sh +++ b/.install/Death on the Road.sh @@ -1,6 +1,6 @@ -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "http://oriolgomez.com/games/road_en.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/death on the road" "${cache}/road_en.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/death on the road" "${cache}/road_en.zip" add_launcher "c:\Program Files\death on the road\game.exe" diff --git a/.install/Deathmatch.sh b/.install/Deathmatch.sh index 4cb0cb2..dc636c9 100644 --- a/.install/Deathmatch.sh +++ b/.install/Deathmatch.sh @@ -1,6 +1,6 @@ export winVer="win7" export winetricksSettings="vd=1024x768" download "https://www.agarchive.net/games/realitySoftware/death%20match%20project%20alpha%20setup.exe" -install_wine_bottle quartz speechsdk +install_wine_bottle quartz wine "${cache}/death match project alpha setup.exe" /silent add_launcher "c:\Program Files\reality software\death match project alpha\dm1.exe" diff --git a/.install/Dog Who Hates Toast.sh b/.install/Dog Who Hates Toast.sh index 6aa746e..040fd92 100644 --- a/.install/Dog Who Hates Toast.sh +++ b/.install/Dog Who Hates Toast.sh @@ -1,9 +1,9 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" export winetricksSettings="vd=1024x768" download "https://www.kaldobsky.com/audiogames/dogwhohatestoast.zip" -install_wine_bottle vb6run dx8vb quartz speechsdk corefonts -unzip -d "$WINEPREFIX/drive_c/Program Files/dogwhohatestoast" "${cache}/dogwhohatestoast.zip" +install_wine_bottle 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" echo "Note: Dog who Hates Toast installed. Once you start the game, you must press tab until you hear sapi on to get speech." >&2 diff --git a/.install/Dragon Pong.sh b/.install/Dragon Pong.sh index 2d84cae..901a26d 100644 --- a/.install/Dragon Pong.sh +++ b/.install/Dragon Pong.sh @@ -2,5 +2,5 @@ export winVer="win7" install_wine_bottle download "https://www.iamtalon.me/games/dragonpong.zip" -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/dragonpong.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/dragonpong.zip" add_launcher "c:\Program Files\dragonpong\DragonPong.exe" diff --git a/.install/Dreamland.sh b/.install/Dreamland.sh index 8013107..1b3ddf3 100644 --- a/.install/Dreamland.sh +++ b/.install/Dreamland.sh @@ -1,9 +1,22 @@ +export winVer="win10" +export WINEARCH=win32 +export WINEPREFIX="$HOME/.local/wine32" + download https://scwl-1251129685.cos.ap-shanghai.myqcloud.com/dreamland/Win/DreamLandSetup.exe -install_wine_bottle speechsdk ole32 -$wine "${cache}/DreamLandSetup.exe" /silent - "Duck Hunt") -export bottle="l-works" -download "http://files.l-works.net/dhsetup.exe" -install_wine_bottle vb6run dx8vb speechsdk -wine "${cache}/dhsetup.exe" /silent -add_launcher "c:\Program Files\Lworks\Duck Hunt\duckhunt.exe" + +install_wine_bottle + +winetricks -q vcrun2019 d3dcompiler_47 + +# Run installer silently (shows a dialog but completes successfully) +# Using C:\DreamLand instead of Program Files to avoid potential permission issues +{ + echo "# Installing Dreamland..." + timeout 120 wine "${cache}/DreamLandSetup.exe" /VERYSILENT /NORESTART /DIR="C:\DreamLand" 2>&1 || true + echo "# Installation complete" +} | agm_progressbox "Installing Game" "Installing Dreamland (this may take a minute)..." + +# Kill any game processes that may have auto-launched +wineserver -k 2>/dev/null || true + +add_launcher "c:\DreamLand\DreamLand.exe" diff --git a/.install/Duck Hunt.sh b/.install/Duck Hunt.sh index bb87a34..c9f2511 100644 --- a/.install/Duck Hunt.sh +++ b/.install/Duck Hunt.sh @@ -1,6 +1,5 @@ -"Duck Hunt") -export bottle="l-works" +# Uses standard wine path based on architecture (win32/win64) download "http://files.l-works.net/dhsetup.exe" -install_wine_bottle vb6run dx8vb speechsdk +install_wine_bottle vb6run dx8vb wine "${cache}/dhsetup.exe" /silent -add_launcher "c:\Program Files\Lworks\Duck Hunt\duckhunt.exe" +add_launcher "c:\Program Files\Lworks\Duck Hunt\duckhunt.exe" \ No newline at end of file diff --git a/.install/DynaMan.sh b/.install/DynaMan.sh index 25c768c..750a199 100644 --- a/.install/DynaMan.sh +++ b/.install/DynaMan.sh @@ -1,12 +1,12 @@ export winVer="win7" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) download "http://download.dracoent.com/Windows/classic/DMSetup.exe" -install_wine_bottle vb6run dx8vb speechsdk quartz -cp -v "${cache}/DMSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" +install_wine_bottle vb6run dx8vb quartz +cp -fv "${cache}/DMSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/DMSetup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/DMSetup.exe" # warning warning warning: Do not change location, or installer will not function. # FIXME: Hacky, but it works. Install dotnet20 by itself so it actually doesn't hang. winetricks -q dotnet20 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. add_launcher "c:\Program Files\Draconis Entertainment\DynaMan\dm.exe" diff --git a/.install/ESP Pinball Classic.sh b/.install/ESP Pinball Classic.sh index ac46a98..04c5187 100644 --- a/.install/ESP Pinball Classic.sh +++ b/.install/ESP Pinball Classic.sh @@ -1,12 +1,12 @@ export winVer="win7" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) download "http://download.dracoent.com/Windows/classic/PBCSetup.exe" -install_wine_bottle vb6run dx8vb speechsdk quartz -cp -v "${cache}/PBCSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" +install_wine_bottle vb6run dx8vb quartz +cp -fv "${cache}/PBCSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/PBCSetup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/PBCSetup.exe" # warning warning warning: Do not change location, or installer will not function. # FIXME: Hacky, but it works. Install dotnet20 by itself so it actually doesn't hang. winetricks -q dotnet20 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. add_launcher "c:\Program Files\Draconis Entertainment\ESP Pinball Classic\pbc.exe" diff --git a/.install/ESP Pinball Extreme.sh b/.install/ESP Pinball Extreme.sh index 4079c97..49e3f56 100644 --- a/.install/ESP Pinball Extreme.sh +++ b/.install/ESP Pinball Extreme.sh @@ -1,12 +1,12 @@ export winVer="win7" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) download "http://download.dracoent.com/Windows/classic/PBXSetup.exe" -install_wine_bottle vb6run dx8vb speechsdk quartz -cp -v "${cache}/PBXSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" +install_wine_bottle vb6run dx8vb quartz +cp -fv "${cache}/PBXSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/PBXSetup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/PBXSetup.exe" # warning warning warning: Do not change location, or installer will not function. # FIXME: Hacky, but it works. Install dotnet20 by itself so it actually doesn't hang. winetricks -q dotnet20 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. add_launcher "c:\Program Files\Draconis Entertainment\ESP Pinball Xtreme\pbx.exe" diff --git a/.install/ESP Pinball Party Pack.sh b/.install/ESP Pinball Party Pack.sh index c4701d9..a758cc6 100644 --- a/.install/ESP Pinball Party Pack.sh +++ b/.install/ESP Pinball Party Pack.sh @@ -1,5 +1,5 @@ export winVer="win7" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) export WINEPREFIX="$HOME/.local/wine/draconis" # Only works in conjunction with esp pinball extreme. if ! [ -f "$HOME/.local/wine/$bottle/drive_c/Program Files/Draconis Entertainment/ESP Pinball Xtreme/pbx.exe" ] ; then @@ -7,7 +7,7 @@ if ! [ -f "$HOME/.local/wine/$bottle/drive_c/Program Files/Draconis Entertainmen exit 1 fi download "http://download.dracoent.com/Windows/classic/PP1Setup.exe" -cp -v "${cache}/PP1Setup.exe" "$WINEPREFIX/drive_c/windows/temp/" +cp -fv "${cache}/PP1Setup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/PP1Setup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/PP1Setup.exe" add_launcher "c:\Program Files\Draconis Entertainment\ESP Pinball Xtreme\pbx.exe" diff --git a/.install/Endless Runner.sh b/.install/Endless Runner.sh index 6558aa3..b1426f8 100644 --- a/.install/Endless Runner.sh +++ b/.install/Endless Runner.sh @@ -1,5 +1,4 @@ download "http://www.masonasons.me/softs/EndlessRunner.7z" -install_wine_bottle speechsdk -7z x -y -o"$WINEPREFIX/drive_c/Program Files/Endless Runner" "${cache}/EndlessRunner.7z" -prunner -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress 7z "Extracting game files..." x -y -o"$WINEPREFIX/drive_c/Program Files/Endless Runner" "${cache}/EndlessRunner.7z" -prunner add_launcher "c:\Program Files\Endless Runner\runner.exe" diff --git a/.install/Entombed.sh b/.install/Entombed.sh index f07746e..492857e 100644 --- a/.install/Entombed.sh +++ b/.install/Entombed.sh @@ -1,22 +1,21 @@ -export version="6.18" 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" -install_wine "$version" "32" +# Uses wine32 due to dependency export winVer="win7" -install_wine_bottle speechsdk msvcrt40 gdiplus ie7 wmp11 mf +install_wine_bottle msvcrt40 gdiplus ie7 wmp11 mf # Ok, more dotnet. LC_ALL=C DISPLAY="" winetricks -q dotnet40 xna40 -${wine}server -k # Sigh. +wineserver -k # Sigh. mkdir -p "${WINEPREFIX}/drive_c/temp" pushd "${WINEPREFIX}/drive_c/temp" -7z x "${cache}/SSCERuntime-ENU.exe" -${wine} msiexec /i "${WINEPREFIX}/drive_c/temp/SSCERuntime_x86-ENU.msi" /q +install_with_progress 7z "Extracting game files..." x "${cache}/SSCERuntime-ENU.exe" +wine msiexec /i "${WINEPREFIX}/drive_c/temp/SSCERuntime_x86-ENU.msi" /q rm * popd pushd "${WINEPREFIX}/drive_c/Program Files/Microsoft SQL Server Compact Edition/v3.5" -${wine} regsvr32 sqlceoledb35.dll -${wine} regsvr32 sqlceca35.dll +wine regsvr32 sqlceoledb35.dll +wine regsvr32 sqlceca35.dll popd -${wine} "${cache}/EntombedSetup.exe" /silent +wine "${cache}/EntombedSetup.exe" /silent pushd "${WINEPREFIX}/drive_c/Program Files/Entombed" cp ../Microsoft\ SQL\ Server\ Compact\ Edition/v3.5/Private/System.Data.SqlServerCe.Entity.dll ../Microsoft\ SQL\ Server\ Compact\ Edition/v3.5/Private/System.Data.SqlServerCe.dll . cp ../Microsoft\ SQL\ Server\ Compact\ Edition/v3.5/sql* . diff --git a/.install/Eurofly.sh b/.install/Eurofly.sh index b6b47a7..94b08e7 100644 --- a/.install/Eurofly.sh +++ b/.install/Eurofly.sh @@ -1,9 +1,9 @@ # export winVer="win7" export winetricksSettings="vd=1024x768" -download "https://www.stefankiss.sk/files/eurofly2/Launcher_1.2.zip" "https://www.stefankiss.sk/files/eurofly2/Eurofly_2_ful_setup.exe" -install_wine_bottle speechsdk comctl32 +download "https://www.stefankiss.sk/files/eurofly2/Launcher_1.2.zip" "https://www.stefankiss.sk/files/eurofly2/Eurofly_2_ful_setup.exe" +install_wine_bottle comctl32 wine "${cache}/Eurofly_2_ful_setup.exe" /silent -unzip -o -d "$WINEPREFIX/drive_c/Eurofly" "${cache}/Launcher_1.2.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Eurofly" "${cache}/Launcher_1.2.zip" add_launcher "c:\Eurofly\launcher.exe" echo "Note: On first and sometimes later launch, Eurofly may take a very long time to download required files, please be patient..." diff --git a/.install/Executioner's Rage.sh b/.install/Executioner's Rage.sh index e078946..5fec7af 100644 --- a/.install/Executioner's Rage.sh +++ b/.install/Executioner's Rage.sh @@ -1,9 +1,8 @@ -download "https://dl.tweesecake.app/rage/rage1.5.0.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" +download "https://dl.tweesecake.app/rage/rage1.5.0.zip" export WINEARCH=win64 export winVer="win10" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/rage1.5.0.zip" -find "${WINEPREFIX}/drive_c/Program Files" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/rage1.5.0.zip" add_launcher "c:\Program Files\rage\rage.exe" url="https://techcake.games/games/executioners-rage/" echo "Before you can login, you need to create an account at:" diff --git a/.install/Extant.sh b/.install/Extant.sh index a93028d..bc36403 100644 --- a/.install/Extant.sh +++ b/.install/Extant.sh @@ -1,4 +1,4 @@ download "https://agarchive.net/games/other/extant.zip" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/extant" "${cache}/extant.zip" +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/extant" "${cache}/extant.zip" add_launcher "c:\Program Files\extant\Extant.exe" diff --git a/.install/Fuck That Bird.sh b/.install/Fuck That Bird.sh index 0fad3e2..68d1fe8 100644 --- a/.install/Fuck That Bird.sh +++ b/.install/Fuck That Bird.sh @@ -1,6 +1,6 @@ -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "http://oriolgomez.com/games/bird_en.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/fuck that bird" "${cache}/bird_en.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/fuck that bird" "${cache}/bird_en.zip" add_launcher "c:\Program Files\fuck that bird\game.exe" diff --git a/.install/GMA Tank Commander.sh b/.install/GMA Tank Commander.sh index df356ac..44982db 100644 --- a/.install/GMA Tank Commander.sh +++ b/.install/GMA Tank Commander.sh @@ -1,5 +1,5 @@ download "http://www.gmagames.com/gtc120.exe" -install_wine_bottle vb6run dx8vb speechsdk +install_wine_bottle vb6run dx8vb wine "${cache}/gtc120.exe" /silent & xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null xdotool sleep 15 type --clearmodifiers --delay 100 "${USER^}" 2> /dev/null @@ -12,7 +12,7 @@ xdotool sleep 10 type --clearmodifiers --delay 100 "uuuuuuu" 2> /dev/null xdotool key --clearmodifiers Tab 2> /dev/null xdotool key --clearmodifiers Return 2> /dev/null xdotool sleep 10 key --clearmodifiers Return 2> /dev/null -${wine}server -w +wineserver -w echo "To accurately set your information, edit the file:" echo "${WINEPREFIX}/drive_c/Program\ Files/GMA\ Tank\ Commander/config.dat" echo "The default country is US. The fields are:" diff --git a/.install/Galactic Strike.sh b/.install/Galactic Strike.sh index db17486..5716389 100644 --- a/.install/Galactic Strike.sh +++ b/.install/Galactic Strike.sh @@ -1,7 +1,7 @@ get_installer "Galactic Strike 1.2.zip" "https://fusion-forged-games.itch.io/galactic-strike" export winVer="win10" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/Galactic Strike" "${cache}/Galactic Strike 1.2.zip" +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/Galactic Strike" "${cache}/Galactic Strike 1.2.zip" add_launcher "c:\Program Files\Galactic Strike\Galactic Strike.exe" echo "Use controls wasd to movi and navigate the menu." echo "Use m to fire and select items from the menu." diff --git a/.install/Grizzly Gulch.sh b/.install/Grizzly Gulch.sh index 834b374..998b1e1 100644 --- a/.install/Grizzly Gulch.sh +++ b/.install/Grizzly Gulch.sh @@ -1,6 +1,6 @@ download "https://stormgames.wolfe.casa/downloads/grizzly-gulch.zip" install_wine_bottle vb6run mfc42 -unzip -d "$WINEPREFIX/drive_c/Program Files" "$cache/grizzly-gulch.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "$cache/grizzly-gulch.zip" add_launcher "c:\Program Files\grizzly-gulch\Grizzly Gulch.exe" echo "If the combat sequences happen too slow for your tastes, while in the town square, you can use f12 to turn up the combat speed and f11 to lower it." alert diff --git a/.install/Hammer of Glory.sh b/.install/Hammer of Glory.sh index 520dc73..9c6e0a1 100644 --- a/.install/Hammer of Glory.sh +++ b/.install/Hammer of Glory.sh @@ -1,7 +1,6 @@ -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "http://oriolgomez.com/games/hammer_en.zip" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/hammer of glory" "${cache}/hammer_en.zip" -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/hammer of glory" "${cache}/hammer_en.zip" add_launcher "c:\Program Files\hammer of glory\game.exe" diff --git a/.install/Hunter.sh b/.install/Hunter.sh index ced7ec7..27b50a5 100644 --- a/.install/Hunter.sh +++ b/.install/Hunter.sh @@ -2,12 +2,12 @@ download "http://www.agarchive.net/games/bsc/HunterSetup.exe" "https://www.agarc install_wine_bottle vb6run dx8vb # FIXME: Hacky, but it works. Install dotnet35 by itself so it actually doesn't hang. winetricks -q dotnet35sp1 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. wine "${cache}/HunterSetup.exe" /silent & xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null -sleep 30 && ${wine}server -k # Sometimes the installer finishes but the ${wine}server has more processes that don't exit, so we can't depend on ${wine}server -w. +sleep 30 && wineserver -k # Sometimes the installer finishes but the wineserver has more processes that don't exit, so we can't depend on wineserver -w. mkdir -p "$WINEPREFIX/drive_c/Program Files/bsc-key-generator" -7z x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z" +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z" echo "$USER"$'\n'"$(hostname)"$'\n'"none"$'\n'"US" > "$WINEPREFIX/drive_c/Program Files/Hunter/config.dat" unix2dos "$WINEPREFIX/drive_c/Program Files/Hunter/config.dat" if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then @@ -18,7 +18,7 @@ if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then xdotool sleep 1 key Shift+Tab sleep 1 key Return # FIXME: Kind of hacky, but let's make sure it actually exitted. sleep 5 - ${wine}server -k + wineserver -k wine "c:\Program Files\bsc-key-generator\BlindsoftwareUnlockCodeGenerator.exe" & xdotool sleep 10 key Return sleep 2 type h xdotool sleep 1 key Tab sleep 1 type $regcode @@ -27,13 +27,13 @@ if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then regcode="$(xclip -selection clipboard -o)" # Might as well reuse the variable. # FIXME: Kind of hacky, but let's make sure it actually exitted since I can't find a good way to exit this program. sleep 5 - ${wine}server -k + wineserver -k wine "c:\Program Files\Hunter\HunterRegistration.exe" & echo "$regcode" | xclip -selection clipboard xdotool sleep 10 key Return sleep 2 key Shift+Tab sleep 1 key Shift+Tab sleep 1 key Return # FIXME: Kind of hacky, but let's make sure it actually exitted. sleep 5 - ${wine}server -k + wineserver -k else echo "Warning: You need xclip and xdotool for this installer to finish the registration process, however, you don't have them. Either remove the program, install the stated tools, and reinstall it, or go on your own. Caveat Emptor, go to jail, do not pass go, do not collect audiogame rewards and all that stuff." fi diff --git a/.install/Inquisitor's Heartbeat.sh b/.install/Inquisitor's Heartbeat.sh index cd45831..06c6c49 100644 --- a/.install/Inquisitor's Heartbeat.sh +++ b/.install/Inquisitor's Heartbeat.sh @@ -2,7 +2,7 @@ get_installer "Inquisitor_windows_ENG.zip" "https://www.audiogame.store/en/produ export WINEARCH=win64 export winVer="win8" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/Inquisitor_windows_ENG.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/Inquisitor_windows_ENG.zip" # Weird work around to get keyboard working. winetricks -q usetakefocus=y winetricks -q usetakefocus=n diff --git a/.install/Insect Therapy.sh b/.install/Insect Therapy.sh index 7aa5925..22316a5 100644 --- a/.install/Insect Therapy.sh +++ b/.install/Insect Therapy.sh @@ -1,6 +1,6 @@ -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "http://oriolgomez.com/games/insect_en.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/insect therapy" "${cache}/insect_en.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/insect therapy" "${cache}/insect_en.zip" add_launcher "c:\Program Files\insect therapy\game.exe" diff --git a/.install/Judgement Day.sh b/.install/Judgement Day.sh index 60ae578..a9a4f90 100644 --- a/.install/Judgement Day.sh +++ b/.install/Judgement Day.sh @@ -1,4 +1,4 @@ -export bottle="l-works" +# Uses standard wine path based on architecture (win32/win64) download "http://files.l-works.net/judgmentdayfullsetup.exe" install_wine_bottle vb6run dx8vb quartz wine "${cache}/judgmentdayfullsetup.exe" /silent diff --git a/.install/Kitchensinc Games.sh b/.install/Kitchensinc Games.sh index 987389e..d267ec6 100644 --- a/.install/Kitchensinc Games.sh +++ b/.install/Kitchensinc Games.sh @@ -1,5 +1,5 @@ download "${ipfsGateway}/ipfs/QmdkLPig6Kp3AZTwKAhjrhhsEuvhFCFhm6SHLUQVeNNYCb?filename=kitchen.tar.xz" -install_wine_bottle vb6run speechsdk dx8vb +install_wine_bottle 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/Laser Breakout.sh b/.install/Laser Breakout.sh index 1833bf8..ea843cc 100644 --- a/.install/Laser Breakout.sh +++ b/.install/Laser Breakout.sh @@ -1,9 +1,8 @@ # Currently only speaks in japanese, looking to see if we can find an english version. -export bottle="nyanchan" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -download "https://www.agarchive.net/games/nyanchan/laser%20breakout.7z" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" "https://stormgames.wolfe.casa/downloads/laser-breakout-options.dat" +download "https://www.agarchive.net/games/nyanchan/laser%20breakout.7z" "https://stormgames.wolfe.casa/downloads/laser-breakout-options.dat" install_wine_bottle -7z x -o"$WINEPREFIX/drive_c/nyanchangame/" "$cache/laser breakout.7z" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; -cp -v "$cache/laser-breakout-options.dat" "$WINEPREFIX/drive_c/nyanchangame/laser breakout/options.dat" +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/nyanchangame/" "$cache/laser breakout.7z" +cp -fv "$cache/laser-breakout-options.dat" "$WINEPREFIX/drive_c/nyanchangame/laser breakout/options.dat" add_launcher "c:\nyanchangame\laser breakout\play.exe" diff --git a/.install/Light Battles.sh b/.install/Light Battles.sh index 2c6cbfc..3608feb 100644 --- a/.install/Light Battles.sh +++ b/.install/Light Battles.sh @@ -1,6 +1,5 @@ export winVer="win7" -download "https://prometheus-enterprises.com/games/CoL.exe" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" +download "https://prometheus-enterprises.com/games/CoL.exe" install_wine_bottle -7z x -o"$WINEPREFIX/drive_c/Program Files/Light Battles" "${cache}/CoL.exe" -find "${WINEPREFIX}" -type f -name "nvdaControllerClient.dll" -exec cp -v "$cache/nvda2speechd32.dll" "{}" \; +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/Light Battles" "${cache}/CoL.exe" add_launcher "c:\Program Files\Light Battles\battles.exe" diff --git a/.install/Light Cars.sh b/.install/Light Cars.sh index 3f485b0..22429f1 100644 --- a/.install/Light Cars.sh +++ b/.install/Light Cars.sh @@ -2,7 +2,7 @@ download "https://www.agarchive.net/games/lighttech/light%20cars%20setup.exe" install_wine_bottle dx8vb vb6run wine "${cache}/light cars setup.exe" & xdotool sleep 10 key --clearmodifiers alt+n sleep 1 key --clearmodifiers alt+a key --clearmodifiers space sleep 1 key --clearmodifiers alt+n sleep 1 key --clearmodifiers alt+n sleep 1 key --clearmodifiers alt+i sleep 30 key --clearmodifiers Tab sleep 1 key --clearmodifiers Return 2> /dev/null -${wine}server -w +wineserver -w echo -e "${USER} ${HOST}\nna@na.na\nUS" > ~/.local/wine/light-cars/drive_c/Program\ Files/Lighttech\ Interactive/Light\ Cars/config.dat unix2dos ~/.local/wine/light-cars/drive_c/Program\ Files/Lighttech\ Interactive/Light\ Cars/config.dat add_launcher "c:\Program Files\Lighttech Interactive\Light Cars\lightCars.exe" diff --git a/.install/Lockpick.sh b/.install/Lockpick.sh index 427142b..a9fa742 100644 --- a/.install/Lockpick.sh +++ b/.install/Lockpick.sh @@ -1,4 +1,4 @@ -export bottle="l-works" +# Uses standard wine path based on architecture (win32/win64) download "http://files.l-works.net/lockpicksetup.exe" install_wine_bottle vb6run dx8vb wine "${cache}/lockpicksetup.exe" /silent diff --git a/.install/Lone Wolf.sh b/.install/Lone Wolf.sh index 8aa6f21..2775f44 100644 --- a/.install/Lone Wolf.sh +++ b/.install/Lone Wolf.sh @@ -1,5 +1,5 @@ download "http://www.gmagames.com/lw350.exe" -install_wine_bottle vb6run dx8vb speechsdk +install_wine_bottle vb6run dx8vb wine "${cache}/lw350.exe" /silent & xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null xdotool sleep 10 type --clearmodifiers --delay 100 "$USER" 2> /dev/null @@ -11,5 +11,5 @@ xdotool key --clearmodifiers Tab 2> /dev/null xdotool type --clearmodifiers --delay 100 "uuuuuu" 2> /dev/null xdotool key --clearmodifiers Tab 2> /dev/null xdotool key --clearmodifiers Return 2> /dev/null -${wine}server -w +wineserver -w add_launcher "c:\Program Files\Lone Wolf\lw.exe" diff --git a/.install/Lost.sh b/.install/Lost.sh index 2313d07..d282288 100644 --- a/.install/Lost.sh +++ b/.install/Lost.sh @@ -1,6 +1,5 @@ -export bottle=dan-z +# Uses standard wine path based on architecture (win32/win64) download "https://agarchive.net/games/danZ/lost.zip" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/lost" "$cache/lost.zip" -find "$WINEPREFIX/drive_c/Program Files/lost" -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/lost" "$cache/lost.zip" add_launcher 'c:\Program Files\lost\lost.exe' diff --git a/.install/Lunimals.sh b/.install/Lunimals.sh index 349ce03..97afd96 100644 --- a/.install/Lunimals.sh +++ b/.install/Lunimals.sh @@ -1,9 +1,9 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" export winetricksSettings="vd=1024x768" download "https://kaldobsky.com/audiogames/lunimals.zip" -install_wine_bottle vb6run dx8vb quartz speechsdk corefonts -unzip -d "$WINEPREFIX/drive_c/Program Files/lunimals" "${cache}/lunimals.zip" +install_wine_bottle 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" echo "Note: Lunimals installed. Once you start the game, you must press tab until you hear sapi on to get speech." >&2 diff --git a/.install/Manamon 2.sh b/.install/Manamon 2.sh index 8f0ed39..e0b02d3 100644 --- a/.install/Manamon 2.sh +++ b/.install/Manamon 2.sh @@ -1,5 +1,5 @@ export winVer="win7" download "http://www.vgstorm.com/manamon2/manamon2_installer.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/manamon2_installer.exe" /silent add_launcher "c:\Program Files\VGStorm.com\Manamon 2\rpg.exe" diff --git a/.install/Manamon.sh b/.install/Manamon.sh index 47fe1ed..8eb4f5c 100644 --- a/.install/Manamon.sh +++ b/.install/Manamon.sh @@ -1,5 +1,5 @@ export winVer="win7" download "https://www.vgstorm.com/manamon/manamon_installer.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/manamon_installer.exe" /silent add_launcher "c:\Program Files\VGStorm.com\Manamon\rpg.exe" diff --git a/.install/Marina Break.sh b/.install/Marina Break.sh index 8ed3afd..6d06459 100644 --- a/.install/Marina Break.sh +++ b/.install/Marina Break.sh @@ -1,10 +1,8 @@ # -export bottle="nyanchan" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -download "https://www.nyanchangames.com/softs/MbSetupE.exe" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/MbSetupE.exe" & xdotool sleep 10 key Return -${wine}server -w -find "${WINEPREFIX}" -type f -name "nvdaControllerClient.dll" -exec cp -v "$cache/nvda2speechd32.dll" "{}" \; +wineserver -w add_launcher "c:\nyanchangame\MarinaBreak\marinabreak.exe" diff --git a/.install/Maze Craze.sh b/.install/Maze Craze.sh index 5db7775..f5e35c4 100644 --- a/.install/Maze Craze.sh +++ b/.install/Maze Craze.sh @@ -1,7 +1,7 @@ -export bottle=dan-z +# Uses standard wine path based on architecture (win32/win64) download "http://www.danielzingaro.com/maze_craze_setup.exe" install_wine_bottle vb6run dx8vb -${wine} "${cache}/maze_craze_setup.exe" & +wine "${cache}/maze_craze_setup.exe" & xdotool sleep 15 key --delay 100 y 2> /dev/null xdotool sleep 3 key --delay 250 alt+n 2> /dev/null xdotool key --delay 250 alt+a 2> /dev/null @@ -12,5 +12,5 @@ xdotool key --delay 250 alt+n 2> /dev/null xdotool key --delay 250 alt+i 2> /dev/null xdotool sleep 15 key --delay 250 alt+f 2> /dev/null xdotool sleep 3 key --delay 250 n 2> /dev/null -${wine}server -k +wineserver -k add_launcher "c:\Program Files\Maze Craze 1.4\mazecraze.exe" diff --git a/.install/Mist World.sh b/.install/Mist World.sh index 82de3a3..8c1aadd 100644 --- a/.install/Mist World.sh +++ b/.install/Mist World.sh @@ -1,11 +1,10 @@ +export WINEARCH="win32" export winVer="win7" +export WINEPREFIX="$HOME/.local/wine32" get_installer "Mist World_Setup.exe" "https://drive.google.com/uc?export=download&id=12YeUqorkkMT46ZSR5pcfWxSY8DHOLxZ-" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" -install_wine_bottle sapi -7z x -o"$WINEPREFIX/drive_c/Program Files/Mist World" "$cache/Mist World_Setup.exe" +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} -find "$WINEPREFIX/drive_c/Program Files/Mist World" -iname "nvdaControllerClient32.dll" -exec cp "$cache/nvda2speechd32.dll" "{}" \; mkdir "$WINEPREFIX/drive_c/Program Files/Mist World/"{user,users} add_launcher 'c:\Program Files\Mist World\mw.exe' echo diff --git a/.install/Monkey Business.sh b/.install/Monkey Business.sh index c277831..fc6422e 100644 --- a/.install/Monkey Business.sh +++ b/.install/Monkey Business.sh @@ -1,12 +1,12 @@ export winVer="win7" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) download "http://download.dracoent.com/Windows/classic/MBSetup.exe" -install_wine_bottle vb6run dx8vb speechsdk quartz -cp -v "${cache}/MBSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" +install_wine_bottle vb6run dx8vb quartz +cp -fv "${cache}/MBSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/MBSetup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/MBSetup.exe" # warning warning warning: Do not change location, or installer will not function. # FIXME: Hacky, but it works. Install dotnet20 by itself so it actually doesn't hang. winetricks -q dotnet20 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. add_launcher "c:\Program Files\Draconis Entertainment\Monkey Business\mb.exe" diff --git a/.install/MudSplat English.sh b/.install/MudSplat English.sh index 630d5e6..e472e8a 100644 --- a/.install/MudSplat English.sh +++ b/.install/MudSplat English.sh @@ -1,28 +1,33 @@ +#!/bin/bash +case "${game}" in + "MudSplat English") a="a" f="f" i="i" n="n" - ;& + ;; "MudSplat French") # Variables may be already set for English installation, so make sure not to overwrite them. a="${a:-j}" f="${f:-t}" i="${i:-i}" n="${n:-s}" - ;& + ;; "MudSplat Swedish") # Variables may be already set for French installation, so make sure not to overwrite them. a="${a:-a}" f="${f:-f}" i="${i:-i}" n="${n:-n}" + ;; +esac download "https://www.agarchive.net/games/other/Mudsplat-install.exe" install_wine_bottle wine "${cache}/Mudsplat-install.exe" & # Select the language. xdotool sleep 10 type --clearmodifiers ${game:9:1} 2> /dev/null xdotool sleep 1 key --clearmodifiers Return sleep 1 key alt+${n} sleep 1 key alt+${a} sleep 1 key alt+${n} sleep 1 key space sleep 1 key alt+${n} sleep 1 key alt+${n} sleep 1 key alt+${i} sleep 10 key space sleep 1 key alt+${f} 2> /dev/null -${wine}server -w +wineserver -w mudsplatLauncher="$(find "$WINEPREFIX/drive_c/Program Files/TiM/MudSplat" -name 'mudsplat-*.exe')" mudsplatLauncher="${mudsplatLauncher##*/}" -add_launcher "c:\Program Files\TiM\MudSplat\\${mudsplatLauncher}" +add_launcher "c:\Program Files\TiM\MudSplat\\${mudsplatLauncher}" \ No newline at end of file diff --git a/.install/Oh Shit.sh b/.install/Oh Shit.sh index 89d2a2a..1158b9c 100644 --- a/.install/Oh Shit.sh +++ b/.install/Oh Shit.sh @@ -1,8 +1,6 @@ export winVer="win7" export norh="true" # Requires sapi even though uses nvda -download "${ipfsGateway}/ipfs/QmQnAJJrt5uABFziQc7enXYrJ74J9GKQSMi8Ry8ebsxfPV?filename=OhShit.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/OhShit.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; +download "${ipfsGateway}/ipfs/QmQnAJJrt5uABFziQc7enXYrJ74J9GKQSMi8Ry8ebsxfPV?filename=OhShit.zip" +install_wine_bottle +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/Operation BlackSquare.sh b/.install/Operation BlackSquare.sh index 35b6ef2..922e06d 100644 --- a/.install/Operation BlackSquare.sh +++ b/.install/Operation BlackSquare.sh @@ -1,5 +1,5 @@ export winVer="win7" download "https://www.iamtalon.me/games/blacksquare.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/blacksquare.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/blacksquare.zip" add_launcher "c:\Program Files\blacksquare\OperationBlackSquare.exe" diff --git a/.install/Palace Punch Up.sh b/.install/Palace Punch Up.sh index 9ca20eb..af5afc1 100644 --- a/.install/Palace Punch Up.sh +++ b/.install/Palace Punch Up.sh @@ -1,4 +1,4 @@ download "https://www.agarchive.net/games/blastbay/palace%20punch-up%20setup.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/palace punch-up setup.exe" /silent add_launcher "c:\Program Files\Palace Punch-up\palace.exe" diff --git a/.install/Paladin of the Sky.sh b/.install/Paladin of the Sky.sh index 6d68821..89220b4 100644 --- a/.install/Paladin of the Sky.sh +++ b/.install/Paladin of the Sky.sh @@ -1,5 +1,5 @@ export winVer="win7" download "http://www.vgstorm.com/cod/pots/paladin_installer.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/paladin_installer.exe" /silent add_launcher "c:\Program Files\VGStorm.com\Paladin of the Sky\game.exe" diff --git a/.install/Park Boss.sh b/.install/Park Boss.sh index 99963cd..4fbbfc9 100644 --- a/.install/Park Boss.sh +++ b/.install/Park Boss.sh @@ -1,7 +1,7 @@ export winVer="win7" download "http://www.ndadamson.com/downloads/Park%20Boss%201.01%20setup.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/Park Boss 1.01 setup.exe" /silent & xdotool sleep 10 key --clearmodifiers Return sleep 1 key alt+n sleep 1 key alt+a sleep 1 key alt+i sleep 10 key alt+f 2> /dev/null -${wine}server -w +wineserver -w add_launcher "c:\Program Files\NASoft\ParkBoss\pbMain.exe" diff --git a/.install/Paw Prints.sh b/.install/Paw Prints.sh index 933a3be..9396bd3 100644 --- a/.install/Paw Prints.sh +++ b/.install/Paw Prints.sh @@ -1,8 +1,8 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" export winetricksSettings="vd=1024x768" download "https://www.kaldobsky.com/audiogames/pawprints.zip" -install_wine_bottle vb6run dx8vb quartz speechsdk corefonts -unzip -d "$WINEPREFIX/drive_c/Program Files/pawprints" "${cache}/pawprints.zip" +install_wine_bottle vb6run dx8vb quartz +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/pawprints" "${cache}/pawprints.zip" wine 'c:\Program Files\pawprints\checkup.exe' /verysilent add_launcher "c:\Program Files\pawprints\PawPrints.exe" diff --git a/.install/Penta Path.sh b/.install/Penta Path.sh index f4ba764..f0c6385 100644 --- a/.install/Penta Path.sh +++ b/.install/Penta Path.sh @@ -1,8 +1,8 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" export winetricksSettings="vd=1024x768" download "http://www.kaldobsky.com/audiogames/pentapath.zip" -install_wine_bottle vb6run dx8vb quartz speechsdk corefonts -unzip -d "$WINEPREFIX/drive_c/Program Files/pentapath" "${cache}/pentapath.zip" +install_wine_bottle vb6run dx8vb quartz +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/pentapath" "${cache}/pentapath.zip" wine 'c:\Program Files\pentapath\checkup.exe' /verysilent add_launcher "c:\Program Files\pentapath\PentaPath.exe" diff --git a/.install/Perilous Hearts.sh b/.install/Perilous Hearts.sh index 77f3766..189d21f 100644 --- a/.install/Perilous Hearts.sh +++ b/.install/Perilous Hearts.sh @@ -1,4 +1,4 @@ download "https://www.agarchive.net/games/blastbay/perilous%20hearts%20concept%20demo.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/perilous hearts concept demo.exe" /silent add_launcher "c:\Program Files\Perilous Hearts Concept Demo\perilous_hearts.exe" diff --git a/.install/Pigeon Panic.sh b/.install/Pigeon Panic.sh index 32b4e1e..44dceaf 100644 --- a/.install/Pigeon Panic.sh +++ b/.install/Pigeon Panic.sh @@ -1,4 +1,4 @@ -export bottle="l-works" +# Uses standard wine path based on architecture (win32/win64) download "http://agarchive.net/games/lworks/pigeon%20panic%20setup.exe" install_wine_bottle vb6run dx8vb wine "${cache}/pigeon panic setup.exe" /silent diff --git a/.install/Pipe 2 Blast Chamber.sh b/.install/Pipe 2 Blast Chamber.sh index d3616ba..8b01203 100644 --- a/.install/Pipe 2 Blast Chamber.sh +++ b/.install/Pipe 2 Blast Chamber.sh @@ -1,13 +1,13 @@ install_wine_bottle vb6run dx8vb # FIXME: Hacky, but it works. Install dotnet35 by itself so it actually doesn't hang. winetricks -q dotnet35sp1 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. download "http://www.agarchive.net/games/bsc/BlastChamberSetup.exe" "https://www.agarchive.net/games/bsc/BSC%20unlock%20code%20generator.7z" wine "${cache}/BlastChamberSetup.exe" /silent & xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null -sleep 30 && ${wine}server -k # Sometimes the installer finishes but the ${wine}server has more processes that don't exit, so we can't depend on ${wine}server -w. +sleep 30 && wineserver -k # Sometimes the installer finishes but the wineserver has more processes that don't exit, so we can't depend on wineserver -w. mkdir -p "$WINEPREFIX/drive_c/Program Files/bsc-key-generator" -7z x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z" +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z" echo "$USER"$'\n'"$(hostname)"$'\n'"none"$'\n'"US" > "$WINEPREFIX/drive_c/Program Files/Blast Chamber/config.dat" unix2dos "$WINEPREFIX/drive_c/Program Files/Blast Chamber/config.dat" if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then @@ -18,7 +18,7 @@ if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then xdotool sleep 1 key Shift+Tab sleep 1 key Return # FIXME: Kind of hacky, but let's make sure it actually exitted. sleep 5 - ${wine}server -k + wineserver -k wine "c:\Program Files\bsc-key-generator\BlindsoftwareUnlockCodeGenerator.exe" & xdotool sleep 10 key Return sleep 2 type b xdotool sleep 1 key Tab sleep 1 type $regcode @@ -27,13 +27,13 @@ if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then regcode="$(xclip -selection clipboard -o)" # Might as well reuse the variable. # FIXME: Kind of hacky, but let's make sure it actually exitted since I can't find a good way to exit this program. sleep 5 - ${wine}server -k + wineserver -k wine "c:\Program Files\Blast Chamber\register.exe" & echo "$regcode" | xclip -selection clipboard xdotool sleep 10 key Return sleep 2 key Shift+Tab sleep 1 key Shift+Tab sleep 1 key Return # FIXME: Kind of hacky, but let's make sure it actually exitted. sleep 5 - ${wine}server -k + wineserver -k else echo "Warning: You need xclip and xdotool for this installer to finish the registration process, however, you don't have them. Either remove the program, install the stated tools, and reinstall it, or go on your own. Caveat Emptor, go to jail, do not pass go, do not collect audiogame rewards and all that stuff." fi diff --git a/.install/Preludeamals.sh b/.install/Preludeamals.sh index 67230ce..3dd33f1 100644 --- a/.install/Preludeamals.sh +++ b/.install/Preludeamals.sh @@ -1,8 +1,8 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" export winetricksSettings="vd=1024x768" download "https://www.kaldobsky.com/audiogames/Preludeamals.zip" -install_wine_bottle vb6run dx8vb quartz speechsdk corefonts -unzip -d "$WINEPREFIX/drive_c/Program Files/preludeamals" "${cache}/Preludeamals.zip" +install_wine_bottle vb6run dx8vb quartz +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/preludeamals" "${cache}/Preludeamals.zip" wine 'c:\Program Files\preludeamals\checkup.exe' /verysilent add_launcher "c:\Program Files\preludeamals\Preludeamals.exe" diff --git a/.install/Psycho Strike.sh b/.install/Psycho Strike.sh index c16d5c2..6e6b6c2 100644 --- a/.install/Psycho Strike.sh +++ b/.install/Psycho Strike.sh @@ -1,5 +1,5 @@ # download "http://www.vgstorm.com/psycho_strike_installer.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/psycho_strike_installer.exe" /silent add_launcher "c:\Program Files\VGStorm.com\Psycho Strike\strike.exe" diff --git a/.install/Puzzle Divided.sh b/.install/Puzzle Divided.sh index c616527..83f57b8 100644 --- a/.install/Puzzle Divided.sh +++ b/.install/Puzzle Divided.sh @@ -1,7 +1,7 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" export winetricksSettings="vd=1024x768" download "https://www.kaldobsky.com/audiogames/puzzledivided.zip" -install_wine_bottle vb6run dx8vb quartz corefonts -unzip -d "$WINEPREFIX/drive_c/Program Files/puzzledivided" "${cache}/puzzledivided.zip" +install_wine_bottle vb6run dx8vb quartz +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/puzzledivided" "${cache}/puzzledivided.zip" add_launcher "c:\Program Files\puzzledivided\PuzzleDivided.exe" diff --git a/.install/RS Games.sh b/.install/RS Games.sh index 2a0907c..602b089 100644 --- a/.install/RS Games.sh +++ b/.install/RS Games.sh @@ -1,8 +1,6 @@ -export version="7.0" -download "http://rsgames.org/rsdownloads/rsgclient/rsgames-client-setup-2.01.exe" "${nvdaControllerClientDll}" -install_wine "$version" "32" +download "http://rsgames.org/rsdownloads/rsgclient/rsgames-client-setup-2.01.exe" +export WINEARCH=win64 export winVer="win7" -install_wine_bottle speechsdk -${wine} "${cache}/rsgames-client-setup-2.01.exe" /silent -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; +install_wine_bottle +wine "${cache}/rsgames-client-setup-2.01.exe" /silent add_launcher "c:\Program Files\RS Games Client\rsg.exe" diff --git a/.install/Rettou.sh b/.install/Rettou.sh index 7f6c1bc..4bf23e9 100644 --- a/.install/Rettou.sh +++ b/.install/Rettou.sh @@ -1,7 +1,7 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" export winetricksSettings="vd=1024x768" download "http://www.kaldobsky.com/audiogames/rettou.zip" -install_wine_bottle vb6run dx8vb quartz speechsdk corefonts -unzip -d "$WINEPREFIX/drive_c/Program Files/rettou" "${cache}/rettou.zip" +install_wine_bottle vb6run dx8vb quartz +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/rettou" "${cache}/rettou.zip" add_launcher "c:\Program Files\rettou\Rettou.exe" diff --git a/.install/Revelation.sh b/.install/Revelation.sh index cb288a6..279f06e 100644 --- a/.install/Revelation.sh +++ b/.install/Revelation.sh @@ -1,7 +1,7 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" export winetricksSettings="vd=1024x768" download "https://www.kaldobsky.com/audiogames/revelation.zip" -install_wine_bottle vb6run dx8vb quartz speechsdk corefonts -unzip -d "$WINEPREFIX/drive_c/Program Files/revelation" "${cache}/revelation.zip" +install_wine_bottle vb6run dx8vb quartz +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/revelation" "${cache}/revelation.zip" add_launcher "c:\Program Files\revelation\Revelation.exe" diff --git a/.install/Rhythm Rage.sh b/.install/Rhythm Rage.sh index b926ce0..b909c33 100644 --- a/.install/Rhythm Rage.sh +++ b/.install/Rhythm Rage.sh @@ -1,7 +1,6 @@ -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "http://oriolgomez.com/games/rr_en.zip" "${nvdaControllerClientDll}" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/rhythm rage" "${cache}/rr_en.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/rhythm rage" "${cache}/rr_en.zip" add_launcher "c:\Program Files\rhythm rage\game.exe" diff --git a/.install/River Raiders.sh b/.install/River Raiders.sh index 971b9e4..130153a 100644 --- a/.install/River Raiders.sh +++ b/.install/River Raiders.sh @@ -5,5 +5,5 @@ wine "$cache/River Raiders 1.3.5.exe" & xdotool sleep 10 type y 2> /dev/null xdotool sleep 2 type y 2> /dev/null xdotool sleep 2 key --clearmodifiers alt+n sleep 2 key alt+n sleep 2 key alt+n sleep 2 key alt+i sleep 10 key alt+f 2> /dev/null -${wine}server -w +wineserver -w add_launcher "c:\Program Files\River Raiders\raid.exe" diff --git a/.install/Road to Rage Offline.sh b/.install/Road to Rage Offline.sh index 783432a..f79b132 100644 --- a/.install/Road to Rage Offline.sh +++ b/.install/Road to Rage Offline.sh @@ -1,6 +1,5 @@ export winVer="win7" download "https://agarchive.net/games/talon/the%20road%20to%20rage%20offline.7z" -install_wine_bottle speechsdk -7z x -o"$WINEPREFIX/drive_c/Program Files" "${cache}/the road to rage offline.7z" -find "${WINEPREFIX}" -type f -name "nvdaControllerClient.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files" "${cache}/the road to rage offline.7z" add_launcher "c:\Program Files\RTR Offline\rtr.exe" diff --git a/.install/Road to Rage.sh b/.install/Road to Rage.sh index 130aeea..a441cb4 100644 --- a/.install/Road to Rage.sh +++ b/.install/Road to Rage.sh @@ -2,5 +2,5 @@ export WINEARCH=win64 export winVer="win7" download "https://iamtalon.me/games/rtr_ultimate.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/rtr_ultimate.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/rtr_ultimate.zip" add_launcher "c:\Program Files\rtr_Ultimate\trtr.exe" diff --git a/.install/Run For Your Life.sh b/.install/Run For Your Life.sh index d7f2a1a..65724d4 100644 --- a/.install/Run For Your Life.sh +++ b/.install/Run For Your Life.sh @@ -1,6 +1,6 @@ -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "http://oriolgomez.com/games/rfyl_en.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/run for your life" "${cache}/rfyl_en.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/run for your life" "${cache}/rfyl_en.zip" add_launcher "c:\Program Files\run for your life\game.exe" diff --git a/.install/Sammy Center.sh b/.install/Sammy Center.sh index ab3bcd0..a21a311 100644 --- a/.install/Sammy Center.sh +++ b/.install/Sammy Center.sh @@ -1,7 +1,6 @@ # export winVer="win7" download "http://www.samtupy.com/games/SCSetup.exe" "${nvdaControllerClientDll}" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/SCSetup.exe" /silent -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; add_launcher "c:\Program Files\Sam Tupy\SammyCenter\SammyCenter.exe" diff --git a/.install/Sarah and the Castle of Witchcraft and Wizardry.sh b/.install/Sarah and the Castle of Witchcraft and Wizardry.sh index 6155c74..c46a62a 100644 --- a/.install/Sarah and the Castle of Witchcraft and Wizardry.sh +++ b/.install/Sarah and the Castle of Witchcraft and Wizardry.sh @@ -1,5 +1,5 @@ download "http://www.pcs-games.net/Sarah10.exe" "http://www.pcs-games.net/Sarah-Patch4.exe" -install_wine_bottle vb6run dx8vb speechsdk +install_wine_bottle vb6run dx8vb wine "${cache}/Sarah10.exe" /sp- /verysilent wine "${cache}/Sarah-Patch4.exe" /sp- /verysilent add_launcher "c:\Program Files\Sarah and the Castle of Witchcraft and Wizardry 10\scw.exe" diff --git a/.install/Scramble!.sh b/.install/Scramble!.sh index 1e5533a..0cf863d 100644 --- a/.install/Scramble!.sh +++ b/.install/Scramble!.sh @@ -1,9 +1,8 @@ winetricksSettings="vd=1024x768" export winVer="win7" -download "https://stevend.net/downloads/scramble_win32.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/scramble_win32.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; +download "https://stevend.net/downloads/scramble_win32.zip" +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/scramble_win32.zip" echo "Note: When you first start the game, it will say that tts initialization failed. Please answer that you do not want to attempt initialization of tts when the game starts to allow easy speech through speech dispatcher." alert add_launcher "c:\Program Files\scramble_win32\scramble.exe" diff --git a/.install/Screaming Strike 2.sh b/.install/Screaming Strike 2.sh index d4592f5..736038d 100644 --- a/.install/Screaming Strike 2.sh +++ b/.install/Screaming Strike 2.sh @@ -1,9 +1,8 @@ -export bottle="nyanchan" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "https://www.nyanchangames.com/softs/screamingStrike2.exe" "${nvdaControllerClientDll}" -install_wine_bottle fakejapanese speechsdk +install_wine_bottle fakejapanese wine "${cache}/screamingStrike2.exe" & xdotool sleep 10 key Return -${wine}server -w -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; +wineserver -w add_launcher "c:\nyanchangame\Screaming Strike 2\play.exe" diff --git a/.install/Scrolling Battles.sh b/.install/Scrolling Battles.sh index 36ef1f3..fcc5ebb 100644 --- a/.install/Scrolling Battles.sh +++ b/.install/Scrolling Battles.sh @@ -3,6 +3,6 @@ export winVer="win7" get_installer "sbrw-win.zip" "https://masonasons.itch.io/sbrw" download "https://stormgames.wolfe.casa/downloads/Tolk.dll" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/sbrw" "${cache}/sbrw-win.zip" -find "${WINEPREFIX}" -type f -name 'Tolk.dll' -exec cp -v "${cache}/Tolk.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/sbrw" "${cache}/sbrw-win.zip" +find "${WINEPREFIX}" -type f -name 'Tolk.dll' -exec cp -fv "${cache}/Tolk.dll" "{}" \; add_launcher "c:\Program Files\sbrw\sb.exe" diff --git a/.install/Sequence Storm.sh b/.install/Sequence Storm.sh index 08e74c2..18b2454 100644 --- a/.install/Sequence Storm.sh +++ b/.install/Sequence Storm.sh @@ -2,7 +2,7 @@ get_installer "sequence-storm-win64.zip" "https://special-magic-games-llc.itch.i export WINEARCH=win64 export winVer="win10" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/sequence-storm" "${cache}/sequence-storm-win64.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/sequence-storm" "${cache}/sequence-storm-win64.zip" write_sequence_storm_reader curl -L --output "$WINEPREFIX/drive_c/Program Files/sequence-storm/settings.json" "https://stormgames.wolfe.casa/downloads/sequencestorm-settings.json" add_launcher "c:\Program Files\sequence-storm\SequenceStorm.exe" diff --git a/.install/Shades of Doom 1.2.sh b/.install/Shades of Doom 1.2.sh index 057d231..1b89f4e 100644 --- a/.install/Shades of Doom 1.2.sh +++ b/.install/Shades of Doom 1.2.sh @@ -1,4 +1,4 @@ download "http://gmagames.com/sod1208.exe" -install_wine_bottle vb6run dx8vb speechsdk +install_wine_bottle vb6run dx8vb wine "${cache}/sod1208.exe" /sp- /verysilent add_launcher "c:\Program Files\Shades of Doom 1.2\sod.exe" diff --git a/.install/Shades of Doom.sh b/.install/Shades of Doom.sh index 249b15e..b22c803 100644 --- a/.install/Shades of Doom.sh +++ b/.install/Shades of Doom.sh @@ -1,5 +1,5 @@ export winVer="win7" download "http://www.gmagames.com/sod20024.exe" -install_wine_bottle vb6run dx8vb speechsdk +install_wine_bottle vb6run dx8vb wine "${cache}/sod20024.exe" /silent add_launcher "c:\Program Files\Shades of Doom 2.0\sod.exe" diff --git a/.install/Shadow Line.sh b/.install/Shadow Line.sh index 4f02b80..88e49c8 100644 --- a/.install/Shadow Line.sh +++ b/.install/Shadow Line.sh @@ -1,6 +1,5 @@ -export version="7.7" 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" -install_wine "$version" "32" +# Uses wine64 (no speech API dependency) export winVer="win8" install_wine_bottle $wine "${cache}/shadowrine_fullvoice3.171.exe" /sp- & @@ -12,7 +11,7 @@ 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 -${wine}server -w +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" echo "Please set the language to English when the game opens." diff --git a/.install/Shooter.sh b/.install/Shooter.sh index 691dc73..c310908 100644 --- a/.install/Shooter.sh +++ b/.install/Shooter.sh @@ -1,8 +1,6 @@ export WINEARCH=win64 export winVer="win7" get_installer "shooter-win.zip" "https://brynify.itch.io/shooter" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/shooter" "${cache}/shooter-win.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; -add_launcher "c:\Program Files\shooter\shooter.exe" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/shooter" "${cache}/shooter-win.zip" +add_launcher "c:\Program Files\shooter\Shooter.exe" diff --git a/.install/Side Party.sh b/.install/Side Party.sh index 81099d8..a517d72 100644 --- a/.install/Side Party.sh +++ b/.install/Side Party.sh @@ -1,18 +1,17 @@ +# Source dialog interface wrapper +source "${0%/*}/../.includes/dialog-interface.sh" + export WINEARCH=win64 export winVer="win7" get_installer "sideparty-win.zip" "https://masonasons.itch.io/sideparty" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" \ "https://stormgames.wolfe.casa/downloads/SidePartySettings.dat" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/Side Party" "${cache}/sideparty-win.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/Side Party" "${cache}/sideparty-win.zip" add_launcher "c:\Program Files\Side Party\SideParty.exe" alert -sidePartyUser="$(dialog --ok-label "Continue" \ - --backtitle "Audiogame Manager" \ - --inputbox "Please enter a user name for Side Party score board:" -1 -1 --stdout)" +sidePartyUser="$(agm_inputbox "Side Party Installation" "Side Party Installation" "Please enter a user name for Side Party score board:" "")" mkdir -p "$WINEPREFIX/drive_c/Program Files/Side Party/masonasons.me/SideParty" -cp -v "${cache}/SidePartySettings.dat" "$WINEPREFIX/drive_c/Program Files/Side Party/masonasons.me/SideParty/settings.dat" +cp -fv "${cache}/SidePartySettings.dat" "$WINEPREFIX/drive_c/Program Files/Side Party/masonasons.me/SideParty/settings.dat" if [[ ${#sidePartyUser} -gt 3 ]]; then sed -i "s/Anonymous/${sidePartyUser}/" "$WINEPREFIX/drive_c/Program Files/Side Party/masonasons.me/SideParty/settings.dat" fi diff --git a/.install/Silver Dollar.sh b/.install/Silver Dollar.sh index 827e6a4..3b625b3 100644 --- a/.install/Silver Dollar.sh +++ b/.install/Silver Dollar.sh @@ -1,12 +1,12 @@ export winVer="win7" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) download "http://download.dracoent.com/Windows/SilverDollarSetup.exe" -install_wine_bottle speechsdk -cp -v "${cache}/SilverDollarSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" +install_wine_bottle +cp -fv "${cache}/SilverDollarSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/SilverDollarSetup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/SilverDollarSetup.exe" # warning warning warning: Do not change location, or installer will not function. # FIXME: Hacky, but it works. Install dotnet40 by itself so it actually doesn't hang. DISPLAY="" winetricks -q dotnet40 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. add_launcher "c:\Program Files\Draconis Entertainment\Silver Dollar\SilverDollarGui.exe" diff --git a/.install/Simple Fighter.sh b/.install/Simple Fighter.sh index 1f08087..c9f6faa 100644 --- a/.install/Simple Fighter.sh +++ b/.install/Simple Fighter.sh @@ -6,7 +6,6 @@ if [[ ! -r "${cache}/simple-fighter-sounds.7z" ]] && [[ ! -r "${cache}/sounds.7z mv "${cache}/sounds.7z" "${cache}/simple-fighter-sounds.7z" fi install_wine_bottle -7z x -o"$WINEPREFIX/drive_c/Program Files/simple fighter" "${cache}/simple fighter.exe" -7z x -o"$WINEPREFIX/drive_c/Program Files/simple fighter/sounds" "${cache}/simple-fighter-sounds.7z" -find "${WINEPREFIX}/drive_c/Program Files/bf" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/simple fighter" "${cache}/simple fighter.exe" +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/simple fighter/sounds" "${cache}/simple-fighter-sounds.7z" add_launcher "c:\Program Files\simple fighter\game.exe" diff --git a/.install/Skateboarder Pro.sh b/.install/Skateboarder Pro.sh index 944b4d6..6dec0e7 100644 --- a/.install/Skateboarder Pro.sh +++ b/.install/Skateboarder Pro.sh @@ -1,8 +1,7 @@ -download "https://tunmi13.com/projects/sb_pro_rw.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" +download "https://tunmi13.com/projects/sb_pro_rw.zip" export WINEARCH=win64 export winVer="win8" -export bottle=tunmi13-64bit +# No custom bottle - use standard wine64 path install_wine_bottle sapi -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/sb_pro_rw.zip" -find "${WINEPREFIX}/drive_c/Program Files/sb_pro_rw" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress unzip "Extracting Skateboarder Pro..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/sb_pro_rw.zip" add_launcher "c:\Program Files\sb_pro_rw\sb_pro.exe" diff --git a/.install/Sketchbook.sh b/.install/Sketchbook.sh index e5bf662..a7b50e6 100644 --- a/.install/Sketchbook.sh +++ b/.install/Sketchbook.sh @@ -1,8 +1,7 @@ export winVer="win7" download "http://sbyw.games/SBYW/SBYW.zip" "http://sbyw.games/SBYW/sounds.zip" "${nvdaControllerClientDll}" -install_wine_bottle speechsdk +install_wine_bottle mv -v "${cache}/sounds.zip" "${cache}/SBYW-sounds.zip" -unzip -d "$WINEPREFIX/drive_c/Program Files/sketchbook" "${cache}/SBYW.zip" -unzip -d "$WINEPREFIX/drive_c/Program Files/sketchbook" "${cache}/SBYW-sounds.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/sketchbook" "${cache}/SBYW.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/sketchbook" "${cache}/SBYW-sounds.zip" add_launcher "c:\Program Files\sketchbook\SBYW.exe" diff --git a/.install/Slender Lost Vision.sh b/.install/Slender Lost Vision.sh index 3b4f4ab..4ccd531 100644 --- a/.install/Slender Lost Vision.sh +++ b/.install/Slender Lost Vision.sh @@ -1,23 +1,5 @@ export winVer="win7" download "https://www.iamtalon.me/games/slender.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/slender.zip" -add_launcher "c:\Program Files\slender\slender.exe" - "Shooter") -export WINEARCH=win64 -export winVer="win7" -get_installer "shooter-win.zip" "https://brynify.itch.io/shooter" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" -install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/shooter" "${cache}/shooter-win.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; -add_launcher "c:\Program Files\shooter\shooter.exe" - "Skateboarder Pro") -download "https://tunmi13.com/projects/sb_pro_rw.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" -export WINEARCH=win64 -export winVer="win8" -export bottle=tunmi13-64bit -install_wine_bottle sapi -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/sb_pro_rw.zip" -find "${WINEPREFIX}/drive_c/Program Files/sb_pro_rw" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; -add_launcher "c:\Program Files\sb_pro_rw\sb_pro.exe" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/slender.zip" +add_launcher "c:\Program Files\slender\slender.exe" \ No newline at end of file diff --git a/.install/Smashathon.sh b/.install/Smashathon.sh index 48c652e..31dc0c8 100644 --- a/.install/Smashathon.sh +++ b/.install/Smashathon.sh @@ -1,5 +1,5 @@ -export bottle="l-works" +# Uses standard wine path based on architecture (win32/win64) download "https://agarchive.net/games/lworks/Smashathon0.02.zip" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files" "$cache/Smashathon0.02.zip" +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "$cache/Smashathon0.02.zip" add_launcher 'c:\Program Files\Smashathon0.02\smashathon.exe' diff --git a/.install/Sonic Zoom.sh b/.install/Sonic Zoom.sh index e78f2cc..02a29eb 100644 --- a/.install/Sonic Zoom.sh +++ b/.install/Sonic Zoom.sh @@ -1,18 +1,5 @@ export winVer="win7" download "http://wwwx.cs.unc.edu/Research/assist/et/projects/SonicZoom/soniczoom11.zip" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/soniczoom11.zip" -add_launcher "c:\Program Files\Sonic Zoom\SonicZoom.exe" - "Space Defender") -export WINEARCH="win64" -export winVer="win7" -download "http://tunmi13.ddns.net/projects/space_defender.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient64.dll" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/space_defender.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvdaControllerClient64.dll" "{}" \; -add_launcher "c:\Program Files\space_defender\sdefender.exe" - "Star Treck Final Conflict") -download "https://agarchive.net/games/USA/star%20trek%20final%20conflict%20Setup.exe" -install_wine_bottle speechsdk -wine "${cache}/star trek final conflict Setup.exe" /silent -add_launcher "c:\Program Files\USA Games\Final Conflict\stfc.exe" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/soniczoom11.zip" +add_launcher "c:\Program Files\Sonic Zoom\SonicZoom.exe" \ No newline at end of file diff --git a/.install/Sonic the Hedgehog.sh b/.install/Sonic the Hedgehog.sh index 5c041aa..63d4fa8 100644 --- a/.install/Sonic the Hedgehog.sh +++ b/.install/Sonic the Hedgehog.sh @@ -1,5 +1,5 @@ export winVer="win7" download "https://www.agarchive.net/games/jeqoconGames/sonic%20the%20hedgehog.7z" -install_wine_bottle speechsdk -7z x -o"$WINEPREFIX/drive_c/Program Files/Sonic the Hedgehog" "${cache}/sonic the hedgehog.7z" +install_wine_bottle +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/Sonic the Hedgehog" "${cache}/sonic the hedgehog.7z" add_launcher "c:\Program Files\Sonic the Hedgehog\sth.exe" diff --git a/.install/Space Defender.sh b/.install/Space Defender.sh new file mode 100644 index 0000000..6a45abb --- /dev/null +++ b/.install/Space Defender.sh @@ -0,0 +1,6 @@ +export WINEARCH="win64" +export winVer="win7" +download "http://tunmi13.ddns.net/projects/space_defender.zip" +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/space_defender.zip" +add_launcher "c:\Program Files\space_defender\sdefender.exe" \ No newline at end of file diff --git a/.install/Star Trek Final Conflict.sh b/.install/Star Trek Final Conflict.sh new file mode 100644 index 0000000..82038cf --- /dev/null +++ b/.install/Star Trek Final Conflict.sh @@ -0,0 +1,4 @@ +download "https://agarchive.net/games/USA/star%20trek%20final%20conflict%20Setup.exe" +install_wine_bottle +wine "${cache}/star trek final conflict Setup.exe" /silent +add_launcher "c:\Program Files\USA Games\Final Conflict\stfc.exe" \ No newline at end of file diff --git a/.install/Super Deekout.sh b/.install/Super Deekout.sh index 92f96e6..cb691b7 100644 --- a/.install/Super Deekout.sh +++ b/.install/Super Deekout.sh @@ -1,7 +1,7 @@ -export bottle=dan-z +# Uses standard wine path based on architecture (win32/win64) download "http://www.danielzingaro.com/superdeekout_setup.exe" "http://www.danielzingaro.com/sd_full.exe" install_wine_bottle vb6run dx8vb -${wine} "${cache}/superdeekout_setup.exe" & +wine "${cache}/superdeekout_setup.exe" & xdotool sleep 15 key --delay 100 y 2> /dev/null xdotool sleep 3 key --delay 250 alt+n 2> /dev/null xdotool key --delay 250 alt+a 2> /dev/null @@ -12,14 +12,14 @@ xdotool key --delay 250 alt+n 2> /dev/null xdotool key --delay 250 alt+i 2> /dev/null xdotool sleep 15 key --delay 250 alt+f 2> /dev/null xdotool sleep 3 key --delay 250 n 2> /dev/null -${wine}server -k -7z x -y -o"$WINEPREFIX/drive_c/Program Files/Super Deekout" "${cache}/sd_full.exe" +wineserver -k +install_with_progress 7z "Extracting game files..." x -y -o"$WINEPREFIX/drive_c/Program Files/Super Deekout" "${cache}/sd_full.exe" echo "Super Deekout needs some information before it will run:" alert read -erp "Please enter your first name: " fname read -erp "Please enter your last name: " lname read -erp "Please enter your email address: " email -${wine} "c:\Program Files\Super Deekout\config.exe" & +wine "c:\Program Files\Super Deekout\config.exe" & xdotool sleep 5 key --delay 100 Return 2> /dev/null xdotool sleep 3 type --clearmodifiers --delay 100 "${fname}" xdotool key --clearmodifiers --delay 100 Tab 2> /dev/null @@ -30,5 +30,5 @@ xdotool key --clearmodifiers --delay 100 Tab 2> /dev/null xdotool sleep 15 key --delay 100 u 2> /dev/null xdotool key --clearmodifiers --delay 100 Tab 2> /dev/null xdotool sleep 1 key --delay 250 Return 2> /dev/null -${wine}server -k +wineserver -k add_launcher "c:\Program Files\Super Deekout\super.exe" diff --git a/.install/Super Dogs Bone Hunt.sh b/.install/Super Dogs Bone Hunt.sh index 0ff58a1..87e51a1 100644 --- a/.install/Super Dogs Bone Hunt.sh +++ b/.install/Super Dogs Bone Hunt.sh @@ -1,4 +1,4 @@ download "http://www.pcs-games.net/SBH11.exe" -install_wine_bottle vb6run dx8vb speechsdk +install_wine_bottle vb6run dx8vb wine "${cache}/SBH11.exe" /sp- /silent add_launcher "c:\Program Files\SuperDog's Bone Hunt\sbh.exe" diff --git a/.install/Super Egg Hunt.sh b/.install/Super Egg Hunt.sh index ebd9979..bb1c16c 100644 --- a/.install/Super Egg Hunt.sh +++ b/.install/Super Egg Hunt.sh @@ -1,4 +1,4 @@ -export bottle="l-works" +# Uses standard wine path based on architecture (win32/win64) download "https://agarchive.net/games/lworks/super%20egg%20hunt+%20setup.exe" install_wine_bottle wine "${cache}/super egg hunt+ setup.exe" /silent diff --git a/.install/Super Liam.sh b/.install/Super Liam.sh index 2d47580..595b71f 100644 --- a/.install/Super Liam.sh +++ b/.install/Super Liam.sh @@ -1,4 +1,4 @@ -export bottle="l-works" +# Uses standard wine path based on architecture (win32/win64) download "http://files.l-works.net/superliamsetup.exe" install_wine_bottle vb6run dx8vb wine "${cache}/superliamsetup.exe" /silent diff --git a/.install/Super Mario Bros.sh b/.install/Super Mario Bros.sh index baccca8..77339b1 100644 --- a/.install/Super Mario Bros.sh +++ b/.install/Super Mario Bros.sh @@ -1,5 +1,5 @@ export winVer="win7" download "https://www.agarchive.net/games/jeqoconGames/super%20mario%20bros.7z" -install_wine_bottle speechsdk -7z x -o"$WINEPREFIX/drive_c/Program Files/Super Mario Bros" "${cache}/super mario bros.7z" +install_wine_bottle +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/Super Mario Bros" "${cache}/super mario bros.7z" add_launcher "c:\Program Files\Super Mario Bros\Mario.exe" diff --git a/.install/Swamp.sh b/.install/Swamp.sh index 7df53a6..26c0b54 100644 --- a/.install/Swamp.sh +++ b/.install/Swamp.sh @@ -1,17 +1,16 @@ -export bottle="aprone" -export winVer="win7" +export WINEARCH="win32" export winetricksSettings="vd=1024x768" -dialog --backtitle "Audiogame manager" --yesno "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?" -1 -1 --stdout +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=$? download "https://www.kaldobsky.com/audiogames/Swamp.zip" -install_wine_bottle dx8vb quartz corefonts vb6run speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/Swamp.zip" +install_wine_bottle dx8vb quartz vb6run +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/Swamp.zip" # make sure the latest version is installed. if curl -L --output "${cache}/SwampPatch.zip" "https://www.kaldobsky.com/audiogames/SwampPatch.zip" ; then - unzip -o -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPatch.zip" + install_with_progress unzip "Installing Swamp patch..." -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPatch.zip" fi -$wine 'c:\Program Files\swamp\checkup.exe' /verysilent -#$wine cmd.exe /c 'cd /d c:\Program Files\swamp && Windows32bit.bat' +wine 'c:\Program Files\swamp\Checkup.exe' /verysilent +#wine cmd.exe /c 'cd /d c:\Program Files\swamp && Windows64bit.bat' # Delete music if requested. if [[ $deleteMusic -eq 0 ]]; then rm -frv "$WINEPREFIX/drive_c/Program Files/swamp/sounds/Music/" diff --git a/.install/Tactical Battle.sh b/.install/Tactical Battle.sh index 14290ba..8fe3e51 100644 --- a/.install/Tactical Battle.sh +++ b/.install/Tactical Battle.sh @@ -1,6 +1,6 @@ download "https://blindgamers.com/downloads/Tactical%20Battle%20Dev.zip" -install_wine_bottle speechsdk +install_wine_bottle LC_ALL=C DISPLAY="" winetricks -q dotnet462 -${wine}server -k -unzip -d "$WINEPREFIX/drive_c/Program Files/Tactical Battle" "${cache}/Tactical Battle Dev.zip" +wineserver -k +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/Tactical Battle" "${cache}/Tactical Battle Dev.zip" add_launcher "c:\Program Files\Tactical Battle\Tactical Battle.exe" diff --git a/.install/Tarot Assistant.sh b/.install/Tarot Assistant.sh index 5430bfe..0bc63cc 100644 --- a/.install/Tarot Assistant.sh +++ b/.install/Tarot Assistant.sh @@ -1,7 +1,7 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "https://www.kaldobsky.com/audiogames/tarot.zip" -install_wine_bottle vb6run dx8vb speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/Tarot Assistant" "${cache}/tarot.zip" +install_wine_bottle vb6run dx8vb +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/Tarot Assistant" "${cache}/tarot.zip" wine "c:\Program Files\Tarot Assistant\Checkup.exe" /verysilent add_launcher "c:\Program Files\Tarot Assistant\TarotAssistant.exe" diff --git a/.install/Technoshock.sh b/.install/Technoshock.sh index 0b239c3..7344026 100644 --- a/.install/Technoshock.sh +++ b/.install/Technoshock.sh @@ -1,8 +1,8 @@ download "http://tiflocomp.ru/download/games/technoshock_140b_en.zip" "http://tiflocomp.ru/download/games/technoshock140b_en_update.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/technoshock_140b_en.zip" -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/technoshock_140b_en_update.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/technoshock_140b_en.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/technoshock_140b_en_update.zip" wine "$WINEPREFIX/drive_c/Program Files/setup_eng.exe" /silent -${wine}server -w +wineserver -w wine "$WINEPREFIX/drive_c/Program Files/setup_eng_update_pack.exe" /silent add_launcher "c:\Program Files\Tiflocomp Games\Technoshock\ts.exe" diff --git a/.install/Ten Pin Alley.sh b/.install/Ten Pin Alley.sh index 743f197..898d97c 100644 --- a/.install/Ten Pin Alley.sh +++ b/.install/Ten Pin Alley.sh @@ -1,13 +1,13 @@ export winVer="win7" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) download "http://download.dracoent.com/Windows/classic/TPAXPSetup.exe" -install_wine_bottle vb6run dx8vb speechsdk quartz -cp -v "${cache}/TPAXPSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" +install_wine_bottle vb6run dx8vb quartz +cp -fv "${cache}/TPAXPSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/TPAXPSetup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/TPAXPSetup.exe" #winetricks -q msdxmocx # I think having this installed first breaks things. # warning warning warning: Do not change location, or installer will not function. # FIXME: Hacky, but it works. Install dotnet20 by itself so it actually doesn't hang. winetricks -q dotnet20 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. add_launcher "c:\Program Files\Draconis Entertainment\Ten Pin Alley\tpa.exe" diff --git a/.install/The Blind Swordsman.sh b/.install/The Blind Swordsman.sh index a6fc2bc..bb9d720 100644 --- a/.install/The Blind Swordsman.sh +++ b/.install/The Blind Swordsman.sh @@ -1,4 +1,4 @@ download "https://www.agarchive.net/games/other/the%20blind%20swordsmanPC.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/the blind swordsmanPC.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/the blind swordsmanPC.zip" add_launcher "c:\Program Files\TheBlindSwordsman.exe" diff --git a/.install/The Great Toy Robbery.sh b/.install/The Great Toy Robbery.sh index 67f79b7..1aa381e 100644 --- a/.install/The Great Toy Robbery.sh +++ b/.install/The Great Toy Robbery.sh @@ -1,7 +1,5 @@ -export bottle="l-works" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" -download "http://files.l-works.net/tgtrsetup_2.04.exe" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" install_wine_bottle dsound directmusic wine "${cache}/tgtrsetup_2.04.exe" /silent -find "${WINEPREFIX}/drive_c/Program Files/Lworks/The Great Toy Robbery" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; add_launcher "c:\Program Files\Lworks\The Great Toy Robbery\tgtr.exe" diff --git a/.install/The Vale.sh b/.install/The Vale.sh index 212707c..039379a 100644 --- a/.install/The Vale.sh +++ b/.install/The Vale.sh @@ -2,7 +2,7 @@ get_installer "the-vale-win.zip" "https://falling-squirrel.itch.io/the-vale" export WINEARCH=win64 export winVer="win8" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/the-vale" "${cache}/the-vale-win.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/the-vale" "${cache}/the-vale-win.zip" # Weird work around to get keyboard working. winetricks -q usetakefocus=y winetricks -q usetakefocus=n diff --git a/.install/They'll Come from the Moon.sh b/.install/They'll Come from the Moon.sh index c339615..1fc466d 100644 --- a/.install/They'll Come from the Moon.sh +++ b/.install/They'll Come from the Moon.sh @@ -1,13 +1,11 @@ get_installer "theyll-come-from-the-moon-windows.zip" "https://soundrascal.itch.io/theyll-come-from-the-moon" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" export WINEARCH=win64 export winVer="win8" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/tcftm" "${cache}/theyll-come-from-the-moon-windows.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/tcftm" "${cache}/theyll-come-from-the-moon-windows.zip" # Weird work around to get keyboard working. winetricks -q usetakefocus=y winetricks -q usetakefocus=n -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; add_launcher "c:\Program Files\tcftm\They'll Come from the Moon!.exe" echo "When the game launches, press the enter key to load the game which will begin to speak." alert diff --git a/.install/Thief.sh b/.install/Thief.sh index 5a4f10a..c85bec1 100644 --- a/.install/Thief.sh +++ b/.install/Thief.sh @@ -1,6 +1,6 @@ -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "http://oriolgomez.com/games/thief_en.zip" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/thief" "${cache}/thief_en.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/thief" "${cache}/thief_en.zip" add_launcher "c:\Program Files\thief\game.exe" diff --git a/.install/Three D velocity.sh b/.install/Three D velocity.sh index 6a33f34..e086067 100644 --- a/.install/Three D velocity.sh +++ b/.install/Three D velocity.sh @@ -1,12 +1,10 @@ export winVer="win10" export WINEARCH=win64 export norh=false # Must install a voice, and rhvoice works easily with 64 bit. -download "https://github.com/munawarb/Three-D-Velocity-Binaries/archive/master.zip" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" -install_wine_bottle sapi vcrun2008 gdiplus xact dotnet48 xna40 +download "https://github.com/munawarb/Three-D-Velocity-Binaries/archive/master.zip" +install_wine_bottle sapi vcrun2008 gdiplus xact dotnet48 xna40 # Dotnet is evil. That is all. -# LC_ALL=C winetricks -q dotnet48 -# ${wine}server -k # Ha ha ha. -unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/master.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +# LC_ALL=C winetricks -q dotnet48 +# wineserver -k # Ha ha ha. +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files" "${cache}/master.zip" add_launcher "c:\Program Files\Three-D-Velocity-Binaries-master\tdv.exe" diff --git a/.install/Tomb Hunter.sh b/.install/Tomb Hunter.sh index f36e363..3e14666 100644 --- a/.install/Tomb Hunter.sh +++ b/.install/Tomb Hunter.sh @@ -1,5 +1,4 @@ download "http://masonasons.me/softs/th_freeware_password_is_tombhunter.7z" -install_wine_bottle speechsdk -7z x -o"$WINEPREFIX/drive_c/Program Files/Tomb Hunter" "${cache}/th_freeware_password_is_tombhunter.7z" -ptombhunter -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/Tomb Hunter" "${cache}/th_freeware_password_is_tombhunter.7z" -ptombhunter add_launcher "c:\Program Files\Tomb Hunter\th.exe" diff --git a/.install/Toy Mania.sh b/.install/Toy Mania.sh index 98cf068..623d1b9 100644 --- a/.install/Toy Mania.sh +++ b/.install/Toy Mania.sh @@ -2,6 +2,5 @@ export WINEARCH=win64 export winVer="win7" get_installer "ToyMania_windows_portable_password_is_GrateCollector.7z" "https://tsatria03.itch.io/toymania" install_wine_bottle -7z x -o"$WINEPREFIX/drive_c/Program Files/ToyMania" "${cache}/ToyMania_windows_portable_password_is_GrateCollector.7z" -pGrateCollector -find "${WINEPREFIX}/drive_c/Program Files/ToyMania" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/ToyMania" "${cache}/ToyMania_windows_portable_password_is_GrateCollector.7z" -pGrateCollector add_launcher "c:\Program Files\ToyMania\tm.exe" diff --git a/.install/Triple Triad.sh b/.install/Triple Triad.sh index 4e3bf6f..cad8175 100644 --- a/.install/Triple Triad.sh +++ b/.install/Triple Triad.sh @@ -1,7 +1,7 @@ -export bottle="aprone" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "https://www.kaldobsky.com/audiogames/tripletriad.zip" -install_wine_bottle vb6run dx8vb speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/Triple Triad" "${cache}/tripletriad.zip" +install_wine_bottle vb6run dx8vb +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/Triple Triad" "${cache}/tripletriad.zip" wine "c:\Program Files\Triple Triad\Checkup.exe" /verysilent add_launcher "c:\Program Files\Triple Triad\TripleTriad.exe" diff --git a/.install/Troopanum2.sh b/.install/Troopanum2.sh index 07db0e3..e010053 100644 --- a/.install/Troopanum2.sh +++ b/.install/Troopanum2.sh @@ -2,12 +2,12 @@ download "https://www.agarchive.net/games/bsc/Troopanum2Setup.exe" "https://www. install_wine_bottle vb6run dx8vb # FIXME: Hacky, but it works. Install dotnet35 by itself so it actually doesn't hang. winetricks -q dotnet35sp1 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. wine "${cache}/Troopanum2Setup.exe" /silent & xdotool sleep 10 key --clearmodifiers alt+y 2> /dev/null -sleep 30 && ${wine}server -k # Sometimes the installer finishes but the ${wine}server has more processes that don't exit, so we can't depend on ${wine}server -w. +sleep 30 && wineserver -k # Sometimes the installer finishes but the wineserver has more processes that don't exit, so we can't depend on wineserver -w. mkdir -p "$WINEPREFIX/drive_c/Program Files/bsc-key-generator" -7z x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z" +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z" echo "$USER"$'\n'"$(hostname)"$'\n'"none"$'\n'"US" > "$WINEPREFIX/drive_c/Program Files/Troopanum 2.0/config.dat" unix2dos "$WINEPREFIX/drive_c/Program Files/Troopanum 2.0/config.dat" if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then @@ -18,7 +18,7 @@ if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then xdotool sleep 1 key Shift+Tab sleep 1 key Return # FIXME: Kind of hacky, but let's make sure it actually exitted. sleep 5 - ${wine}server -k + wineserver -k wine "c:\Program Files\bsc-key-generator\BlindsoftwareUnlockCodeGenerator.exe" & xdotool sleep 10 key Return sleep 2 type t xdotool sleep 1 type t @@ -28,13 +28,13 @@ if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then regcode="$(xclip -selection clipboard -o)" # Might as well reuse the variable. # FIXME: Kind of hacky, but let's make sure it actually exitted since I can't find a good way to exit this program. sleep 5 - ${wine}server -k + wineserver -k wine "c:\Program Files\Troopanum 2.0\register.exe" & echo "$regcode" | xclip -selection clipboard xdotool sleep 10 key Return sleep 2 key Shift+Tab sleep 1 key Shift+Tab sleep 1 key Return # FIXME: Kind of hacky, but let's make sure it actually exitted. sleep 5 - ${wine}server -k + wineserver -k else echo "Warning: You need xclip and xdotool for this installer to finish the registration process, however, you don't have them. Either remove the program, install the stated tools, and reinstall it, or go on your own. Caveat Emptor, go to jail, do not pass go, do not collect audiogame rewards and all that stuff." fi diff --git a/.install/Tube Sim.sh b/.install/Tube Sim.sh index ad1221d..8f396b2 100644 --- a/.install/Tube Sim.sh +++ b/.install/Tube Sim.sh @@ -1,7 +1,7 @@ export winVer="win7" download "http://www.ndadamson.com/downloads/TubeSim1_1_Install.exe" -install_wine_bottle speechsdk +install_wine_bottle wine "${cache}/TubeSim1_1_Install.exe" /silent & xdotool sleep 10 key --clearmodifiers Return sleep 1 key alt+n sleep 1 key alt+a sleep 1 key alt+i sleep 10 key alt+f 2> /dev/null -${wine}server -w +wineserver -w add_launcher "c:\Program Files\NASoft\TubeSim\tsMain.exe" diff --git a/.install/Ultimate SounDoku.sh b/.install/Ultimate SounDoku.sh index 966c7fc..19fdcb9 100644 --- a/.install/Ultimate SounDoku.sh +++ b/.install/Ultimate SounDoku.sh @@ -1,12 +1,12 @@ export winVer="win7" -export bottle="draconis" +# Uses standard wine path based on architecture (win32/win64) download "http://download.dracoent.com/Windows/classic/USSetup.exe" -install_wine_bottle vb6run dx8vb speechsdk quartz -cp -v "${cache}/USSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" +install_wine_bottle vb6run dx8vb quartz +cp -fv "${cache}/USSetup.exe" "$WINEPREFIX/drive_c/windows/temp/" wine "c:/windows/temp/USSetup.exe" /sp- /silent rm -fv "$WINEPREFIX/drive_c/windows/temp/USSetup.exe" # warning warning warning: Do not change location, or installer will not function. # FIXME: Hacky, but it works. Install dotnet20 by itself so it actually doesn't hang. winetricks -q dotnet20 -${wine}server -k # Damn you, dotnet. +wineserver -k # Damn you, dotnet. add_launcher "c:\Program Files\Draconis Entertainment\Ultimate Soundoku\soundoku.exe" diff --git a/.install/Undead Assault.sh b/.install/Undead Assault.sh index f479af0..3b99723 100644 --- a/.install/Undead Assault.sh +++ b/.install/Undead Assault.sh @@ -1,6 +1,5 @@ export winVer="win7" download "http://undead-assault.com/static/files/public/undead_assault.zip" "${nvdaControllerClientDll}" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/undead_assault" "${cache}/undead_assault.zip" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/undead_assault" "${cache}/undead_assault.zip" add_launcher "c:\Program Files\undead_assault\Undead Assault.exe" diff --git a/.install/VIP Mud.sh b/.install/VIP Mud.sh index 380a7a0..7ddb9c1 100644 --- a/.install/VIP Mud.sh +++ b/.install/VIP Mud.sh @@ -1,10 +1,7 @@ -download "http://gmagames.com/vipmud20016.exe" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" export winVer="win7" -install_wine_bottle vb6run dx8vb speechsdk +install_wine_bottle vb6run dx8vb wine "${cache}/vipmud20016.exe" /silent mkdir -p "${HOME}/.local/wine/vip-mud/drive_c/users/${USER}/Documents/VIP Mud" -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvda2speechd32.dll" "{}" \; add_launcher "c:\Program Files\VIPMud 2.0\vipmud2.exe" echo echo "When you first launch VIP Mud You will be presented with several inaccessible dialogs." diff --git a/.install/Villains From Beyond.sh b/.install/Villains From Beyond.sh index 03eca82..2fc3a33 100644 --- a/.install/Villains From Beyond.sh +++ b/.install/Villains From Beyond.sh @@ -1,7 +1,6 @@ -export bottle="oriol-gomez" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "${ipfsGateway}/ipfs/QmWx271xuk3Mv9XTBoVu5BDJvXFZdasawC2nhtV21WAaUU?filename=villains_en.zip" -install_wine_bottle speechsdk -unzip -d "$WINEPREFIX/drive_c/Program Files/villains from beyond" "${cache}/villains_en.zip" -find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; +install_wine_bottle +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/villains from beyond" "${cache}/villains_en.zip" add_launcher "c:\Program Files\villains from beyond\game.exe" diff --git a/.install/Warsim.sh b/.install/Warsim.sh index 2fd7957..26cd8ba 100644 --- a/.install/Warsim.sh +++ b/.install/Warsim.sh @@ -2,5 +2,5 @@ get_installer "Warsim Full Game.zip" "https://huw2k8.itch.io/warsim" export WINEARCH=win64 export winVer="win7" install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/Warsim/" "${cache}/Warsim Full Game.zip" +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/Warsim/" "${cache}/Warsim Full Game.zip" add_launcher "c:\Program Files\Warsim\Warsim.exe" diff --git a/.install/Wave of the Undead.sh b/.install/Wave of the Undead.sh index cedfc3b..7158e70 100644 --- a/.install/Wave of the Undead.sh +++ b/.install/Wave of the Undead.sh @@ -1,6 +1,5 @@ export WINEARCH=win64 export winVer="win7" -download "https://dl.dropbox.com/scl/fi/ukvou0y4gwg21nhhdpj40/Wave-of-the-Undead-Setup.exe?rlkey=4xnuwicpmbkx6w2jo2i56mijg" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" install_wine_bottle wine "${cache}/Wave-of-the-Undead-Setup.exe" & xdotool sleep 20 key Alt+n sleep 2 key Alt+n sleep 2 key Alt+n @@ -8,6 +7,5 @@ wine "${cache}/Wave-of-the-Undead-Setup.exe" & xdotool sleep 20 key Alt+n xdotool sleep 2 key space xdotool sleep 2 key Alt+f - ${wine}server -w -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; + wineserver -w add_launcher "c:\Program Files (x86)\Wave Of The Undead\wave_of_the_undead.exe" diff --git a/.install/World of War.sh b/.install/World of War.sh index 0a12abf..0004f6b 100644 --- a/.install/World of War.sh +++ b/.install/World of War.sh @@ -1,6 +1,6 @@ -export bottle="nyanchan" +# Uses standard wine path based on architecture (win32/win64) export winVer="win7" download "https://www.agarchive.net/games/nyanchan/world%20of%20war%20English.7z" install_wine_bottle -7z x -o"$WINEPREFIX/drive_c/nyanchangame" "${cache}/world of war English.7z" +install_with_progress 7z "Extracting game files..." x -o"$WINEPREFIX/drive_c/nyanchangame" "${cache}/world of war English.7z" add_launcher "c:\nyanchangame\world of war English\world of war.exe" diff --git a/.install/haunted Party.sh b/.install/haunted Party.sh index 95090fc..e5c08ca 100644 --- a/.install/haunted Party.sh +++ b/.install/haunted Party.sh @@ -1,9 +1,7 @@ get_installer "hp.zip" "https://tunmi13.itch.io/haunted-party" -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" export WINEARCH=win64 export winVer="win8" -export bottle=tunmi13-64bit +# Uses standard wine path based on architecture (win32/win64) install_wine_bottle -unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/hp.zip" -find "${WINEPREFIX}/drive_c/Program Files/hp" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +install_with_progress unzip "Extracting game files..." -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/hp.zip" add_launcher "c:\Program Files\hp\hp.exe" diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..73e414e --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,216 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +**Critical**: Be sure to keep this file up to date with new changes. + +## Project Overview + +**Audiogame Manager** is a comprehensive bash-based installer and launcher system for Windows audio games running under Wine on Linux. The project focuses on accessibility, providing speech synthesis support and screen reader compatibility for audio games designed for blind and visually impaired users. + +## Architecture + +### Core Components + +- **Main Script**: `audiogame-manager.sh` - Entry point providing interactive menus for game installation, launching, and management with Wine32/64 bottle support +- **Includes Directory**: `.includes/` - Modular helper scripts containing core functionality + - `functions.sh` - Core utilities (download, cache management, validation, requirements checking) + - `dialog-interface.sh` - UI abstraction layer supporting both console (dialog) and GUI (yad) modes + - `bottle.sh` - Wine bottle management, RHVoice installation, and prefix management + - `checkup.sh` - System dependency validation + - `help.sh` - Documentation system + - `desktop.sh` - Desktop integration + - `update.sh` - Auto-update mechanisms +- **Game Scripts**: `game-scripts/` - Individual game update/launch scripts +- **Install Scripts**: `.install/` - Game installation scripts (100+ games supported) +- **Speech Integration**: `speech/` - TTS and accessibility tools + - `set-voice.sh` - Voice configuration with test functionality + - Supports multiple TTS engines (RHVoice, SAPI, Cepstral) + - Per-bottle voice configuration system + - NVDA screen reader compatibility through custom DLL +- **Wine Integration**: `wine/` - Wine setup utilities including bottle creation and dependency installation + - `mkwine.sh` - Wine bottle creation + - Distribution-specific dependency installers + +### 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/` +- **IMPORTANT**: Never create game-specific wine directories like `~/.local/winegamename` - use the standard bottle system + +### Interface System + +Dialog interface automatically detects environment: +- Console mode: Uses `dialog` for accessibility +- GUI mode: Uses `yad` when DISPLAY is available +- All UI functions are prefixed with `agm_` (audiogame manager) + +## Development Commands + +### System Check +```bash +./audiogame-manager.sh -c # Check system requirements and dependencies +bash -n audiogame-manager.sh # Basic syntax check +``` + +### Installation and Usage +```bash +./audiogame-manager.sh # Launch installed games menu +./audiogame-manager.sh -i # Install games (interactive menu) +./audiogame-manager.sh -I "Game Name" # Install a game noninteractively +./audiogame-manager.sh -h # Show help +``` + +### Wine Bottle Management +```bash +./wine/mkwine.sh [bottle_name] [architecture] # Create a new Wine bottle +``` + +### Voice and Speech Testing +```bash +./speech/set-voice.sh # Configure and test voice settings +./speech/set-voice.sh [bottle_name] # Configure voice for a specific bottle +``` + +### Dependency Management +```bash +# Check all required packages +./.includes/checkup.sh packages + +# Install Wine dependencies for different distros +./wine/install-dependencies-arch.sh +./wine/install-dependencies-debian.sh +``` + +### Testing All Include Files +```bash +for f in .includes/*.sh; do bash -n "$f"; done +``` + +## Key Patterns and Conventions + +### Coding Style - **EXTREMELY IMPORTANT - MUST BE FOLLOWED** + +- **Variables**: Use camelCase for variable names (e.g., `gameTitle`, `wineBottle`, `installPath`) + - **CRITICAL**: ALL variables must use camelCase - no exceptions + - Examples: `selectedGame`, `wineArch`, `installPath`, `downloadUrl` + - Never use: `selected_game`, `wine_arch`, `install_path`, `download_url` +- **Functions**: Use snake_case for function names (e.g., `install_game`, `create_wine_bottle`, `check_dependencies`) + - **CRITICAL**: ALL functions must use snake_case - no exceptions + - Examples: `get_wine_bottle()`, `process_launcher_flags()`, `download_file()` + - Never use: `getWineBottle()`, `processLauncherFlags()`, `downloadFile()` +- **Shebang**: Use `#!/bin/bash` for all bash scripts +- **Sourcing pattern**: + - **Main script** (`audiogame-manager.sh`): Use `source "${scriptDir}/.includes/file.sh"` (scriptDir is defined at line 4) + - **Subdirectory scripts** (game-scripts/, wine/, speech/): Use `source "${0%/*}/../.includes/file.sh"` + - **CRITICAL**: Never use relative paths like `source .includes/file.sh` - these fail when the current working directory differs from the script location +- **Indentation**: Use consistent indentation (tabs or spaces, follow existing file patterns) +- When fixing code, correct any indentation inconsistencies to match the established style + +### Error Handling +- Functions return 0 for success, non-zero for failure +- Use consistent exit codes throughout scripts +- Provide clear error messages with context +- Critical errors vs warnings are clearly distinguished in checkup system +- Progress feedback is provided for all long-running operations +- Always clean up temporary files on exit +- Log important operations for debugging + +### File Structure +- Game installers follow naming convention: `.install/Game Name.sh` + - **IMPORTANT**: Games starting with hash (#) are commented out even if it's a comment + - First line of a game installer may not start with # unless we're excluding it +- Cache directory: `~/.local/share/audiogame-manager/cache/` +- Wine bottles: `~/.local/wine32/` and `~/.local/wine64/` +- Custom bottles: `~/.local/share/audiogame-manager/wineBottles/` +- Configuration: `~/.config/audiogame-manager/` + +### UI Functions +All dialog functions in `.includes/dialog-interface.sh` follow pattern: +- `agm_menu()` - Selection menus +- `agm_msgbox()` - Message display +- `agm_yesno()` - Confirmation dialogs +- `agm_progressbox()` - Progress display +- Functions automatically adapt to console/GUI environment + +### Game Integration +- Each game has both an installer (`.install/`) and optional update script (`game-scripts/`) +- Games are categorized by engine type and requirements +- SAPI games automatically use Wine32, others use Wine64 +- Games are tracked in configuration files with Wine bottle associations +- Each game can use different Wine bottles with specific configurations + +### Game Installation Pattern +1. Check system requirements and dependencies +2. Create or verify Wine bottle +3. Install Wine dependencies via winetricks +4. Download and validate game files (use checksums when available) +5. Configure speech synthesis (typically RHVoice) +6. Add game entry to launcher configuration + +### Accessibility Features +- Sound alerts using `sox` for important notifications +- Screen reader compatibility through proper dialog usage +- Keyboard navigation support throughout interface +- Voice testing integrated into setup process + +## Dependencies + +### Critical (Required) +- wine, curl, dialog, sox +- Archive tools: 7z, cabextract, unzip, xz +- winetricks (for Wine component management) + +### Optional (Warnings if missing) +- gawk (for game removal) +- ocrdesktop (installer debugging) +- qjoypad (gamepad support) +- translate-shell, sqlite3, perl (translation features) +- w3m (documentation viewing) +- xclip, xdotool (X11 integration) + +### Platform Support +- x86_64 Linux (primary) +- aarch64 with FEX-Emu (alternative Wine implementation) + +## Testing +- System requirements: `./audiogame-manager.sh -c` +- Voice functionality: Use built-in voice test in `set-voice.sh` +- Game installation: Test with simple games first before complex ones +- Wine bottle integrity: Check `~/.local/wine32/system.reg` and `~/.local/wine64/system.reg` exist +- Test with different Wine versions when modifying bottle creation +- Verify speech synthesis functionality after TTS changes +- Test game installation scripts in clean environments +- Check both 32-bit and 64-bit compatibility where applicable + +## Recent Refactor Notes (2025) + +### Major Refactor Status +The project has undergone a significant refactor to modularize functionality. **Status: Largely Complete** + +### Key Fixes Applied +1. **Function naming**: Fixed `process_launcher-flags()` → `process_launcher_flags()` in `audiogame-manager.sh:270` +2. **Variable scope**: Added `export game` in main script so `.includes/bottle.sh` functions can access it +3. **Installation logic**: Completed the `-I` option implementation for noninteractive game installation +4. **Code deduplication**: Removed duplicate `check_news` and launcher logic from `update.sh` +5. **Include sourcing**: Fixed all relative path sourcing (e.g., `source .includes/bottle.sh`) to use `${scriptDir}` to ensure desktop launchers and execution from any working directory works correctly + +### Critical Variable Handling +- **`$game` variable**: Must be exported when set (line 489 in main script) for bottle.sh functions to work +- **`agmNoLaunch` variable**: Used to prevent main script execution when sourced by other scripts +- **Bottle names**: Derived from game names, converted to lowercase with spaces replaced by hyphens + +### Important Patterns +- **Noninteractive installation**: The `-I` option sources the appropriate `.install/GameName.sh` script +- **Variable scope**: Include files rely on exported variables from main script +- **Wine bottle logic**: Game-specific wine versions are handled in `bottle.sh:get_bottle()` + +### Common Issues to Watch For +1. **Variable exports**: Ensure variables are exported when needed by include files +2. **Function naming**: Use snake_case for functions, camelCase for variables +3. **Path quoting**: Always quote paths that might contain spaces +4. **Duplicate logic**: Check main script vs includes to avoid redundant code diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 65d2412..d615c1b 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -1,751 +1,168 @@ #!/usr/bin/env bash -license() { - cat << EOF - ■The contents of this file are subject to the Common Public Attribution - License Version 1.0 (the ■License■); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - https://opensource.org/licenses/CPAL-1.0. The License is based on the Mozilla Public License Version - 1.1 but Sections 14 and 15 have been added to cover use of software over a - computer network and provide for limited attribution for the Original - Developer. In addition, Exhibit A has been modified to be consistent with - Exhibit B. - - Software distributed under the License is distributed on an ■AS IS■ basis, - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - for the specific language governing rights and limitations under the - License. - - The Original Code is audiogame manager. - - The Original Developer is not the Initial Developer and is . If - left blank, the Original Developer is the Initial Developer. - - The Initial Developer of the Original Code is Billy "Storm Dragon" Wolfe. All portions of - the code written by Billy Wolfe are Copyright (c) 2020, 2024. All Rights - Reserved. - - Contributor Michael Taboada. - - Attribution Copyright Notice: Audiogame manager copyright 2020 Storm Dragon. All rights reserved. - - Attribution Phrase (not exceeding 10 words): A Stormux project - - Attribution URL: https://stormgames.wolfe.casa - - Graphic Image as provided in the Covered Code, if any. - - Display of Attribution Information is required in Larger - Works which are defined in the CPAL as a work which combines Covered Code - or portions thereof with code not governed by the terms of the CPAL. -EOF -} +# Get script directory for relative paths +scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Dialog accessibility export DIALOGOPTS='--no-lines --visit-items' +# Wine32 version for SAPI compatibility +wineThirtyTwoVersion="9.0" -# Alerts, for when user needs to read something. -alert() { - play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t - echo - read -rp "Press enter to continue." continue -} - -# Check for latest news -check_news() { - # For use by update scripts that want to source functions in this file. - [[ "$agmNoLaunch" == "true" ]] && return - trap return INT - # url for news file - local newsFile="https://stormgames.wolfe.casa/media/agm.ogg" - local newsPath="${configFile%/*.conf}/.news" - local newsTag="$(curl --connect-timeout 5 -sI "$newsFile" | grep -i '^etag: "' | cut -d '"' -f2)" - if [[ -z "${newsTag}" ]]; then - return - fi - local newsOldTag="$(cat "$newsPath" 2> /dev/null)" - if [[ "$newsTag" != "$newsOldTag" ]]; then - dialog --yes-label 'Play' \ - --no-label 'Later' \ - --backtitle 'Audiogame Manager News' \ - --yesno 'Audiogame manager news is available. Please use left and right arrows to navigate and enter to confirm.' -1 -1 || return - sox -qV0 "$newsFile" -d &> /dev/null - echo -n "$newsTag" > "$newsPath" - fi -} - -# Automatic update function -# Automatic update function -update() { - if ! [[ -d ".git" ]]; then - return - fi - local url="$(git ls-remote --get-url)" - if [[ "$url" =~ ^ssh://|git@|gitea@ ]] || [[ -z "$url" ]]; then - return - fi - git remote update &> /dev/null - local upstream='@{u}' - local home="$(git rev-parse @)" - local remote="$(git rev-parse "$upstream")" -if [[ "$home" == "$remote" ]]; then - return -fi - dialog --backtitle "Audiogame Manager" \ - --yesno "Updates are available. Would you like to update now?" -1 -1 --stdout || return - { git pull - git log '@{1}..' --pretty=format:'%an: %s' | tac; } - exit $? -} - -# Function to open urls across OS. -open_url() { - if [[ "$(uname)" == "Darwin" ]]; then - open "${*}" 2> /dev/null - else - xdg-open "${*}" 2> /dev/null - fi -} - -# Create desktop launcher file -desktop_launcher() { - local desktopFile="${HOME}/audiogame-manager.desktop" - if [[ -e "${desktopFile}" ]]; then - echo "the file ${desktopFile} exists. Cannot create the launcher." - exit 1 - fi - local dotDesktop - local terminal - # Try to find an accessible terminal - for i in mate-terminal lxterminal terminator gnome-terminal ; do - if command -v $i &> /dev/null ; then - terminal="$i" - break - fi - done - dotDesktop=('[Desktop Entry]' - 'Name=Audiogame manager' - 'GenericName=Audiogame Manager' - 'Comment=Play audio games' - "Exec=${terminal} -t \"Audiogame Manager\" -e \"/usr/bin/bash -c 'nohup $(readlink -e "$0") 2> /dev/null'\"" - 'Terminal=false' - 'Type=Application' - 'StartupNotify=false' - 'Keywords=game;' - 'Categories=Game;' - 'Version=1.0') - for i in "${dotDesktop[@]}" ; do - echo "$i" >> "${desktopFile}" - done - desktop-file-install --dir "${HOME}/.local/share/applications" -m 755 "${desktopFile}" - xdg-desktop-icon install ~/.local/share/applications/audiogame-manager.desktop - rm "${desktopFile}" - exit 0 -} - - -# Wine configuration section - -checklist() { - declare -a errorList - declare -a packageList - if [[ $# -eq 0 ]]; then - echo "Checking your system..." - echo - fi - if command -v wine &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Wine is installed." - else - errorList+=("Critical: Wine is not installed. You will not be able to play any games.") - fi - packageList+=("wine") - if command -v curl &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Curl is installed." - else - errorList+=("Critical: Curl is not installed. Critical functionality will not work.") - fi - packageList+=("curl") - if command -v dialog &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Dialog is installed." - else - errorList+=("Critical: Dialog is not installed. You will not be able to install, launch, or remove any games.") - fi - packageList+=("dialog") - for i in 7z cabextract unzip xz ; do - if command -v $i &> /dev/null ; then - [[ $# -eq 0 ]] && echo "${i^} is installed." - else - errorList+=("Critical: ${i^} is not installed. You will not be able to install some games or their components.") - fi - packageList+=("$i") - done - if command -v gawk &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Gawk is installed." - else - errorList+=("Warning: gawk is not installed. Game removal with -r will not work.") - fi - packageList+=("gawk") - if command -v ocrdesktop &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Ocrdesktop is installed." - else - errorList+=("Warning: ocrdesktop is not installed. It can help if the installer gets stuck to figure out what is happening.") - fi - packageList+=("ocrdesktop") - if command -v qjoypad &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Qjoypad is installed." - else - errorList+=("Warning: qjoypad is not installed. Qjoypad allows you to play keyboard only games with a gamepad.") - fi - packageList+=("qjoypad") - if command -v sox &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Sox is installed." - else - errorList+=("Warning: Sox is not installed. Audio will not work.") - fi - packageList+=("sox") - if command -v trans &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Translate-shell is installed." - else - errorList+=("Warning: translate-shell is not installed. Games that require translation will not be translated.") - fi - packageList+=("translate-shell") - if command -v sqlite3 &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Sqlite3 is installed." - else - errorList+=("Warning: sqlite is not installed. Required for games that need to be translated.") - fi - if command -v perl &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Perl is installed." - else - errorList+=("Warning: perl is not installed. Required for games that need to be translated.") - fi - packageList+=("perl") - packageList+=("sqlite") - if command -v w3m &> /dev/null ; then - [[ $# -eq 0 ]] && echo "W3m is installed." - else - errorList+=("Warning: w3m is not installed. W3m is used to view game documentation.") - fi - packageList+=("w3m") - if command -v xclip &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Xclip is installed." - else - errorList+=("Warning: Xclip is not installed. Some games may not speak or register properly.") - fi - packageList+=("xclip") - if command -v xdotool &> /dev/null ; then - [[ $# -eq 0 ]] && echo "Xdotool is installed." - else - errorList+=("Warning: Xdotool is not installed. Some installers may not work or may need manual intervention.") - fi - packageList+=("xdotool") - # Show the results - if [[ $# -ne 0 ]]; then - for i in "${packageList[@]}" ; do - echo "$i" - done | sort - exit 0 - fi - if [[ ${#errorList[@]} -eq 0 ]]; then - echo "No problems found, you are good to go." - exit 0 - fi - echo "Errors detected, here is a list along with the severity." - echo "Note that errors marked critical mean that you will not be able to install and play games until they are resolved." - for i in "${errorList[@]}" ; do - echo "$i" - done - exit 0 -} - -clear_cache() { - local answer - if [[ ! -d "${cache}" ]]; then - echo "No cache found at ${cache}." - return - fi - while ! [[ "${answer,,}" =~ ^yes$|^no$ ]]; do - echo "This will delete all contents of ${cache}. Are you sure you want to continue?" - echo "Please type yes or no." - echo - read -r answer - done - if [[ "$answer" == "no" ]]; then - return - fi - # All safety checks done. Delete the cache. - rm -rfv "${cache}" - echo "Cache deleted." -} - -download() { - local source=($@) - for i in "${source[@]}" ; do - local dest="${i##*/}" - dest="${dest//%20/ }" - dest="${dest#*\?filename=}" - dest="${dest%\?*}" - # Remove the destination file if it is empty. - [[ -s "${cache}/${dest}" ]] || rm -f "${cache}/${dest}" 2> /dev/null - if [[ "${redownload}" == "true" ]] && [[ -e "${cache}/${dest}" ]]; then - rm -v "${cache}/${dest}" - fi - # Skip if the item is in cache. - [[ -e "${cache}/${dest}" ]] && continue - { if ! curl -L4 -C - --retry 10 --output "${cache}/${dest}" "${i}" ; then - echo "Could not download \"$i\"..." - exit 1 - fi; } | dialog --backtitle "Audio Game Manager" \ - --progressbox "Downloading \"$dest\" from \"$i\"" -1 -1 - local downloadError=1 - case "${dest##*.}" in - "pk3"|"zip") - unzip -tq "${cache}/${dest}" | dialog --backtitle "Audio Game Manager" \ - --progressbox "Validating ${dest##*.} file" -1 -1 --stdout - downloadError=$? - ;; - "7z") - 7z t "${cache}/${dest}" | dialog --backtitle "Audio Game Manager" \ - --progressbox "Validating 7z file" -1 -1 --stdout - downloadError=$? - ;; - "exe") - # Check if it's a valid Windows executable by looking at the MZ header - hexdump -n 2 -v -e '/1 "%02X"' "${cache}/${dest}" | grep -q "4D5A" - downloadError=$? - ;; - "wad") - if [[ "$(file -b --mime-type "${cache}/${dest}")" != "application/octet-stream" ]]; then - downloadError=0 - fi - ;; - *) - # Add HTML check for other file types - if file -b "${cache}/${dest}" | grep -q "HTML document" ; then - echo "File not found: \"$i\" (HTML document probably 404)" - downloadError=1 - else - downloadError=0 - fi - ;; - esac - if [[ $downloadError -ne 0 ]]; then - rm -fv "${cache}/${dest}" - dialog --backtitle "Audio Game Manager" \ - --infobox "Error downloading \"${dest}\". Installation cannot continue." -1 -1 --stdout - alert - exit 1 - fi - done -} - -get_bottle() { - # Handles games that use the same wine bottle - case "${game}" in - # Aprone (Jeremy Kaldobsky) games. - "castaways"*) ;& - "castaways-2"*) ;& - "daytona-and-the-book-of-gold"*) ;& - "dog-who-hates-toast"*) ;& - "lunimals"*) ;& - "paw-prints"*) ;& - "penta-path"*) ;& - "preludeamals"*) ;& - "puzzle-divided"*) ;& - "rettou"*) ;& - "revelation"*) ;& - "swamp"*) ;& - "tarot-assistant"*) ;& - "triple-triad"*) - export WINEPREFIX="${HOME}/.local/wine/aprone" ;; - "bg-"*) export WINEPREFIX="${HOME}/.local/wine/bg";; - # draconis games - "esp-pinball-classic"*) ;& - "esp-pinball-extreme"*) ;& - "esp-pinball-party-pack"*) ;& - "silver-dollar"*) ;& - "monkey-business"*) ;& - "alien-outback"*) ;& - "dyna-man"*) ;& - "change-reaction"*) ;& - "ten-pin-alley"*) export WINEPREFIX="${HOME}/.local/wine/draconis";; - # l-works games group - "duck-hunt"*) ;& - "judgement-day"*) ;& - "lockpick"*) ;& - "pigeon-panic"*) ;& - "smashathon"*) ;& - "super-egg-hunt"*) ;& - "super-liam"*) ;& - "the-great-toy-robbery"*) export WINEPREFIX="${HOME}/.local/wine/l-works";; - # Nyanchan games group - "bokurano-daibouken"*) ;& - "laser-breakout"*) ;& - "marina-break"*) ;& - "mp5"*) ;& - "screaming-strike-2"*) ;& - "world-of-war"*) export WINEPREFIX="${HOME}/.local/wine/nyanchan";; - # Oriol Gomez games group - "bombercats"*) ;& - "copter-mission"*) ;& - "danger-on-the-wheel"*) ;& - "death-on-the-road"*) ;& - "fuck-that-bird"*) ;& - "hammer-of-glory"*) ;& - "insect-therapy"*) ;& - "rhythm-rage"*) ;& - "run-for-your-life"*) ;& - "thief"*) ;& - "villains-from-beyond"*) export WINEPREFIX="${HOME}/.local/wine/oriol-gomez";; - # pbgames group - "dark-destroyer"*) ;& - "PBGames TMP") export WINEPREFIX="$HOME/.local/wine/pbgames" ;; - # tunmi13 games group - "battle-of-the-hunter"*) ;& - "clashes-of-the-sky"*) ;& - "challenge-of-the-horse"*) export WINEPREFIX="${HOME}/.local/wine/tunmi13";; - # tunmi13-64bit games group - "battlefield-2d"*) ;& - "haunted-party"*) ;& - "skateboarder-pro"*) export WINEPREFIX="${HOME}/.local/wine/tunmi13-64bit";; - # Dan Z games group - "lost"*) ;& - "maze-craze"*) ;& - "super-deekout"*) - export norh="true" - export WINEPREFIX="$HOME/.local/wine/dan-z" - ;; - *) export WINEPREFIX="${HOME}/.local/wine/${game%|*}";; - esac - # Wine version for bottles - if [[ "$game" =~ entombed ]]; then - install_wine "6.18" "32" - fi - if [[ "$game" =~ rs-games ]]; then - install_wine "7.0" "32" - fi - if [[ "$game" =~ shadow-line ]]; then - install_wine "7.7" "32" - fi -} - -get_installer() { - trap "exit 0" SIGINT - # If the file is in cache nothing else needs to be done. - if [[ -f "${cache}/$1" ]]; then - return - fi - # Create message for dialog. - local message="Make sure $1 is available in either your Downloads or Desktop directory and press enter to continue." - if [[ -n "$2" ]]; then - message+="\n\nThe last good known URL for $game is:" - message+="\n$2" - fi - if echo "$2" | xclip -selection clipboard 2> /dev/null ; then - message+="\n\nThe URL has been copied to the clipboard." - fi - dialog --ok-label "Continue" \ - --backtitle "Audiogame Manager" \ - --msgbox "$message" -1 -1 - # Search the Desktop and Downloads directories for the installation file - for i in ~/Downloads ~/Desktop ; do - find $i -type f -name "$1" -exec cp -v {} "${cache}/" \; - done - # If the file is still not available abort. - if [[ ! -f "${cache}/$1" ]]; then - echo "couldn't find $1. Please download the file and try again." - exit 1 - fi -} - -get_steam() { - # Arguments: $1 id of item for download, $2 url for game - trap "exit 0" SIGINT - echo "manual intervention required." - alert - dialog --backtitle "Audiogame Manager" \ - --yes-label "Continue with Steam" \ - --no-label "Install manually" \ - --extra-button \ - --extra-label "Exit" \ - --yesno "To install the game manually, place files in \"${WINEPREFIX}/drive_c/Program Files/${game}\"" -1 -1 --stdout - case $? in - 0) echo "The next steps will install through steamcmd." ;; - 1) - mkdir -p "${WINEPREFIX}/drive_c/Program Files/${game}" - dialog --backtitle "Audiogame Manager" \ - --msgbox "Place game files in \"${WINEPREFIX}/drive_c/Program Files/${game}\" and press enter to continue." -1 -1 --stdout - return - ;; - *) exit 0 ;; - esac - # Check for steamcmd - if ! command -v steamcmd &> /dev/null ; then - dialog --backtitle "Audiogame Manager" \ - --infobox "This installer requires steamcmd. Please install steamcmd and try again." -1 -1 - exit 1 - fi - # Create message for dialog. - local message="Make sure ${game} is available in your Steam library and press enter to continue. The URL for ${game} is $2" - if echo "$2" | xclip -selection clipboard 2> /dev/null ; then - message+="\n\nThe URL has been copied to the clipboard." - fi - dialog --ok-label "Continue" \ - --backtitle "Audiogame Manager" \ - --msgbox "$message" -1 -1 - # Get Steam user name. - steamUser="$(dialog --ok-label "Continue" \ - --backtitle "Audiogame Manager" \ - --inputbox "Please enter your Steam user name:" -1 -1 --stdout)" - # Download the game - mkdir -p "${WINEPREFIX}/drive_c/Program Files/${game}" - steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir "${WINEPREFIX}/drive_c/Program Files/$game" +login "$steamUser" +app_update "$1" +quit || { dialog --backtitle "Audiogame Manager" \ - --infobox "Something went wrong. Please make sure you have a stable internet connection, and if the problem persists, contact audiogame-manager's developers." -1 -1 - exit 1; } -} - -help() { - echo "${0##*/}" - echo "Released under the terms of the Common Public Attribution License Version 1.0" - echo -e "This is a Stormux project: https://stormux.org\n" - echo -e "Usage:\n" - echo "With no arguments, open the game launcher." - for i in "${!command[@]}" ; do - echo "-${i/:/ }: ${command[${i}]}" - done | sort - echo - echo "Some settings that are often used can be stored in a settings.conf file." - echo "If wanted, place it at the following location:" - echo "${configFile%/*}/settings.conf" - echo "The syntax is variable=\"value\"" - echo - echo "ipfsGateway=\"https://ipfs.stormux.org\" # Gateway to be used for ipfs downloads." - echo "noCache=\"true\" # Do not keep downloaded items in the cache." - echo "noqjoypad=\"true\" # Do not launch qjoypad." - echo "norh=\"true\" # Do not install RHVoice." - echo "redownload=\"true\" # Redownload sources, do not use the version stored in cache." - echo "voiceName=\"voicename\" # Select the voice to be installed (default Bdl)." - echo "defaultVoice=\"voicename\" # Select the default voice to use for the bottle, e.g. MSMike or RHVoice." - echo "defaultRate=\"Default voice rate for the bottle, default 7, may not work in all games. Values 1-9 or A." - echo "winedebug=\"flag(s)\" # Set wine debug flags, useful for development." - exit 0 -} - -documentation() { - if [[ "$2" == "Become a Patron" ]]; then - return - fi - if [[ "$2" == "Donate" ]]; then - return - fi - if ! command -v w3m &> /dev/null ; then - echo "This feature of audiogame-manager requires w3m. Please install it before continuing." - exit 1 - fi - get_bottle "$1" -echo "Loading documentation, please wait..." - # Try to find documentation based on common naming conventions. - local gamePath="$(winepath -u "$2" 2> /dev/null)" - gamePath="${gamePath%/*}" - local gameDoc="$(find "$gamePath" -type f -iname 'user_manual.htm*' -or -iname 'user manual.htm*' -or -iname '*user guide.htm*' | head -1)" - # Game name specific docs, add the name to the for loop. - if [[ -z "$gameDoc" ]]; then - for i in "troopanum.txt" "superdeekout.txt" scw.html ; do - gameDoc="$(find "$gamePath" -type f -iname "$i" -or -iname 'manual.htm' | head -1)" - done - fi - if [[ -z "$gameDoc" ]]; then - gameDoc="$(find "$gamePath" -type f -path '*/Manual/index.html' | head -1)" - fi - if [[ -z "$gameDoc" ]]; then - gameDoc="$(find "$gamePath" -type f -iname '[A-Z]*Help.htm' -or -iname '[A-Z]*Help.html' | head -1)" - fi - if [[ -z "$gameDoc" ]]; then - gameDoc="$(find "$gamePath" -type f -iname 'manual.html' -or -iname 'manual.htm' | head -1)" - fi - if [[ -z "$gameDoc" ]]; then - gameDoc="$(find "$gamePath" -type f -iname 'en.html' -or -iname 'en.htm' | head -1)" - fi - if [[ -z "$gameDoc" ]]; then - gameDoc="$(find "$gamePath" -type f -iname 'readme.html' -or -iname 'readme.htm' | head -1)" - fi - if [[ -z "$gameDoc" ]]; then - gameDoc="$(find "$gamePath" -type f -iname 'manual.txt' | head -1)" - fi - if [[ -z "$gameDoc" ]]; then - gameDoc="$(find "$gamePath" -type f -iname 'readme.txt' -or -iname 'help.txt' | head -1)" - fi - if [[ -z "$gameDoc" ]]; then - gameDoc="$(find "$gamePath" -type f -iname '*.url' -exec grep -i 'url=' {} \; | grep -iv 'score' | head -1)" - gameDoc="${gameDoc#*=}" - gameDoc="${gameDoc//[[:cntrl:]]/}" - fi - # Display documentation if available. - if [[ -n "$gameDoc" ]]; then - w3m "$gameDoc" - else - echo "No documentation found." - fi - exit 0 -} - -install_wine() { - # Requires wine version, e.g. 7.7 and architecture, 32|64 - if [[ $# -ne 2 ]]; then - exit 1 - fi - # Figure out wineInstallationPath - wineInstallationPath="${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/wine_$2/$1" - export wine="${wineInstallationPath}/bin/wine" - # If the path exists, wine should already be installed. - # Just make sure we didn't wind up with a empty directory for some reason - rmdir "${wineInstallationPath}" 2> /dev/null - if [[ -d "${wineInstallationPath}" ]]; then - return - fi - mkdir -p "${wineInstallationPath}" 2> /dev/null - # This probably does not need to be cached, so download to tmp. - installationFile="$(mktemp)" - local v=$2 - v="${v/32/x86}" - v="${v/64/x64}" # Probably wrong, so just a place holder. - # If this goes wrong, bail out - set -e - { curl -L --output "${installationFile}" "https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/PlayOnLinux-wine-${1}-upstream-linux-${v}.tar.gz" - tar xf "${installationFile}" -C "${wineInstallationPath}"; } | dialog --progressbox "Installing $2 bit Wine version $1." -1 -1 - set +e -} - - -unix2dos() { - if [[ $# -eq 0 ]]; then - echo "Usage: unix2dos file(s)." - exit 1 - fi - for file in "${@}" ; do - sed -i 's/$/\r/' "${file}" - done -} - - -winetricks() { - # Report used packages to the winetricks maintainer so he knows they are being used. - if ! [[ -e "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/track_usage" ]]; then - mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/" - echo "1" > "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/track_usage" - fi - # Temporary work around for winetricks git bugs. Requires winetricks be installed from package manager. - /usr/bin/winetricks "$@" - return - # Download or update agm's copy of winetricks - if [[ ! -e "${winetricksPath}/winetricks" ]]; then - checkWinetricksUpdate="true" - download "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks" - mv "${cache}/winetricks" "${winetricksPath}" - chmod 755 "${winetricksPath}/winetricks" - else - if [[ "$checkWinetricksUpdate" != "true" ]]; then - checkWinetricksUpdate="true" - ${winetricksPath}/winetricks --self-update - fi - fi - # Run the requested winetricks parameters - if command -v FEXLoader &> /dev/null ; then - WINE="" FEXLoader -- ${winetricksPath}/winetricks "$@" - else - ${winetricksPath}/winetricks "$@" - fi -} - -install_rhvoice() { - if [[ -d "$HOME/.local/wine/${bottle}/drive_c/Program Files/Olga Yakovleva/" ]]; then - return - fi - if [[ "$norh" == "true" ]]; then - # Try to prevent the user from breaking speech - # Also useful for games that do not work with RHVoice - if [[ "${defaultVoice}" == "RHVoice" ]]; then - unset defaultVoice - fi - return - fi - declare -A RHVoice=( - [alan]="https://github.com/RHVoice/alan-eng/releases/download/4.0/RHVoice-voice-English-Alan-v4.0.2016.21-setup.exe" - [bdl]="https://github.com/RHVoice/bdl-eng/releases/download/4.1/RHVoice-voice-English-Bdl-v4.1.2016.21-setup.exe" - [clb]="https://github.com/RHVoice/clb-eng/releases/download/4.0/RHVoice-voice-English-Clb-v4.0.2016.21-setup.exe" - [lyubov]="https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Lyubov-v4.0.2008.15-setup.exe" - [slt]="https://github.com/RHVoice/slt-eng/releases/download/4.1/RHVoice-voice-English-Slt-v4.1.2016.21-setup.exe" - ) - voiceName="${voiceName:-bdl}" - voiceName="${voiceName,,}" - if [[ "${RHVoice[${voiceName}]}" == "" ]]; then - echo "Invalid RHVoice name specified, defaulting to Bdl." - voiceName="bdl" - fi - local voiceFile="${RHVoice[${voiceName}]##*/}" - download "${RHVoice[${voiceName}]}" - winetricks -q win8 - echo "Installing RHVoice ${voiceName^}..." - ${wine} "${cache}/${voiceFile}" & - sleep 20 - ${wine}server -k -} - -install_wine_bottle() { - # 32 bit installations work best and are the default here, if you need to override it, do it in the game specific installation steps. - export WINEARCH="${WINEARCH:-win32}" - # Figure out if we are using a specific version of wine - export wine="${wine:-$(command -v wine)}" - # Set the WINE and WINESERVER environmental variables so winetricks will use the right installation. - export WINE="${wine}" - export WINESERVER="${wine}server" - if [[ -z "$bottle" ]]; then - local bottle="${game,,}" - bottle="${bottle//[[:space:]]/-}" - if [[ -d "$HOME/.local/wine/${bottle}" ]]; then - echo "$HOME/.local/wine/${bottle} exists. Please remove it before running this installer." - exit 1 - fi - fi - export WINEPREFIX="$HOME/.local/wine/${bottle}" - # Arguments to the function are dependancies to be installed. - # Get location of mono and gecko. - monoPath="$(find /usr/share/wine/ -maxdepth 1 -type d -name mono 2> /dev/null)" - geckoPath="$(find /usr/share/wine/ -maxdepth 1 -type d -name "gecko" 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 - 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 - # This is in a brace list to pipe through dialog. - { echo -n "Using " - ${wine} --version - DISPLAY="" ${wine}boot -u - ${wine} msiexec /i z:"$monoPath" /quiet - ${wine} msiexec /i z:"$geckoPath" /quiet - if [[ "${*}" =~ (speechsdk|sapi) ]]; then - install_rhvoice +# 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" + + # 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 + echo "$wineThirtyTwoVersion" > "$versionFile" + echo "# Wine32 setup complete." + else + echo "# Failed to extract wine32. SAPI games may not work properly." + rm -rf "$wine32Dir" fi - if [[ "${WINEARCH}" == "win64" ]]; then - download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd" + } | agm_progressbox "Wine32 Setup" "Extracting Wine32 for SAPI compatibility..." + fi + + # Export wine32 path for bottle creation + if [[ -f "$wine32Dir/bin/wine" ]]; then + export wine32="$wine32Dir/bin/wine" + export wine32server="$wine32Dir/bin/wineserver" + fi +} + +# Ensure wine bottles exist with proper dependencies +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 - if [[ "${WINEARCH}" == "win64" ]] && [[ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd" ]]; then + "$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 + 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 + + # Setup nvda2speechd for accessibility + 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 - winetricks -q isolate_home $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 - # make it easy for game scripts to know which version of wine to use. - echo "WINE=\"${WINE}\"" > "$HOME/.local/wine/${bottle}/agm.conf" - echo "WINESERVER=\"${WINESERVER}\"" >> "$HOME/.local/wine/${bottle}/agm.conf" - # If default voice is set, change it for the bottle - if [[ ${#defaultVoice} -ge 2 ]] && [[ "${*}" =~ (speechsdk|sapi) ]]; then - echo "Setting default voice for bottle \"${bottle}\" to \"${defaultVoice}\"." - "${0%/*}/speech/set-voice.sh" -b "${bottle}" -r "${defaultRate:-7}" -v "${defaultVoice}" - fi + + echo "# Wine64 bottle creation complete." + } | agm_progressbox "Wine Bottle Setup" "Creating wine64 bottle for modern games..." + fi } @@ -757,7 +174,7 @@ game_installer() { # Create the menu of available games by reading from .install directory declare -a menuList # Get all .sh files from .install directory, excluding those starting with # as first line. - mapfile -t sortedGames < <(for f in "${0%/*}/.install/"*.sh; do + mapfile -t sortedGames < <(for f in "${scriptDir}/.install/"*.sh; do # Skip if first line starts with # [[ $(head -n1 "$f") == "#"* ]] && continue echo "${f##*/%.sh}" @@ -779,17 +196,13 @@ game_installer() { done # If all games are installed, exit if [[ ${#menuList[@]} -eq 0 ]]; then - echo "All games are already installed." + agm_msgbox "Audio Game Installer" "" "All games are already installed." exit 0 fi menuList+=("Donate" "Donate") menuList+=("Become a Patron" "Become a Patron") # Show game selection dialog - game="$(dialog --backtitle "Audio Game Installer" \ - --clear \ - --ok-label "Install" \ - --no-tags \ - --menu "Please select a game to install" 0 0 0 "${menuList[@]}" --stdout)" + game="$(agm_menu "Audio Game Installer" "Audio Game Installer" "Please select a game to install" "${menuList[@]}")" [[ $? -ne 0 ]] && exit 0 # Handle selection if [[ -n "$game" ]]; then @@ -804,14 +217,15 @@ game_installer() { ;; *) # Convert game name to filename format - local installScript="${0%/*}/.install/${game}.sh" + local installScript="${scriptDir}/.install/${game}.sh" # Check if install script exists if [[ -f "$installScript" ]]; then # Source and execute the install script source "$installScript" + # Show success message + agm_msgbox "Installation Complete" "Audio Game Installer" "Game \"${game}\" has been successfully installed." else - dialog --backtitle "Audio Game Installer" \ - --msgbox "Installation script not found for ${game}" -1 -1 + agm_msgbox "Audio Game Installer" "Audio Game Installer" "Installation script not found for ${game}" exit 1 fi ;; @@ -821,14 +235,11 @@ game_installer() { # remove games game_removal() { - if [[ "$(uname -m)" == "aarch64" ]]; then - export wine="${wine:-/usr/bin/wine}" - else - export wine="${wine:-/usr/bin/wine}" - fi + source "${scriptDir}/.includes/bottle.sh" + # Modern wine is unified - no architecture-specific wine executables needed mapfile -t lines < <(sed -e '/^$/d' -e '/^[[:space:]]*#/d' "${configFile}" 2> /dev/null) if [[ ${#lines} -eq 0 ]]; then - echo "No games found." + agm_msgbox "Audio Game Removal" "" "No games found." exit 0 fi # Create the menu of installed games @@ -840,11 +251,7 @@ game_removal() { menuList+=("Donate" "Donate") menuList+=("Become a Patron" "Become a Patron") local game - game="$(dialog --backtitle "Audio Game Removal" \ - --clear \ - --ok-label "Remove" \ - --no-tags \ - --menu "Please select a game to delete" 0 0 0 "${menuList[@]}" --stdout)" + game="$(agm_menu "Audio Game Removal" "Audio Game Removal" "Please select a game to delete" "${menuList[@]}")" if [[ ${#game} -gt 0 ]]; then if [[ "$game" == "Donate" ]]; then open_url "https://ko-fi.com/stormux" @@ -854,41 +261,53 @@ game_removal() { open_url "https://2mb.games/product/2mb-patron/" exit 0 fi + # Parse game info before create_game_array overwrites $game + local selectedGame="$game" local winePath="${game#*|}" export winePath="${winePath%\\*.exe}" local wineExec="${game#*|}" wineExec="${wineExec%|*}" wineExec="${wineExec##*\\}" - # Confirm removal - get_bottle "${game%|*}" - # Make sure the game can be handled by remove - if [[ "${HOME}/.local/wine/${game%|*}" == "${WINEPREFIX}" ]]; then - read -rp "To remove the wine bottle \"${WINEPREFIX##*/}\" and all of its contents press enter. To cancel press control+c. " continue + + # With shared bottles, always remove only the game files, never the entire bottle + create_game_array "$selectedGame" + if [[ ${#game[@]} -gt 0 ]]; then + # Set up wine environment for this game + source "${scriptDir}/.includes/bottle.sh" + get_bottle "${game[0]}" + + if ! agm_yesno "Confirm Removal" "Audio Game Removal" "Are you sure you want to remove \"${game[2]}\"?"; then + agm_msgbox "Audio Game Removal" "" "Removal cancelled." + exit 0 + fi + # kill any previous existing wineservers for this prefix in case they didn't shut down properly. - ${wine}server -k - # remove the game - rm -rf "${WINEPREFIX}" - else - read -rp "This bottle \"${WINEPREFIX##*/}\" contains multiple entries, so only the game will be removed. To continue press enter. To cancel press control+c. " continue - rm -rf "$(winepath "${winePath}")" + wineserver -k + + # Remove only the game's installation directory + if [[ -n "$winePath" ]]; then + local gameDir="$(winepath "$winePath")" + if [[ -d "$gameDir" ]]; then + rm -rfv "$gameDir" | agm_progressbox "Removing Game" "Removing \"${game[2]}\" files..." + else + agm_msgbox "Game Removal" "" "Game directory not found, skipping file removal." + fi + fi fi - # remove the launcher - gawk -i inplace -vLine="${game//\\/\\\\}" '!index($0,Line)' "$configFile" - echo "The selected item has been deleted." + # 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." fi exit 0 } # kill games that are stuck kill_game() { - if [[ "$(uname -m)" == "aarch64" ]]; then - export wine="${wine:-/usr/bin/wine}" - else - export wine="${wine:-/usr/bin/wine}" - fi + source "${scriptDir}/.includes/bottle.sh" + # Modern wine is unified - no architecture-specific wine executables needed mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null) if [[ ${#lines} -eq 0 ]]; then - echo "No games found." + agm_msgbox "Audio Game Killer" "" "No games found." exit 0 fi # Create the menu of installed games @@ -899,11 +318,7 @@ kill_game() { done menuList+=("Donate" "Donate") menuList+=("Become a Patron" "Become a Patron") - local game="$(dialog --backtitle "Audio Game Killer" \ - --clear \ - --ok-label "Kill" \ - --no-tags \ - --menu "Please select a game to force stop" 0 0 0 "${menuList[@]}" --stdout)" + local game="$(agm_menu "Audio Game Killer" "Audio Game Killer" "Please select a game to force stop" "${menuList[@]}")" if [[ ${#game} -gt 0 ]]; then if [[ "$game" == "Donate" ]]; then open_url "https://ko-fi.com/stormux" @@ -920,98 +335,92 @@ kill_game() { wineExec="${wineExec##*\\}" # kill the wine server. get_bottle "${game%|*}" - ${wine}server -k - echo "The selected game has been stopped." + wineserver -k + agm_msgbox "Audio Game Killer" "" "The selected game has been stopped." fi exit 0 } # for games that require custom scripts before launch or custom launch parameters custom_launch_parameters() { - if [[ "${game[0]}" == "dragon-pong" ]]; then - "${0%/*}/speech/speak_window_title.sh" DragonPong.exe & + if [[ "${game[2]}" == "Dragon Pong" ]]; then + "${scriptDir}/speech/speak_window_title.sh" DragonPong.exe & pushd "$(winepath "$winePath")" wine "$wineExec" popd exit 0 fi - if [[ "${game[0]}" == "executioner's-rage" ]]; then - find "${WINEPREFIX}/drive_c/Program Files" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; + if [[ "${game[2]}" == "Dreamland" ]]; then + "$WINE" "${game[1]}" &> /dev/null & + exit 0 fi - if [[ "${game[0]}" == "laser-breakout" ]]; then - "${0%/*}/speech/speak_window_title.sh" play.exe & + # executioner's-rage: DLL replacement now handled by update_nvda_dlls() + if [[ "${game[2]}" == "Laser Breakout" ]]; then + "${scriptDir}/speech/speak_window_title.sh" play.exe & fi - if [[ "${game[0]}" == "bokurano-daibouken-2" ]]; then - "${0%/*}/speech/clipboard_translator.sh" play.exe bokurano-daibouken2 & + if [[ "${game[2]}" == "Bokurano Daibouken 2" ]]; then + find "${WINEPREFIX}/drive_c/nyanchangame/bk2" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \; + "${scriptDir}/speech/clipboard_translator.sh" "play.exe" bokurano-daibouken2 & fi - if [[ "${game[0]}" == "bokurano-daibouken" ]]; then - "${0%/*}/speech/clipboard_translator.sh" play.exe bokurano-daibouken & + if [[ "${game[2]}" == "Bokurano Daibouken" ]]; then + find "${WINEPREFIX}/drive_c/nyanchangame/bk" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \; + "${scriptDir}/speech/clipboard_translator.sh" "play.exe" bokurano-daibouken & fi - if [[ "${game[0]}" =~ "bokurano-daibouken-3" ]]; then + if [[ "${game[2]}" == "Bokurano Daibouken 3" ]]; then dictPath="$(winepath "${winePath}")" if [[ -r "${cache}/bk3-dict.dat" ]] && [[ ! -d "${dictPath}/dict" ]]; then cp "${cache}/bk3-dict.dat" "${dictPath}/dict.dat" fi - if [[ -d "${dictPath}/dict" ]]; then - if [[ ! -e "${dictPath}/data/nvdaControllerClient.dll" ]]; then - cp "${cache}/nvda2speechd32.dll" "${dictPath}/data/nvdaControllerClient.dll" - fi - fi + # DLL replacement now handled by update_nvda_dlls() if [[ ! -d "${dictPath}/dict" ]] && [[ ! -r "${cache}/bk3-dict.dat" ]]; then find "${WINEPREFIX}/drive_c/nyanchangame/bk3" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \; - "${0%/*}/speech/clipboard_translator.sh" play.exe bokurano-daibouken3 & + "${scriptDir}/speech/clipboard_translator.sh" "play.exe" bokurano-daibouken3 & fi fi - if [[ "${game[0]}" == "bop-it-emulator" ]]; then - "${0%/*}/speech/speak_window_title.sh" bop.exe & + if [[ "${game[2]}" == "Bop It Emulator" ]]; then + "${scriptDir}/speech/speak_window_title.sh" bop.exe & fi - if [[ "${game[0]}" == "road-to-rage" ]]; then - "${0%/*}/speech/speak_window_title.sh" trtr.exe & + if [[ "${game[2]}" == "Road to Rage" ]]; then + "${scriptDir}/speech/speak_window_title.sh" trtr.exe & fi - if [[ "${game[0]}" == "sequence-storm" ]]; then - "${0%/*}/speech/clipboard_reader.sh" SequenceStorm & + if [[ "${game[2]}" == "Sequence Storm" ]]; then + "${scriptDir}/speech/clipboard_reader.sh" SequenceStorm & fi - #if [[ "${game[0]}" == "shadow-line" ]]; then + #if [[ "${game[2]}" == "Shadow Line" ]]; then #find "${WINEPREFIX}/drive_c/" -type f -name 'nvdaControllerClient.dll' -exec rm -v "{}" \; - #"${0%/*}/speech/clipboard_translator.sh" play_sr.exe shadow-line & + #"${scriptDir}/speech/clipboard_translator.sh" play_sr.exe shadow-line & #fi - if [[ "${game[0]}" == "sketchbook" ]]; then - find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \; - fi - if [[ "${game[0]}" == "audiodisc" ]]; then + # sketchbook: DLL replacement now handled by update_nvda_dlls() + if [[ "${game[2]}" == "Audiodisc" ]]; then wine "$winePath\\$wineExec" exit 0 fi - if [[ "${game[0]}" == "audioquake" ]]; then + if [[ "${game[2]}" == "Audioquake" ]]; then wine "$winePath\\$wineExec" exit 0 fi - if [[ "${game[0]}" == "screaming-strike-2" ]]; then + if [[ "${game[2]}" == "Screaming Strike 2" ]]; then pushd "$(winepath "$winePath")" - ${wine} "$wineExec" + wine "$wineExec" popd exit 0 fi - if [[ "${game[0]}" == "warsim" ]]; then + if [[ "${game[2]}" == "Warsim" ]]; then pushd "$(winepath "${game[1]%\\*}")" wine "${game[1]##*\\}" popd exit 0 fi - if [[ "${game[0]}" == "interceptor" ]]; then + if [[ "${game[2]}" == "Interceptor" ]]; then pushd "$(winepath "$winePath")" wine "$wineExec" popd exit 0 fi - if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then - # switch to wine64 for 64 bit prefix. - [[ "${wine}" == "/usr/bin/wine" ]] && export wine="/usr/bin/wine64" - fi } # Process game launcher flags -process_launcher-flags() { +process_launcher_flags() { flags=("${game[@]:3}") for i in "${flags[@]}" ; do if [[ "${i}" =~ ^export\ [a-zA-Z_][a-zA-Z0-9_]*=\'?.*\'?$ ]]; then @@ -1022,31 +431,80 @@ process_launcher-flags() { create_game_array() { # Game array 0 bottle, 1 path, 2 title, 3+ flags + game="$1" for i in "${lines[@]}" ; do - if [[ "${game}" =~ ^${i} ]]; then - # This is weird. Why do I have to set game to i before making the array? - game="$i" + # Only compare the launcher section + j="${game#*|}" + k="${i#*|}" + k="${k%%|*}" + if [[ "$j" == "$k" ]]; then IFS='|' read -ra game <<< "$i" break fi done } +# Update NVDA controller client DLLs in wine bottles +update_nvda_dlls() { + # Ensure we have the replacement DLLs + source "${scriptDir}/.includes/functions.sh" + download "${nvdaControllerClientDll}" "${nvdaControllerClient64Dll}" + + # 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") + replacement="${cache}/nvdaControllerClient32.dll" + ;; + "nvdacontrollerclient64.dll") + replacement="${cache}/nvdaControllerClient64.dll" + ;; + "nvdacontrollerclient.dll") + # Use file command to detect architecture + if file "$dllFile" | grep -q "PE32+"; then + replacement="${cache}/nvdaControllerClient64.dll" + elif file "$dllFile" | grep -q "PE32"; then + replacement="${cache}/nvdaControllerClient32.dll" + fi + ;; + esac + + if [[ -n "$replacement" ]] && [[ -f "$replacement" ]]; then + echo "Updating $dllFile with nvdaControllerClient" + cp "$replacement" "$dllFile" + 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 +} + # launch games that are installed game_launcher() { # For use by update scripts that want to source functions in this file. [[ "$agmNoLaunch" == "true" ]] && return - pgrep -u "$USER" nvda2speechd &> /dev/null || { - if [[ -x ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd ]]; then - if command -v FEXLoader &> /dev/null ; then - FEXLoader -- ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd &> /dev/null & - else - ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd &> /dev/null & - fi - fi; } + source "${scriptDir}/.includes/bottle.sh" + + # Start nvda2speechd if available + if [[ -x ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd ]]; then + ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd &> /dev/null & + fi + + # Replace NVDA controller client DLLs in wine64 bottle + update_nvda_dlls mapfile -t lines < <(sed -e '/^$/d' -e '/^ *#/d' "${configFile}" 2> /dev/null) if [[ ${#lines} -eq 0 ]]; then - echo "Install some games first." + agm_msgbox "Audio Game Launcher" "" "Install some games first." exit 0 fi if [[ $# -eq 0 ]]; then @@ -1059,24 +517,25 @@ game_launcher() { menuList+=("Donate" "Donate") menuList+=("Become a Patron" "Become a Patron") local game="" - game="$(dialog --backtitle "Audio Game Launcher" \ - --clear \ - --extra-button \ - --extra-label "Documentation" \ - --ok-label "Launch" \ - --no-tags \ - --menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)" + game="$(agm_menu "Audio Game Launcher" "Audio Game Launcher" "Please select a game to play" "${menuList[@]}")" local menuCode=$? if [[ $menuCode -eq 1 ]] || [[ $menuCode -eq 255 ]]; then exit 0 elif [[ $menuCode -eq 3 ]]; then - documentation "$game" "$(echo "$game" | cut -d '|' -f2)" + source "${scriptDir}/.includes/help.sh" # Make available in this function + documentation "$game" "$(echo "$game" | cut -d '|' -f2)" fi - create_game_array - else - create_game_array + + # Safety check: don't proceed if game is empty if [[ -z "$game" ]]; then - echo "Game $1 not found." + exit 0 + fi + + create_game_array "$game" + else + create_game_array "$game" + if [[ -z "$game" ]]; then + agm_msgbox "Audio Game Launcher" "" "Game $1 not found." exit 1 fi fi @@ -1090,16 +549,10 @@ game_launcher() { exit 0 fi get_bottle "${game[0]}" - # make sure wine is actually set to something - if [[ "$(uname -m)" == "aarch64" ]]; then - export wine="${wine:-/usr/bin/wine}" - else - export wine="${wine:-/usr/bin/wine}" - fi echo -n "launching " - ${wine} --version + wine --version # kill any previous existing wineservers for this prefix in case they didn't shut down properly. - ${wine}server -k + wineserver -k # launch the game if command -v qjoypad &> /dev/null ; then mkdir -p ~/.qjoypad3 @@ -1114,9 +567,16 @@ game_launcher() { fi fi fi - process_launcher-flags + process_launcher_flags custom_launch_parameters - ${wine:-/usr/bin/wine} start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime + if [[ "$debugGdb" == "1" ]]; then + # Change to game directory before launching + pushd "$(winepath "${game[1]%\\*}")" > /dev/null + winedbg --gdb "${game[1]##*\\}" + popd > /dev/null + else + wine start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime + fi fi exit 0 } @@ -1124,37 +584,21 @@ game_launcher() { # main script -#functions - -add_launcher() { - local launchSettings="${game,,}" - launchSettings="${launchSettings//[[:space:]]/-}|${1}|${game}" - shift - while [[ $# -gt 0 ]]; do - launchSettings+="|$1" - shift - done - if ! grep -F -q -x "${launchSettings}" "${configFile}" 2> /dev/null ; then - echo "${launchSettings}" >> "${configFile}" - sort -o "${configFile}" "${configFile}" - # Remove .lnk files because they don't work. - find ~/Desktop -type f -iname '*.lnk' -exec bash -c ' - for f ; do - mimeType="$(file -b "$f")" - mimeType="${mimeType%%,*}" - if [[ "$mimeType" == "MS Windows shortcut" ]]; then - rm -v "$f" - fi - done' _ {} + - if [[ "${noCache}" == "true" ]]; then - rm -f "${cache}/${1##*\\}" - fi - fi -} - trap "exit 0" SIGINT -# Check for updates -update + +# 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" +elif command -v yad &> /dev/null; then + dialogType="yad" +else + dialogType="dialog" +fi + +# Source dialog interface early for progress display +source "${scriptDir}/.includes/dialog-interface.sh" + # 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" @@ -1175,14 +619,11 @@ fi # Update the cache for older versions of audiogame-manager if [[ -d "${configFile%/*}/cache" ]]; then { mv -v "${configFile%/*}/cache/"* "${cache}" - rmdir -v "${configFile%/*}/cache/"; } | dialog \ - --backtitle "Audiogame Manager" --progressbox "Updating cache, please wait..." -1 -1 + rmdir -v "${configFile%/*}/cache/"; } | agm_progressbox "Audiogame Manager" "Updating cache, please wait..." fi checkWinetricksUpdate="false" # Turn off debug messages export WINEDEBUG="${winedebug:--all}" -# Compatibility with box86 -export BOX86_NOBANNER=1 # 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" @@ -1193,24 +634,32 @@ unset manualInstall unset version # ipfs gateway export ipfsGateway="${ipfsGateway:-https://ipfs.stormux.org}" -export nvdaControllerClientDll="${ipfsGateway}/ipfs/QmWu7YdSbKMk1Qm5DKvEA5hk1YuAK8wVkwhDf2CsmPkmF1?filename=nvdaControllerClient32.dll" +export nvdaControllerClientDll="${ipfsGateway}/ipfs/Qmd1JXdDoKJVnoaQssDiBgRpbgwKUwdJigiPw8iiYro3vt?filename=nvdaControllerClient32.dll" +export nvdaControllerClient64Dll="${ipfsGateway}/ipfs/QmcPoBTm6eCFF4R4uUc1of3rtrqMVx3HFN1U1jHosay8EX?filename=nvdaControllerClient64.dll" +export nvda2speechdBinary="${ipfsGateway}/ipfs/QmPxhoNsoFoJC7bCfioBBCcK8tEoSoYpm342z6u7KjFsVz?filename=nvda2speechd" + +# nvda2speechd server startup is now handled in game_launcher() -# Make sure the minimum of curl, sox, wine, and winetricks are installed or fex-emu on aarch64 -if [[ "$(uname -m)" == "aarch64" ]]; then - minimumDependencies=("FEXLoader") - wine="FEXLoader -- /usr/bin/wine" -else - minimumDependencies=("curl" "sox" "wine") -fi -for i in "${minimumDependencies[@]}" ; do - if ! command -v $i &> /dev/null ; then - echo "Please install $i before continuing." - exit 1 - fi -done +# Source helper functions +source "${scriptDir}/.includes/bottle.sh" # Also sourced in functions that need it +source "${scriptDir}/.includes/desktop.sh" +# dialog-interface.sh already sourced earlier +source "${scriptDir}/.includes/functions.sh" +source "${scriptDir}/.includes/help.sh" +source "${scriptDir}/.includes/update.sh" + +# Check minimum requirements +check_requirements || exit 1 +# Set up wine32 for SAPI games +check_wine32 +# Ensure wine bottles exist with dependencies +ensure_wine_bottles +# Check for updates +update # Get latest news if available check_news + # With no arguments, open the game launcher. if [[ $# -eq 0 ]]; then game_launcher @@ -1222,6 +671,7 @@ declare -A command=( [C]="Clear the cache. All game installers will be deleted." [D]="Create desktop shortcut. You can launch audiogame-manager from the desktop or applications menu." [d]="Debug mode, wine will be much more verbose when games are installed with this flag." + [g]="Debug with GDB. Launch game with winedbg --gdb for step-through debugging." [h]="This help screen." [i]="Install games." [I:]="Noninteractive game installation." @@ -1245,17 +695,21 @@ args="${!command[*]}" args="${args//[[:space:]]/}" while getopts "${args}" i ; do case "$i" in - c) checklist;; + c) "${scriptDir}/.includes/checkup.sh";; C) clear_cache;; D) desktop_launcher;; d) unset WINEDEBUG game_installer ;; + g) + debugGdb=1 + game_launcher;; h) help;; i) game_installer;; I) - game="${OPTARG}" + export game="${OPTARG}" + export noninteractiveInstall="true" break;; k) kill_game;; L) license;; @@ -1270,9 +724,8 @@ while getopts "${args}" i ; do r) game_removal;; S) defaultRate="${OPTARG}";; t) - gameCount=$(find .install -type f -iname "*.sh" | wc -l) - dialog --backtitle "Linux Game Manager" \ - --infobox "There are currently ${gameCount} games available." -1 -1 + gameCount=$(find "${scriptDir}/.install" -type f -iname "*.sh" | wc -l) + agm_infobox "Linux Game Manager" "Linux Game Manager" "There are currently ${gameCount} games available." exit 0 ;; v) voiceName="${OPTARG}";; @@ -1280,8 +733,22 @@ while getopts "${args}" i ; do esac done -[[ ${#game} -lt 1 ]] && exit 0 +# If agmNoLaunch is set, exit (script is being sourced) +[[ "$agmNoLaunch" == "true" ]] && exit 0 -[[ "$agmNoLaunch" != "true" ]] && winetricks sandbox +# Only proceed with noninteractive installation if explicitly requested +if [[ "$noninteractiveInstall" == "true" ]]; then + # If no game specified for noninteractive install, exit + [[ ${#game} -lt 1 ]] && exit 0 -[[ "$agmNoLaunch" != "true" ]] && exit 0 + # Install the specified game noninteractively + if [[ -f "${scriptDir}/.install/${game}.sh" ]]; then + export LANG="en_US.UTF-8" + . "${scriptDir}/.install/${game}.sh" + # Show success message + agm_msgbox "Installation Complete" "Audio Game Installer" "Game \"${game}\" has been successfully installed." + else + agm_msgbox "Audio Game Installer" "" "Error: Game '${game}' not found in .install directory" + exit 1 + fi +fi diff --git a/game-scripts/conjury-update.sh b/game-scripts/conjury-update.sh index 41a4e49..8592899 100755 --- a/game-scripts/conjury-update.sh +++ b/game-scripts/conjury-update.sh @@ -49,11 +49,11 @@ export WINEPREFIX="$HOME/.local/wine/conjury" # Make sure both nvda2speechd 64 and 32 bit are available. # This is needed to work around the change from 64 bit to 32 bit game. -download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd32.dll" +download "${nvdaControllerClient64Dll}" "${nvdaControllerClientDll}" # Now it should be as simple as running get_steam to redownload the game. get_steam 2684520 "https://store.steampowered.com/app/2684520/Conjury/" -find "$WINEPREFIX/drive_c/Program Files/Conjury" -type f -path '*/x86_64/nvdaControllerClient.dll' -exec cp -v "$cache/nvda2speechd64.dll" "{}" \; -find "$WINEPREFIX/drive_c/Program Files/Conjury" -type f -path '*/x86/nvdaControllerClient.dll' -exec cp -v "$cache/nvda2speechd32.dll" "{}" \; +find "$WINEPREFIX/drive_c/Program Files/Conjury" -type f -path '*/x86_64/nvdaControllerClient.dll' -exec cp -v "$cache/nvdaControllerClient64.dll" "{}" \; +find "$WINEPREFIX/drive_c/Program Files/Conjury" -type f -path '*/x86/nvdaControllerClient.dll' -exec cp -v "$cache/nvdaControllerClient32.dll" "{}" \; exit 0 diff --git a/game-scripts/crazy-party-build-games.sh b/game-scripts/crazy-party-build-games.sh index ce2d45c..eb06f58 100755 --- a/game-scripts/crazy-party-build-games.sh +++ b/game-scripts/crazy-party-build-games.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # âe contents of this file are subject to the Common Public Attribution # License Version 1.0 (the âcenseâ you may not use this file except in @@ -37,6 +37,10 @@ # Works which are defined in the CPAL as a work which combines Covered Code # or portions thereof with code not governed by the terms of the CPAL. + +# Source dialog interface wrapper +source "${0%/*}/../.includes/dialog-interface.sh" + for i in dialog unix2dos; do if ! command -v $i &> /dev/null ; then echo "Please install dialog and dos2unix before using this script." @@ -55,12 +59,7 @@ for i in "${gameList[@]}" ; do done unset gameList -gameList="$(dialog --clear \ - --no-tags \ - --ok-label "Add Games" \ - --separate-output \ - --backtitle "Select games to add to the $1 list." \ - --checklist "Press space to check or uncheck a selected game." 0 0 0 "${menuList[@]}" --stdout)" +gameList="$(agm_checklist "Crazy Party Game Builder" "Crazy Party Game Builder" "Press space to check or uncheck a selected game." "${menuList[@]}")" if [[ -z "${gameList}" ]]; then exit 0 @@ -70,5 +69,5 @@ mkdir -p "$HOME/.local/wine/crazy-party/drive_c/Program Files/Crazy-Party-beta73 echo "$gameList" >> "$HOME/.local/wine/crazy-party/drive_c/Program Files/Crazy-Party-beta73/game/${1}.txt" sort -uno "$HOME/.local/wine/crazy-party/drive_c/Program Files/Crazy-Party-beta73/game/${1}.txt" "$HOME/.local/wine/crazy-party/drive_c/Program Files/Crazy-Party-beta73/game/${1}.txt" eunix2dos "$HOME/.local/wine/crazy-party/drive_c/Program Files/Crazy-Party-beta73/game/${1}.txt" -dialog --infobox "Game list \"$1\" updated." 10 80 +agm_infobox "Crazy Party Game Builder" "Crazy Party Game Builder" "Game list \"$1\" updated." exit 0 diff --git a/game-scripts/crazy-party-update.sh b/game-scripts/crazy-party-update.sh index d8faeb6..a315068 100755 --- a/game-scripts/crazy-party-update.sh +++ b/game-scripts/crazy-party-update.sh @@ -37,6 +37,10 @@ # Works which are defined in the CPAL as a work which combines Covered Code # or portions thereof with code not governed by the terms of the CPAL. + +# Source dialog interface wrapper +source "${0%/*}/../.includes/dialog-interface.sh" + newVersion=82 WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local}/wine/crazy-party" @@ -64,10 +68,10 @@ url="http://pragmapragma.free.fr/crazy-party/Crazy-Party-beta${newVersion}.zip" wget -O "${cache}/Crazy-Party-beta${newVersion}.zip" "$url" || { echo "Could not download file."; exit 1; } unzip -DDod "${WINEPREFIX}/drive_c/Program Files" "${cache}/Crazy-Party-beta${newVersion}.zip" find "${WINEPREFIX}" -type f -name 'Tolk.dll' -exec cp -v "${cache}/Tolk.dll" "{}" \; -find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; +find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvdaControllerClient64.dll" "{}" \; sed -i "s/Crazy-Party-beta${oldVersion}/Crazy-Party-beta${newVersion}/" "$configFile" cp -v "${WINEPREFIX}/drive_c/Program Files/Crazy-Party-beta${oldVersion}/save.bin" "$HOME/.local/wine/crazy-party/drive_c/Program Files/Crazy-Party-beta${newVersion}/" cp -ruv "${WINEPREFIX}/drive_c/Program Files/Crazy-Party-beta${oldVersion}/"* "$HOME/.local/wine/crazy-party/drive_c/Program Files/Crazy-Party-beta${newVersion}/" 2> /dev/null -rm -rf "${WINEPREFIX}/drive_c/Program Files/Crazy-Party-beta${oldVersion}/") | dialog --progressbox "updating Crazy Party, please wait..." -1 -1 +rm -rf "${WINEPREFIX}/drive_c/Program Files/Crazy-Party-beta${oldVersion}/") | agm_progressbox "Crazy Party Update" "Updating Crazy Party, please wait..." exit 0 diff --git a/game-scripts/mist_world_account_creator.sh b/game-scripts/mist_world_account_creator.sh index 3fb1f99..370b5de 100755 --- a/game-scripts/mist_world_account_creator.sh +++ b/game-scripts/mist_world_account_creator.sh @@ -2,8 +2,17 @@ export DISPLAY="${DISPLAY:-:0}" -read -rp "Select create account from the menu, press enter to continue." continue -echo +# Source dialog interface for cross-platform compatibility +source "${0%/*}/../.includes/dialog-interface.sh" + +# Detect dialog interface type +if [[ -z "$DISPLAY" ]]; then + dialogType="dialog" +else + dialogType="yad" +fi + +agm_msgbox "Mist World Account Creator" "" "Select create account from the menu, then press OK to continue." # Read email address echo "Enter email address:" diff --git a/game-scripts/rettou-update.sh b/game-scripts/rettou-update.sh index d9b1920..f47bd21 100755 --- a/game-scripts/rettou-update.sh +++ b/game-scripts/rettou-update.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # âe contents of this file are subject to the Common Public Attribution # License Version 1.0 (the âcenseâ you may not use this file except in @@ -37,6 +37,10 @@ # Works which are defined in the CPAL as a work which combines Covered Code # or portions thereof with code not governed by the terms of the CPAL. + +# Source dialog interface wrapper +source "${0%/*}/../.includes/dialog-interface.sh" + cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager" updateURL="https://www.kaldobsky.com/audiogames" updateFiles=("rettou.zip") @@ -47,7 +51,7 @@ for i in "${updateFiles[@]}" ; do rm -fv "${cache}/${i}" curl -L4 -C - --retry 10 --output "${cache}/$i" "${updateURL}/$i" unzip -o -d ~/".local/wine/aprone/drive_c/Program Files/rettou" "${cache}/${i}" -done | dialog --progressbox "Updating Rettou, please wait..." -1 -1 +done | agm_progressbox "Rettou Update" "Updating Rettou, please wait..." exit 0 diff --git a/game-scripts/scramble-update.sh b/game-scripts/scramble-update.sh index 2bd3a77..d098566 100755 --- a/game-scripts/scramble-update.sh +++ b/game-scripts/scramble-update.sh @@ -37,11 +37,15 @@ # Works which are defined in the CPAL as a work which combines Covered Code # or portions thereof with code not governed by the terms of the CPAL. + +# Source dialog interface wrapper +source "${0%/*}/../.includes/dialog-interface.sh" + cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager" url="https://stevend.net/downloads/scramble_win32.zip" (rm -v "${cache}/scramble_win32.zip" wget -O "${cache}/scramble_win32.zip" "$url" || { echo "Could not download file."; exit 1; } unzip -DDod "$HOME/.local/wine/scramble!/drive_c/Program Files" "${cache}/scramble_win32.zip" -find ~/".local/wine/scramble!" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;) | dialog --progressbox "updating Scramble!, please wait..." -1 -1 +find ~/".local/wine/scramble!" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;) | agm_progressbox "Scramble Update" "Updating Scramble!, please wait..." exit 0 diff --git a/game-scripts/swamp-update.sh b/game-scripts/swamp-update.sh index d494af5..fbf397e 100755 --- a/game-scripts/swamp-update.sh +++ b/game-scripts/swamp-update.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # âe contents of this file are subject to the Common Public Attribution # License Version 1.0 (the âcenseâ you may not use this file except in @@ -37,19 +37,23 @@ # Works which are defined in the CPAL as a work which combines Covered Code # or portions thereof with code not governed by the terms of the CPAL. + +# Source dialog interface wrapper +source "${0%/*}/../.includes/dialog-interface.sh" + cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager" updateURL="https://www.kaldobsky.com/audiogames" updateFiles=("SwampPatch.zip") -dialog --backtitle "Audiogame manager" --yesno "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?" -1 -1 --stdout +agm_yesno "Swamp Update" "Swamp Update" "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=$? # Back up configuration files. for i in losers.txt muted.txt scriptkeys.txt keyconfig.ini ; do cp -v ~/".local/wine/aprone/drive_c/Program Files/swamp/${i}" ~/".local/wine/aprone/drive_c/Program Files/swamp/${i}.agm" echo "${i} backed up as ${i}.agm" -done | dialog --progressbox "Backing up configuration files. They can be found in your swamp directory." -1 -1 +done | agm_progressbox "Swamp Update" "Backing up configuration files. They can be found in your swamp directory." sleep 3 @@ -57,7 +61,7 @@ sleep 3 for i in "${updateFiles[@]}" ; do wget -O "${cache}/$i" "${updateURL}/$i" unzip -o -d ~/".local/wine/aprone/drive_c/Program Files/swamp" "${cache}/${i}" -done | dialog --progressbox "Updating Swamp, please wait..." -1 -1 +done | agm_progressbox "Swamp Update" "Updating Swamp, please wait..." # Delete music if requested. if [[ $deleteMusic -eq 0 ]]; then diff --git a/speech/clipboard_translator.sh b/speech/clipboard_translator.sh index d5ab82d..b675a2e 100755 --- a/speech/clipboard_translator.sh +++ b/speech/clipboard_translator.sh @@ -7,13 +7,20 @@ # set -Eeuo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/#:~:text=set%20%2Du,is%20often%20highly%20desirable%20behavior. shopt -s expand_aliases +# Debug logging +#DEBUG_LOG="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager/translator-debug.log" +#exec 2>>"$DEBUG_LOG" +#echo "=== Translator started at $(date) ===" >&2 +#echo "Args: $@" >&2 +#set -x + if [[ $# -ne 2 ]]; then echo "Usage: $0 \"application name\" \"file name\"." exit 1 fi # Wait for the application to start -while ! pgrep -u "$USER" ^$1 &> /dev/null ; do +while ! pgrep -f -u "$USER" "$1" &> /dev/null ; do sleep 0.05 done @@ -39,24 +46,24 @@ fi # Define a function to safely query the database query_database() { - local db_file="$1" - local sql_query="$2" - sqlite3 -line "$db_file" "$sql_query" + local dbFile="$1" + local sqlQuery="$2" + sqlite3 -line "$dbFile" "$sqlQuery" } # Define a function to safely insert into the database insert_database() { - local db_file="$1" + local dbFile="$1" local text="$2" local translation="$3" # Use sqlite3 .import feature which is more robust for special characters - echo "$text|$translation" | sqlite3 -separator "|" "$db_file" ".import /dev/stdin temp_import" - sqlite3 "$db_file" "INSERT OR IGNORE INTO translations SELECT * FROM temp_import; DROP TABLE IF EXISTS temp_import;" + echo "$text|$translation" | sqlite3 -separator "|" "$dbFile" ".import /dev/stdin temp_import" + sqlite3 "$dbFile" "INSERT OR IGNORE INTO translations SELECT * FROM temp_import; DROP TABLE IF EXISTS temp_import;" } # Read so long as the application is running -while pgrep -u "$USER" ^$1 &> /dev/null ; do +while pgrep -f -u "$USER" "$1" &> /dev/null ; do sleep 0.05 text="$(xclip -d "${DISPLAY:-:0}" -selection clipboard -o 2> /dev/null)" if [[ -f ~/.agmsilent ]]; then @@ -77,32 +84,40 @@ while pgrep -u "$USER" ^$1 &> /dev/null ; do # Normalize different unicode space characters to the same space # https://stackoverflow.com/a/43640405 - alias normalize_spaces="perl -CSDA -plE 's/[^\\S\\t]/ /g'" - alias normalize_unicode="normalize_spaces | nfc" + alias normalizeSpaces="perl -CSDA -plE 's/[^\\S\\t]/ /g'" + alias normalizeUnicode="normalizeSpaces | nfc" # Normalize text - normalized_text="$(echo "$text" | normalize_unicode)" + normalizedText="$(echo "$text" | normalizeUnicode)" # Create a temporary database for import sqlite3 "$translationFile" "CREATE TABLE IF NOT EXISTS temp_import(text TEXT, translation TEXT);" # Check if we already have a translation - translated=$(sqlite3 "$translationFile" "SELECT translation FROM translations WHERE text = '$normalized_text' LIMIT 1;" 2>/dev/null) - + translated=$(sqlite3 "$translationFile" "SELECT translation FROM translations WHERE text = '$normalizedText' LIMIT 1;" 2>/dev/null) + echo "DEBUG: Database lookup result: '$translated'" >&2 + if [[ -z "$translated" ]]; then + echo "DEBUG: No cached translation, calling trans command" >&2 # Get translation from the trans utility - translated="$(trans -no-autocorrect -no-warn -brief "$normalized_text" | head -1 | sed 's/\s*$//' | normalize_unicode)" - + translated="$(trans -no-autocorrect -no-warn -brief "$normalizedText" | head -1 | sed 's/\s*$//' | normalizeUnicode)" + echo "DEBUG: trans returned: '$translated'" >&2 + if [[ -n "$translated" ]]; then # Insert using echo piping to avoid escaping issues - echo "$normalized_text|$translated" | sqlite3 -separator "|" "$translationFile" ".import /dev/stdin temp_import" + echo "$normalizedText|$translated" | sqlite3 -separator "|" "$translationFile" ".import /dev/stdin temp_import" sqlite3 "$translationFile" "INSERT OR IGNORE INTO translations SELECT * FROM temp_import; DELETE FROM temp_import;" + echo "DEBUG: Saved to database" >&2 fi fi - + # If we got a translation, speak it if [[ -n "$translated" ]]; then + echo "DEBUG: Speaking translation: '$translated'" >&2 spd-say -- "$translated" + else + echo "DEBUG: No translation available, speaking original: '$text'" >&2 + spd-say -- "$text" fi # Clear clipboard diff --git a/speech/install_cepstral.sh b/speech/install_cepstral.sh index 2f971a5..3e33838 100755 --- a/speech/install_cepstral.sh +++ b/speech/install_cepstral.sh @@ -8,6 +8,16 @@ # Dialog accessibility export DIALOGOPTS='--no-lines --visit-items' + +# Detect dialog interface type BEFORE potentially setting DISPLAY +if [[ -z "$DISPLAY" ]]; then + dialogType="dialog" +else + dialogType="yad" +fi + +# Source dialog interface wrapper +source "${0%/*}/../.includes/dialog-interface.sh" # Turn off debug messages export WINEDEBUG="-all" # Make sure display is set in case installed from console. @@ -21,9 +31,9 @@ prefix="https://www.cepstral.com/downloads/installers/windows/" register() { local v="$1" - company="$(dialog --clear --inputbox "Company name (leave empty if none)" -1 -1 --stdout)" || exit $? - customer="$(dialog --clear --inputbox "Customer name" -1 -1 --stdout)" || exit $? - key="$(dialog --clear --inputbox "License key" -1 -1 --stdout)" || exit $? + company="$(agm_inputbox "Install Cepstral" "Install Cepstral" "Company name (leave empty if none)" "")" || exit $? + customer="$(agm_inputbox "Install Cepstral" "Install Cepstral" "Customer name" "")" || exit $? + key="$(agm_inputbox "Install Cepstral" "Install Cepstral" "License key" "")" || exit $? eval "wine \"c:\\Program Files\\Cepstral\\bin\\swift.exe\" --reg-voice --voice-name \"$v\" --customer-name \"$customer\" --company-name \"$company\" --license-key \"$key\"" exit 0 } @@ -75,10 +85,7 @@ 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)" +export WINEPREFIX="$(agm_menu "Install Cepstral" "Install Cepstral" "Select A Wine Bottle" "${bottle[@]}")" if [[ -z "${WINEPREFIX}" ]]; then @@ -90,10 +97,7 @@ if [[ "$1" == "-r" || "$1" == "--register" ]]; then action="register" fi -voice="$(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 voice to $action" 0 0 0 "${voices[@]}" --stdout)" +voice="$(agm_menu "Install Cepstral" "Install Cepstral" "Select A voice to $action" "${voices[@]}")" if [[ "$action" == "register" ]]; then register $voice @@ -103,7 +107,7 @@ fi mkdir -p ~/Downloads if ! [[ -e ~/Downloads/Cepstral_${voice}_windows_${version}.${msiexe} ]]; then - wget -P ~/Downloads/ "${prefix}Cepstral_${voice}_windows_${version}.${msiexe}" | dialog --progressbox "Downloading voice..." -1 -1 + wget -P ~/Downloads/ "${prefix}Cepstral_${voice}_windows_${version}.${msiexe}" | agm_progressbox "Install Cepstral" "Downloading voice..." fi # Get the install command. @@ -114,7 +118,7 @@ cmd="${cmd} ~/Downloads/Cepstral_${voice}_windows_${version}.${msiexe}" # Install the voice (eval "$cmd" & [ "$msiexe" = "exe" ] && xdotool sleep 20 key --delay 75 alt+n key --delay 75 alt+a key --delay 75 alt+n key --delay 75 alt+o key --delay 75 alt+i sleep 20 key --delay 75 alt+f -wineserver -w) | dialog --progressbox "installing voice..." -1 -1 +wineserver -w) | agm_progressbox "Install Cepstral" "Installing voice..." # Make voices louder. find "${WINEPREFIX}/drive_c/Program Files/Cepstral/voices" -type d -not -name voices -exec bash -c 'for d ; do echo "GAIN 2.5" > "$d/default.sfx";done' _ {} \; diff --git a/speech/set-voice.sh b/speech/set-voice.sh index 0d9ef85..c09ffea 100755 --- a/speech/set-voice.sh +++ b/speech/set-voice.sh @@ -1,46 +1,32 @@ #!/usr/bin/env bash -# Set Voice -# Set the default wine voice ba$sed on installed options. +# Set Voice - Fixed version for audiogame-manager -# -# ■The contents of this file are subject to the Common Public Attribution -# License Version 1.0 (the ■License■); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# https://opensource.org/licenses/CPAL-1.0. The License is ba$sed on the Mozilla Public License Version -# 1.1 but Sections 14 and 15 have been added to cover use of software over a -# computer network and provide for limited attribution for the Original -# Developer. In addition, Exhibit A has been modified to be consistent with -# Exhibit B. -# -# Software distributed under the License is distributed on an ■AS IS■ basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is audiogame manager. -# -# The Original Developer is not the Initial Developer and is . If -# left blank, the Original Developer is the Initial Developer. -# -# The Initial Developer of the Original Code is Billy "Storm Dragon" Wolfe. All portions of -# the code written by Billy Wolfe are Copyright (c) 2020. All Rights -# Reserved. -# -# Contributor Michael Taboada. -# -# Attribution Copyright Notice: Audiogame manager copyright 2020 Storm Dragon. All rights reserved. -# -# Attribution Phrase (not exceeding 10 words): A Stormux project -# -# Attribution URL: https://stormgames.wolfe.casa -# -# Graphic Image as provided in the Covered Code, if any. -# -# Display of Attribution Information is required in Larger -# Works which are defined in the CPAL as a work which combines Covered Code -# or portions thereof with code not governed by the terms of the CPAL. +# 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 -#--code-- +# Settings to improve accessibility of dialog. +export DIALOGOPTS='--insecure --no-lines --visit-items' +# Turn off debug messages +export WINEDEBUG="-all" +# Set DISPLAY, as needed +if [ -z "$DISPLAY" ] ; then +export DISPLAY=:0 +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." +) help() { echo "${0##*/}" @@ -54,66 +40,11 @@ help() { exit 0 } - -# 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' -# Turn off debug messages -export WINEDEBUG="-all" -# Set DISPLAY, as needed -if [ -z "$DISPLAY" ] ; then -export DISPLAY=:0 -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." -) - - - msgbox() { -# Returns: None -# Shows the provided message on the screen with an ok button. dialog --clear --msgbox "$*" 0 0 } -infobox() { - # Returns: None - # Shows the provided message on the screen with no buttons. - local timeout=3 - dialog --infobox "$*" 0 0 - read -n1 -t $timeout continue - # Clear any keypresses from the buffer - read -t 0.01 continue -} - -yesno() { - # Returns: Yes or No - # Args: Question to user. - # Called in if $(yesno) == "Yes" - # Or variable=$(yesno) - dialog --clear --backtitle "Press 'Enter' for "yes" or 'Escape' for "no"." --yesno "$*" 0 0 --stdout - if [[ $? -eq 0 ]]; then - echo "Yes" - else - echo "No" - fi -} - menulist() { - # Args: List of items for menu. - # returns: selected tag declare -a menuList for i in "${@}" ; do menuList+=("$i" "$i") @@ -129,7 +60,7 @@ menulist() { restore_voice() { if [[ $doRestore -eq 0 ]]; then - ${wine}server -k # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely + ${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" fi } @@ -143,11 +74,11 @@ set_voice() { [[ "$x" = "$tmp" ]] && break counter=$(( $counter + 1 )) done - local RHVoiceName="$(find "${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/" -maxdepth 1 -type d)" + local 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 # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely + ${wine}server -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" @@ -162,11 +93,11 @@ test_voice() { [ "$x" = "$tmp" ] && break counter=$(( $counter + 1 )) done - local RHVoiceName="$(find "${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/" -maxdepth 1 -type d)" + local 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 # If we don't do this it's likely wine will overwrite our reverted change or even clobber the registry key entirely + ${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" cat << "EOF" > "${bottle}/drive_c/windows/temp/speak.vbs" dim speechobject @@ -205,9 +136,7 @@ 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 @@ -224,13 +153,22 @@ if [[ -z "${WINEPREFIX}" ]]; then exit 0 fi -# Get wine version if available +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 -wine="${WINE:-$(command -v wine)}" + +# 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" diff --git a/speech/speak_window_title.sh b/speech/speak_window_title.sh index eb73553..3fbd4a1 100755 --- a/speech/speak_window_title.sh +++ b/speech/speak_window_title.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Adapted from the bash snippet found at: # https://bbs.archlinux.org/viewtopic.php?id=117031 @@ -19,9 +19,9 @@ while pgrep -u "$USER" ^$1 &> /dev/null ; do if [[ "$wnd_title" =~ $lookfor ]]; then wnd_title=${BASH_REMATCH[1]} - if [[ "$old_title" != "$wnd_title" ]]; then + if [[ "$oldTitle" != "$wnd_title" ]]; then spd-say -- "$wnd_title" - old_title="$wnd_title" + oldTitle="$wnd_title" fi fi done diff --git a/wine/install-dependencies.sh b/wine/install-dependencies-arch.sh old mode 100755 new mode 100644 similarity index 61% rename from wine/install-dependencies.sh rename to wine/install-dependencies-arch.sh index 5aee44f..d750bdc --- a/wine/install-dependencies.sh +++ b/wine/install-dependencies-arch.sh @@ -3,13 +3,9 @@ # Immediately exit if errors are encountered. set -e -# Installer/configuration tool for wine -# If this fails on your system, please contact storm_dragon@linux-a11y.org +# Wine dependencies installer for Arch Linux +# If this fails on your system, please contact storm_dragon@stormux.org -is_function() { - LC_ALL=C type "$1" 2> /dev/null | grep -q "$1 is a function" -} - configure_arch() { packageList=( cabextract @@ -29,7 +25,7 @@ configure_arch() { mpg123 libpulse libpng - libjpeg-turbo + libjpeg-turbo gnutls alsa-plugins alsa-lib @@ -70,36 +66,10 @@ configure_arch() { # Some of these may fail, so do them in a for loop. yay -Syy for i in "${packageList[@]}" ; do - yay -S --needed --noconfirm $i + yay -S --needed --noconfirm "$i" || true done } -configure_debian() { - packageList=( - curl - dialog - gawk - gstreamer1.0-plugins-bad:i386 - gstreamer1.0-plugins-good:i386 - gstreamer1.0-plugins-ugly:i386 - mono-complete - ncurses5-dev - w3m - winehq-stable - ) - # make sure 32 bit libraries are available - sudo dpkg --add-architecture i386 - sudo apt install --install-recommends ${packageList[*]} -} +configure_arch - -distro="$(head -1 /etc/issue | cut -d ' ' -f1)" -distro="${distro,,}" - -if is_function configure_${distro} ; then - configure_${distro} -else - echo "${distro^} is not yet supported. If you want it added, please contact storm_dragon@linux-a11y.org" | fold -s -w 72 -fi - -exit 0 +exit 0 \ No newline at end of file diff --git a/wine/install-dependencies-debian.sh b/wine/install-dependencies-debian.sh new file mode 100644 index 0000000..70a59ed --- /dev/null +++ b/wine/install-dependencies-debian.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Immediately exit if errors are encountered. +set -e + +# Wine dependencies installer for Debian/Ubuntu +# If this fails on your system, please contact storm_dragon@stormux.org + +configure_debian() { + packageList=( + curl + dialog + gawk + gstreamer1.0-plugins-bad:i386 + gstreamer1.0-plugins-good:i386 + gstreamer1.0-plugins-ugly:i386 + mono-complete + ncurses5-dev + w3m + winehq-stable + ) + # make sure 32 bit libraries are available + sudo dpkg --add-architecture i386 + sudo apt install --install-recommends "${packageList[@]}" +} + +configure_debian + +exit 0 diff --git a/wine/mkwine.sh b/wine/mkwine.sh index 41b79da..ab1ec15 100755 --- a/wine/mkwine.sh +++ b/wine/mkwine.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # âe contents of this file are subject to the Common Public Attribution # License Version 1.0 (the âcenseâ you may not use this file except in @@ -38,6 +38,9 @@ # or portions thereof with code not governed by the terms of the CPAL. +# Source dialog interface wrapper +source "${0%/*}/../.includes/dialog-interface.sh" + export WINEARCH=win32 bottle="${1,,}" shift @@ -47,6 +50,6 @@ export WINEPREFIX="$HOME/.local/wine/${bottle}" # Arguments to the function are dependancies to be installed. (wine msiexec /i z:/usr/share/wine/mono/$(ls -1 /usr/share/wine/mono/) /silent wine msiexec /i z:$(ls -1 /usr/share/wine/gecko/*x86.msi) /silent - winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}) | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 + winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}) | agm_progressbox "Wine Bottle Creation" "Installing wine bottle, please wait..." exit 0