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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user