[1.72, Linux] Slightly changed BASH script to run Auteria

[1.72, Linux] Slightly changed BASH script to run Auteria

Postby dey on Fri Feb 01, 2008 10:59 pm

I have modified original, "auteria_shader" BASH script which should be used to run Auteria. The code is:
Code: Select all
#!/bin/sh
old_pwd=$PWD
my_dir=`dirname "$0"`
export LD_LIBRARY_PATH="$my_dir/lib:$LD_LIBRARY_PATH"
cd $my_dir
./auteria_shader.bin $@ &
# OK, let's return to the original directory
cd $old_pwd

The shell script above gives me ability to do something like: ~/opt/auteria/auteria from everywhere. Also it setups properly the library path, so linker (loader) knows where are those shared libraries needed for the game.

Original file is DOS (ie. CR+LF line-endings) so it is possible that it might not work on your Linux boxes. If you want to use original file use dos2unix tool to change it into normal, UNIX mode.
User avatar
dey
Renegade
 
Posts: 329
Joined: Sun Jun 17, 2007 5:34 pm
Location: London, UK

Postby yion on Sat Feb 09, 2008 5:08 am

I use option -chdir which basicly does same, without changing CWD.
You can even put it somewhere else then. :)
yion
Young Lizard
 
Posts: 22
Joined: Sat Nov 17, 2007 12:23 pm

Postby yion on Sat Feb 09, 2008 5:25 am

To clarify it is something like that:

Code: Select all
[prak@a ~] cat /opt/bin/auteria
#!/bin/sh
export LD_LIBRARY_PATH="/opt/share/auteria/lib:$LD_LIBRARY_PATH"
/opt/share/auteria/auteria.bin -chdir /opt/share/auteria/ $*

I added user auteria to system, whole game directory is owned by it, executable has attribute +s (sticky). Means it always runs with permissions of owner, which solves writing own files :)
Only issue that is not solved is seperation of preferences. I think it is possible with bit of symlink hackery too. Just i am only user on this machine, so i didn't care :P
If anyone had questions, I can help, just contact me somehow. :)
yion
Young Lizard
 
Posts: 22
Joined: Sat Nov 17, 2007 12:23 pm


Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 2 guests


cron