Allow launching through a symlink. It doesn't work quite like normal applications. Menus don't show up, it doesn't really seem to know where it is.

Still, most people just would use the Finder and never encounter this behavior.
This commit is contained in:
Steve Checkoway
2006-08-14 15:31:52 +00:00
parent 832212c526
commit c6936984b4
2 changed files with 13 additions and 10 deletions
+6 -1
View File
@@ -221,7 +221,12 @@ static void ChangeToDirOfExecutable( const RString &argv0 )
#if defined(_WINDOWS)
chdir( RageFileManagerUtil::sDirOfExecutable + "/.." );
#elif defined(MACOSX)
chdir( RageFileManagerUtil::sDirOfExecutable + "/../../.." );
/* If the basename is not MacOS, then we've likely been launched via the command line
* through a symlink. Assume this is the case and change to the dir of the symlink. */
puts( RageFileManagerUtil::sDirOfExecutable );
if( Basename(RageFileManagerUtil::sDirOfExecutable) == "MacOS" )
CollapsePath( RageFileManagerUtil::sDirOfExecutable += "/../../.." );
chdir( RageFileManagerUtil::sDirOfExecutable );
#endif
}