Update Installer

This commit is contained in:
Nicole George 2020-04-28 18:23:10 -05:00 committed by GitHub
parent 0ef0ac5975
commit 87da64f126
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,147 +12,155 @@ export WINE=$(which wine)
export WINETRICKSINSTALL="win7 corefonts droid ddr=gdi devenum wmp9 dmsynth wmv9vcm directplay quartz ie8" export WINETRICKSINSTALL="win7 corefonts droid ddr=gdi devenum wmp9 dmsynth wmv9vcm directplay quartz ie8"
start () { start () {
zenity --info --title="$WTITLE Installer" --text 'Welcome to the Worlds Linux setup installer maintained by Wirlaburla. This will setup and install Worlds for use on Linux systems through WINE.' --width=320 --ok-label="Next" errorcheck
settings zenity --info --title="$WTITLE Installer" --text 'Welcome to the Worlds Linux setup installer maintained by Wirlaburla. This will setup and install Worlds for use on Linux systems through WINE.' --width=320 --ok-label="Next"
settings
}
errorcheck () {
winetricks --help >> /dev/null || { zenity --error --title="$WTITLE Installer - Error" --text "Winetricks wasn't found! Please install it before continuing" --width=320 ; exit 1; }
wget --help >> /dev/null || { zenity --error --title="$WTITLE Installer - Error" --text "Wget wasn't found! Please install it before continuing" --width=320 ; exit 1; }
} }
settings () { settings () {
SelOptions=$(zenity --list --title="$WTITLE - Settings" --text="Installer Options for $WTITLE" --column='Option' --column='Value' --ok-label='Edit' --cancel-label='Exit' --extra-button='Next' --width=400 --height=260 \ SelOptions=$(zenity --list --title="$WTITLE - Settings" --text="Installer Options for $WTITLE" --column='Option' --column='Value' --ok-label='Edit' --cancel-label='Exit' --extra-button='Next' --width=400 --height=260 \
"Install Location" "$WORLDSDIR" \ "Install Location" "$WORLDSDIR" \
"Wine Location" "$WINE" \ "Wine Location" "$WINE" \
"Prefix Location" "$WINEPREFIX" \ "Prefix Location" "$WINEPREFIX" \
"WineArch" "$WINEARCH" \ "WineArch" "$WINEARCH" \
"Worlds Version" "$WORLDSVER" \ "Worlds Version" "$WORLDSVER" \
"Winetricks" "$WINETRICKSINSTALL" \ "Winetricks" "$WINETRICKSINSTALL" \
2>/dev/null) 2>/dev/null)
case $SelOptions in case $SelOptions in
'Install Location') 'Install Location')
WORLDSDIRSEL=$(zenity --file-selection --directory --title="$WTITLE - Install Location" --text="Wrapper Install Location" --save --confirm-overwrite --width=640 --height=480) WORLDSDIRSEL=$(zenity --file-selection --directory --title="$WTITLE - Install Location" --text="Wrapper Install Location" --save --confirm-overwrite --width=640 --height=480)
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
export WORLDSDIR=$WORLDSDIRSEL export WORLDSDIR=$WORLDSDIRSEL
fi fi
settings ;; settings ;;
'Wine Location') 'Wine Location')
WINESEL=$(zenity --entry --title="$WTITLE - Wine Binary Location" --text="Path to wine binary" --entry-text="$WINE") WINESEL=$(zenity --entry --title="$WTITLE - Wine Binary Location" --text="Path to wine binary" --entry-text="$WINE")
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
export WINE=$WINESEL export WINE=$WINESEL
fi fi
settings ;; settings ;;
'Prefix Location') 'Prefix Location')
WINEPREFIXSEL=$(zenity --file-selection --directory --title="$WTITLE - WinePrefix" --text="Worlds Prefix location" --save --confirm-overwrite --width=640 --height=480) WINEPREFIXSEL=$(zenity --file-selection --directory --title="$WTITLE - WinePrefix" --text="Worlds Prefix location" --save --confirm-overwrite --width=640 --height=480)
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
export WINEPREFIX=$WINEPREFIXSEL export WINEPREFIX=$WINEPREFIXSEL
fi fi
settings ;; settings ;;
'WineArch') 'WineArch')
WINEARCHSEL=$(zenity --list --radiolist --title="$WTITLE - WineArch" --text="Architecture for Wine" --column='Use' --column='winearch' --hide-header --width=100 --height=200 \ WINEARCHSEL=$(zenity --list --radiolist --title="$WTITLE - WineArch" --text="Architecture for Wine" --column='Use' --column='winearch' --hide-header --width=100 --height=200 \
TRUE 'win32' \ TRUE 'win32' \
FALSE 'win64') FALSE 'win64')
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
export WINEARCH=$WINEARCHSEL export WINEARCH=$WINEARCHSEL
fi fi
settings ;; settings ;;
'Worlds Version') 'Worlds Version')
WORVERSEL=$(zenity --list --radiolist --title="$WTITLE - Worlds Version" --text="Version of Worlds to install" --column='Use' --column='worldsver' --hide-header --width=100 --height=240 \ WORVERSEL=$(zenity --list --radiolist --title="$WTITLE - Worlds Version" --text="Version of Worlds to install" --column='Use' --column='worldsver' --hide-header --width=100 --height=240 \
TRUE '1922' \ TRUE '1922' \
FALSE '1920' \ FALSE '1920' \
FALSE '1900' \ FALSE '1900' \
FALSE "1890" \ FALSE "1890" \
FALSE 'Custom') FALSE 'Custom')
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
export WORLDSVER=$WORVERSEL export WORLDSVER=$WORVERSEL
fi fi
settings ;; settings ;;
'Winetricks') 'Winetricks')
TRICKSEL=$(zenity --entry --title="$WTITLE - Winetricks" --text="Component to install." --entry-text="$WINETRICKSINSTALL" --width=400) TRICKSEL=$(zenity --entry --title="$WTITLE - Winetricks" --text="Component to install." --entry-text="$WINETRICKSINSTALL" --width=400)
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
export WINETRICKSINSTALL=$TRICKSEL export WINETRICKSINSTALL=$TRICKSEL
fi fi
settings ;; settings ;;
'Next') 'Next')
work ;; work ;;
esac esac
} }
work () { work () {
if [[ "$WORLDSVER" -eq 'Custom' ]]; then if [[ "$WORLDSVER" -eq 'Custom' ]]; then
INSTALLERSEL=$(zenity --file-selection --title="$WTITLE - Custom Worlds" --text="Worlds Custom Executable" --width=640 --height=480 --file-filter='Windows Executable (exe) | *.exe') INSTALLERSEL=$(zenity --file-selection --title="$WTITLE - Custom Worlds" --text="Worlds Custom Executable" --width=640 --height=480 --file-filter='Windows Executable (exe) | *.exe')
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
export INSTALLER=$INSTALLERSEL export INSTALLER=$INSTALLERSEL
else else
download1922 download1922
fi fi
JAVASEL=$(zenity --question --title="$WTITLE - Java" --text="Will this Worlds install require Java 6 to be installed?" --width=300) JAVASEL=$(zenity --question --title="$WTITLE - Java" --text="Will this Worlds install require Java 6 to be installed?" --width=300)
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
java java
fi fi
elif [[ "$WORLDSVER" -eq '1922' ]]; then elif [[ "$WORLDSVER" -eq '1922' ]]; then
download1922 download1922
elif [[ "$WORLDSVER" -eq '1920' ]]; then elif [[ "$WORLDSVER" -eq '1920' ]]; then
download1920 download1920
elif [[ "$WORLDSVER" -eq '1900' ]]; then elif [[ "$WORLDSVER" -eq '1900' ]]; then
download1900 download1900
elif [[ "$WORLDSVER" -eq "1890" ]]; then elif [[ "$WORLDSVER" -eq "1890" ]]; then
download1890 download1890
fi fi
tricks tricks
codec codec
worlds worlds
launchscript | zenity --progress --title="$WTITLE - Finalizing" --width=300 --height=50 --auto-close --auto-kill launchscript | zenity --progress --title="$WTITLE - Finalizing" --width=300 --height=50 --auto-close --auto-kill
zenity --info --title="$WTITLE" --text="Worlds for Linux Wrapper has been setup and installed. You can now launch Worlds via the launch.sh script available at '$WORLDSDIR'." --width=340 --height=180 zenity --info --title="$WTITLE" --text="Worlds for Linux Wrapper has been setup and installed. You can now launch Worlds via the launch.sh script available at '$WORLDSDIR'." --width=340 --height=180
} }
download1922 () { download1922 () {
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds Inc/WorldsPlayer - Win7" export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds Inc/WorldsPlayer - Win7"
wget -O$INSTALLER "http://cache.worlds.com/test/WorldsPlayerWin7-1922a10.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Worlds $WORLDSVER" --text="Starting Download.." --width=300 --height=50 --auto-close --auto-kill wget -O$INSTALLER "http://cache.worlds.com/test/WorldsPlayerWin7-1922a09.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Worlds $WORLDSVER" --text="Starting Download.." --width=300 --height=50 --auto-close --auto-kill
} }
download1920 () { download1920 () {
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds.com/WorldsPlayer - Win7" export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds.com/WorldsPlayer - Win7"
wget -O$INSTALLER "http://wirlaburla.site/files/archives/Worlds.com/WorldsPlayer/WorldsPlayer-1920.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Worlds $WORLDSVER" --text="Starting Download.." --width=300 --height=50 --auto-close --auto-kill wget -O$INSTALLER "http://wirlaburla.site/files/archives/Worlds.com/WorldsPlayer/WorldsPlayer-1920.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Worlds $WORLDSVER" --text="Starting Download.." --width=300 --height=50 --auto-close --auto-kill
} }
download1900 () { download1900 () {
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com" export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com"
wget -O$INSTALLER "http://wirlaburla.site/files/archives/Worlds.com/WorldsPlayer/WorldsPlayer-1900.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Worlds $WORLDSVER" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill wget -O$INSTALLER "http://wirlaburla.site/files/archives/Worlds.com/WorldsPlayer/WorldsPlayer-1900.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Worlds $WORLDSVER" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill
java java
} }
download1890 () { download1890 () {
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com" export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com"
wget -O$INSTALLER "http://wirlaburla.site/files/archives/Worlds.com/WorldsPlayer/WorldsPlayer-1890.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Worlds $WORLDSVER" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill wget -O$INSTALLER "http://wirlaburla.site/files/archives/Worlds.com/WorldsPlayer/WorldsPlayer-1890.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Worlds $WORLDSVER" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill
java java
} }
java () { java () {
wget -O"$WORLDSDIR/JavaInstaller.exe" "http://users.worldsonline.com/jimbly/java/jre-6u23-windows-i586-s.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Downloading Java 6" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill wget -O"$WORLDSDIR/JavaInstaller.exe" "http://users.worldsonline.com/jimbly/java/jre-6u23-windows-i586-s.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Downloading Java 6" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill
$WINE "$WORLDSDIR/JavaInstaller.exe" /s 2>&1 | zenity --title="$WTITLE - Installing Java" --progress --pulsate --auto-close --width=300 --height=50 --auto-kill $WINE "$WORLDSDIR/JavaInstaller.exe" /s 2>&1 | zenity --title="$WTITLE - Installing Java" --progress --pulsate --auto-close --width=300 --height=50 --auto-kill
} }
tricks () { tricks () {
winetricks -f "$(echo $WINETRICKSINSTALL)" 2>&1 | zenity --title="$WTITLE - Winetricks" --text="Installing Components. This may require manual interaction." --progress --pulsate --auto-close --width=340 --height=50 winetricks -f "$(echo $WINETRICKSINSTALL)" 2>&1 | zenity --title="$WTITLE - Winetricks" --text="Installing Components. This may require manual interaction." --progress --pulsate --auto-close --width=340 --height=50
} }
codec() { codec() {
wget -O"$WORLDSDIR/K-Lite.exe" "https://files3.codecguide.com/K-Lite_Codec_Pack_1535_Full.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Downloading K-Lite" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill wget -O"$WORLDSDIR/K-Lite.exe" "https://files3.codecguide.com/K-Lite_Codec_Pack_1535_Full.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Downloading K-Lite" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill
wget -O"$WORLDSDIR/LAVFilters.exe" "https://github.com/Nevcairiel/LAVFilters/releases/download/0.74.1/LAVFilters-0.74.1-Installer.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Downloading LAVFilters" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill wget -O"$WORLDSDIR/LAVFilters.exe" "https://github.com/Nevcairiel/LAVFilters/releases/download/0.74.1/LAVFilters-0.74.1-Installer.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Downloading LAVFilters" --text="Starting Download..." --width=300 --height=50 --auto-close --auto-kill
$WINE "$WORLDSDIR/K-Lite.exe" 2>&1 | zenity --title="$WTITLE - Installing K-Lite" --text="Please complete the setup." --progress --pulsate --auto-close --width=300 --height=50 --auto-kill $WINE "$WORLDSDIR/K-Lite.exe" 2>&1 | zenity --title="$WTITLE - Installing K-Lite" --text="Please complete the setup." --progress --pulsate --auto-close --width=300 --height=50 --auto-kill
$WINE "$WORLDSDIR/LAVFilters.exe" 2>&1 | zenity --title="$WTITLE - Installing LAVFilters" --text="Please complete the setup." --progress --pulsate --auto-close --width=300 --height=50 --auto-kill $WINE "$WORLDSDIR/LAVFilters.exe" 2>&1 | zenity --title="$WTITLE - Installing LAVFilters" --text="Please complete the setup." --progress --pulsate --auto-close --width=300 --height=50 --auto-kill
} }
worlds () { worlds () {
wine "$(echo $INSTALLER)" 2>&1 | zenity --title="$WTITLE - Worlds Install" --text="Installing Worlds. Please complete the setup. Do NOT change the install location!" --progress --pulsate --auto-close --width=300 --height=50 --auto-kill wine "$(echo $INSTALLER)" 2>&1 | zenity --title="$WTITLE - Worlds Install" --text="Installing Worlds. Please complete the setup. Do NOT change the install location!" --progress --pulsate --auto-close --width=300 --height=50 --auto-kill
} }
launchscript () { launchscript () {
wget -O"$WORLDSDIR/launch.sh" "https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/launch.sh" wget -O"$WORLDSDIR/launch.sh" "https://github.com/Vencorr/Worlds-LinuxScript/blob/master/launch.sh"
chmod +x "$WORLDSDIR/launch.sh" wget -O"$WORLDSDIR/icon.png" "https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/icon.png"
wget -O"$WORLDSDIR/icon.png" "https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/icon.png" rm "$WORLDSDIR/wrldslinux"
rm "$WORLDSDIR/wine.worlds" "$WORLDSDIR/wineprefix.worlds" "$WORLDSDIR/worlds.worlds" echo "# Configuration for Worlds on Linux." > "$WORLDSDIR/wrldslinux"
echo "$WINE" > "$WORLDSDIR/wine.worldslinux" echo "export WINE=$WINE" >> "$WORLDSDIR/wrldslinux"
echo "$WINEPREFIX" > "$WORLDSDIR/wineprefix.worldslinux" echo "export WINEPREFIX=$WINEPREFIX" >> "$WORLDSDIR/wrldslinux"
echo "$WORLDSINSTALL" > "$WORLDSDIR/worlds.worldslinux" echo "export WORLDSDIR=$WORLDSDIR" >> "$WORLDSDIR/wrldslinux"
rm "$HOME/Desktop/WorldsPlayer Win7.*" echo "export SETTHEME=DEFAULT" >> "$WORLDSDIR/wrldslinux"
echo "source \"$WORLDSDIR/wlrdscmd\"" >> "$WORLDSDIR/wrldslinux"
rm "$HOME/Desktop/WorldsPlayer Win7.*"
} }
start start