Friday 18 July 2014

Star Wars: The Old Republic - Start Script

#! /bin/bash

unset OPTIMUS_PREFIX
# In case of an optimus-enabled laptop, the use of primusrun is recommended over optirun.
# Don't uncomment this line in any other case.
# OPTIMUS_PREFIX="primusrun"

# If you store the script anywhere else than the game directory, change this to the path of your launcher.exe
LAUNCHER_COMMAND="wine launcher.exe"
#LAUNCHER_COMMAND="wine explorer /desktop=name,1920x1080 launcher.exe"

 
# Set up a new wineprefix in the game directory, and reduce debugging to improve performance.
# If you don't like it there, or running the script from somewhere else, change it.
# Please note that WINEARCH=win32 is REQUIRED.
export WINEARCH=win32
export WINEDEBUG=-all
export WINEPREFIX="$( pwd )/wineprefix"

# Check if we have swtor_fix.exe, and download it if we don't.
# This can be placed anywhere on the system, and must be run parallel to the game.

if [ ! -f swtor_fix.exe ]; then
    wget -O swtor_fix.exe https://github.com/aljen/swtor_fix/raw/master/swtor_fix.exe
fi
# Start it parallely.
wine swtor_fix.exe &
# Give it a sec to fire up.
sleep 1
# Install and set up components in wineprefix.
# Since that command does nothing if already ran, we need no checks there.
winetricks msvcp90=native d3dx9_36 vcrun2008 msls31 winhttp

# Here we come!
$OPTIMUS_PREFIX $LAUNCHER_COMMAND

# Since wait for swtor_fix.exe to finish.
wait $!

# Clean up after ourselves.
unset WINEARCH
unset WINEPREFIX
unset WINEDEBUG

No comments:

Post a Comment