This commit is contained in:
Michael Taboada 2021-08-09 17:57:53 -07:00
commit 7bc44e1925

View File

@ -307,6 +307,9 @@ download() {
dest="${dest//%20/ }" dest="${dest//%20/ }"
# Remove the destination file if it is empty. # Remove the destination file if it is empty.
test -s "${cache}/${dest}" || rm -f "${cache}/${dest}" 2> /dev/null test -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. # Skip if the item is in cache.
test -e "${cache}/${dest}" && continue test -e "${cache}/${dest}" && continue
if ! wget -4 -O "${cache}/${dest}" "${i}" ; then if ! wget -4 -O "${cache}/${dest}" "${i}" ; then
@ -696,7 +699,9 @@ game_launcher() {
exit 0 exit 0
fi fi
if [[ "$game" =~ warsim ]]; then if [[ "$game" =~ warsim ]]; then
wine "$winePath\\$wineExec" pushd "$(winepath "$winePath")"
wine "$wineExec"
popd
exit 0 exit 0
fi fi
if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then if [[ -d "${WINEPREFIX}/drive_c/windows/syswow64" ]]; then
@ -928,6 +933,7 @@ declare -A command=(
[l:]="Launch given game without interactive audiogame-manager menu specified by its wine bottle." [l:]="Launch given game without interactive audiogame-manager menu specified by its wine bottle."
[N]="No cache, delete the installer after it has been extracted." [N]="No cache, delete the installer after it has been extracted."
[P]="Print a list of packages required by audiogame-manager." [P]="Print a list of packages required by audiogame-manager."
[R]="Redownload. Removes old versions of packages from cache before installing."
[r]="Remove a game. This will delete all game data." [r]="Remove a game. This will delete all game data."
) )
@ -952,6 +958,7 @@ while getopts "${args}" i ; do
l) game_launcher "${OPTARG}";; l) game_launcher "${OPTARG}";;
N) noCache="true";; N) noCache="true";;
P) checklist quiet;; P) checklist quiet;;
R) redownload="true";;
r) game_removal;; r) game_removal;;
esac esac
done done
@ -1434,7 +1441,7 @@ case "${game}" in
;; ;;
"Constant Battle") "Constant Battle")
export winVer="win7" export winVer="win7"
install_wine_bottle speechsdk install_wine_bottle cjkfonts speechsdk
download "https://renovagames.com/bc/BC-Setup.exe" download "https://renovagames.com/bc/BC-Setup.exe"
wine "${cache}/BC-Setup.exe" /silent wine "${cache}/BC-Setup.exe" /silent
#add_launcher "c:\Program Files\" #add_launcher "c:\Program Files\"