Added yad dialogues if in GUI session, retains the dialog interface if in console.

This commit is contained in:
Storm Dragon
2025-08-01 15:25:53 -04:00
parent 15f90a7979
commit 76f0c66c96
16 changed files with 392 additions and 113 deletions

View File

@ -36,7 +36,7 @@ install_wine() {
# If this goes wrong, bail out # If this goes wrong, bail out
set -e set -e
{ curl -L --output "${installationFile}" "https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/PlayOnLinux-wine-${1}-upstream-linux-${v}.tar.gz" { 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 tar xf "${installationFile}" -C "${wineInstallationPath}"; } | agm_progressbox "Wine Installation" "Installing $2 bit Wine version $1."
set +e set +e
} }

View File

@ -0,0 +1,281 @@
#!/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"
else
dialogType="yad"
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)
# Return the mapped value
if [[ -n "$selectedDescription" ]]; then
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
yad --info \
--title="$title" \
--text="$text" \
--selectable-labels \
--show-cursor \
--width=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
yad --question \
--title="$title" \
--text="$text" \
--selectable-labels \
--width=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
yad --progress \
--title="$title" \
--text="$text" \
--pulsate \
--auto-close \
--no-buttons \
--show-cursor \
--width=400
else
dialog --title "$title" \
--progressbox "$text" 20 70
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
}

View File

