Hopefully the automate installer using xdotool will work now. There's a wineserver -w in case something goes wrong to give the user a chance to fix with ocrdesktop.
This commit is contained in:
parent
cf08791ba0
commit
20f11c04a3
@ -17,6 +17,16 @@ checklist() {
|
||||
else
|
||||
errorList+=("Critical: Wget is not installed. You will not be able to install any games.")
|
||||
fi
|
||||
if command -v ocrdesktop &> /dev/null ; then
|
||||
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
|
||||
if command -v unix2dos &> /dev/null ; then
|
||||
echo "Dos2unix is installed."
|
||||
else
|
||||
errorList+=("Warning: unix2dos is not installed. Some games need a configuration file in dos format before they will run.")
|
||||
fi
|
||||
if [[ -d /usr/share/wine/gecko/ ]]; then
|
||||
echo "Found wine gecko."
|
||||
else
|
||||
@ -135,17 +145,19 @@ add_launcher() {
|
||||
|
||||
automate_installer() {
|
||||
# Function arguments are the keys to be pressed.
|
||||
declare -a keyListD=("sleep 20")
|
||||
sleep 15
|
||||
declare -a keyList
|
||||
for i in ${@} ; do
|
||||
case "$i" in
|
||||
"alt+f") keyList+=("key ${i}");;
|
||||
"alt+i") keyList+=("sleep 10 key ${i}");;
|
||||
"alt+"*) keyList+=("key ${i} sleep 2");;
|
||||
*"+"*) keyList+=("key ${i} sleep 2");;
|
||||
*) xdotool sleep 15 type ${i} & ;;
|
||||
"alt+f") keyList+=("sleep 15 key ${i}");;
|
||||
"space") keyList+=("sleep 1 key ${i}");;
|
||||
*"+"*) keyList+=("sleep 1 key ${i}");;
|
||||
*) xdotool sleep 1 type ${i};;
|
||||
esac
|
||||
done
|
||||
xdotool ${keyList[*]} &
|
||||
# call wineserver -w in case something failed here, the user will have a chance to try to fix it.
|
||||
wineserver -w
|
||||
}
|
||||
|
||||
# Settings file
|
||||
@ -158,6 +170,8 @@ export WINEDEBUG="-all"
|
||||
# During installation, you can set winVer to the versions available.
|
||||
# To set winetricks arguments, such as virtual desktop, set the winetricksSettings variable.
|
||||
# Example: winetricksSettings="vd=1024x768"
|
||||
# Manual installation is not default, make sure it's unset
|
||||
unset manualInstall
|
||||
|
||||
# The list of games available for installation.
|
||||
# Use menu friendly names.
|
||||
@ -187,6 +201,7 @@ fi
|
||||
command=(
|
||||
"c" # Check wine environment
|
||||
"i" # Install games
|
||||
"m" # Manually handle install screens
|
||||
)
|
||||
|
||||
while getopts "${command[*]//[[:space:]]/}" i ; do
|
||||
@ -194,6 +209,7 @@ while getopts "${command[*]//[[:space:]]/}" i ; do
|
||||
c) checklist;;
|
||||
h) show_help;;
|
||||
i) game_installer;;
|
||||
i) manualInstall="true"
|
||||
esac
|
||||
done
|
||||
|
||||
@ -222,9 +238,16 @@ case "${game}" in
|
||||
rm -f "$WINEPREFIX/drive_c/Program Files/Kitchensinc complete Setup.exe"
|
||||
;;
|
||||
"Light Cars")
|
||||
install_wine_bottle dx8vb
|
||||
install_wine_bottle dx8vb vb6run
|
||||
wget -O "$WINEPREFIX/drive_c/Program Files/light cars setup.exe" "https://www.agarchive.net/games/lighttech/light%20cars%20setup.exe"
|
||||
wine "$WINEPREFIX/drive_c/Program Files/light cars setup.exe" /silent
|
||||
if [[ -n "$manualInstall" ]]; then
|
||||
wine "$WINEPREFIX/drive_c/Program Files/light cars setup.exe"
|
||||
else
|
||||
wine "$WINEPREFIX/drive_c/Program Files/light cars setup.exe" &
|
||||
automate_installer alt+n alt+a space alt+n alt+n alt+i alt+f
|
||||
fi
|
||||
echo -e "${USER} ${HOST}\nna@na.na\nUS" > ~/.local/wine/light-cars/drive_c/Program\ Files/Lighttech\ Interactive/Light\ Cars/config.dat
|
||||
unix2dos ~/.local/wine/light-cars/drive_c/Program\ Files/Lighttech\ Interactive/Light\ Cars/config.dat
|
||||
add_launcher "c:\Program Files\Lighttech Interactive\Light Cars\lightCars.exe"
|
||||
rm -f "$WINEPREFIX/drive_c/Program Files/light cars setup.exe"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user