瀏覽代碼

Experimental; copy the whole 'direct' tree to 'built' to avoid the hacky __init__.py (which we can't use anymore because of the way the runtime is packaged)

rdb 16 年之前
父節點
當前提交
68f224ff08
共有 1 個文件被更改,包括 3 次插入11 次删除
  1. 3 11
      makepanda/makepanda.py

+ 3 - 11
makepanda/makepanda.py

@@ -1389,21 +1389,13 @@ CreatePandaVersionFiles()
 
 
 ##########################################################################################
 ##########################################################################################
 #
 #
-# Generate direct/__init__.py
+# Copy the "direct" tree
 #
 #
 ##########################################################################################
 ##########################################################################################
 
 
-DIRECTINIT="""
-import os,sys
-srcdir1 = os.path.join(__path__[0], 'src')
-srcdir2 = os.path.join(__path__[0], '..', '..', 'direct', 'src')
-if    (os.path.isdir(srcdir1)): __path__[0] = srcdir1
-elif  (os.path.isdir(srcdir2)): __path__[0] = srcdir2
-else: sys.exit("Cannot find the 'direct' tree")
-"""
-
 if (PkgSkip("PYTHON")==0):
 if (PkgSkip("PYTHON")==0):
-    ConditionalWriteFile(GetOutputDir()+'/direct/__init__.py', DIRECTINIT)
+    CopyTree(GetOutputDir()+'/direct','direct/src')
+    ConditionalWriteFile(GetOutputDir()+'/direct/__init__.py', "")
 
 
 ##########################################################################################
 ##########################################################################################
 #
 #