@ -59,18 +59,15 @@ download() {
{ if ! curl -L4 -C - --retry 10 --output "${cache}/${dest}" "${i}" ; then { if ! curl -L4 -C - --retry 10 --output "${cache}/${dest}" "${i}" ; then
echo "Could not download \"$i\"..." echo "Could not download \"$i\"..."
exit 1 exit 1
fi; } | dialog --backtitle "Audio Game Manager" \ fi; } | agm_progressbox "Audio Game Manager" "Downloading \"$dest\" from \"$i\""
--progressbox "Downloading \"$dest\" from \"$i\"" -1 -1
local downloadError=1 local downloadError=1
case "${dest##*.}" in case "${dest##*.}" in
"pk3"|"zip") "pk3"|"zip")
unzip -tq "${cache}/${dest}" | dialog --backtitle "Audio Game Manager" \ unzip -tq "${cache}/${dest}" | agm_progressbox "Audio Game Manager" "Validating ${dest##*.} file"
--progressbox "Validating ${dest##*.} file" -1 -1 --stdout
downloadError=$? downloadError=$?
;; ;;
"7z") "7z")
7z t "${cache}/${dest}" | dialog --backtitle "Audio Game Manager" \ 7z t "${cache}/${dest}" | agm_progressbox "Audio Game Manager" "Validating 7z file"
--progressbox "Validating 7z file" -1 -1 --stdout
downloadError=$? downloadError=$?
;; ;;
"exe") "exe")
@ -95,8 +92,7 @@ download() {
esac esac
if [[ $downloadError -ne 0 ]]; then if [[ $downloadError -ne 0 ]]; then
rm -fv "${cache}/${dest}" rm -fv "${cache}/${dest}"
dialog --backtitle "Audio Game Manager" \ agm_infobox "Audio Game Manager" "Audio Game Manager" "Error downloading \"${dest}\". Installation cannot continue."
--infobox "Error downloading \"${dest}\". Installation cannot continue." -1 -1 --stdout
alert alert
exit 1 exit 1
fi fi
@ -118,9 +114,7 @@ get_installer() {
if echo "$2" | xclip -selection clipboard 2> /dev/null ; then if echo "$2" | xclip -selection clipboard 2> /dev/null ; then
message+="\n\nThe URL has been copied to the clipboard." message+="\n\nThe URL has been copied to the clipboard."
fi fi
dialog --ok-label "Continue" \ agm_msgbox "Audiogame Manager" "Audiogame Manager" "$message"
--backtitle "Audiogame Manager" \
--msgbox "$message" -1 -1
# Search the Desktop and Downloads directories for the installation file # Search the Desktop and Downloads directories for the installation file
for i in ~/Downloads ~/Desktop ; do for i in ~/Downloads ~/Desktop ; do
find $i -type f -name "$1" -exec cp -v {} "${cache}/" \; find $i -type f -name "$1" -exec cp -v {} "${cache}/" \;
@ -137,26 +131,19 @@ get_steam() {
trap "exit 0" SIGINT trap "exit 0" SIGINT
echo "manual intervention required." echo "manual intervention required."
alert alert
dialog --backtitle "Audiogame Manager" \ agm_yesno "Audiogame Manager" "Audiogame Manager" "To install the game manually, place files in \"${WINEPREFIX}/drive_c/Program Files/${game}\". Continue with Steam installation?"
--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 case $? in
0) echo "The next steps will install through steamcmd." ;; 0) echo "The next steps will install through steamcmd." ;;
1) 1)
mkdir -p "${WINEPREFIX}/drive_c/Program Files/${game}" mkdir -p "${WINEPREFIX}/drive_c/Program Files/${game}"
dialog --backtitle "Audiogame Manager" \ agm_msgbox "Audiogame Manager" "Audiogame Manager" "Place game files in \"${WINEPREFIX}/drive_c/Program Files/${game}\" and press enter to continue."
--msgbox "Place game files in \"${WINEPREFIX}/drive_c/Program Files/${game}\" and press enter to continue." -1 -1 --stdout
return return
;; ;;
*) exit 0 ;; *) exit 0 ;;
esac esac
# Check for steamcmd # Check for steamcmd
if ! command -v steamcmd &> /dev/null ; then if ! command -v steamcmd &> /dev/null ; then
dialog --backtitle "Audiogame Manager" \ agm_infobox "Audiogame Manager" "Audiogame Manager" "This installer requires steamcmd. Please install steamcmd and try again."
--infobox "This installer requires steamcmd. Please install steamcmd and try again." -1 -1
exit 1 exit 1
fi fi
# Create message for dialog. # Create message for dialog.
@ -164,17 +151,12 @@ get_steam() {
if echo "$2" | xclip -selection clipboard 2> /dev/null ; then if echo "$2" | xclip -selection clipboard 2> /dev/null ; then
message+="\n\nThe URL has been copied to the clipboard." message+="\n\nThe URL has been copied to the clipboard."
fi fi
dialog --ok-label "Continue" \ agm_msgbox "Audiogame Manager" "Audiogame Manager" "$message"
--backtitle "Audiogame Manager" \
--msgbox "$message" -1 -1
# Get Steam user name. # Get Steam user name.
steamUser="$(dialog --ok-label "Continue" \ steamUser="$(agm_inputbox "Audiogame Manager" "Audiogame Manager" "Please enter your Steam user name:" "")"
--backtitle "Audiogame Manager" \
--inputbox "Please enter your Steam user name:" -1 -1 --stdout)"
# Download the game # Download the game
mkdir -p "${WINEPREFIX}/drive_c/Program Files/${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" \ 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."
--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; } exit 1; }
} }

View File

