Created
March 19, 2012 11:03
-
-
Save jaromero/2107657 to your computer and use it in GitHub Desktop.
Wine launcher for World of Warcraft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set the following to your wine binary | |
WINE_BIN=wine64 | |
#WINE_BIN=/opt/wine1.5-amd64/bin/wine64 | |
# Where WoW lives in your system | |
WOW_DIR=$HOME/WoW | |
# Comment to re-enable debug messages | |
WINEDEBUG=-all | |
# Alternate wineprefix? | |
export WINEPREFIX=$HOME/.wine-wow | |
# In case xim/ibus break dead keys | |
export XMODIFIERS= | |
usage() | |
{ | |
cat << EOF | |
usage: $0 [options] | |
-h This message | |
-l Start launcher instead of game | |
-e <engine> | |
Selects graphical engine: | |
opengl | |
d3d9 | |
d3d11 (unsupported) | |
EOF | |
} | |
# Determine whether 32 or 64 bit | |
ARCH=$(uname -m) | |
if [ $(basename $WINE_BIN) = "wine64" ]; | |
then | |
echo "64-bit Wine detected" | |
WOW_BIN=Wow-64.exe | |
else | |
echo "64-bit Wine not detected" | |
WOW_BIN=Wow.exe | |
fi | |
# Default | |
WOW_COMMAND="${WINE_BIN} ${WOW_DIR}/${WOW_BIN} -opengl" | |
while getopts "hle:" OPT; | |
do | |
case $OPT in | |
h) | |
usage | |
exit 0 | |
;; | |
l) | |
WOW_COMMAND="${WINE_BIN} ${WOW_DIR}/World\ of\ Warcraft\ Launcher.exe" | |
;; | |
e) | |
WOW_COMMAND="${WINE_BIN} ${WOW_DIR}/${WOW_BIN} -${OPTARG}" | |
;; | |
esac | |
done | |
# Delete cache files for NPCScan | |
if pgrep ${WOW_BIN} | |
then | |
echo "WoW is already running, not deleting anything." | |
else | |
rm -f ${WOW_DIR}/Cache/WDB/enUS/creaturecache.wdb | |
rm -f ${WOW_DIR}/Cache/WDB/esMX/creaturecache.wdb | |
fi | |
# Start it up | |
echo "Starting World of Warcraft..." | |
echo "Using wineprefix ${WINEPREFIX}" | |
eval $WOW_COMMAND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment