mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 16:26:42 +00:00 
			
		
		
		
	OpenCS: set current directory to bundle location on OS X, like in OpenMW binary
This commit is contained in:
		
							parent
							
								
									df5b52b45b
								
							
						
					
					
						commit
						0494fa543f
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		|  | @ -7,6 +7,11 @@ | |||
| #include <QApplication> | ||||
| #include <QIcon> | ||||
| 
 | ||||
| // for Ogre::macBundlePath
 | ||||
| #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE | ||||
| #include <OSX/macUtils.h> | ||||
| #endif | ||||
| 
 | ||||
| class Application : public QApplication | ||||
| { | ||||
|     private: | ||||
|  | @ -32,6 +37,12 @@ class Application : public QApplication | |||
| 
 | ||||
| int main(int argc, char *argv[]) | ||||
| { | ||||
| #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE | ||||
|     // set current dir to bundle path
 | ||||
|     boost::filesystem::path bundlePath = boost::filesystem::path(Ogre::macBundlePath()).parent_path(); | ||||
|     boost::filesystem::current_path(bundlePath); | ||||
| #endif | ||||
| 
 | ||||
|     Q_INIT_RESOURCE (resources); | ||||
|     Application mApplication (argc, argv); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue