Created
December 7, 2013 07:07
-
-
Save CommanderAlchemy/7838183 to your computer and use it in GitHub Desktop.
EVE - Online Launcher
This file contains 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 | |
# Credits 2013 Artur O. <commander.alchemy@gmail.com> | |
# This script is for managing EVE Online with Wine. | |
# It includes: | |
# Installing and managing EVE - Online. | |
# Installing and managing wine prefixes. | |
# Injecting Simplescreenrecorder opengl shm code. | |
# | |
# License GPL or something, just give credit if you use it m8 | |
# Default Values | |
launcher=false | |
server=Tranquility | |
flag=-all | |
resolution=0x0 | |
record=false | |
# nVidia _GL_THREADED_OPTIMIZATIONS | |
optimize=true | |
# Path to wine | |
winepath=/usr/bin/ | |
# Install paths! | |
prefixpath=~/.Games/eve/char/ | |
installpath=~/.Games/eve/install/ | |
# Path where to install game (EVE-Online) | |
tranquilitypath="$installpath"tranquility/drive_c/Program\ Files/CCP/EVE/ | |
singularitypath="$installpath"singularity/drive_c/Program\ Files/CCP/EVE/ | |
# Usage | |
usage() { | |
cat << EOF | |
usage: $0 options | |
This script is for managing EVE Online with Wine. | |
It includes: | |
Installing and managing EVE - Online. | |
Installing and managing wine prefixes. | |
Injecting Simplescreenrecorder opengl shm code. | |
OPTIONS: | |
Prefixes | |
-c [CHAR] Char, what prefix to launch. | |
-s [Server] Server, what server to use DEFAULT=Tranquility OPTIONS= Tranquility SISI | |
Wine | |
-f [FLAG] Winedebug flag. DEFAULT=-all OPTIONS= check winehq | |
-r [RES] Resolution for the desktop. DEFAULT=fullscreen OPTIONS= 1920x1080 | |
-k [PREFIX] Kill wineprefix | |
Launcher | |
-l Launches eve with Launcher instead. | |
Directly | |
-u [username] Launches ExeFile.exe directly with username and password. | |
-p [password] | |
Recordmydesktop | |
-R [CODE] Simplescreenrecorder shm code. Check Simplescreenrecorder opengl settings for code | |
Install | |
-i [PREFIX] Reinstall prefix for char Into: ~/.Games/eve/char/[PREFIX] | |
-I Optional Reinstall EVE - Online DEFAULT ~/.Games/eve/Install | |
Help | |
-h This help | |
EOF | |
} | |
set -x | |
# Wineserver killer | |
killPrefix() { | |
echo "killing" | |
echo | |
echo "Killing "$char"" | |
echo ""$server"" | |
echo | |
wineserver -k | |
exit 0 | |
} | |
# Launch winetricks for prefix | |
wineprefix() { | |
echo | |
echo "[Launching Winetricks]" | |
echo "For:"$char"" | |
echo | |
winetricks | |
exit 0 | |
} | |
# Launch Winecfg for prefix | |
wineconf() { | |
echo | |
echo "[Launching Settings]" | |
echo "For:"$char"" | |
echo | |
winecfg | |
exit 0 | |
} | |
# Install prefix for EVE - Online | |
installprefix() { | |
echo "Creating Dir" | |
mkdir -p "$prefixpath" | |
cd "$prefixpath" || echo "error finding "$prefixpath"" | |
mv "$char" "$char".old || echo "no existing, not backing up" | |
winearch=win32 winetricks vcrun2005 vcrun2008 vcrun2010 corefonts win7 | |
exit 0 | |
} | |
installeve() { | |
echo "Creating Dir" | |
mkdir -p "$installpath" | |
cd "$installpath" || echo "error finding "$installpath"" | |
wget -O installer.exe http://content.eveonline.com/663778/EVE_Online_Installer_663778.exe || echo "error could not find installer on EVE-Online Website, Update link location in script line 117" | |
if [[ "$server" == "tranquility" ]]; then | |
mkdir "$installpath"tranquility || echo "error while creating tranquility path" && "echo test and" | |
winearch=win32 WINEPREFIX="$installpath"tranquility wine installer.exe | |
else | |
mkdir "$installpath"singularity || echo "error while creating singularity path" | |
winearch=win32 WINEPREFIX="$installpath"singularity wine installer.exe | |
fi | |
exit 0 | |
} | |
# If no arguments passed exit | |
if [ "$#" == "0" ]; then | |
echo "" | |
echo "[No Arguments Given]" | |
usage | |
echo "" | |
exit 0 | |
fi | |
# Passes parameters, Record SHM code for inject. And flag for winedebug | |
while getopts f:c:s:r:R:ikhIL option | |
do | |
case "$option" | |
in | |
f) | |
flag=$OPTARG | |
export WINEDEBUG="$flag" | |
;; | |
c) | |
char=$OPTARG | |
export WINEPREFIX="$prefixpath""$char" | |
;; | |
s) | |
server=$OPTARG | |
;; | |
r) | |
resolution=$OPTARG | |
;; | |
R) | |
shm=$OPTARG | |
record=true | |
;; | |
L) | |
launcher=true | |
;; | |
u) | |
username=$OPTARG | |
;; | |
p) | |
password=$OPTARG | |
;; | |
i) | |
installprefix | |
;; | |
I) | |
installeve | |
;; | |
k) | |
killPrefix | |
;; | |
h) | |
usage | |
;; | |
esac | |
done | |
for argz in "$@" ;do | |
case $argz | |
in | |
csmt) | |
winepath=.PlayOnLinux/wine/linux-x86/1.7.1-CSMT/bin/ | |
;; | |
winetricks) | |
winetricks | |
;; | |
conf) | |
wineconf | |
;; | |
esac | |
done | |
# IF launcher | |
if $launcher; then | |
#Launcher | |
if [[ "$server" == "Tranquility" ]]; then | |
# Launch Launcher + Tranquility | |
install="$tranquilitypath"eve.exe | |
else | |
# Launch Launcher + Sisi | |
install="$singularitypath"eve.exe\ /server:Singularity | |
fi | |
else | |
#Directly | |
if [[ "$server" == "Tranquility" ]]; then | |
# Launch Directly + Tranquility | |
install="$tranquilitypath"bin/ExeFile.exe | |
else | |
# Launch Directly + Sisi | |
install="$singularitypath"bin/ExeFile.exe\ /server:Singularity | |
fi | |
fi | |
# IF Record | |
if $record; then | |
# Record, Inject Recordmydesktop | |
export LD_PRELOAD="libssr-glinject.so libpthread.so.0 libGL.so.1" | |
export SSR_GLINJECT_SHM="$shm" | |
else | |
# Export regular | |
export LD_PRELOAD="libpthread.so.0 libGL.so.1" | |
fi | |
# Use nVidia Optimization? | |
if $optimize; then | |
export GL_THREADED_OPTIMIZATIONS=1 | |
fi | |
"$winepath"wine explorer /desktop="EVE-"$char"@"$server"","$resolution" "$install" &>>~/EVE/"$client".log& | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment