Move model cache to $USER_APPDATA, and enable it on linux

This commit is contained in:
rdb 2009-07-01 14:09:23 +00:00
parent d5836b1ae3
commit f723c4d8d6
2 changed files with 11 additions and 5 deletions

View File

@ -5,11 +5,17 @@
########################################################### ###########################################################
# Uncomment one of the following lines to choose whether you should # Uncomment one of the following lines to choose whether you should
# run using OpenGL or DirectX rendering. # run using OpenGL, DirectX or TinyPanda (software) rendering.
# There can only be one load-display line, but you can use
# multiple aux-display lines to specify fallback modules.
# When the module indicated by load-display fails, it will fall
# back to the next display module indicated by aux-display,
# when that fails, the next aux-display line, and so on.
load-display pandagl load-display pandagl
#load-display pandadx9 #load-display pandadx9
#load-display pandadx8 #load-display pandadx8
#load-display tinydisplay
# These control the placement and size of the default rendering window. # These control the placement and size of the default rendering window.
@ -81,7 +87,7 @@ hardware-animated-vertices #f
# Enable the model-cache, but only for models, not textures. # Enable the model-cache, but only for models, not textures.
model-cache-dir $THIS_PRC_DIR/../modelcache model-cache-dir $USER_APPDATA/.panda3d/cache
model-cache-textures #f model-cache-textures #f
# This option specifies the default profiles for Cg shaders. # This option specifies the default profiles for Cg shaders.

View File

@ -1120,10 +1120,11 @@ if (os.path.isfile("makepanda/myconfig.in")):
else: else:
configprc=ReadFile("makepanda/config.in") configprc=ReadFile("makepanda/config.in")
if (sys.platform != "win32"): if (sys.platform == "win32"):
confautoprc = confautoprc.replace(".panda3d","Panda3D-%s" % VERSION)
else:
confautoprc = confautoprc.replace("aux-display pandadx9","") confautoprc = confautoprc.replace("aux-display pandadx9","")
confautoprc = confautoprc.replace("aux-display pandadx8","") confautoprc = confautoprc.replace("aux-display pandadx8","")
confautoprc = confautoprc.replace("aux-display pandadx7","")
# OpenAL is not yet working well on OSX for us, so let's do this for now. # OpenAL is not yet working well on OSX for us, so let's do this for now.
if (sys.platform == "darwin"): if (sys.platform == "darwin"):
@ -3817,7 +3818,6 @@ def MakeInstallerOSX():
oscmd("mkdir -p Panda3D-tpl-rw/Panda3D/%s/lib/direct" % VERSION) oscmd("mkdir -p Panda3D-tpl-rw/Panda3D/%s/lib/direct" % VERSION)
oscmd("ln -s /usr/bin/python Panda3D-tpl-rw/Panda3D/%s/bin/ppython" % VERSION) oscmd("ln -s /usr/bin/python Panda3D-tpl-rw/Panda3D/%s/bin/ppython" % VERSION)
oscmd("sed -e 's@\\$1@%s@' < direct/src/directscripts/profilepaths-osx.command >> Panda3D-tpl-rw/panda3dpaths.command" % VERSION) oscmd("sed -e 's@\\$1@%s@' < direct/src/directscripts/profilepaths-osx.command >> Panda3D-tpl-rw/panda3dpaths.command" % VERSION)
oscmd("sed -e 's@model-cache-@# model-cache-@' -e 's@$THIS_PRC_DIR/[.][.]@/Applications/Panda3D/%s@' < %s/etc/Config.prc > Panda3D-tpl-rw/Panda3D/%s/etc/Config.prc" % (VERSION, GetOutputDir(), VERSION))
# Append the plugin-path to the Config.prc. # Append the plugin-path to the Config.prc.
f = open("Panda3D-tpl-rw/Panda3D/%s/etc/Config.prc" % VERSION, "a") f = open("Panda3D-tpl-rw/Panda3D/%s/etc/Config.prc" % VERSION, "a")
f.write("\nplugin-path /Applications/Panda3D/%s/lib\n" % VERSION) f.write("\nplugin-path /Applications/Panda3D/%s/lib\n" % VERSION)