A little more progress on refactor.

This commit is contained in:
Storm Dragon
2025-06-10 01:54:56 -04:00
parent e3df3c4485
commit da065e5835
5 changed files with 22 additions and 18 deletions

View File

@ -111,9 +111,10 @@ install_wine_bottle() {
# Set the WINE and WINESERVER environmental variables so winetricks will use the right installation. # Set the WINE and WINESERVER environmental variables so winetricks will use the right installation.
export WINE="${wine}" export WINE="${wine}"
export WINESERVER="${wine}server" export WINESERVER="${wine}server"
# Installation paths are based on WINEARCH unless bottle is set. # Installation paths are based on WINEARCH unless game is set for custom bottle.
if [[ ${#bottle} -gt 0 ]]; then local bottle=""
local bottle="${game,,}" if [[ ${#game} -gt 0 ]]; then
bottle="${game,,}"
bottle="${bottle//[[:space:]]/-}" bottle="${bottle//[[:space:]]/-}"
if [[ -d "$HOME/.local/wine/${bottle}" ]]; then if [[ -d "$HOME/.local/wine/${bottle}" ]]; then
echo "$HOME/.local/wine/${bottle} exists. Please remove it before running this installer." echo "$HOME/.local/wine/${bottle} exists. Please remove it before running this installer."

View File

@ -44,9 +44,3 @@ fi
git log '@{1}..' --pretty=format:'%an: %s' | tac; } git log '@{1}..' --pretty=format:'%an: %s' | tac; }
exit $? exit $?
} }
# Get latest news if available
check_news
# With no arguments, open the game launcher.
if [[ $# -eq 0 ]]; then
game_launcher
fi

View File

@ -1,5 +1,5 @@
export WINEARCH="win32" export WINEARCH="win32"
download "${ipfsGateway}/ipfs/QmYQWZZifzKJSuVRCC1SabwRmEDz95GdFvbzRvsBMmTt6e?filename=BWJ32Setup10.exe" download "${ipfsGateway}/ipfs/QmYQWZZifzKJSuVRCC1SabwRmEDz95GdFvbzRvsBMmTt6e?filename=BWJ32Setup10.exe"
install_wine_bottle speechsdk install_wine_bottle speechsdk
wine "${cache}/BWJ32Setup10.wineExec" /silent wine "${cache}/BWJ32Setup10.exe" /silent
add_launcher "c:\Program Files\Games\WordJumbleB\WordJumbleB.exe" add_launcher "c:\Program Files\Games\WordJumbleB\WordJumbleB.exe"

View File

@ -1,7 +1,6 @@
export WINEARCH=win64
get_installer "bounce_bounce.rar" "https://kavyapriya.itch.io/bounce-bounce" get_installer "bounce_bounce.rar" "https://kavyapriya.itch.io/bounce-bounce"
download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll" download "https://github.com/RastislavKish/nvda2speechd/releases/download/v0.1/nvda2speechd64.dll"
export winVer="win7"
export WINEARCH=win64
install_wine_bottle install_wine_bottle
unrar x "${cache}/bounce_bounce.rar" -op"$WINEPREFIX/drive_c/Program Files" 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" "{}" \; find "${WINEPREFIX}/drive_c/Program Files/bounce_bounce" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvda2speechd64.dll" "{}" \;

View File

@ -267,7 +267,7 @@ custom_launch_parameters() {
} }
# Process game launcher flags # Process game launcher flags
process_launcher-flags() { process_launcher_flags() {
flags=("${game[@]:3}") flags=("${game[@]:3}")
for i in "${flags[@]}" ; do for i in "${flags[@]}" ; do
if [[ "${i}" =~ ^export\ [a-zA-Z_][a-zA-Z0-9_]*=\'?.*\'?$ ]]; then if [[ "${i}" =~ ^export\ [a-zA-Z_][a-zA-Z0-9_]*=\'?.*\'?$ ]]; then
@ -375,7 +375,7 @@ game_launcher() {
fi fi
fi fi
fi fi
process_launcher-flags process_launcher_flags
custom_launch_parameters custom_launch_parameters
${wine:-/usr/bin/wine} start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime ${wine:-/usr/bin/wine} start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
fi fi
@ -486,7 +486,7 @@ while getopts "${args}" i ; do
h) help;; h) help;;
i) game_installer;; i) game_installer;;
I) I)
game="${OPTARG}" export game="${OPTARG}"
break;; break;;
k) kill_game;; k) kill_game;;
L) license;; L) license;;
@ -501,7 +501,7 @@ while getopts "${args}" i ; do
r) game_removal;; r) game_removal;;
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" \ dialog --backtitle "Linux Game Manager" \
--infobox "There are currently ${gameCount} games available." -1 -1 --infobox "There are currently ${gameCount} games available." -1 -1
exit 0 exit 0
@ -511,7 +511,17 @@ while getopts "${args}" i ; do
esac esac
done done
# If agmNoLaunch is set, exit (script is being sourced)
[[ "$agmNoLaunch" == "true" ]] && exit 0
# If no game specified, exit
[[ ${#game} -lt 1 ]] && exit 0 [[ ${#game} -lt 1 ]] && exit 0
# Install the specified game noninteractively
[[ "$agmNoLaunch" != "true" ]] && exit 0 if [[ -f ".install/${game}.sh" ]]; then
export LANG="en_US.UTF-8"
. ".install/${game}.sh"
else
echo "Error: Game '${game}' not found in .install directory"
exit 1
fi