@ -12,10 +12,7 @@ check_news() {
fi fi
local newsOldTag="$(cat "$newsPath" 2> /dev/null)" local newsOldTag="$(cat "$newsPath" 2> /dev/null)"
if [[ "$newsTag" != "$newsOldTag" ]]; then if [[ "$newsTag" != "$newsOldTag" ]]; then
dialog --yes-label 'Play' \ agm_yesno 'Audiogame Manager News' 'Audiogame Manager News' 'Audiogame manager news is available. Would you like to play it now?' || return
--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 sox -qV0 "$newsFile" -d &> /dev/null
echo -n "$newsTag" > "$newsPath" echo -n "$newsTag" > "$newsPath"
fi fi
@ -38,8 +35,7 @@ update() {
if [[ "$home" == "$remote" ]]; then if [[ "$home" == "$remote" ]]; then
return return
fi fi
dialog --backtitle "Audiogame Manager" \ agm_yesno "Audiogame Manager" "Audiogame Manager" "Updates are available. Would you like to update now?" || return
--yesno "Updates are available. Would you like to update now?" -1 -1 --stdout || return
{ git pull { git pull
git log '@{1}..' --pretty=format:'%an: %s' | tac; } git log '@{1}..' --pretty=format:'%an: %s' | tac; }
exit $? exit $?

View File

@ -1,6 +1,9 @@
# Source dialog interface wrapper
source "${0%/*}/../.includes/dialog-interface.sh"
if [[ ! -r "${cache}/bk3-dict.dat" ]]; then if [[ ! -r "${cache}/bk3-dict.dat" ]]; then
echo "http://www.nyanchangames.com/order/bk3translate.html" | xclip -selection clipboard 2> /dev/null 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 fi
dictFile="" dictFile=""
for i in "${HOME}/Downloads/dict.dat" "${HOME}/Desktop/dict.dat" ; do for i in "${HOME}/Downloads/dict.dat" "${HOME}/Desktop/dict.dat" ; do
@ -9,7 +12,7 @@ for i in "${HOME}/Downloads/dict.dat" "${HOME}/Desktop/dict.dat" ; do
fi fi
done done
if [[ "${#dictFile}" -ge 3 ]] && [[ ! -r "${cache}/bk3-dict.dat" ]]; then 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 -v "$dictFile" "${cache}/bk3-dict.dat"
fi 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" 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 bottle="nyanchan"

View File

@ -1,3 +1,6 @@
# Source dialog interface wrapper
source "${0%/*}/../.includes/dialog-interface.sh"
export WINEARCH=win64 export WINEARCH=win64
export winVer="win7" export winVer="win7"
get_installer "sideparty-win.zip" "https://masonasons.itch.io/sideparty" get_installer "sideparty-win.zip" "https://masonasons.itch.io/sideparty"
@ -8,9 +11,7 @@ unzip -d "$WINEPREFIX/drive_c/Program Files/Side Party" "${cache}/sideparty-win.
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \; find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \;
add_launcher "c:\Program Files\Side Party\SideParty.exe" add_launcher "c:\Program Files\Side Party\SideParty.exe"
alert alert
sidePartyUser="$(dialog --ok-label "Continue" \ sidePartyUser="$(agm_inputbox "Side Party Installation" "Side Party Installation" "Please enter a user name for Side Party score board:" "")"
--backtitle "Audiogame Manager" \
--inputbox "Please enter a user name for Side Party score board:" -1 -1 --stdout)"
mkdir -p "$WINEPREFIX/drive_c/Program Files/Side Party/masonasons.me/SideParty" 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 -v "${cache}/SidePartySettings.dat" "$WINEPREFIX/drive_c/Program Files/Side Party/masonasons.me/SideParty/settings.dat"
if [[ ${#sidePartyUser} -gt 3 ]]; then if [[ ${#sidePartyUser} -gt 3 ]]; then

View File

@ -1,7 +1,10 @@
# Source dialog interface wrapper
source "${0%/*}/../.includes/dialog-interface.sh"
export bottle="aprone" export bottle="aprone"
export winVer="win7" export winVer="win7"
export winetricksSettings="vd=1024x768" 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=$? deleteMusic=$?
download "https://www.kaldobsky.com/audiogames/Swamp.zip" download "https://www.kaldobsky.com/audiogames/Swamp.zip"
install_wine_bottle dx8vb quartz corefonts vb6run speechsdk install_wine_bottle dx8vb quartz corefonts vb6run speechsdk

View File

@ -39,11 +39,7 @@ game_installer() {
menuList+=("Donate" "Donate") menuList+=("Donate" "Donate")
menuList+=("Become a Patron" "Become a Patron") menuList+=("Become a Patron" "Become a Patron")
# Show game selection dialog # Show game selection dialog
game="$(dialog --backtitle "Audio Game Installer" \ game="$(agm_menu "Audio Game Installer" "Audio Game Installer" "Please select a game to install" "${menuList[@]}")"
--clear \
--ok-label "Install" \
--no-tags \
--menu "Please select a game to install" 0 0 0 "${menuList[@]}" --stdout)"
[[ $? -ne 0 ]] && exit 0 [[ $? -ne 0 ]] && exit 0
# Handle selection # Handle selection
if [[ -n "$game" ]]; then if [[ -n "$game" ]]; then
@ -64,8 +60,7 @@ game_installer() {
# Source and execute the install script # Source and execute the install script
source "$installScript" source "$installScript"
else else
dialog --backtitle "Audio Game Installer" \ agm_msgbox "Audio Game Installer" "Audio Game Installer" "Installation script not found for ${game}"
--msgbox "Installation script not found for ${game}" -1 -1
exit 1 exit 1
fi fi
;; ;;
@ -95,11 +90,7 @@ game_removal() {
menuList+=("Donate" "Donate") menuList+=("Donate" "Donate")
menuList+=("Become a Patron" "Become a Patron") menuList+=("Become a Patron" "Become a Patron")
local game local game
game="$(dialog --backtitle "Audio Game Removal" \ game="$(agm_menu "Audio Game Removal" "Audio Game Removal" "Please select a game to delete" "${menuList[@]}")"
--clear \
--ok-label "Remove" \
--no-tags \
--menu "Please select a game to delete" 0 0 0 "${menuList[@]}" --stdout)"
if [[ ${#game} -gt 0 ]]; then if [[ ${#game} -gt 0 ]]; then
if [[ "$game" == "Donate" ]]; then if [[ "$game" == "Donate" ]]; then
open_url "https://ko-fi.com/stormux" open_url "https://ko-fi.com/stormux"
@ -155,11 +146,7 @@ kill_game() {
done done
menuList+=("Donate" "Donate") menuList+=("Donate" "Donate")
menuList+=("Become a Patron" "Become a Patron") menuList+=("Become a Patron" "Become a Patron")
local game="$(dialog --backtitle "Audio Game Killer" \ local game="$(agm_menu "Audio Game Killer" "Audio Game Killer" "Please select a game to force stop" "${menuList[@]}")"
--clear \
--ok-label "Kill" \
--no-tags \
--menu "Please select a game to force stop" 0 0 0 "${menuList[@]}" --stdout)"
if [[ ${#game} -gt 0 ]]; then if [[ ${#game} -gt 0 ]]; then
if [[ "$game" == "Donate" ]]; then if [[ "$game" == "Donate" ]]; then
open_url "https://ko-fi.com/stormux" open_url "https://ko-fi.com/stormux"
@ -319,13 +306,7 @@ game_launcher() {
menuList+=("Donate" "Donate") menuList+=("Donate" "Donate")
menuList+=("Become a Patron" "Become a Patron") menuList+=("Become a Patron" "Become a Patron")
local game="" local game=""
game="$(dialog --backtitle "Audio Game Launcher" \ game="$(agm_menu "Audio Game Launcher" "Audio Game Launcher" "Please select a game to play" "${menuList[@]}")"
--clear \
--extra-button \
--extra-label "Documentation" \
--ok-label "Launch" \
--no-tags \
--menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)"
local menuCode=$? local menuCode=$?
if [[ $menuCode -eq 1 ]] || [[ $menuCode -eq 255 ]]; then if [[ $menuCode -eq 1 ]] || [[ $menuCode -eq 255 ]]; then
exit 0 exit 0
@ -387,6 +368,14 @@ game_launcher() {
trap "exit 0" SIGINT trap "exit 0" SIGINT
# 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"
else
dialogType="yad"
fi
# If display isn't set assume we are launching from console and an X environment is running using display :0 # If display isn't set assume we are launching from console and an X environment is running using display :0
if [[ -z "$DISPLAY" ]]; then if [[ -z "$DISPLAY" ]]; then
export DISPLAY=":0" export DISPLAY=":0"
@ -431,6 +420,7 @@ export nvdaControllerClientDll="${ipfsGateway}/ipfs/QmWu7YdSbKMk1Qm5DKvEA5hk1YuA
# Source helper functions # Source helper functions
source .includes/bottle.sh # Also sourced in functions that need it source .includes/bottle.sh # Also sourced in functions that need it
source .includes/desktop.sh source .includes/desktop.sh
source .includes/dialog-interface.sh
source .includes/functions.sh source .includes/functions.sh
source .includes/help.sh source .includes/help.sh
source .includes/update.sh source .includes/update.sh
@ -502,8 +492,7 @@ while getopts "${args}" i ; do
S) defaultRate="${OPTARG}";; S) defaultRate="${OPTARG}";;
t) t)
gameCount=$(find ".install" -type f -iname "*.sh" | wc -l) gameCount=$(find ".install" -type f -iname "*.sh" | wc -l)
dialog --backtitle "Linux Game Manager" \ agm_infobox "Linux Game Manager" "Linux Game Manager" "There are currently ${gameCount} games available."
--infobox "There are currently ${gameCount} games available." -1 -1
exit 0 exit 0
;; ;;
v) voiceName="${OPTARG}";; v) voiceName="${OPTARG}";;

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# âe contents of this file are subject to the Common Public Attribution # â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 # 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 # 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. # 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 for i in dialog unix2dos; do
if ! command -v $i &> /dev/null ; then if ! command -v $i &> /dev/null ; then
echo "Please install dialog and dos2unix before using this script." echo "Please install dialog and dos2unix before using this script."
@ -55,12 +59,7 @@ for i in "${gameList[@]}" ; do
done done
unset gameList unset gameList
gameList="$(dialog --clear \ gameList="$(agm_checklist "Crazy Party Game Builder" "Crazy Party Game Builder" "Press space to check or uncheck a selected game." "${menuList[@]}")"
--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)"
if [[ -z "${gameList}" ]]; then if [[ -z "${gameList}" ]]; then
exit 0 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" 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" 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" 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 exit 0

View File

@ -37,6 +37,10 @@
# Works which are defined in the CPAL as a work which combines Covered Code # 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. # 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 newVersion=82
WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local}/wine/crazy-party" WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local}/wine/crazy-party"
@ -68,6 +72,6 @@ find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${c
sed -i "s/Crazy-Party-beta${oldVersion}/Crazy-Party-beta${newVersion}/" "$configFile" 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 -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 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 exit 0

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# âe contents of this file are subject to the Common Public Attribution # â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 # 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 # 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. # 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" cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager"
updateURL="https://www.kaldobsky.com/audiogames" updateURL="https://www.kaldobsky.com/audiogames"
updateFiles=("rettou.zip") updateFiles=("rettou.zip")
@ -47,7 +51,7 @@ for i in "${updateFiles[@]}" ; do
rm -fv "${cache}/${i}" rm -fv "${cache}/${i}"
curl -L4 -C - --retry 10 --output "${cache}/$i" "${updateURL}/$i" curl -L4 -C - --retry 10 --output "${cache}/$i" "${updateURL}/$i"
unzip -o -d ~/".local/wine/aprone/drive_c/Program Files/rettou" "${cache}/${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 exit 0

View File

@ -37,11 +37,15 @@
# Works which are defined in the CPAL as a work which combines Covered Code # 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. # 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" cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager"
url="https://stevend.net/downloads/scramble_win32.zip" url="https://stevend.net/downloads/scramble_win32.zip"
(rm -v "${cache}/scramble_win32.zip" (rm -v "${cache}/scramble_win32.zip"
wget -O "${cache}/scramble_win32.zip" "$url" || { echo "Could not download file."; exit 1; } 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" 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 exit 0

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# âe contents of this file are subject to the Common Public Attribution # â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 # 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 # 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. # 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" cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager"
updateURL="https://www.kaldobsky.com/audiogames" updateURL="https://www.kaldobsky.com/audiogames"
updateFiles=("SwampPatch.zip") 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=$? deleteMusic=$?
# Back up configuration files. # Back up configuration files.
for i in losers.txt muted.txt scriptkeys.txt keyconfig.ini ; do 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" 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" 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 sleep 3
@ -57,7 +61,7 @@ sleep 3
for i in "${updateFiles[@]}" ; do for i in "${updateFiles[@]}" ; do
wget -O "${cache}/$i" "${updateURL}/$i" wget -O "${cache}/$i" "${updateURL}/$i"
unzip -o -d ~/".local/wine/aprone/drive_c/Program Files/swamp" "${cache}/${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. # Delete music if requested.
if [[ $deleteMusic -eq 0 ]]; then if [[ $deleteMusic -eq 0 ]]; then

View File

@ -8,6 +8,16 @@
# Dialog accessibility # Dialog accessibility
export DIALOGOPTS='--no-lines --visit-items' 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 # Turn off debug messages
export WINEDEBUG="-all" export WINEDEBUG="-all"
# Make sure display is set in case installed from console. # Make sure display is set in case installed from console.
@ -21,9 +31,9 @@ prefix="https://www.cepstral.com/downloads/installers/windows/"
register() { register() {
local v="$1" local v="$1"
company="$(dialog --clear --inputbox "Company name (leave empty if none)" -1 -1 --stdout)" || exit $? company="$(agm_inputbox "Install Cepstral" "Install Cepstral" "Company name (leave empty if none)" "")" || exit $?
customer="$(dialog --clear --inputbox "Customer name" -1 -1 --stdout)" || exit $? customer="$(agm_inputbox "Install Cepstral" "Install Cepstral" "Customer name" "")" || exit $?
key="$(dialog --clear --inputbox "License key" -1 -1 --stdout)" || 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\"" 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 exit 0
} }
@ -75,10 +85,7 @@ declare -a bottle
for i in $(find ~/.local/wine/ -maxdepth 1 -type d -not -name 'wine' | sort) ; do for i in $(find ~/.local/wine/ -maxdepth 1 -type d -not -name 'wine' | sort) ; do
bottle+=("$i" "${i##*/}") bottle+=("$i" "${i##*/}")
done done
export WINEPREFIX="$(dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \ export WINEPREFIX="$(agm_menu "Install Cepstral" "Install Cepstral" "Select A Wine Bottle" "${bottle[@]}")"
--clear \
--no-tags \
--menu "Select A Wine Bottle" 0 0 0 "${bottle[@]}" --stdout)"
if [[ -z "${WINEPREFIX}" ]]; then if [[ -z "${WINEPREFIX}" ]]; then
@ -90,10 +97,7 @@ if [[ "$1" == "-r" || "$1" == "--register" ]]; then
action="register" action="register"
fi fi
voice="$(dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \ voice="$(agm_menu "Install Cepstral" "Install Cepstral" "Select A voice to $action" "${voices[@]}")"
--clear \
--no-tags \
--menu "Select A voice to $action" 0 0 0 "${voices[@]}" --stdout)"
if [[ "$action" == "register" ]]; then if [[ "$action" == "register" ]]; then
register $voice register $voice
@ -103,7 +107,7 @@ fi
mkdir -p ~/Downloads mkdir -p ~/Downloads
if ! [[ -e ~/Downloads/Cepstral_${voice}_windows_${version}.${msiexe} ]]; then 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 fi
# Get the install command. # Get the install command.
@ -114,7 +118,7 @@ cmd="${cmd} ~/Downloads/Cepstral_${voice}_windows_${version}.${msiexe}"
# Install the voice # Install the voice
(eval "$cmd" & (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 [ "$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. # 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' _ {} \; 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' _ {} \;

View File

@ -42,6 +42,16 @@
#--code-- #--code--
# 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"
help() { help() {
echo "${0##*/}" echo "${0##*/}"
echo "Released under the terms of the Common Public Attribution License Version 1.0" echo "Released under the terms of the Common Public Attribution License Version 1.0"
@ -84,14 +94,14 @@ declare -A command=(
msgbox() { msgbox() {
# Returns: None # Returns: None
# Shows the provided message on the screen with an ok button. # Shows the provided message on the screen with an ok button.
dialog --clear --msgbox "$*" 0 0 agm_msgbox "Set Voice" "Set Voice" "$*"
} }
infobox() { infobox() {
# Returns: None # Returns: None
# Shows the provided message on the screen with no buttons. # Shows the provided message on the screen with no buttons.
local timeout=3 local timeout=3
dialog --infobox "$*" 0 0 agm_infobox "Set Voice" "Set Voice" "$*"
read -n1 -t $timeout continue read -n1 -t $timeout continue
# Clear any keypresses from the buffer # Clear any keypresses from the buffer
read -t 0.01 continue read -t 0.01 continue
@ -102,7 +112,7 @@ yesno() {
# Args: Question to user. # Args: Question to user.
# Called in if $(yesno) == "Yes" # Called in if $(yesno) == "Yes"
# Or variable=$(yesno) # Or variable=$(yesno)
dialog --clear --backtitle "Press 'Enter' for "yes" or 'Escape' for "no"." --yesno "$*" 0 0 --stdout agm_yesno "Set Voice" "Set Voice" "$*"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
echo "Yes" echo "Yes"
else else
@ -117,12 +127,7 @@ menulist() {
for i in "${@}" ; do for i in "${@}" ; do
menuList+=("$i" "$i") menuList+=("$i" "$i")
done done
dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \ agm_menu "Set Voice" "Set Voice" "Please select one" "${menuList[@]}"
--clear \
--extra-button \
--extra-label "Test Voice" \
--no-tags \
--menu "Please select one" 0 0 0 "${menuList[@]}" --stdout
return $? return $?
} }
@ -251,10 +256,7 @@ if [[ -z "${bottle}" ]]; then
exit 1 exit 1
fi fi
export WINEPREFIX="$(dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \ export WINEPREFIX="$(agm_menu "Set Voice" "Set Voice" "Select A Wine Bottle" "${bottles[@]}")"
--clear \
--no-tags \
--menu "Select A Wine Bottle" 0 0 0 "${bottles[@]}" --stdout)"
fi fi
if [[ -z "${WINEPREFIX}" ]]; then if [[ -z "${WINEPREFIX}" ]]; then
@ -303,7 +305,7 @@ done
oldVoice="$($grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | $sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" oldVoice="$($grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | $sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')"
exit=1 exit=1
if [[ "${#voiceList[@]}" -eq 0 ]]; then if [[ "${#voiceList[@]}" -eq 0 ]]; then
dialog --msgbox "No voices found in ${WINEPREFIX}. Make sure SAPI voices are installed in this Wine prefix." 0 0 agm_msgbox "Set Voice" "Set Voice" "No voices found in ${WINEPREFIX}. Make sure SAPI voices are installed in this Wine prefix."
exit 1 exit 1
fi fi
while [[ $exit -ne 0 ]] ; do while [[ $exit -ne 0 ]] ; do

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# âe contents of this file are subject to the Common Public Attribution # â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 # 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. # 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 export WINEARCH=win32
bottle="${1,,}" bottle="${1,,}"
shift shift
@ -47,6 +50,6 @@ export WINEPREFIX="$HOME/.local/wine/${bottle}"
# Arguments to the function are dependancies to be installed. # 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:/usr/share/wine/mono/$(ls -1 /usr/share/wine/mono/) /silent
wine msiexec /i z:$(ls -1 /usr/share/wine/gecko/*x86.msi) /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 exit 0