# In case of an optimus-enabled laptop, the use of primusrun is recommended over optirun.
# Don't uncomment this line in any other case.
# If you store the script anywhere else than the game directory, change this to the path of your 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 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
# Start it parallely.
wine swtor_fix.exe &
# Give it a sec to fire up.
# 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!
# Since wait for swtor_fix.exe to finish.
# Clean up after ourselves.