Skip to content

Commit 603ffa7

Browse files
committed
New panda3d.* import structure
1 parent 8f83314 commit 603ffa7

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

direct/src/directscripts/packpanda.nsi

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,17 @@ Section "${SMDIRECTORY}" SecCore
100100
File /r /x CVS /x Opt?-Win32 "${PSOURCE}\direct\filter\*.sha"
101101
SetOutPath $INSTDIR\direct
102102
File /r /x CVS /x Opt?-Win32 "${PSOURCE}\direct\*.py"
103+
SetOutPath $INSTDIR
104+
File "${PSOURCE}\panda3d.py"
103105
!else
104106
File /r /x CVS /x Opt?-Win32 "${PSOURCE}\direct\src\directscripts\*"
105107
SetOutPath $INSTDIR\direct\filter
106108
File /r /x CVS /x Opt?-Win32 "${PSOURCE}\direct\src\filter\*.sha"
107109
SetOutPath $INSTDIR\direct
108110
File /r /x CVS /x Opt?-Win32 "${PSOURCE}\direct\src\*.py"
109111
File "${PANDA}\tmp\__init__.py"
112+
SetOutPath $INSTDIR
113+
File "${PSOURCE}\direct\src\ffi\panda3d.py"
110114
!endif
111115
SetOutPath $INSTDIR\pandac
112116
File /r "${PANDA}\pandac\*.py"
@@ -188,14 +192,14 @@ Section "${SMDIRECTORY}" SecCore
188192
StrCmp $1 "" done
189193
StrCmp $1 "." next
190194
StrCmp $1 ".." next
191-
Push $1
192-
Push "-"
195+
Push $1
196+
Push "-"
193197
Push " "
194198
Call StrRep
195199
Pop $R0
196200
StrCpy $READABLE $R0
197-
Push $1
198-
Push "-"
201+
Push $1
202+
Push "-"
199203
Push "_"
200204
Call StrRep
201205
Pop $R0
@@ -816,6 +820,6 @@ done:
816820
Pop $R1
817821
Pop $R4
818822
Exch $R3
819-
823+
820824
FunctionEnd
821825

makepanda/installpanda.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built"):
122122
oscmd("cp -R direct/src/* "+destdir+prefix+"/share/panda3d/direct")
123123
oscmd("cp -R "+outputdir+"/pandac "+destdir+prefix+"/share/panda3d/pandac")
124124
oscmd("cp -R "+outputdir+"/models "+destdir+prefix+"/share/panda3d/models")
125+
oscmd("cp direct/src/ffi/panda3d.py "+destdir+prefix+"/share/panda3d/panda3d.py")
125126
if os.path.isdir("samples"): oscmd("cp -R samples "+destdir+prefix+"/share/panda3d/samples")
126127
if os.path.isdir(outputdir+"/Pmw"): oscmd("cp -R "+outputdir+"/Pmw "+destdir+prefix+"/share/panda3d/Pmw")
127128
if os.path.isdir(outputdir+"/plugins"): oscmd("cp -R "+outputdir+"/plugins "+destdir+prefix+"/share/panda3d/plugins")

makepanda/makepanda.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ def CreatePandaVersionFiles():
14861486

14871487
##########################################################################################
14881488
#
1489-
# Copy the "direct" tree
1489+
# Copy the "direct" tree and panda3d.py
14901490
#
14911491
##########################################################################################
14921492

@@ -4524,6 +4524,7 @@ def MakeInstallerOSX():
45244524
oscmd("ln -s /usr/bin/python Panda3D-tpl-rw/Panda3D/%s/bin/ppython" % VERSION)
45254525
oscmd("sed -e 's@\\$1@%s@' < direct/src/directscripts/profilepaths-osx.command >> Panda3D-tpl-rw/panda3dpaths.command" % VERSION)
45264526
WriteFile("Panda3D-tpl-rw/Panda3D/%s/lib/direct/__init__.py" % VERSION, "")
4527+
oscmd("cp direct/src/ffi/panda3d.py Panda3D-tpl-rw/Panda3D/%s/lib/panda3d.py" % VERSION)
45274528
oscmd("cp %s/etc/Config.prc Panda3D-tpl-rw/Panda3D/%s/etc/Config.prc" % (GetOutputDir(), VERSION))
45284529
oscmd("cp %s/etc/Confauto.prc Panda3D-tpl-rw/Panda3D/%s/etc/Confauto.prc" % (GetOutputDir(), VERSION))
45294530
oscmd("cp -R %s/include Panda3D-tpl-rw/Panda3D/%s/include" % (GetOutputDir(), VERSION))
@@ -4547,6 +4548,7 @@ def MakeInstallerOSX():
45474548
compileall.compile_dir("Panda3D-tpl-rw/Panda3D/"+VERSION+"/lib/Pmw")
45484549
oscmd("chmod -R 555 Panda3D-tpl-rw/Panda3D/"+VERSION+"/lib/direct")
45494550
oscmd("chmod -R 555 Panda3D-tpl-rw/Panda3D/"+VERSION+"/lib/pandac")
4551+
oscmd("chmod 555 Panda3D-tpl-rw/Panda3D/"+VERSION+"/lib/panda3d.py")
45504552
oscmd("chmod -R 555 Panda3D-tpl-rw/Panda3D/"+VERSION+"/models")
45514553
if os.path.isdir("samples"): oscmd("chmod -R 555 Panda3D-tpl-rw/Panda3D/"+VERSION+"/samples")
45524554
if os.path.isdir(GetOutputDir()+"/Pmw"): oscmd("chmod -R 555 Panda3D-tpl-rw/Panda3D/"+VERSION+"/lib/Pmw")

0 commit comments

Comments
 (0)