Merge branch 'testing' in preparation for binary release.

This commit is contained in:
Storm Dragon 2021-10-24 09:37:39 -04:00
commit e091ff036b
6 changed files with 162 additions and 75 deletions

View File

@ -79,7 +79,11 @@ update() {
if [[ "$(uname)" == "Darwin" ]]; then if [[ "$(uname)" == "Darwin" ]]; then
local downloadFile="audiogame-manager.mac" local downloadFile="audiogame-manager.mac"
else else
if [[ "$(uname -m)" == "armv7l" ]]; then
local downloadFile="audiogame-manager.arm"
else
local downloadFile="audiogame-manager" local downloadFile="audiogame-manager"
fi
fi fi
if [[ "$(wget --quiet -O - https://stormgames.wolfe.casa/downloads/${downloadFile} | sha256sum | cut -d ' ' -f1)" == "$(sha256sum "${filePath}" | cut -d ' ' -f1)" ]]; then if [[ "$(wget --quiet -O - https://stormgames.wolfe.casa/downloads/${downloadFile} | sha256sum | cut -d ' ' -f1)" == "$(sha256sum "${filePath}" | cut -d ' ' -f1)" ]]; then
return return
@ -103,9 +107,9 @@ update() {
# Function to open urls across OS. # Function to open urls across OS.
open_url() { open_url() {
if [[ "$(uname)" == "Darwin" ]]; then if [[ "$(uname)" == "Darwin" ]]; then
open "${*}" open "${*}" 2> /dev/null
else else
xdg-open "${*}" xdg-open "${*}" 2> /dev/null
fi fi
} }
@ -181,12 +185,6 @@ checklist() {
errorList+=("Critical: Wine is not installed. You will not be able to play any games.") errorList+=("Critical: Wine is not installed. You will not be able to play any games.")
fi fi
packageList+=("wine") packageList+=("wine")
if command -v winetricks &> /dev/null ; then
[[ $# -eq 0 ]] && echo "Winetricks is installed."
else
errorList+=("Critical: Winetricks is not installed. This means wine cannot be configured, dependancies cannot be installed, and only self-voicing games have any chance of working.")
fi
packageList+=("winetricks")
if command -v curl &> /dev/null ; then if command -v curl &> /dev/null ; then
[[ $# -eq 0 ]] && echo "Curl is installed." [[ $# -eq 0 ]] && echo "Curl is installed."
else else
@ -442,6 +440,22 @@ echo "Loading documentation, please wait..."
exit 0 exit 0
} }
winetricks() {
# Download or update agm's copy of winetricks
if [[ ! -e "${cache}/winetricks" ]]; then
checkWinetricksUpdate="true"
download "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
chmod 700 "${cache}/winetricks"
else
if [[ "$checkWinetricksUpdate" != "true" ]]; then
checkWinetricksUpdate="true"
${cache}/winetricks --self-update
fi
fi
# Run the requested winetricks parameters
${cache}/winetricks "$@"
}
install_wine_bottle() { install_wine_bottle() {
# 32 bit installations work best and are the default here, if you need to override it, do it in the game specific installation steps. # 32 bit installations work best and are the default here, if you need to override it, do it in the game specific installation steps.
export WINEARCH="${WINEARCH:-win32}" export WINEARCH="${WINEARCH:-win32}"
@ -456,8 +470,8 @@ install_wine_bottle() {
export WINEPREFIX="$HOME/.local/wine/${bottle}" export WINEPREFIX="$HOME/.local/wine/${bottle}"
# Arguments to the function are dependancies to be installed. # Arguments to the function are dependancies to be installed.
# Get location of mono and gecko. # Get location of mono and gecko.
monoPath="$(find /usr/share/wine/mono -name "wine-mono*x86.msi")" monoPath="$(find /usr/share/wine/mono -name "wine-mono*x86.msi" 2> /dev/null)"
geckoPath="$(find /usr/share/wine/gecko -name "wine-gecko*x86.msi")" geckoPath="$(find /usr/share/wine/gecko -name "wine-gecko*x86.msi" 2> /dev/null)"
if [[ -z "$monoPath" ]]; then if [[ -z "$monoPath" ]]; then
download 'http://dl.winehq.org/wine/wine-mono/6.0.0/wine-mono-6.0.0-x86.msi' 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" monoPath="${cache}/wine-mono-6.0.0-x86.msi"
@ -757,8 +771,11 @@ cache="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/cache"
configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf" configFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/games.conf"
mkdir -p "${cache}" mkdir -p "${cache}"
mkdir -p "${configFile%/*}" mkdir -p "${configFile%/*}"
checkWinetricksUpdate="false"
# Turn off debug messages # Turn off debug messages
export WINEDEBUG="-all" export WINEDEBUG="-all"
# Compatibility with box86
export BOX86_NOBANNER=1
# During installation, you can set winVer to the versions available. # During installation, you can set winVer to the versions available.
# To set winetricks arguments, such as virtual desktop, set the winetricksSettings variable. # To set winetricks arguments, such as virtual desktop, set the winetricksSettings variable.
# Example: winetricksSettings="vd=1024x768" # Example: winetricksSettings="vd=1024x768"
@ -835,6 +852,7 @@ gameList=(
"Copter Mission" "Copter Mission"
"Crazy Party" "Crazy Party"
"Crazy Tennis" "Crazy Tennis"
"Crime Hunter"
"Danger on the Wheel" "Danger on the Wheel"
"Death on the Road" "Death on the Road"
"Deathmatch" "Deathmatch"
@ -866,10 +884,11 @@ gameList=(
"Lunimals" "Lunimals"
"Manamon" "Manamon"
"Manamon 2" "Manamon 2"
#"MudSplat French" "Monkey Business"
"MudSplat French"
"MudSplat English" "MudSplat English"
#"MudSplat Swedish" #"MudSplat Swedish"
"Oh Shit!" "Oh Shit"
"Pacman Talks" "Pacman Talks"
"Palace Punch Up" "Palace Punch Up"
"Paladin of the Sky" "Paladin of the Sky"
@ -878,7 +897,6 @@ gameList=(
"Pontes Kickups!" "Pontes Kickups!"
#"Psycho Strike" #"Psycho Strike"
"Q9" "Q9"
#"Revenge of the Undead"
"Rhythm Rage" "Rhythm Rage"
#"River raiders" #"River raiders"
"RS Games" "RS Games"
@ -891,6 +909,7 @@ gameList=(
"Shades of Doom" "Shades of Doom"
"Silver Dollar" "Silver Dollar"
"Slender Lost Vision" "Slender Lost Vision"
#"Shooter"
"Sonic Zoom" "Sonic Zoom"
#"Space Defender" #"Space Defender"
"Super Dogs Bone Hunt" "Super Dogs Bone Hunt"
@ -1489,9 +1508,9 @@ case "${game}" in
export winVer="win7" export winVer="win7"
install_wine_bottle speechsdk install_wine_bottle speechsdk
download "http://pragmapragma.free.fr/crazy-party/Crazy-Party-beta76.zip" download "http://pragmapragma.free.fr/crazy-party/Crazy-Party-beta76.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/Crazy-Party-beta75.zip" unzip -d "$WINEPREFIX/drive_c/Program Files" "${cache}/Crazy-Party-beta76.zip"
add_launcher "c:\Program Files\Crazy-Party-beta75\Crazy Party.exe" add_launcher "c:\Program Files\Crazy-Party-beta76\Crazy Party.exe"
rm -f "${WINEPREFIX}/drive_c/Program Files/Crazy-Party-beta75/nvdaControllerClient32.dll" rm -f "${WINEPREFIX}/drive_c/Program Files/Crazy-Party-beta76/nvdaControllerClient32.dll"
;; ;;
"Crazy Tennis") "Crazy Tennis")
install_wine_bottle speechsdk install_wine_bottle speechsdk
@ -1499,6 +1518,15 @@ case "${game}" in
wine "${cache}/crazy tennis setup.exe" /sp- /silent wine "${cache}/crazy tennis setup.exe" /sp- /silent
add_launcher "c:\Program Files\Crazytennis\crazytennis.exe" add_launcher "c:\Program Files\Crazytennis\crazytennis.exe"
;; ;;
"Crime Hunter")
export WINEARCH=win64
export winVer="win7"
install_wine_bottle
download "http://masonasons.me/softs/CH2.0Win.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient64.dll"
unzip -d "$WINEPREFIX/drive_c/Program Files/crime-hunter" "${cache}/CH2.0Win.zip"
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvdaControllerClient64.dll" "{}" \;
add_launcher "c:\Program Files\crime-hunter\ch.exe"
;;
"Danger on the Wheel") "Danger on the Wheel")
export bottle="oriol-gomez" export bottle="oriol-gomez"
export winVer="win7" export winVer="win7"
@ -1819,6 +1847,17 @@ EOF
wine "${cache}/manamon2_installer.exe" /silent wine "${cache}/manamon2_installer.exe" /silent
add_launcher "c:\Program Files\VGStorm.com\Manamon 2\rpg.exe" add_launcher "c:\Program Files\VGStorm.com\Manamon 2\rpg.exe"
;; ;;
"Monkey Business")
export winVer="win7"
install_wine_bottle vb6run dx8vb speechsdk quartz
download "http://download.dracoent.com/Windows/classic/MBSetup.exe"
wine "${cache}/MBSetup.exe" /sp- /silent
# warning warning warning: Do not change location, or installer will not function.
# FIXME: Hacky, but it works. Install dotnet20 by itself so it actually doesn't hang.
winetricks -q dotnet20
wineserver -k # Damn you, dotnet.
add_launcher "c:\Program Files\Draconis Entertainment\Monkey Business\mb.exe"
;;
"MudSplat English") "MudSplat English")
a="a" a="a"
f="f" f="f"
@ -1827,7 +1866,7 @@ EOF
;& ;&
"MudSplat French") "MudSplat French")
# Variables may be already set for English installation, so make sure not to overwrite them. # Variables may be already set for English installation, so make sure not to overwrite them.
a="${a:-a}" a="${a:-j}"
f="${f:-t}" f="${f:-t}"
i="${i:-i}" i="${i:-i}"
n="${n:-s}" n="${n:-s}"
@ -1849,7 +1888,7 @@ EOF
mudsplatLauncher="${mudsplatLauncher##*/}" mudsplatLauncher="${mudsplatLauncher##*/}"
add_launcher "c:\Program Files\TiM\MudSplat\\${mudsplatLauncher}" add_launcher "c:\Program Files\TiM\MudSplat\\${mudsplatLauncher}"
;; ;;
"Oh Shit!") "Oh Shit")
export winVer="win7" export winVer="win7"
install_wine_bottle speechsdk install_wine_bottle speechsdk
download "http://samtupy.com/stevend/oh_shit.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll" download "http://samtupy.com/stevend/oh_shit.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll"
@ -1903,14 +1942,6 @@ EOF
wine "${cache}/q9_english_installer.exe" /silent wine "${cache}/q9_english_installer.exe" /silent
add_launcher "c:\Program Files\Q9 Action Game\q9.exe" add_launcher "c:\Program Files\Q9 Action Game\q9.exe"
;; ;;
"Revenge of the Undead")
export winVer="win7"
install_wine_bottle speechsdk
download "https://ims-productions.com/downloads/rotu.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/revenge of the undead" "${cache}/rotu.zip"
find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \;
add_launcher "c:\Program Files\revenge of the undead\rotu.exe"
;;
"Rhythm Rage") "Rhythm Rage")
export bottle="oriol-gomez" export bottle="oriol-gomez"
export winVer="win7" export winVer="win7"
@ -2012,6 +2043,16 @@ EOF
unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/slender.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/" "${cache}/slender.zip"
add_launcher "c:\Program Files\slender\slender.exe" add_launcher "c:\Program Files\slender\slender.exe"
;; ;;
"Shooter")
export WINEARCH=win64
export winVer="win7"
install_wine_bottle
download "http://masonasons.me/softs/Shooter.zip" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient32.dll" "https://stormgames.wolfe.casa/downloads/nvdaControllerClient64.dll"
unzip -d "$WINEPREFIX/drive_c/Program Files/shooter" "${cache}/Shooter.zip"
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient32.dll' -exec cp -v "${cache}/nvdaControllerClient32.dll" "{}" \;
find "${WINEPREFIX}" -type f -name 'nvdaControllerClient64.dll' -exec cp -v "${cache}/nvdaControllerClient64.dll" "{}" \;
add_launcher "c:\Program Files\shooter\shooter.exe"
;;
"Sonic Zoom") "Sonic Zoom")
export winVer="win7" export winVer="win7"
install_wine_bottle speechsdk install_wine_bottle speechsdk

