2009/8/28 Yin Jintao <[email protected]>: > You can using Glib.Environment.get_current_dir() to get current directory. > > Thanks, > Jintao > > > 2009/8/28 Arkadi Viner <[email protected]> > >> Hi guys. >> I need to execute some program which is located in my program's directory. >> Is there any API to get the path to my program's directory? >> Thanks. >>
Just to elaborate a bit, you wouldn't normally run a binary in the same directory as the binary is located, unless you are working on windows. Normal practice is to encode the install location into the binary, and use that path at runtime - your build tool will probably do that for you by writing it into a config header during the configure stage. get_current_dir() will normally return the directory the user started the app from. -- Phil Housley _______________________________________________ Vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
