Compare commits

..

10 Commits

Author SHA1 Message Date
Nicholas George
7d8bc6f11e To GitHub we go! 2022-05-20 23:20:14 -05:00
Nicholas George
cff84f9f33
Update README.md 2021-03-13 10:28:27 -06:00
Nicholas George
6fb499e158 Add WorldsOrganizer arguments 2021-03-02 01:03:26 -06:00
Nicholas George
cf9931a828 Remove duplicate winetricks 2021-01-28 16:39:04 -06:00
Nicholas George
eb94666e2c Fixed the desktop file function 2021-01-28 16:31:17 -06:00
Nicholas George
a0aba594d2 Added Desktop creation
Menu file!
2021-01-28 16:20:44 -06:00
Nicholas George
5aa6b62f3e Fixed urls and config creation 2021-01-28 16:04:27 -06:00
Nicholas George
aab28fb6cc Fix things
Themes gone, zenity now uses --no-cancel, added progress bars, fixed links, and made the WorldsOrganizer download more informing. Updated images and readme.
2021-01-24 20:49:57 -06:00
Nicholas George
697bb42957 Remove theme functionality
It's buggy and will be re-added in the future.
2020-09-29 16:14:49 -05:00
Nicholas George
0d1cb50994 Added 'mimeassoc=off' to default Winetricks
Prevents K-Lite to handle system association
2020-09-29 15:28:22 -05:00
8 changed files with 55 additions and 103 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/Vencorr/Worlds-LinuxScript/master/worlds-installer.sh $ wget https://raw.githubusercontent.com/Wirlaburla/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.
![](https://github.com/Vencorr/Worlds-LinuxScript/blob/master/image.png) ![](launcher.png)
![](https://i.imgur.com/1jjA7WM.png) ![](app.png)
*WorldsPlayer is property of Worlds Inc. I do not own WorldsPlayer and these scripts in no way modify the client.* *WorldsPlayer and it's logo is property of Worlds Inc. and all rights belong to them.*

BIN
app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 B

BIN
image.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -3,7 +3,6 @@ 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
@ -45,9 +44,10 @@ 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
wget -O"$WORLDSDIR/WorldsOrganizer.jar" "https://wirlaburla.site/projects/WorldsOrganizer/dw/0.9.64/WorldsOrganizer-linux.jar" 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.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" java -jar "$WORLDSDIR/WorldsOrganizer.jar" -i "$WORLDSINSTALL/gamma.avatars" -i "$WORLDSINSTALL/gamma.worldsmarks"
main ;; main ;;
'Open Worlds folder') 'Open Worlds folder')
gio open "$WORLDSINSTALL" ;; gio open "$WORLDSINSTALL" ;;
@ -61,19 +61,14 @@ main() {
killw killw
main ;; main ;;
'Update' ) 'Update' )
update ;; update | zenity --progress --no-cancel --title="$TITLE - Updating" --width=300 --height=50 --auto-close --auto-kill;;
'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"
@ -84,6 +79,10 @@ launch () {
else else
$WINE cmd /c "$WORLDSINSTALL/$WORLDSLEGACY" $WINE cmd /c "$WORLDSINSTALL/$WORLDSLEGACY"
fi fi
if [ $? -ne 0 ]; then
launch
fi
} }
settings () { settings () {
@ -94,7 +93,6 @@ 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)
@ -126,9 +124,6 @@ settings () {
'Winetricks') 'Winetricks')
winetricks winetricks
settings ;; settings ;;
'Set Theme')
theme
settings ;;
'Backup') 'Backup')
backup backup
settings ;; settings ;;
@ -140,58 +135,9 @@ 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")
@ -237,7 +183,7 @@ cache () {
} }
update () { update () {
NEWLAUNCHFILE="https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/launch.sh" NEWLAUNCHFILE="https://gitlab.com/Vencorr/Worlds-LinuxScript/-/raw/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"
@ -248,7 +194,7 @@ update () {
} }
killw () { killw () {
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 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
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"
} }

BIN
launcher.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -9,21 +9,23 @@ export INSTALLER="$WORLDSDIR/WorldsInstaller.exe"
export WINE=$(which wine) export WINE=$(which wine)
export WINETRICKSINSTALL="win7 corefonts droid ddr=gdi devenum wmp9 dmsynth wmv9vcm directplay quartz ie8 quartz" export WINETRICKSINSTALL="win7 droid renderer=gdi glsl=disabled devenum wmp9 dmsynth wmv9vcm directplay quartz ie8 mimeassoc=off"
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' --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' --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" \
@ -60,7 +62,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 '1922' \ TRUE '1922a10' \
FALSE '1920' \ FALSE '1920' \
FALSE '1900' \ FALSE '1900' \
FALSE 'Custom') FALSE 'Custom')
@ -91,12 +93,8 @@ work () {
if [[ ! $? -eq 1 ]]; then if [[ ! $? -eq 1 ]]; then
java java
fi fi
elif [[ "$WORLDSVER" -eq '1922' ]]; then else
download1922 downloadVersion "$WORLDSVER"
elif [[ "$WORLDSVER" -eq '1920' ]]; then
download1920
elif [[ "$WORLDSVER" -eq '1900' ]]; then
download1900
fi fi
tricks tricks
codec codec
@ -106,26 +104,13 @@ 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
} }
download1922 () { downloadVersion () {
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 "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 "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
} if [[ ! $ver -eq "1922a10" ]]; then
java
download1920 () { fi
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 () {
@ -147,17 +132,28 @@ worlds () {
} }
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/Wirlaburla/Worlds-LinuxScript/blob/master/launch.sh"
wget -O"$WORLDSDIR/icon.png" "https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/icon.png" wget -qO- "http://www.worlds.net/favicon.ico" | convert - "$WORLDSDIR/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

10
worlds.desktop Executable file
View File

@ -0,0 +1,10 @@
#!/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