Remove theme functionality
It's buggy and will be re-added in the future.
This commit is contained in:
parent
0d1cb50994
commit
697bb42957
53
launch.sh
53
launch.sh
|
@ -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
|
||||||
|
@ -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 ;;
|
||||||
|
@ -144,54 +139,6 @@ settings () {
|
||||||
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")
|
||||||
|
|
|
@ -155,7 +155,6 @@ launchscript () {
|
||||||
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"
|
||||||
rm "$HOME/Desktop/WorldsPlayer Win7.*"
|
rm "$HOME/Desktop/WorldsPlayer Win7.*"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user