Support for new launch.sh
Now installs everything to it's own folder that can be moved with a launch script inside.
This commit is contained in:
parent
8da04b334c
commit
289d1d113d
|
@ -1,21 +1,22 @@
|
|||
#!/bin/bash
|
||||
export WINEPREFIX=$HOME/.local/share/wineprefixes/worlds
|
||||
export WORLDSDIR="$(dirname "$(readlink -f "$0")")/Worlds"
|
||||
export WINEPREFIX="$WORLDSDIR/prefix"
|
||||
export WINEARCH=win32
|
||||
export DIR="$WINEPREFIX/drive_c/Program Files/Worlds/WorldsPlayer by Worlds.com"
|
||||
export DIREXE="$DIR/run.exe"
|
||||
export WORLDSINSTALL="$WINEPREFIX/drive_c/Program Files/Worlds"
|
||||
|
||||
start () {
|
||||
rm -rf "$DIR/downloads"
|
||||
mkdir -p "$DIR/downloads"
|
||||
rm -rf "$WORLDSDIR/downloads"
|
||||
if [ $1 == "fresh" ]; then
|
||||
rm -rf $WINEPREFIX
|
||||
rm -rf $WORLDSDIR
|
||||
fi
|
||||
mkdir -p $WORLDSDIR
|
||||
mkdir -p "$WORLDSDIR/downloads"
|
||||
download
|
||||
}
|
||||
|
||||
download () {
|
||||
cd "$DIR/downloads"
|
||||
wget https://github.com/Vencorr/Worlds-LinuxScript/blob/master/files.txt
|
||||
cd "$WORLDSDIR/downloads"
|
||||
wget https://raw.githubusercontent.com/Vencorr/Worlds-LinuxScript/master/files.txt
|
||||
wget -i files.txt
|
||||
prefix
|
||||
}
|
||||
|
@ -32,13 +33,8 @@ prefix () {
|
|||
}
|
||||
|
||||
install () {
|
||||
cd "$DIR/downloads"
|
||||
cd "$WORLDSDIR/downloads"
|
||||
echo "Downloading Java 6u45 Windows i586..."
|
||||
#wget --user=$(zenity --forms --title="Oracle Login" --text="An Oracle account is required to download the installer" --add-entry="Email") --password=$(zenity --forms --title="Oracle Login" --text="An Oracle account is required to download the installer" --add-password="Password") https://download.oracle.com/otn/java/jdk/6u45-b06/jre-6u45-windows-i586.exe
|
||||
#if ! [ -f "$DIR/downloads/jre-6u45-windows-i586.exe" ]; then
|
||||
# echo "JRE6 installer not found! Aborting!"
|
||||
# exit 1
|
||||
#fi
|
||||
echo "Installing Worlds 1900. Please complete the setup."
|
||||
wine jre-6u23-windows-i586-s /s
|
||||
wine Worlds1900.exe /s
|
||||
|
@ -48,26 +44,16 @@ install () {
|
|||
|
||||
audio () {
|
||||
echo "Setting up Audio prerequisites. Please complete the setups."
|
||||
cd "$DIR/downloads"
|
||||
cd "$WORLDSDIR/downloads"
|
||||
wine K-Lite_Codec_Pack_1535_Full.exe /s
|
||||
wine LAVFilters-0.74.1-Installer.exe /s
|
||||
script
|
||||
}
|
||||
|
||||
script () {
|
||||
WORLDSSCRIPT=$HOME/worlds.sh
|
||||
rm $WORLDSSCRIPT
|
||||
touch "$WORLDSSCRIPT"
|
||||
echo "#!/bin/sh" >> "$WORLDSSCRIPT"
|
||||
echo "export WINEPREFIX=$WINEPREFIX" >> "$WORLDSSCRIPT"
|
||||
echo "export WINEARCH=win32" >> "$WORLDSSCRIPT"
|
||||
echo "export DIR=\"$DIR\"" >> "$WORLDSSCRIPT"
|
||||
echo "cd \"$DIR\"" >> "$WORLDSSCRIPT"
|
||||
echo "rm -rf \"\$DIR/cachedir\"" >> "$WORLDSSCRIPT"
|
||||
echo "wine \"\$DIR/run.exe\" $*" >> "$WORLDSSCRIPT"
|
||||
chmod +u $WORLDSSCRIPT
|
||||
echo "A worlds startup script is available at $WORLDSSCRIPT!"
|
||||
echo "Setup done!"
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user