Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
76f0c66c96 | |||
15f90a7979 | |||
da065e5835 | |||
e3df3c4485 | |||
737432a63f | |||
6526d40c68 | |||
d9ef202b33 | |||
faba6bcbcb | |||
31018bc55f | |||
6e4d7bae8d | |||
e892da65c8 |
197
.includes/bottle.sh
Normal file
197
.includes/bottle.sh
Normal file
@ -0,0 +1,197 @@
|
||||
get_bottle() {
|
||||
local architecture="${1/win/}"
|
||||
export WINEPREFIX="$HOME/.local/wine${architecture}"
|
||||
# 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
|
||||
}
|
||||
|
||||
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}"; } | agm_progressbox "Wine Installation" "Installing $2 bit Wine version $1."
|
||||
set +e
|
||||
}
|
||||
|
||||
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
|
||||
echo "Installing RHVoice ${voiceName^}..."
|
||||
${wine} "${cache}/${voiceFile}" &
|
||||
sleep 20
|
||||
${wine}server -k
|
||||
}
|
||||
|
||||
install_wine_bottle() {
|
||||
# Wine defaults to 64, so if you need 32 bit, don't forget export WINEARCH=win32
|
||||
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"
|
||||
# Installation paths are based on WINEARCH unless game is set for custom bottle.
|
||||
local bottle=""
|
||||
if [[ ${#game} -gt 0 ]]; then
|
||||
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
|
||||
if [[ ( -z "$WINEARCH" || "$WINEARCH" == "win64" ) && ! "$*" =~ speechsdk ]]; then
|
||||
local architecture=64
|
||||
else
|
||||
local architecture=32
|
||||
fi
|
||||
export WINEPREFIX="$HOME/.local/wine${bottle:+/}${bottle:-$architecture}"
|
||||
# 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
|
||||
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
|
||||
fi
|
||||
if [[ "${WINEARCH}" == "win64" ]]; then
|
||||
download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd"
|
||||
fi
|
||||
if [[ "${WINEARCH}" == "win64" ]] && [[ ! -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:-win7} ${winetricksSettings}
|
||||
# make it easy for game scripts to know which version of wine to use.
|
||||
if [[ ${#bottle} -gt 1 ]]; then
|
||||
echo "WINE=\"${WINE}\"" > "$HOME/.local/wine/${bottle}/agm.conf"
|
||||
echo "WINESERVER=\"${WINESERVER}\"" >> "$HOME/.local/wine/${bottle}/agm.conf"
|
||||
echo "Setting default voice for bottle \"${bottle}\" to \"${defaultVoice}\"."
|
||||
"${0%/*}/speech/set-voice.sh" -b "${bottle}" -r "${defaultRate:-7}" -v "${defaultVoice}"
|
||||
fi
|
||||
# If default voice is set, change it for the current architecture
|
||||
if [[ -z "$bottle" ]]; then
|
||||
if [[ ${#defaultVoice} -ge 2 ]] && [[ "${*}" =~ (speechsdk|sapi) ]]; then
|
||||
echo "Setting default voice for wine${architecture}."
|
||||
"${0%/*}/speech/set-voice.sh" -b "${bottle}" -r "${defaultRate:-7}" -v "${defaultVoice}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
add_launcher() {
|
||||
local launchSettings="${WINEARCH:-win64}|${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
|
||||
}
|
109
.includes/checkup.sh
Executable file
109
.includes/checkup.sh
Executable file
@ -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
|
35
.includes/desktop.sh
Normal file
35
.includes/desktop.sh
Normal file
@ -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
|
||||
}
|
281
.includes/dialog-interface.sh
Normal file
281
.includes/dialog-interface.sh
Normal 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
|
||||
}
|
180
.includes/functions.sh
Normal file
180
.includes/functions.sh
Normal file
@ -0,0 +1,180 @@
|
||||
# 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_requirements() {
|
||||
# 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."
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
return 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; } | agm_progressbox "Audio Game Manager" "Downloading \"$dest\" from \"$i\""
|
||||
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
|
||||
}
|
125
.includes/help.sh
Normal file
125
.includes/help.sh
Normal file
@ -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/:/ <parameter>}: ${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
|
||||
}
|
42
.includes/update.sh
Normal file
42
.includes/update.sh
Normal file
@ -0,0 +1,42 @@
|
||||
# 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
|
||||
{ git pull
|
||||
git log '@{1}..' --pretty=format:'%an: %s' | tac; }
|
||||
exit $?
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmQiocMpMXoxejDftKKvmrR5xxpj1qcWcgkhBBwTcyijXg?filename=FPB32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/FPB32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmPNt3c78UBgEMrTH3eJ5eD2mCMdth6jwes1iDKGW24Uj5?filename=BG204832Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BG204832Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmTshtHBEV9dh7wFtaQpNUEYHZ3fBpuhSRZqc7k8HwmtPM?filename=ASB32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/ASB32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/Qma76HXBhmKgMDeHH1XLePsaWzzzLsBS2HRL3c7MVwDokg?filename=BAC32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BAC32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/Qmaq9P9fxdLTEFMGg4mhHrRuUbPg6HgU3eYVJNqZUimHjo?filename=BGB32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGB32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmQwWiJw9hDiPdfwDyL4XepeoD66ztVRi3HwbSjFFP4CNg?filename=BGB32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGB32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmRn21tREXxXVSaDe9i54zEPzPSespjJAFBqu4DWocuagD?filename=BXB32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BXB32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmWEdmTkQsjSqBgWUgnDajMf8QvQBbEF4Nxo6mhkXYzBtQ?filename=BRN32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BRN32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmT2yBpU5Jqna18FxYtyWzi4xMGAY9PyJWStAskxCHqBDw?filename=BGC32Setup10d.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGC32Setup10d.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmU486SssAdM7kPKwDyAKDLQs3Z92bG6wFjaLhzqDZCxAF?filename=BCB32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BCB32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmbRUiknnNcibWD3NwK4DFZGNHWswBgsFidUzU1TFGJ5Ra?filename=BCS32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BCS32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmeFud3EPHy7wQe8UENgvh96HdAazEkwqA2AutCNkYvB3t?filename=BGC32Setup12e.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGC32Setup12e.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmZQGY9CeATEiWrSqsKBz4AN6jPgQuvbBZSpQoLiMjoDr2?filename=BGX32Setup10h.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGX32Setup10h.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmZQGY9CeATEiWrSqsKBz4AN6jPgQuvbBZSpQoLiMjoDr2?filename=BDD32Setup.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BDD32Setup.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmWWZByYL5CsDSi6gQLGcMyBL7zqD5hWXbPXJr3shRt5AQ?filename=ESB32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/ESB32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmSZt6dz7WQkNrFBmYq9n4WdYrrZyQAebTBPo46uHqCuNi?filename=BFD32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BFD32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmVfQMMnqTD9Zm8Xwv7rGrUTdS9FXToq7Fv6wtQQVgbQGR?filename=BGF32Setup20.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGF32Setup20.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmfAp9EYou1pndLwYSdpYdUCHBv2DR94oFccQh1ii9JVLD?filename=GSB32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/GSB32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmXTPMmvw7JE2eLuPBLGSpkZqUn12TX7QEQZbX8qtp7GBx?filename=HMB32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/HMB32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmdU5ag1PRjvG28wNX7aNuJqZSVxaqEEKjgG6GoRoDT8k4?filename=BGH32Setup10b.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/${BGH32Setup10b.exe}" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmctBDvhQWwER94LvgauR7sMDxv9D1mS9cToV47orTCdzU?filename=BGK32Setup10b.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGK32Setup10b.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/Qma5WeCC9B2P5abRGX9nGYV8Zi9F8vfCCr4ehejP2bgmNm?filename=LAP32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/LAP32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmP6cwMbirbBqAaG9JLfNRnD2dvJfh6nq74kfwxs5hN2RQ?filename=BMM32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BMM32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmRa54HroWjwxHYfKr6hdmP34sHW5G3ecuzcjMA5UBBVKa?filename=MSB32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/MSB32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/Qmb7eGTMDgiaDC9muMW9n8bHoistGcNm1VgHc6sr7dRyHU?filename=BNW32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BNW32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmXKvQ6WNNSnDiSyYmvAhZXVdALnuhUGK7dSMQVkQNReJr?filename=BPS32Setup10c.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BPS32Setup10c.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmPLv74LiDgVGuiGhu9HuPhx3uoMm9QyCYk6jgeFUHjj3S?filename=BPS32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BPS32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmaqXaBKD3xY2smhU2LcejXRTPnWZHqaTW9se8yRepLsHu?filename=PSB32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/PSB32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmSxJs2MiLQ61Fgx6vCpSD7GmQziLiCEU3sZ3mgWc7RsJ8?filename=BSS32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BSS32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmVrwyPdJBnmc4wLW7oT2hexxXnXxs8bA7gfiqbnJsWJ16?filename=BGS32Setup20.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGS32Setup20.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmXtBCqB6VCFPaDYuLaFNP1BDtJSLCJdJZzgm61zMtrsQt?filename=BGS32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGS32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmdWBaDnLVbKCJSpiqF675ew6nJ6KHUVXA5FEH3t3E7UAu?filename=SPB32Setup10b.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/SPB32Setup10b.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmXCAHEVRGZBc8t45Jgn2vkxicwF9Aox6yz9XrQBdkv7WY?filename=SDB32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/SDB32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmYoiFQ6JuSXfZfZXT3SQDsYzMWLBu9rW9yivi1xiPjqZx?filename=SDB32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/SDB32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmWJGvSR6iaQfMHM3XuGCkWxx285jkzSDdNSvvk3bSCH8S?filename=TPB32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/TPB32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmWAk2TMHMvW6Kjc1sZBEPsxmCNHfY3nF1K723PCqaTa57?filename=T20B32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/T20B32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmVsfPkebSoTDwYSXF1n7y4P9eGJTgTcGXdrEjpcV8A3Dv?filename=BGU32Setup11a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGU32Setup11a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmXtR49EZShyj15Tc9CXQpBYVmKNfZpp4515Epm16bviuH?filename=BWB32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BWB32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmfTgfRzd4JMRqKSfDiz76iMorkaG19BqH1K7nRCCDwo4H?filename=WCB32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/WCB32Setup10a.exe" /silent
|
||||
|
@ -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
|
||||
wine "${cache}/BWJ32Setup10.exe" /silent
|
||||
add_launcher "c:\Program Files\Games\WordJumbleB\WordJumbleB.exe"
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmXPtj5PkVZjXpU3m6FAfm8MwVL6bQCvhEDoR385u6FGTL?filename=BWM32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BWM32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmZp73ARDPqgnCz7zxfKeBHjNoHrgZSgg2NdQZR2sMyZGD?filename=WSB32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/WSB32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmWWZFXVHNtmNkH55oermWWtrMcQ8qVqL687B7kGFyeezq?filename=WTB32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/WTB32Setup10a.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmdicAVDegDktY3euVAC2PPn4YBGz96KedxYXNe4WDQaoq?filename=BWY32Setup10.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BWY32Setup10.exe" /silent
|
||||
|
@ -1,4 +1,4 @@
|
||||
export bottle="bg"
|
||||
export WINEARCH="win32"
|
||||
download "${ipfsGateway}/ipfs/QmZebvkKgFAADnb1cgW6Bz7wTYdUh82X61QdtW66KcvmpF?filename=BGY32Setup10a.exe"
|
||||
install_wine_bottle speechsdk
|
||||
wine "${cache}/BGY32Setup10a.exe" /silent
|
||||
|
@ -1,5 +1,4 @@
|
||||
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"
|
||||
|
@ -1,6 +1,9 @@
|
||||
# Source dialog interface wrapper
|
||||
source "${0%/*}/../.includes/dialog-interface.sh"
|
||||
|
||||
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,7 +12,7 @@ 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 -v "$dictFile" "${cache}/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"
|
||||
|
@ -1,7 +1,6 @@
|
||||
export WINEARCH=win64
|
||||
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
|
||||
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" "{}" \;
|
||||
|
@ -1,8 +1,5 @@
|
||||
export version="7.0"
|
||||
download "http://rsgames.org/rsdownloads/rsgclient/rsgames-client-setup-2.01.exe" "${nvdaControllerClientDll}"
|
||||
install_wine "$version" "32"
|
||||
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" "{}" \;
|
||||
find "${WINEPREFIX}/drive_c/Program Files/RS Games Client" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
|
||||
add_launcher "c:\Program Files\RS Games Client\rsg.exe"
|
||||
|
@ -1,3 +1,6 @@
|
||||
# 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"
|
||||
@ -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" "{}" \;
|
||||
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"
|
||||
if [[ ${#sidePartyUser} -gt 3 ]]; then
|
||||
|
@ -1,7 +1,10 @@
|
||||
# Source dialog interface wrapper
|
||||
source "${0%/*}/../.includes/dialog-interface.sh"
|
||||
|
||||
export bottle="aprone"
|
||||
export winVer="win7"
|
||||
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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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"
|
||||
@ -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"
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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' _ {} \;
|
||||
|
@ -1,18 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
# Set Voice
|
||||
# Set the default wine voice ba$sed on installed options.
|
||||
# Set the default wine voice based on installed options.
|
||||
|
||||
#
|
||||
# ■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
|
||||
# â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
|
||||
# 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
|
||||
# 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,
|
||||
# Software distributed under the License is distributed on an â ISâasis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
@ -42,6 +42,16 @@
|
||||
|
||||
#--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() {
|
||||
echo "${0##*/}"
|
||||
echo "Released under the terms of the Common Public Attribution License Version 1.0"
|
||||
@ -81,18 +91,17 @@ declare -A command=(
|
||||
)
|
||||
|
||||
|
||||
|
||||
msgbox() {
|
||||
# Returns: None
|
||||
# Shows the provided message on the screen with an ok button.
|
||||
dialog --clear --msgbox "$*" 0 0
|
||||
agm_msgbox "Set Voice" "Set Voice" "$*"
|
||||
}
|
||||
|
||||
infobox() {
|
||||
# Returns: None
|
||||
# Shows the provided message on the screen with no buttons.
|
||||
local timeout=3
|
||||
dialog --infobox "$*" 0 0
|
||||
agm_infobox "Set Voice" "Set Voice" "$*"
|
||||
read -n1 -t $timeout continue
|
||||
# Clear any keypresses from the buffer
|
||||
read -t 0.01 continue
|
||||
@ -103,7 +112,7 @@ yesno() {
|
||||
# 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
|
||||
agm_yesno "Set Voice" "Set Voice" "$*"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "Yes"
|
||||
else
|
||||
@ -118,12 +127,7 @@ menulist() {
|
||||
for i in "${@}" ; do
|
||||
menuList+=("$i" "$i")
|
||||
done
|
||||
dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \
|
||||
--clear \
|
||||
--extra-button \
|
||||
--extra-label "Test Voice" \
|
||||
--no-tags \
|
||||
--menu "Please select one" 0 0 0 "${menuList[@]}" --stdout
|
||||
agm_menu "Set Voice" "Set Voice" "Please select one" "${menuList[@]}"
|
||||
return $?
|
||||
}
|
||||
|
||||
@ -143,10 +147,18 @@ 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)"
|
||||
RHVoiceName="${RHVoiceName##*/}"
|
||||
local RHVoiceName=""
|
||||
local RHVoicePath="${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/"
|
||||
if [[ -d "$RHVoicePath" ]]; then
|
||||
RHVoiceName="$(find "$RHVoicePath" -maxdepth 1 -type d -not -path "$RHVoicePath" | head -1)"
|
||||
if [[ -n "$RHVoiceName" ]]; then
|
||||
RHVoiceName="${RHVoiceName##*/}"
|
||||
fi
|
||||
fi
|
||||
fullVoice="${voiceListFullName[$counter]}"
|
||||
fullVoice="${fullVoice/RHVoice/RHVoice\\\\${RHVoiceName}}"
|
||||
if [[ -n "$RHVoiceName" ]]; then
|
||||
fullVoice="${fullVoice/RHVoice/RHVoice\\\\${RHVoiceName}}"
|
||||
fi
|
||||
${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
|
||||
# Remove any existing rate change for voices
|
||||
$sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg"
|
||||
@ -162,13 +174,21 @@ 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)"
|
||||
RHVoiceName="${RHVoiceName##*/}"
|
||||
local RHVoiceName=""
|
||||
local RHVoicePath="${WINEPREFIX}/drive_c/ProgramData/Olga Yakovleva/RHVoice/data/voices/"
|
||||
if [[ -d "$RHVoicePath" ]]; then
|
||||
RHVoiceName="$(find "$RHVoicePath" -maxdepth 1 -type d -not -path "$RHVoicePath" | head -1)"
|
||||
if [[ -n "$RHVoiceName" ]]; then
|
||||
RHVoiceName="${RHVoiceName##*/}"
|
||||
fi
|
||||
fi
|
||||
fullVoice="${voiceListFullName[$counter]}"
|
||||
fullVoice="${fullVoice/RHVoice/RHVoice\\\\${RHVoiceName}}"
|
||||
if [[ -n "$RHVoiceName" ]]; then
|
||||
fullVoice="${fullVoice/RHVoice/RHVoice\\\\${RHVoiceName}}"
|
||||
fi
|
||||
${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
|
||||
$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"
|
||||
$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" > "${WINEPREFIX}/drive_c/windows/temp/speak.vbs"
|
||||
dim speechobject
|
||||
set speechobject=createobject("sapi.spvoice")
|
||||
speechobject.speak "This is a test of your chosen voice. It contains multiple sentences and punctuation, and is designed to give a full representation of this voices qualities."
|
||||
@ -186,12 +206,20 @@ args="${args//[[:space:]]/}"
|
||||
while getopts "${args}" i ; do
|
||||
case "$i" in
|
||||
b)
|
||||
if ! [[ -d ~/".local/wine/${OPTARG}" ]]; then
|
||||
# Check for valid bottles in all possible locations
|
||||
if [[ -d ~/.local/wine/${OPTARG} ]]; then
|
||||
export bottle=~/.local/wine/${OPTARG}
|
||||
export WINEPREFIX=~/.local/wine/${OPTARG}
|
||||
elif [[ -d ~/.local/wine32 && ${OPTARG} == "wine32" ]]; then
|
||||
export bottle=~/.local/wine32
|
||||
export WINEPREFIX=~/.local/wine32
|
||||
elif [[ -d ~/.local/wine64 && ${OPTARG} == "wine64" ]]; then
|
||||
export bottle=~/.local/wine64
|
||||
export WINEPREFIX=~/.local/wine64
|
||||
else
|
||||
echo "Invalid wine bottle specified."
|
||||
exit 1
|
||||
fi
|
||||
export bottle=~/".local/wine/${OPTARG}"
|
||||
export WINEPREFIX=~/".local/wine/${OPTARG}"
|
||||
;;
|
||||
h) help;;
|
||||
r)
|
||||
@ -210,14 +238,25 @@ done
|
||||
|
||||
# Offer a list of wine bottles if one isn't specified on the command line.
|
||||
if [[ -z "${bottle}" ]]; then
|
||||
declare -a bottle
|
||||
for i in $(find ~/.local/wine/ -maxdepth 1 -type d -not -name 'wine' | sort) ; do
|
||||
bottle+=("$i" "${i##*/}")
|
||||
declare -a bottles=()
|
||||
|
||||
# Check for wine32 and wine64 bottles
|
||||
[[ -d ~/.local/wine32 ]] && bottles+=("$HOME/.local/wine32" "wine32")
|
||||
[[ -d ~/.local/wine64 ]] && bottles+=("$HOME/.local/wine64" "wine64")
|
||||
|
||||
# Add bottles from ~/.local/wine directory
|
||||
if [[ -d ~/.local/wine ]]; then
|
||||
for i in $(find ~/.local/wine/ -maxdepth 1 -type d -not -name 'wine' | sort); do
|
||||
bottles+=("$i" "${i##*/}")
|
||||
done
|
||||
export WINEPREFIX="$(dialog --backtitle "Use the up and down arrow keys to find the option you want, then press enter to select it." \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--menu "Select A Wine Bottle" 0 0 0 "${bottle[@]}" --stdout)"
|
||||
fi
|
||||
|
||||
if [[ ${#bottles[@]} -eq 0 ]]; then
|
||||
echo "No wine bottles found in ~/.local/wine32, ~/.local/wine64, or ~/.local/wine/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export WINEPREFIX="$(agm_menu "Set Voice" "Set Voice" "Select A Wine Bottle" "${bottles[@]}")"
|
||||
fi
|
||||
|
||||
if [[ -z "${WINEPREFIX}" ]]; then
|
||||
@ -231,9 +270,16 @@ if [[ -r "${WINEPREFIX}/agm.conf" ]]; then
|
||||
export WINESERVER
|
||||
fi
|
||||
wine="${WINE:-$(command -v wine)}"
|
||||
wineserver="${WINESERVER:-$(command -v wineserver)}"
|
||||
|
||||
# Debug information - comment out or delete when not needed
|
||||
# echo "Using wine bottle: ${WINEPREFIX}"
|
||||
# echo "Wine executable: ${wine}"
|
||||
# echo "Wineserver executable: ${wineserver}"
|
||||
|
||||
# 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"
|
||||
mkdir -p "${WINEPREFIX}/drive_c/windows/temp"
|
||||
cat << "EOF" > "${WINEPREFIX}/drive_c/windows/temp/speak.vbs"
|
||||
dim speechobject
|
||||
set speechobject=createobject("sapi.spvoice")
|
||||
speechobject.speak ""
|
||||
@ -245,6 +291,13 @@ ifs="$IFS"
|
||||
IFS=$'\n'
|
||||
voiceListFullName=($($grep -P '\[Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^\\]+\].*' "${WINEPREFIX}/system.reg" | $sed -E -e 's/\[([^]]+)\].*/\1/g'))
|
||||
IFS="$ifs"
|
||||
|
||||
# Debug the voice list - comment out or delete when not needed
|
||||
# echo "Found ${#voiceListFullName[@]} voices in registry"
|
||||
# for voice in "${voiceListFullName[@]}"; do
|
||||
# echo "Voice: $voice"
|
||||
# done
|
||||
|
||||
voiceList=()
|
||||
for x in "${voiceListFullName[@]}" ; do
|
||||
voiceList+=("$(echo "$x" | $sed -E -e 's/Software\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\(.+)/\3/g')")
|
||||
@ -252,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')"
|
||||
exit=1
|
||||
if [[ "${#voiceList[@]}" -eq 0 ]]; then
|
||||
dialog --msgbox "No voices found." -1 -1
|
||||
agm_msgbox "Set Voice" "Set Voice" "No voices found in ${WINEPREFIX}. Make sure SAPI voices are installed in this Wine prefix."
|
||||
exit 1
|
||||
fi
|
||||
while [[ $exit -ne 0 ]] ; do
|
||||
|
42
wine/install-dependencies.sh → wine/install-dependencies-arch.sh
Executable file → Normal file
42
wine/install-dependencies.sh → wine/install-dependencies-arch.sh
Executable file → Normal file
@ -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
|
29
wine/install-dependencies-debian.sh
Normal file
29
wine/install-dependencies-debian.sh
Normal file
@ -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
|
@ -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
|
||||
|
Reference in New Issue
Block a user