Compare commits

..

No commits in common. "7d8bc6f11ee5b95f635a95b51656e1a7c0869495" and "a93caae282bf45976f816088d014b8729c3a6e85" have entirely different histories.

8 changed files with 103 additions and 55 deletions

View File

@ -6,15 +6,15 @@ You don't need to clone this repository. Simply download `worlds-installer.sh` a
``` ```
$ mkdir Worlds $ mkdir Worlds
$ wget https://raw.githubusercontent.com/Wirlaburla/Worlds-LinuxScript/master/worlds-installer.sh $ wget https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/worlds-installer.sh
$ chmod +x worlds-installer.sh $ chmod +x worlds-installer.sh
$ ./worlds-installer.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.
![](launcher.png) ![](https://github.com/Vencorr/Worlds-LinuxScript/blob/master/image.png)
![](app.png) ![](https://i.imgur.com/1jjA7WM.png)
*WorldsPlayer and it's logo is property of Worlds Inc. and all rights belong to them.* *WorldsPlayer is property of Worlds Inc. I do not own WorldsPlayer and these scripts in no way modify the client.*

BIN
app.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

BIN
image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -3,6 +3,7 @@ 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/WorldsPlayer by Worlds.com" export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com"
export SETTHEME="DEFAULT"
export WINE="/usr/bin/wine" export WINE="/usr/bin/wine"
mkdir -p $WORLDSDIR/backups $WORLDSDIR/themes mkdir -p $WORLDSDIR/backups $WORLDSDIR/themes
@ -44,10 +45,9 @@ main() {
launch && tail -F "$WORLDSINSTALL/Gamma.Log.open" | zenity --text-info --auto-scroll --height=480 --width=768 --title="$TITLE - Log" --window-icon="$WORLDSDIR/icon.png" --text="Gamma.Log.open" ;; launch && tail -F "$WORLDSINSTALL/Gamma.Log.open" | zenity --text-info --auto-scroll --height=480 --width=768 --title="$TITLE - Log" --window-icon="$WORLDSDIR/icon.png" --text="Gamma.Log.open" ;;
'Worlds Organizer') 'Worlds Organizer')
if [[ ! -f "$WORLDSDIR/WorldsOrganizer.jar" ]]; then if [[ ! -f "$WORLDSDIR/WorldsOrganizer.jar" ]]; then
zenity --info --text="The launcher will now download WorldsOrganizer using wget and run it." --width=280 --height=40 --title="$TITLE - WorldsOrganizer" --window-icon="$WORLDSDIR/icon.png" wget -O"$WORLDSDIR/WorldsOrganizer.jar" "https://wirlaburla.site/projects/WorldsOrganizer/dw/0.9.64/WorldsOrganizer-linux.jar"
wget -O"$WORLDSDIR/WorldsOrganizer.jar" "https://wirlaburla.com/WorldsOrganizer/dw/0.9.64/WorldsOrganizer-linux.jar" | zenity --progress --no-cancel --title="$TITLE - Downloading WorldsOrganizer" --width=300 --height=50 --auto-close --auto-kill
fi fi
java -jar "$WORLDSDIR/WorldsOrganizer.jar" -i "$WORLDSINSTALL/gamma.avatars" -i "$WORLDSINSTALL/gamma.worldsmarks" java -jar "$WORLDSDIR/WorldsOrganizer.jar"
main ;; main ;;
'Open Worlds folder') 'Open Worlds folder')
gio open "$WORLDSINSTALL" ;; gio open "$WORLDSINSTALL" ;;
@ -61,14 +61,19 @@ main() {
killw killw
main ;; main ;;
'Update' ) 'Update' )
update | zenity --progress --no-cancel --title="$TITLE - Updating" --width=300 --height=50 --auto-close --auto-kill;; update ;;
'Open Github page' ) 'Open Github page' )
xdg-open "https://github.com/Vencorr/Worlds-LinuxScript" xdg-open "https://github.com/Vencorr/Worlds-LinuxScript"
main ;; main ;;
esac esac
if [ "$?" != 0 ]
then
exit
fi
} }
launch () { launch () {
source "$WORLDSDIR/wrldscmd"
WORLDSNEW="WorldsPlayer.exe" WORLDSNEW="WorldsPlayer.exe"
WORLDSOLD="run.exe" WORLDSOLD="run.exe"
WORLDSLEGACY="run.bat" WORLDSLEGACY="run.bat"
@ -79,10 +84,6 @@ launch () {
else else
$WINE cmd /c "$WORLDSINSTALL/$WORLDSLEGACY" $WINE cmd /c "$WORLDSINSTALL/$WORLDSLEGACY"
fi fi
if [ $? -ne 0 ]; then
launch
fi
} }
settings () { settings () {
@ -93,6 +94,7 @@ settings () {
"Edit worlds.ini" "" \ "Edit worlds.ini" "" \
"Wine Configuration" "" \ "Wine Configuration" "" \
"Winetricks" "" \ "Winetricks" "" \
"Set Theme" "$SETTHEME" \
"Backup" "" \ "Backup" "" \
"Restore" "" \ "Restore" "" \
2>/dev/null) 2>/dev/null)
@ -124,6 +126,9 @@ settings () {
'Winetricks') 'Winetricks')
winetricks winetricks
settings ;; settings ;;
'Set Theme')
theme
settings ;;
'Backup') 'Backup')
backup backup
settings ;; settings ;;
@ -135,9 +140,58 @@ settings () {
echo "export WINE=\"$WINE\"" >> "$WORLDSDIR/wrldslinux" echo "export WINE=\"$WINE\"" >> "$WORLDSDIR/wrldslinux"
echo "export WINEPREFIX=\"$WINEPREFIX\"" >> "$WORLDSDIR/wrldslinux" echo "export WINEPREFIX=\"$WINEPREFIX\"" >> "$WORLDSDIR/wrldslinux"
echo "export WORLDSINSTALL=\"$WORLDSINSTALL\"" >> "$WORLDSDIR/wrldslinux" echo "export WORLDSINSTALL=\"$WORLDSINSTALL\"" >> "$WORLDSDIR/wrldslinux"
echo "export SETTHEME=\"$SETTHEME\"" >> "$WORLDSDIR/wrldslinux"
echo "source \"$WORLDSDIR/wrldscmd\"" >> "$WORLDSDIR/wrldslinux" echo "source \"$WORLDSDIR/wrldscmd\"" >> "$WORLDSDIR/wrldslinux"
} }
theme () {
declare -a acceptimg=(
"actb.gif"
"actm.gif"
"actt.gif"
"back.gif"
"changeav.gif"
"drive.gif"
"dyrwtq.gif"
"explore.gif"
"friends.gif"
"hangong.gif"
"mfriends.gif"
"moreinfo.gif"
"notavail.gif"
"opnscrnc.gif"
"override.ini"
"pwc.gif"
"quit.gif"
"rtpanel.gif"
)
declare -A map
for key in "${!acceptimg[@]}"; do map[${acceptimg[$key]}]="$key"; done
mkdir -p "$WORLDSDIR/themes"
cd "$WORLDSDIR/themes"
# Due to some bug, this won't even accept a directory despite the option being defined. Instead using text entry.
# seltheme=$(zenity --file-selection --directory --title="Select a theme folder" --window-icon="$WORLDSDIR/icon.png")
seltheme=$(zenity --entry --title="$WTITLE - Worlds Theme" --text="Enter a theme directory." --entry-text="$WORLDSDIR/themes/" --window-icon="$WORLDSDIR/icon.png")
if [[ ! $? -eq 1 ]]; then
rename 'y/A-Z/a-z/' "$seltheme/*"
for i in $seltheme/*;
do FILENAME="$(basename $i)"
if [[ -n "${map[$i]}" ]]; then
echo "$seltheme/$FILENAME >> $WORLDSINSTALL/$FILENAME"
ln -sf "$seltheme/$FILENAME" "$WORLDSINSTALL/$FILENAME"
fi
done
export SETTHEME="$(basename $seltheme)"
zenity --info --text="Successfully set theme to $(basename $seltheme)." --width=240 --height=40 --title="$TITLE - Theme" --window-icon="$WORLDSDIR/icon.png"
else
zenity --error --text="Couldn't set $(basename $seltheme). Does it exist?" --width=240 --height=40 --title="$TITLE - Theme" --window-icon="$WORLDSDIR/icon.png"
fi
cd "$WORLDSINSTALL"
settings
}
backup () { backup () {
mkdir -p "$WORLDSDIR/backups" 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") 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")
@ -183,7 +237,7 @@ cache () {
} }
update () { update () {
NEWLAUNCHFILE="https://gitlab.com/Vencorr/Worlds-LinuxScript/-/raw/master/launch.sh" NEWLAUNCHFILE="https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/launch.sh"
UPDATEFILE="$WORLDSDIR/.update.sh" UPDATEFILE="$WORLDSDIR/.update.sh"
touch "$UPDATEFILE" touch "$UPDATEFILE"
echo "wget -N -O\"$WORLDSDIR/launch.sh\" \"$NEWLAUNCHFILE\"" >> "$UPDATEFILE" echo "wget -N -O\"$WORLDSDIR/launch.sh\" \"$NEWLAUNCHFILE\"" >> "$UPDATEFILE"
@ -194,7 +248,7 @@ update () {
} }
killw () { killw () {
killall WorldsPlayer.exe run.exe javaw.exe jrew.exe run.bat | zenity --progress --no-cancel --title="$TITLE - Killing Processes" --width=300 --height=50 --auto-close --auto-kill killall WorldsPlayer.exe run.exe javaw.exe jrew.exe run.bat | zenity --progress --no-buttons --title="$TITLE - Killing Processes" --width=300 --height=50 --auto-close --auto-kill
zenity --error --text="Killed all possible running processes of Worlds." --width=240 --height=40 --title="$TITLE - Kill" --window-icon="$WORLDSDIR/icon.png" zenity --error --text="Killed all possible running processes of Worlds." --width=240 --height=40 --title="$TITLE - Kill" --window-icon="$WORLDSDIR/icon.png"
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -9,23 +9,21 @@ export INSTALLER="$WORLDSDIR/WorldsInstaller.exe"
export WINE=$(which wine) export WINE=$(which wine)
export WINETRICKSINSTALL="win7 droid renderer=gdi glsl=disabled devenum wmp9 dmsynth wmv9vcm directplay quartz ie8 mimeassoc=off" export WINETRICKSINSTALL="win7 corefonts droid ddr=gdi devenum wmp9 dmsynth wmv9vcm directplay quartz ie8 quartz"
start () { start () {
errorcheck errorcheck
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" 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"
zenity --info --title="$WTITLE Installer" --text 'NOTE: This wrapper has been known to become unreliable and may not work. Worlds is finnicky with WINE and may take manual tinkering to function.' --width=320 --ok-label="Next"
settings settings
} }
errorcheck () { errorcheck () {
wine --version >> /dev/null || { zenity --error --title="$WTITLE Installer - Error" --text "Wine wasn't found! Please install it before continuing" --width=320 ; exit 1; }
winetricks --help >> /dev/null || { zenity --error --title="$WTITLE Installer - Error" --text "Winetricks wasn't found! Please install it before continuing" --width=320 ; exit 1; } 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; } 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' --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" \
@ -62,7 +60,7 @@ settings () {
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 '1922a10' \ TRUE '1922' \
FALSE '1920' \ FALSE '1920' \
FALSE '1900' \ FALSE '1900' \
FALSE 'Custom') FALSE 'Custom')
@ -93,8 +91,12 @@ work () {
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
java java
fi fi
else elif [[ "$WORLDSVER" -eq '1922' ]]; then
downloadVersion "$WORLDSVER" download1922
elif [[ "$WORLDSVER" -eq '1920' ]]; then
download1920
elif [[ "$WORLDSVER" -eq '1900' ]]; then
download1900
fi fi
tricks tricks
codec codec
@ -104,13 +106,26 @@ work () {
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
} }
downloadVersion () { download1922 () {
local ver="$1"
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 "https://files.worlio.com/files/WorldsPlayer/software/Worlds$ver.exe" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --title="$WTITLE - Worlds $ver" --text="Starting Download.." --width=300 --height=50 --auto-close --auto-kill 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
if [[ ! $ver -eq "1922a10" ]]; then }
java
fi download1920 () {
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds.com/WorldsPlayer - Win7"
wget -O$INSTALLER "https://wirlaburla.site/library/WorldsPlayer/Software/Worlds1920.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 "https://wirlaburla.site/library/WorldsPlayer/Software/Worlds1900.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 "https://wirlaburla.site/library/WorldsPlayer/Software/Worlds1890.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 () {
@ -132,28 +147,17 @@ worlds () {
} }
launchscript () { launchscript () {
wget -O"$WORLDSDIR/launch.sh" "https://github.com/Wirlaburla/Worlds-LinuxScript/blob/master/launch.sh" wget -O"$WORLDSDIR/launch.sh" "https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/launch.sh"
wget -qO- "http://www.worlds.net/favicon.ico" | convert - "$WORLDSDIR/icon.png" wget -O"$WORLDSDIR/icon.png" "https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/icon.png"
rm "$WORLDSDIR/wrldslinux" rm "$WORLDSDIR/wrldslinux"
echo "# Configuration for Worlds on Linux." > "$WORLDSDIR/wrldslinux" echo "# Configuration for Worlds on Linux." > "$WORLDSDIR/wrldslinux"
echo "export WINE=\"$WINE\"" >> "$WORLDSDIR/wrldslinux" echo "export WINE=$WINE" >> "$WORLDSDIR/wrldslinux"
echo "export WINEPREFIX=\"$WINEPREFIX\"" >> "$WORLDSDIR/wrldslinux" echo "export WINEPREFIX=$WINEPREFIX" >> "$WORLDSDIR/wrldslinux"
echo "export WORLDSDIR=\"$WORLDSDIR\"" >> "$WORLDSDIR/wrldslinux" echo "export WORLDSDIR=$WORLDSDIR" >> "$WORLDSDIR/wrldslinux"
echo "export WORLDSINSTALL=\"$WORLDSINSTALL\"" >> "$WORLDSDIR/wrldslinux" echo "export WORLDSINSTALL=$WORLDSINSTALL" >> "$WORLDSDIR/wrldslinux"
echo "export SETTHEME=DEFAULT" >> "$WORLDSDIR/wrldslinux"
echo "source \"$WORLDSDIR/wlrdscmd\"" >> "$WORLDSDIR/wrldslinux" echo "source \"$WORLDSDIR/wlrdscmd\"" >> "$WORLDSDIR/wrldslinux"
touch "$WORLDSDIR/wlrdscmd"
rm "$HOME/Desktop/WorldsPlayer Win7.*" rm "$HOME/Desktop/WorldsPlayer Win7.*"
menufile
}
menufile () {
wget -O"$WORLDSDIR/worlds.desktop" "https://github.com/Wirlaburla/Worlds-LinuxScript/blob/master/worlds.desktop"
echo "" > "$HOME/.local/share/applications/worlds.desktop" #Making sure the file is clear.
while read line
do
line=${line/\${WORLDSDIR\}/$WORLDSDIR}
echo $line >> "$HOME/.local/share/applications/worlds.desktop"
done < "$WORLDSDIR/worlds.desktop"
} }
start start

View File

@ -1,10 +0,0 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=WorldsPlayer
Exec=${WORLDSDIR}/launch.sh
Comment=
Terminal=false
Icon=${WORLDSDIR}/icon.png
Type=Application
Hidden=false
NoDisplay=false