瀏覽代碼

Uh, oh, let's keep backward compatibility for base.mainDir

rdb 16 年之前
父節點
當前提交
381f89d8ea
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      direct/src/showbase/ShowBase.py

+ 3 - 0
direct/src/showbase/ShowBase.py

@@ -59,6 +59,9 @@ class ShowBase(DirectObject.DirectObject):
         if config.GetBool('want-variable-dump', 0):
             ExceptionVarDump.install()
 
+        # Locate the directory containing the main program
+        self.mainDir = ExecutionEnvironment.getEnvironmentVariable("MAIN_DIR")
+
         # The appRunner should have been created by the time ShowBase
         # has been.
         self.appRunner = AppRunnerGlobal.appRunner