View File

@ -1,49 +0,0 @@
#!/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
# 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 â 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.
#
# The Original Code is audiogame manager.
#
# The Original Developer is not the Initial Developer and is . If
# left blank, the Original Developer is the Initial Developer.
#
# The Initial Developer of the Original Code is Billy "Storm Dragon" Wolfe. All portions of
# the code written by Billy Wolfe are Copyright (c) 2020. All Rights
# Reserved.
#
# Contributor Michael Taboada.
#
# Contributor Jeremiah Ticket.
#
# 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.
cache="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-manager/cache"
url="https://ims-productions.com/downloads/rotu.zip"
(rm -v "${cache}/rotu.zip"
wget -O "${cache}/rotu.zip" "$url" || exit 1
unzip -od "$HOME/.local/wine/revenge-of-the-undead/drive_c/Program Files/revenge of the undead" "${cache}/rotu.zip"
find "$HOME/.local/wine/revenge-of-the-undead" -type f -name 'nvdaControllerClient32.dll' -exec rm -fv {} \; ) | dialog --progressbox "updating Revenge of the undead, please wait..." -1 -1
exit 0

16
speech/nvda-dll/Makefile Normal file
View File

@ -0,0 +1,16 @@
CXX = i686-w64-mingw32-g++
DLLTOOL = i686-w64-mingw32-dlltool
all: nvdaControllerClient32.dll
nvdaControllerClient32.dll: nvdaControllerClient32.o exports.o
@$(CXX) -shared -o nvdaControllerClient32.dll nvdaControllerClient32.o exports.o
exports.o: nvdaControllerClient32.o
@$(DLLTOOL) -e exports.o nvdaControllerClient32.o
nvdaControllerClient32.o: nvdaControllerClient32.cpp
@$(CXX) -c nvdaControllerClient32.cpp
clean:
@rm -f nvdaControllerClient32.o exports.o

