diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 4ce09fa552..6a37276112 100644 --- a/direct/src/showbase/ShowBase.py +++ b/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