Completely revamp Installer and add additional options
This commit is contained in:
parent
3529c54fe2
commit
7a3c791d0e
|
@ -2,13 +2,13 @@
|
||||||
Simple Linux wrapper for WorldsPlayer.
|
Simple Linux wrapper for WorldsPlayer.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
You don't need to clone this repository. Simply download install-worlds.sh and execute it.
|
You don't need to clone this repository. Simply download `worlds-installer.sh` and execute it.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ mkdir Worlds
|
$ mkdir Worlds
|
||||||
$ wget https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/install-worlds.sh
|
$ wget https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/worlds-installer.sh
|
||||||
$ chmod +x install-worlds.sh
|
$ chmod +x worlds-installer.sh
|
||||||
$ ./install-worlds.sh
|
$ ./worlds-installer.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
All worlds content should be in a folder named "Worlds" in the same location your install script resides. A launch script named `launch.sh` should be in it's root. This is the script that you should run. Now you can make a desktop entry pointing to that script and enjoy Worlds.
|
All worlds content should be in a folder named "Worlds" in the same location your install script resides. A launch script named `launch.sh` should be in it's root. This is the script that you should run. Now you can make a desktop entry pointing to that script and enjoy Worlds.
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
http://cache.worlds.com/test/WorldsPlayerWin7-1922a09.exe
|
|
||||||
https://files3.codecguide.com/K-Lite_Codec_Pack_1535_Full.exe
|
|
||||||
https://github.com/Nevcairiel/LAVFilters/releases/download/0.74.1/LAVFilters-0.74.1-Installer.exe
|
|
||||||
https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/launch.sh
|
|
|
@ -1,61 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
export WORLDSDIR="$(dirname "$(readlink -f "$0")")/Worlds"
|
|
||||||
export WINEPREFIX="$WORLDSDIR/prefix"
|
|
||||||
export WINEARCH=win32
|
|
||||||
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds"
|
|
||||||
|
|
||||||
start () {
|
|
||||||
rm -rf "$WORLDSDIR/downloads"
|
|
||||||
if [ $1 == "fresh" ]; then
|
|
||||||
rm -rf $WORLDSDIR
|
|
||||||
fi
|
|
||||||
mkdir -p $WORLDSDIR
|
|
||||||
mkdir -p "$WORLDSDIR/downloads"
|
|
||||||
download
|
|
||||||
}
|
|
||||||
|
|
||||||
download () {
|
|
||||||
cd "$WORLDSDIR/downloads"
|
|
||||||
wget https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/files.txt
|
|
||||||
wget -i files.txt
|
|
||||||
mv Worlds*.exe Worlds.exe
|
|
||||||
mv jre*.exe java.exe
|
|
||||||
mv K-Lite*.exe K-Lite.exe
|
|
||||||
mv LAV*.exe LAV.exe
|
|
||||||
prefix
|
|
||||||
}
|
|
||||||
|
|
||||||
prefix () {
|
|
||||||
echo "Installing components..."
|
|
||||||
if ! [ -x "$(command -v winetricks)" ]; then
|
|
||||||
echo "Error: 'winetricks' not found! Please add it to your path or install it via your package manager."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
sudo winetricks --self-update
|
|
||||||
winetricks win7 corefonts droid ddr=gdi ie8 devenum wmp9 dmsynth wmv9vcm directplay quartz
|
|
||||||
install
|
|
||||||
}
|
|
||||||
|
|
||||||
install () {
|
|
||||||
cd "$WORLDSDIR/downloads"
|
|
||||||
echo "Installing Worlds 1900. Please complete the setup."
|
|
||||||
wine Worlds.exe /s
|
|
||||||
killall run.exe Worlds1900.exe javaw.exe
|
|
||||||
audio
|
|
||||||
}
|
|
||||||
|
|
||||||
audio () {
|
|
||||||
echo "Setting up Audio prerequisites. Please complete the setups."
|
|
||||||
cd "$WORLDSDIR/downloads"
|
|
||||||
wine K-Lite.exe /s
|
|
||||||
wine LAV.exe /s
|
|
||||||
script
|
|
||||||
}
|
|
||||||
|
|
||||||
script () {
|
|
||||||
mv "$WORLDSDIR/downloads/launch.sh" "$WORLDSDIR/launch.sh"
|
|
||||||
chmod +x "$WORLDSDIR/launch.sh"
|
|
||||||
mv "$WINEPREFIX"/drive_c/Program\ Files/Worlds/WorldsPlayer\ by\ Worlds.com/* "$WINEPREFIX/drive_c/Program Files/Worlds/"
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
197
launch.sh
Normal file → Executable file
197
launch.sh
Normal file → Executable file
|
@ -1,107 +1,192 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export TITLE="Worlds Linux Wrapper"
|
export TITLE="Worlds Linux"
|
||||||
export WORLDSDIR="$(dirname "$(readlink -f "$0")")"
|
export WORLDSDIR="$(dirname "$(readlink -f "$0")")"
|
||||||
export WINEPREFIX=$WORLDSDIR/prefix
|
export WINEPREFIX=$WORLDSDIR/prefix
|
||||||
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds/"
|
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com"
|
||||||
export WINEARCH=win32
|
|
||||||
cd "$WORLDSINSTALL"
|
|
||||||
mkdir -p $WORLDSDIR/backups $WORLDSDIR/themes
|
mkdir -p $WORLDSDIR/backups $WORLDSDIR/themes
|
||||||
|
|
||||||
export WINE=$(which wine)
|
if [ ! -d "$WORLDSDIR/wine.worldslinux" ]; then
|
||||||
|
export WINE=$(cat "$WORLDSDIR/wine.worldslinux")
|
||||||
|
fi
|
||||||
|
if [ ! -d "$WORLDSDIR/wineprefix.worldslinux" ]; then
|
||||||
|
export WINEPREFIX=$(cat "$WORLDSDIR/wineprefix.worldslinux")
|
||||||
|
fi
|
||||||
|
if [ ! -d "$WORLDSDIR/worlds.worldslinux" ]; then
|
||||||
|
export WORLDSINSTALL=$(cat "$WORLDSDIR/worlds.worldslinux")
|
||||||
|
fi
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
sel=$(zenity \
|
sel=$(zenity \
|
||||||
|
--list \
|
||||||
--title="$TITLE" \
|
--title="$TITLE" \
|
||||||
--window-icon="$WORLDSDIR/icon.png" \
|
--window-icon="$WORLDSDIR/icon.png" \
|
||||||
--width=360 \
|
--width=300 \
|
||||||
--height=280 \
|
--height=340 \
|
||||||
--cancel-label='Exit' \
|
--cancel-label='Quit' \
|
||||||
--list \
|
--list \
|
||||||
--text 'WorldsPlayer Linux Wrapper' \
|
--text 'WorldsPlayer Linux' \
|
||||||
--radiolist \
|
|
||||||
--column '' \
|
|
||||||
--column 'Options' \
|
--column 'Options' \
|
||||||
TRUE 'Start Worlds' \
|
--hide-header \
|
||||||
FALSE 'Open Worlds folder' \
|
'Launch Worlds' \
|
||||||
FALSE 'Edit worlds.ini' \
|
'Open Logger' \
|
||||||
FALSE 'Backup Worlds files' \
|
'Open Worlds folder' \
|
||||||
FALSE 'Restore from backup' \
|
'Edit worlds.ini' \
|
||||||
FALSE 'Set theme' \
|
'Backup Worlds files' \
|
||||||
FALSE 'Clear Cache' \
|
'Restore from backup' \
|
||||||
FALSE 'FORCE KILL' 2>/dev/null )
|
'Set theme' \
|
||||||
|
'Settings' \
|
||||||
|
'Clear Cache' \
|
||||||
|
'FORCE KILL' 2>/dev/null)
|
||||||
case $sel in
|
case $sel in
|
||||||
'Start Worlds')
|
'Launch Worlds')
|
||||||
$WINE "$WORLDSINSTALL/run.exe" ;;
|
launch ;;
|
||||||
|
'Open Logger')
|
||||||
|
logger ;;
|
||||||
'Open Worlds folder')
|
'Open Worlds folder')
|
||||||
gio open "$WORLDSINSTALL"
|
folder ;;
|
||||||
main ;;
|
|
||||||
'Edit worlds.ini')
|
'Edit worlds.ini')
|
||||||
xdg-open "$WORLDSINSTALL/worlds.ini"
|
ini ;;
|
||||||
main ;;
|
|
||||||
'Backup Worlds files')
|
'Backup Worlds files')
|
||||||
mkdir -p "$WORLDSDIR/backups"
|
backup ;;
|
||||||
bkup=$(zenity --file-selection --title="Select Backup folder to backup to" --directory --filename="$WORLDSDIR/backups/" --save)
|
'Restore from backup')
|
||||||
if [[ $? -eq 1 ]]; then
|
restore ;;
|
||||||
main
|
'Set theme' )
|
||||||
|
theme ;;
|
||||||
|
'Settings' )
|
||||||
|
settings ;;
|
||||||
|
'Clear Cache')
|
||||||
|
cache ;;
|
||||||
|
'FORCE KILL' )
|
||||||
|
kill ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
launch () {
|
||||||
|
WORLDSNEW="WorldsPlayer.exe"
|
||||||
|
WORLDSOLD="run.exe"
|
||||||
|
WORLDSLEGACY="run.bat"
|
||||||
|
if [ ! -d "$WORLDSINSTALL/$WORLDSNEW" ]; then
|
||||||
|
$WINE "$WORLDSINSTALL/$WORLDSNEW"
|
||||||
|
elif [ ! -d "$WORLDSINSTALL/$WORLDSOLD" ]; then
|
||||||
|
$WINE "$WORLDSINSTALL/$WORLDSOLD"
|
||||||
else
|
else
|
||||||
|
$WINE "$WORLDSINSTALL/$WORLDSLEGACY"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
logger () {
|
||||||
|
tail -F "$WORLDSINSTALL/Gamma.Log.open" | zenity --text-info --auto-scroll --height=400 --width=500 --title="$TITLE - Log" --window-icon="$WORLDSDIR/icon.png" --text="Gamma.Log.open"
|
||||||
|
main
|
||||||
|
}
|
||||||
|
|
||||||
|
folder () {
|
||||||
|
gio open "$WORLDSINSTALL"
|
||||||
|
main
|
||||||
|
}
|
||||||
|
|
||||||
|
ini () {
|
||||||
|
xdg-open "$WORLDSINSTALL/worlds.ini"
|
||||||
|
main
|
||||||
|
}
|
||||||
|
|
||||||
|
backup () {
|
||||||
|
mkdir -p "$WORLDSDIR/backups"
|
||||||
|
bkup=$(zenity --file-selection --title="$TITLE - Backup" --text="Select Backup folder to backup to" --directory --filename="$WORLDSDIR/backups/" --save --confirm-overwrite --window-icon="$WORLDSDIR/icon.png")
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
cp -r "$WORLDSINSTALL/worlds.ini" "$bkup/worlds.ini"
|
cp -r "$WORLDSINSTALL/worlds.ini" "$bkup/worlds.ini"
|
||||||
cp -r "$WORLDSINSTALL/gamma.avatars" "$bkup/gamma.avatars"
|
cp -r "$WORLDSINSTALL/gamma.avatars" "$bkup/gamma.avatars"
|
||||||
cp -r "$WORLDSINSTALL/gamma.worldsmarks" "$bkup/gamma.worldsmarks"
|
cp -r "$WORLDSINSTALL/gamma.worldsmarks" "$bkup/gamma.worldsmarks"
|
||||||
if [[ $? -eq 1 ]]; then
|
if [[ $? -eq 1 ]]; then
|
||||||
zenity --error --text="Could not successfully backup files." --width=240 --height=40 --title="$TITLE - Backup"
|
zenity --error --text="Could not successfully backup files." --width=240 --height=40 --title="$TITLE - Backup" --window-icon="$WORLDSDIR/icon.png"
|
||||||
else
|
else
|
||||||
zenity --info --text="Personal world files successfully backed up." --width=240 --height=40 --title="$TITLE - Backup"
|
zenity --info --text="Personal world files successfully backed up." --width=240 --height=40 --title="$TITLE - Backup" --window-icon="$WORLDSDIR/icon.png"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
main
|
main
|
||||||
fi ;;
|
}
|
||||||
'Restore from backup')
|
|
||||||
|
restore () {
|
||||||
mkdir -p "$WORLDSDIR/backups"
|
mkdir -p "$WORLDSDIR/backups"
|
||||||
rbkup=$(zenity --file-selection --title="Select Backup folder to restore from" --directory --filename="$WORLDSDIR/backups/")
|
rbkup=$(zenity --file-selection --title="Select Backup folder to restore from" --directory --filename="$WORLDSDIR/backups/" --window-icon="$WORLDSDIR/icon.png")
|
||||||
if [[ $? -eq 1 ]]; then
|
if [[ ! $? -eq 1 ]]; then
|
||||||
main
|
|
||||||
else
|
|
||||||
cp -r "$rbkup/worlds.ini" "$WORLDSINSTALL/worlds.ini"
|
cp -r "$rbkup/worlds.ini" "$WORLDSINSTALL/worlds.ini"
|
||||||
cp -r "$rbkup/gamma.avatars" "$WORLDSINSTALL/gamma.avatars"
|
cp -r "$rbkup/gamma.avatars" "$WORLDSINSTALL/gamma.avatars"
|
||||||
cp -r "$rbkup/gamma.worldsmarks" "$WORLDSINSTALL/gamma.worldsmarks"
|
cp -r "$rbkup/gamma.worldsmarks" "$WORLDSINSTALL/gamma.worldsmarks"
|
||||||
if [[ $? -eq 1 ]]; then
|
if [[ $? -eq 1 ]]; then
|
||||||
zenity --error --text="Could not successfully restore files." --width=240 --height=40 --title="$TITLE - Restore"
|
zenity --error --text="Could not successfully restore files." --width=240 --height=40 --title="$TITLE - Restore" --window-icon="$WORLDSDIR/icon.png"
|
||||||
else
|
else
|
||||||
zenity --info --text="Personal world files successfully restored." --width=240 --height=40 --title="$TITLE - Restore"
|
zenity --info --text="Personal world files successfully restored." --width=240 --height=40 --title="$TITLE - Restore" --window-icon="$WORLDSDIR/icon.png"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
main
|
main
|
||||||
fi ;;
|
}
|
||||||
'Set theme' )
|
|
||||||
|
theme () {
|
||||||
mkdir -p "$WORLDSDIR/themes"
|
mkdir -p "$WORLDSDIR/themes"
|
||||||
seltheme=$(zenity --file-selection --title="Select a theme folder" --directory --filename="$WORLDSDIR/themes/")
|
seltheme=$(zenity --file-selection --title="Select a theme folder" --directory --filename="$WORLDSDIR/themes/" --window-icon="$WORLDSDIR/icon.png")
|
||||||
if [[ $? -eq 1 ]]; then
|
if [[ ! $? -eq 1 ]]; then
|
||||||
main
|
|
||||||
else
|
|
||||||
for i in $seltheme/*;
|
for i in $seltheme/*;
|
||||||
do FILENAME="$(basename $i)"
|
do FILENAME="$(basename $i)"
|
||||||
echo "$seltheme/$FILENAME >> $WORLDSINSTALL/$FILENAME"
|
echo "$seltheme/$FILENAME >> $WORLDSINSTALL/$FILENAME"
|
||||||
ln -sf "$seltheme/$FILENAME" "$WORLDSINSTALL/$FILENAME"
|
ln -sf "$seltheme/$FILENAME" "$WORLDSINSTALL/$FILENAME"
|
||||||
done
|
done
|
||||||
zenity --info --text="Successfully set theme to $(basename $seltheme)." --width=240 --height=40 --title="$TITLE - Theme"
|
zenity --info --text="Successfully set theme to $(basename $seltheme)." --width=240 --height=40 --title="$TITLE - Theme" --window-icon="$WORLDSDIR/icon.png"
|
||||||
|
fi
|
||||||
main
|
main
|
||||||
fi ;;
|
}
|
||||||
'Clear Cache')
|
|
||||||
|
settings () {
|
||||||
|
SETSEL=$(zenity --list --title="$TITLE - Settings" --text="Settings for Worlds Linux" --column='Option' --column='Value' --cancel-label="Back" --width=300 --height=300 --window-icon="$WORLDSDIR/icon.png" \
|
||||||
|
"Wine Location" "$WINE" \
|
||||||
|
"Prefix Location" "$WINEPREFIX" \
|
||||||
|
"Worlds Location" "$WORLDSINSTALL" \
|
||||||
|
2>/dev/null)
|
||||||
|
case $SETSEL in
|
||||||
|
'Wine Location')
|
||||||
|
WINESEL=$(zenity --entry --title="$WTITLE - Wine Binary Location" --text="Path to wine binary" --entry-text="$WINE" --window-icon="$WORLDSDIR/icon.png")
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export WINE=$WINESEL
|
||||||
|
echo "$WINESEL" > "$WORLDSDIR/wine.worldslinux"
|
||||||
|
fi
|
||||||
|
settings ;;
|
||||||
|
'Prefix Location')
|
||||||
|
PREFSEL=$(zenity --entry --title="$WTITLE - Wine Prefix Location" --text="Path to Wine Prefix." --entry-text="$WINEPREFIX" --window-icon="$WORLDSDIR/icon.png")
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export WINEPREFIX=$PREFSEL
|
||||||
|
echo "$PREFSEL" > "$WORLDSDIR/wineprefix.worldslinux"
|
||||||
|
fi
|
||||||
|
settings ;;
|
||||||
|
'Worlds Location')
|
||||||
|
WORLDSEL=$(zenity --entry --title="$WTITLE - Worlds Location" --text="Path to Worlds Folder" --entry-text="$WORLDSINSTALL" --window-icon="$WORLDSDIR/icon.png")
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export WORLDSINSTALL=$WORLDSEL
|
||||||
|
echo "$WORLDSEL" > "$WORLDSDIR/worlds.worldslinux"
|
||||||
|
fi
|
||||||
|
settings ;;
|
||||||
|
esac
|
||||||
|
main
|
||||||
|
}
|
||||||
|
|
||||||
|
cache () {
|
||||||
CDSIZE=$(du -sh "$WORLDSINSTALL/cachedir" | cut -f1)
|
CDSIZE=$(du -sh "$WORLDSINSTALL/cachedir" | cut -f1)
|
||||||
if [ -d "$WORLDSINSTALL/cachedir" ]; then
|
if [ -d "$WORLDSINSTALL/cachedir" ]; then
|
||||||
rm -rf "$WORLDSINSTALL/cachedir"
|
rm -rf "$WORLDSINSTALL/cachedir"
|
||||||
if [ ! -d "$WORLDSINSTALL/cachedir" ]; then
|
if [ ! -d "$WORLDSINSTALL/cachedir" ]; then
|
||||||
zenity --info --text="$CDSIZE were successfully cleared." --width=240 --height=40 --title="$TITLE - Cachedir"
|
zenity --info --text="$CDSIZE were successfully cleared." --width=240 --height=40 --title="$TITLE - Cachedir" --window-icon="$WORLDSDIR/icon.png"
|
||||||
else
|
else
|
||||||
zenity --error --text="Something went wrong." --width=240 --height=40 --title="$TITLE - Cachedir"
|
zenity --error --text="Something went wrong." --width=240 --height=40 --title="$TITLE - Cachedir" --window-icon="$WORLDSDIR/icon.png"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
zenity --error --text="Cachedir doesn't exist! Was it already cleared?" --width=240 --height=40 --title="$TITLE - Cachedir"
|
zenity --error --text="Cachedir doesn't exist! Was it already cleared?" --width=240 --height=40 --title="$TITLE - Cachedir" --window-icon="$WORLDSDIR/icon.png"
|
||||||
fi
|
fi
|
||||||
main ;;
|
main
|
||||||
'FORCE KILL' )
|
}
|
||||||
|
|
||||||
|
kill () {
|
||||||
killall WorldsPlayer.exe run.exe javaw.exe jrew.exe
|
killall WorldsPlayer.exe run.exe javaw.exe jrew.exe
|
||||||
zenity --error --text="Killed all possible running processes of Worlds." --width=240 --height=40 --title="$TITLE - Kill"
|
zenity --error --text="Killed all possible running processes of Worlds." --width=240 --height=40 --title="$TITLE - Kill" --window-icon="$WORLDSDIR/icon.png"
|
||||||
main ;;
|
main
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
157
worlds-installer.sh
Executable file
157
worlds-installer.sh
Executable file
|
@ -0,0 +1,157 @@
|
||||||
|
#!/bin/bash
|
||||||
|
export WTITLE="Worlds Linux"
|
||||||
|
export WORLDSVER="1922"
|
||||||
|
export WORLDSDIR="$(dirname $(readlink -f $0))"
|
||||||
|
export WINEPREFIX="$WORLDSDIR/prefix"
|
||||||
|
export WINEARCH=win32
|
||||||
|
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com"
|
||||||
|
export INSTALLER="$WORLDSDIR/WorldsInstaller.exe"
|
||||||
|
|
||||||
|
export WINE=$(which wine)
|
||||||
|
|
||||||
|
export WINETRICKSINSTALL="win7 corefonts droid ddr=gdi devenum wmp9 dmsynth wmv9vcm directplay quartz ie8"
|
||||||
|
|
||||||
|
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"
|
||||||
|
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 \
|
||||||
|
"Install Location" "$WORLDSDIR" \
|
||||||
|
"Wine Location" "$WINE" \
|
||||||
|
"Prefix Location" "$WINEPREFIX" \
|
||||||
|
"WineArch" "$WINEARCH" \
|
||||||
|
"Worlds Version" "$WORLDSVER" \
|
||||||
|
"Winetricks" "$WINETRICKSINSTALL" \
|
||||||
|
2>/dev/null)
|
||||||
|
case $SelOptions in
|
||||||
|
'Install Location')
|
||||||
|
WORLDSDIRSEL=$(zenity --file-selection --directory --title="$WTITLE - Install Location" --text="Wrapper Install Location" --save --confirm-overwrite --width=640 --height=480)
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export WORLDSDIR=$WORLDSDIRSEL
|
||||||
|
fi
|
||||||
|
settings ;;
|
||||||
|
'Wine Location')
|
||||||
|
WINESEL=$(zenity --entry --title="$WTITLE - Wine Binary Location" --text="Path to wine binary" --entry-text="$WINE")
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export WINE=$WINESEL
|
||||||
|
fi
|
||||||
|
settings ;;
|
||||||
|
'Prefix Location')
|
||||||
|
WINEPREFIXSEL=$(zenity --file-selection --directory --title="$WTITLE - WinePrefix" --text="Worlds Prefix location" --save --confirm-overwrite --width=640 --height=480)
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export WINEPREFIX=$WINEPREFIXSEL
|
||||||
|
fi
|
||||||
|
settings ;;
|
||||||
|
'WineArch')
|
||||||
|
WINEARCHSEL=$(zenity --list --radiolist --title="$WTITLE - WineArch" --text="Architecture for Wine" --column='Use' --column='winearch' --hide-header --width=100 --height=200 \
|
||||||
|
TRUE 'win32' \
|
||||||
|
FALSE 'win64')
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export WINEARCH=$WINEARCHSEL
|
||||||
|
fi
|
||||||
|
settings ;;
|
||||||
|
'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 \
|
||||||
|
TRUE '1922' \
|
||||||
|
FALSE '1920' \
|
||||||
|
FALSE '1900' \
|
||||||
|
FALSE "1890" \
|
||||||
|
FALSE 'Custom')
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export WORLDSVER=$WORVERSEL
|
||||||
|
fi
|
||||||
|
settings ;;
|
||||||
|
'Winetricks')
|
||||||
|
TRICKSEL=$(zenity --entry --title="$WTITLE - Winetricks" --text="Component to install." --entry-text="$WINETRICKSINSTALL" --width=400)
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export WINETRICKSINSTALL=$TRICKSEL
|
||||||
|
fi
|
||||||
|
settings ;;
|
||||||
|
'Next')
|
||||||
|
work ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
work () {
|
||||||
|
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')
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
export INSTALLER=$INSTALLERSEL
|
||||||
|
else
|
||||||
|
download1922
|
||||||
|
fi
|
||||||
|
JAVASEL=$(zenity --question --title="$WTITLE - Java" --text="Will this Worlds install require Java 6 to be installed?" --width=300)
|
||||||
|
if [[ ! $? -eq 1 ]]; then
|
||||||
|
java
|
||||||
|
fi
|
||||||
|
elif [[ "$WORLDSVER" -eq '1922' ]]; then
|
||||||
|
download1922
|
||||||
|
elif [[ "$WORLDSVER" -eq '1920' ]]; then
|
||||||
|
download1920
|
||||||
|
elif [[ "$WORLDSVER" -eq '1900' ]]; then
|
||||||
|
download1900
|
||||||
|
elif [[ "$WORLDSVER" -eq "1890" ]]; then
|
||||||
|
download1890
|
||||||
|
fi
|
||||||
|
tricks
|
||||||
|
codec
|
||||||
|
worlds
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
download1922 () {
|
||||||
|
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds Inc/WorldsPlayer - Win7"
|
||||||
|
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 () {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
download1900 () {
|
||||||
|
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
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
|
download1890 () {
|
||||||
|
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
|
||||||
|
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
|
||||||
|
$WINE "$WORLDSDIR/JavaInstaller.exe" /s 2>&1 | zenity --title="$WTITLE - Installing Java" --progress --pulsate --auto-close --width=300 --height=50 --auto-kill
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
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/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/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 () {
|
||||||
|
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 () {
|
||||||
|
wget -O"$WORLDSDIR/launch.sh" "https://github.com/Vencorr/Worlds-LinuxScript/blob/master/launch.sh"
|
||||||
|
wget -O"$WORLDSDIR/icon.png" "https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/icon.png"
|
||||||
|
rm "$WORLDSDIR/wine.worlds" "$WORLDSDIR/wineprefix.worlds" "$WORLDSDIR/worlds.worlds"
|
||||||
|
echo "$WINE" > "$WORLDSDIR/wine.worldslinux"
|
||||||
|
echo "$WINEPREFIX" > "$WORLDSDIR/wineprefix.worldslinux"
|
||||||
|
echo "$WORLDSINSTALL" > "$WORLDSDIR/worlds.worldslinux"
|
||||||
|
rm "$HOME/Desktop/WorldsPlayer Win7.*"
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
Loading…
Reference in New Issue
Block a user