View File

@ -0,0 +1,17 @@
CXX = i686-w64-mingw32-g++
DLLTOOL = i686-w64-mingw32-dlltool
CC = i686-w64-mingw32-gcc
all: nvdaControllerClient32.dll
nvdaControllerClient32.dll: nvdaControllerClient32.o exports.o
@$(CC) -shared -o nvdaControllerClient32.dll nvdaControllerClient32.o exports.o
exports.o: nvdaControllerClient32.o
@$(DLLTOOL) -e exports.o nvdaControllerClient32.o
nvdaControllerClient32.o: nvdaControllerClient32.c
@$(CC) -c nvdaControllerClient32.cpp
clean:
@rm -f nvdaControllerClient32.o exports.o

View File

@ -0,0 +1,28 @@
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
unsigned long __stdcall __declspec(dllexport) nvdaController_speakText(const wchar_t* text);
unsigned long __stdcall __declspec(dllexport) nvdaController_cancelSpeech();
unsigned long __stdcall __declspec(dllexport) nvdaController_brailleMessage(const wchar_t* text);
unsigned long __stdcall __declspec(dllexport) nvdaController_testIfRunning();
#ifdef __cplusplus
}
#endif
unsigned long __stdcall __declspec(dllexport) nvdaController_speakText(const wchar_t* text) {
return 420;
}
unsigned long __stdcall __declspec(dllexport) nvdaController_cancelSpeech() {
return 420;
}
unsigned long __stdcall __declspec(dllexport) nvdaController_brailleMessage(const wchar_t* text) {
return 420;
}
unsigned long __stdcall __declspec(dllexport) nvdaController_testIfRunning() {
return 420;
}

View File

@ -0,0 +1,34 @@
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
unsigned long __stdcall __declspec(dllexport) nvdaController_speakText(const wchar_t* text);
unsigned long __stdcall __declspec(dllexport) nvdaController_cancelSpeech();
unsigned long __stdcall __declspec(dllexport) nvdaController_brailleMessage(const wchar_t* text);
unsigned long __stdcall __declspec(dllexport) nvdaController_testIfRunning();
#ifdef __cplusplus
}
#endif
asm (".section .drectve");
asm (".ascii \"-export:nvdaController_speakText\"");
asm (".ascii \"-export:nvdaController_cancelSpeech\"");
asm (".ascii \"-export:nvdaController_brailleMessage\"");
asm (".ascii \"-export:nvdaController_testIfRunning\"");
unsigned long __stdcall __declspec(dllexport) nvdaController_speakText(const wchar_t* text) {
return 420;
}
unsigned long __stdcall __declspec(dllexport) nvdaController_cancelSpeech() {
return 420;
}
unsigned long __stdcall __declspec(dllexport) nvdaController_brailleMessage(const wchar_t* text) {
return 420;
}
unsigned long __stdcall __declspec(dllexport) nvdaController_testIfRunning() {
return 420;
}