Browse Source

Fix model-cache location. On OSX it was even in ~/Documents/Library/Caches/, wow.
Thanks go to Bradamante for pointing out the issue.

rdb 15 years ago
parent
commit
7ea3dfbfee
2 changed files with 6 additions and 6 deletions
  1. 1 1
      makepanda/config.in
  2. 5 5
      makepanda/makepanda.py

+ 1 - 1
makepanda/config.in

@@ -87,7 +87,7 @@ hardware-animated-vertices #f
 
 # Enable the model-cache, but only for models, not textures.
 
-model-cache-dir $USER_APPDATA/.panda3d/cache
+model-cache-dir $HOME/.panda3d/cache
 model-cache-textures #f
 
 # This option specifies the default profiles for Cg shaders.

+ 5 - 5
makepanda/makepanda.py

@@ -1705,16 +1705,16 @@ else:
   configprc=ReadFile("makepanda/config.in")
 
 if (sys.platform.startswith("win")):
-    configprc = configprc.replace(".panda3d","Panda3D-%s" % VERSION)
+    configprc = configprc.replace("$HOME/.panda3d", "$USER_APPDATA/Panda3D-%s" % MAJOR_VERSION)
 else:
-    configprc = configprc.replace("aux-display pandadx9","")
-    configprc = configprc.replace("aux-display pandadx8","")
+    configprc = configprc.replace("aux-display pandadx9", "")
+    configprc = configprc.replace("aux-display pandadx8", "")
 
 if (sys.platform == "darwin"):
-    configprc = configprc.replace(".panda3d","Library/Caches/Panda3D-%s" % VERSION)
+    configprc = configprc.replace(".panda3d/cache", "Library/Caches/Panda3D-%s" % MAJOR_VERSION)
     
     # OpenAL is not yet working well on OSX for us, so let's do this for now.
-    configprc = configprc.replace("p3openal_audio","p3fmod_audio")
+    configprc = configprc.replace("p3openal_audio", "p3fmod_audio")
 
 ConditionalWriteFile(GetOutputDir()+"/etc/Config.prc", configprc)
 ConditionalWriteFile(GetOutputDir()+"/etc/Confauto.prc", confautoprc)