Browse Source

Disable program directory on macOS, updating plists

Josh Engebretson 9 years ago
parent
commit
309bfd366f

+ 2 - 2
Build/CMake/Modules/AtomicEditorInfo.plist.template

@@ -31,12 +31,12 @@
     <key>LSRequiresCarbon</key>
     <true/>
     <key>NSSupportsAutomaticGraphicsSwitching</key>
-  	<true/>    
+  	<true/>
     <key>NSHumanReadableCopyright</key>
     <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
     <key>LSEnvironment</key>
     <dict>
-        <key>URHO3D_PREFIX_PATH</key>
+        <key>ATOMIC_PREFIX_PATH</key>
         <string>../Resources</string>
     </dict>
 </dict>

+ 1 - 1
Build/CMake/Modules/MacOSXBundleInfo.plist.template

@@ -34,7 +34,7 @@
     <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
     <key>LSEnvironment</key>
     <dict>
-        <key>URHO3D_PREFIX_PATH</key>
+        <key>ATOMIC_PREFIX_PATH</key>
         <string>../Resources</string>
     </dict>
 </dict>

+ 2 - 2
Data/AtomicEditor/Deployment/MacOS/AtomicPlayer.app/Contents/Info.plist

@@ -27,7 +27,7 @@
     <key>CFBundleVersion</key>
     <string>1.32.400</string>
     <key>CFBundleIconFile</key>
-    <string>Atomic</string>    
+    <string>Atomic</string>
     <key>CSResourcesFileMapped</key>
     <true/>
     <key>LSRequiresCarbon</key>
@@ -36,7 +36,7 @@
     <string>Copyright (c) 2015 THUNDERBEAST GAMES LLC</string>
     <key>LSEnvironment</key>
     <dict>
-        <key>URHO3D_PREFIX_PATH</key>
+        <key>ATOMIC_PREFIX_PATH</key>
         <string>../Resources</string>
     </dict>
     <key>NSHighResolutionCapable</key>

+ 11 - 0
Source/Atomic/IO/FileSystem.cpp

@@ -726,6 +726,13 @@ String FileSystem::GetProgramDir() const
     programDir_ = GetPath(String(exeName));
 #endif
 
+// ATOMIC BEGIN
+
+    // Disabling this on Mac as a possible source of resource issues with app bundles
+    // https://github.com/AtomicGameEngine/AtomicGameEngine/issues/1209
+
+#ifndef ATOMIC_PLATFORM_OSX
+
     // If the executable directory does not contain CoreData & Data directories, but the current working directory does, use the
     // current working directory instead
     /// \todo Should not rely on such fixed convention
@@ -734,6 +741,10 @@ String FileSystem::GetProgramDir() const
         (DirExists(currentDir + "CoreData") || DirExists(currentDir + "Data")))
         programDir_ = currentDir;
 
+#endif
+
+// ATOMIC END
+
     // Sanitate /./ construct away
     programDir_.Replace("/./", "/");