[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: loading lua scripts relative to an app's path
- From: "Wesley Smith" <wesley.hoke@...>
- Date: Sat, 7 Oct 2006 02:51:28 -0700
I ended up providing an API (callable from Lua) that gave the current
directory, as well as the directory the script ran from (not
necessarily the same thing).
Is this available? I still haven't figured out how to do this as
argv[0] isn't entirely reliable. At least on OSX, if you launch an
app from the Finder, argv[0] does provide the proper path, but if you
launch from the command line, it doesn't. This is really annoying. I
need something more robust than this. I haven't found any C functions
for figuring out where the app is located yet. Does anyone know of
any?
thanks,
wes