Setting the Current Path

Chris Thielen chris at
Fri Jul 5 02:27:32 EDT 2002

I'm using Loki Setup as the installation program for one of my games,
and I was wondering what the common way was to get the path the game's
installed in. My game is installed in, say, /usr/local/games/my_game,
and I need to get data out of files in /usr/local/games/my_game/data,
but internally, my game only has the path as "data/whatever.dat". Is
there a function for Linux/Win32/MacOS to get the directory the binary
is being run from, so I could set the current directory to that, or is
there a better way to do this? Should I have Loki Setup write some sort
of ~/.my_game/path file and grab that everytime the game starts? What is
normally done for this?

-- chris (chris at

More information about the Lokisetup mailing list