Skip to content

Commit 3c2f820

Browse files
committed
Merge branch 'release/1.9.x'
Conflicts: direct/src/p3d/DeploymentTools.py
2 parents c80fd20 + 9348cf6 commit 3c2f820

File tree

20 files changed

+576
-152
lines changed

20 files changed

+576
-152
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ are included as part of the Windows 7.1 SDK.
3131
You will also need to have the third-party dependency libraries available for
3232
the build scripts to use. These are available from one of these two URLs,
3333
depending on whether you are on a 32-bit or 64-bit system:
34-
https://www.panda3d.org/download/panda3d-1.9.0/panda3d-1.9.0-tools-win32.zip
35-
https://www.panda3d.org/download/panda3d-1.9.0/panda3d-1.9.0-tools-win64.zip
34+
https://www.panda3d.org/download/panda3d-1.9.1/panda3d-1.9.1-tools-win32.zip
35+
https://www.panda3d.org/download/panda3d-1.9.1/panda3d-1.9.1-tools-win64.zip
3636

3737
After acquiring these dependencies, you may simply build Panda3D from the
3838
command prompt using the following command:
@@ -97,7 +97,7 @@ Mac OS X
9797
--------
9898

9999
On Mac OS X, you will need to download a set of precompiled thirdparty packages in order to
100-
compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.9.0/panda3d-1.9.0-tools-mac.tar.gz).
100+
compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.9.1/panda3d-1.9.1-tools-mac.tar.gz).
101101

102102
After placing the thirdparty directory inside the panda3d source directory,
103103
you may build Panda3D using a command like the following:

direct/src/distributed/ClockDelta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ClockDelta provides the ability to use clock synchronization for
22
# distributed objects
33

4-
from pandac.PandaModules import *
4+
from panda3d.core import ClockObject
55
from direct.directnotify import DirectNotifyGlobal
66
from direct.showbase import DirectObject
77
import math

direct/src/gui/DirectDialog.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def __init__(self, parent = None, **kw):
9494
('text', '', None),
9595
('text_align', TextNode.ALeft, None),
9696
('text_scale', 0.06, None),
97-
('image', None, None),
98-
('relief', DGG.RAISED, None),
97+
('image', DGG.getDefaultDialogGeom(), None),
98+
('relief', DGG.getDefaultDialogRelief(), None),
9999
('borderWidth', (0.01, 0.01), None),
100100
('buttonTextList', [], DGG.INITOPT),
101101
('buttonGeomList', [], DGG.INITOPT),
@@ -316,7 +316,8 @@ def configureDialog(self):
316316
# reduce bottom by pad, button height and 2*button pad
317317
b = min(b - self['midPad'] - bpad[1] - bHeight - bpad[1], b) - pad[1]
318318
t = t + self['topPad'] + pad[1]
319-
self['frameSize'] = (l, r, b, t)
319+
if self['frameSize'] is None:
320+
self['frameSize'] = (l, r, b, t)
320321
self['image_scale'] = (r - l, 1, t - b)
321322
# Center frame about text and buttons
322323
self['image_pos'] = ((l+r)*0.5, 0.0, (b+t)*0.5)

direct/src/gui/DirectGuiGlobals.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
defaultClickSound = None
1515
defaultRolloverSound = None
1616
defaultDialogGeom = None
17+
defaultDialogRelief = PGFrameStyle.TBevelOut
1718
drawOrder = 100
1819
panel = None
1920

@@ -132,13 +133,16 @@ def setDefaultFontFunc(newFontFunc):
132133

133134
def getDefaultDialogGeom():
134135
global defaultDialogGeom
135-
if defaultDialogGeom == None:
136-
defaultDialogGeom = loader.loadModel('models/gui/dialog_box_gui', okMissing = True)
137136
return defaultDialogGeom
138137

139-
def setDefaultDialogGeom(newDialogGeom):
140-
global defaultDialogGeom
138+
def getDefaultDialogRelief():
139+
global defaultDialogRelief
140+
return defaultDialogRelief
141+
142+
def setDefaultDialogGeom(newDialogGeom, relief=None):
143+
global defaultDialogGeom, defaultDialogRelief
141144
defaultDialogGeom = newDialogGeom
145+
defaultDialogRelief = relief
142146

143147
def getDefaultDrawOrder():
144148
return drawOrder

direct/src/p3d/DeploymentTools.py

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
__all__ = ["Standalone", "Installer"]
66

77
import os, sys, subprocess, tarfile, shutil, time, zipfile, socket, getpass, struct
8+
import gzip
89
from io import BytesIO, TextIOWrapper
910
from direct.directnotify.DirectNotifyGlobal import *
1011
from direct.showbase.AppRunnerGlobal import appRunner
@@ -994,7 +995,7 @@ def buildPKG(self, output, platform):
994995
if self.licensefile:
995996
shutil.copyfile(self.licensefile.toOsSpecific(), Filename(output, "Contents/Resources/License.txt").toOsSpecific())
996997
pkginfo = open(Filename(output, "Contents/PkgInfo").toOsSpecific(), "w")
997-
pkginfo.write("pkmkrpkg1")
998+
pkginfo.write("pmkrpkg1")
998999
pkginfo.close()
9991000
pkginfo = open(Filename(output, "Contents/Resources/package_version").toOsSpecific(), "w")
10001001
pkginfo.write("major: 1\nminor: 9")
@@ -1079,18 +1080,18 @@ def buildPKG(self, output, platform):
10791080
plist.write('</plist>\n')
10801081
plist.close()
10811082

1082-
if hasattr(tarfile, "PAX_FORMAT"):
1083-
archive = tarfile.open(Filename(output, "Contents/Archive.pax.gz").toOsSpecific(), "w:gz", format = tarfile.PAX_FORMAT, tarinfo = TarInfoRootOSX)
1084-
else:
1085-
archive = tarfile.open(Filename(output, "Contents/Archive.pax.gz").toOsSpecific(), "w:gz", tarinfo = TarInfoRootOSX)
1086-
archive.add(appfn.toOsSpecific(), appname)
1083+
# OS X El Capitan no longer accepts .pax archives - it must be a CPIO archive named .pax.
1084+
archive = gzip.open(Filename(output, "Contents/Archive.pax.gz").toOsSpecific(), 'wb')
1085+
self.__ino = 0
1086+
self.__writeCPIO(archive, appfn, appname)
1087+
archive.write(b"0707070000000000000000000000000000000000010000000000000000000001300000000000TRAILER!!!\0")
10871088
archive.close()
10881089

10891090
# Put the .pkg into a zipfile
1090-
archive = Filename(output.getDirname(), "%s %s.zip" % (self.fullname, self.version))
1091+
zip_fn = Filename(output.getDirname(), "%s %s.pkg.zip" % (self.fullname, self.version))
10911092
dir = Filename(output.getDirname())
10921093
dir.makeAbsolute()
1093-
zip = zipfile.ZipFile(archive.toOsSpecific(), 'w')
1094+
zip = zipfile.ZipFile(zip_fn.toOsSpecific(), 'w')
10941095
for root, dirs, files in self.os_walk(output.toOsSpecific()):
10951096
for name in files:
10961097
file = Filename.fromOsSpecific(os.path.join(root, name))
@@ -1101,6 +1102,61 @@ def buildPKG(self, output, platform):
11011102

11021103
return output
11031104

1105+
def __writeCPIO(self, archive, fn, name):
1106+
""" Adds the given fn under the given name to the CPIO archive. """
1107+
1108+
st = os.lstat(fn.toOsSpecific())
1109+
1110+
archive.write(b"070707") # magic
1111+
archive.write(b"000000") # dev
1112+
1113+
# Synthesize an inode number, different for each entry.
1114+
self.__ino += 1
1115+
archive.write("%06o" % (self.__ino))
1116+
1117+
# Determine based on the type which mode to write.
1118+
if os.path.islink(fn.toOsSpecific()):
1119+
archive.write("%06o" % (st.st_mode))
1120+
target = os.path.readlink(fn.toOsSpecific()).encode('utf-8')
1121+
size = len(target)
1122+
elif os.path.isdir(fn.toOsSpecific()):
1123+
archive.write(b"040755")
1124+
size = 0
1125+
elif not fn.getExtension(): # Binary file?
1126+
archive.write(b"100755")
1127+
size = st.st_size
1128+
else:
1129+
archive.write(b"100644")
1130+
size = st.st_size
1131+
1132+
archive.write("000000") # uid (root)
1133+
archive.write("000000") # gid (wheel)
1134+
archive.write("%06o" % (st.st_nlink))
1135+
archive.write("000000") # rdev
1136+
archive.write("%011o" % (st.st_mtime))
1137+
archive.write("%06o" % (len(name) + 1))
1138+
archive.write("%011o" % (size))
1139+
1140+
# Write the filename, plus terminating NUL byte.
1141+
archive.write(name.encode('utf-8'))
1142+
archive.write(b"\0")
1143+
1144+
# Copy the file data to the archive.
1145+
if os.path.islink(fn.toOsSpecific()):
1146+
archive.write(target)
1147+
elif size:
1148+
handle = open(fn.toOsSpecific(), 'rb')
1149+
data = handle.read(1024 * 1024)
1150+
while data:
1151+
archive.write(data)
1152+
data = handle.read(1024 * 1024)
1153+
handle.close()
1154+
1155+
# If this is a directory, recurse.
1156+
if os.path.isdir(fn.toOsSpecific()):
1157+
for child in os.listdir(fn.toOsSpecific()):
1158+
self.__writeCPIO(archive, Filename(fn, child), name + "/" + child)
1159+
11041160
def buildNSIS(self, output, platform):
11051161
# Check if we have makensis first
11061162
makensis = None

direct/src/p3d/Packager.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,7 +2427,7 @@ def __init__(self, platform = None):
24272427

24282428
# Binary files that are considered uncompressible, and are
24292429
# copied without compression.
2430-
self.uncompressibleExtensions = [ 'mp3', 'ogg', 'wav', 'rml', 'rcss', 'otf' ]
2430+
self.uncompressibleExtensions = [ 'mp3', 'ogg', 'ogv', 'wav', 'rml', 'rcss', 'otf' ]
24312431
# wav files are compressible, but p3openal_audio won't load
24322432
# them compressed.
24332433
# rml, rcss and otf files must be added here because
@@ -3744,15 +3744,15 @@ def do_dir(self, dirname, newDir = None, unprocessed = None):
37443744
self.__recurseDir(dirname, newDir, unprocessed = unprocessed)
37453745

37463746
def __recurseDir(self, filename, newName, unprocessed = None, packageTree = None):
3747-
dirList = vfs.scanDirectory(filename)
3748-
if dirList:
3747+
if filename.isDirectory():
37493748
# It's a directory name. Recurse.
37503749
prefix = newName
37513750
if prefix and prefix[-1] != '/':
37523751
prefix += '/'
37533752

37543753
# First check if this is a Python package tree. If so, add it
37553754
# implicitly as a module.
3755+
dirList = vfs.scanDirectory(filename)
37563756
for subfile in dirList:
37573757
filename = subfile.getFilename()
37583758
if filename.getBasename() == '__init__.py':
@@ -3764,6 +3764,9 @@ def __recurseDir(self, filename, newName, unprocessed = None, packageTree = None
37643764
self.__recurseDir(filename, prefix + filename.getBasename(),
37653765
unprocessed = unprocessed)
37663766
return
3767+
elif not filename.exists():
3768+
# It doesn't exist. Perhaps it's a virtual file. Ignore it.
3769+
return
37673770

37683771
# It's a file name. Add it.
37693772
ext = filename.getExtension()

direct/src/p3d/panda3d.pdef

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ class panda3d(package):
103103

104104
excludeModule('MySQLdb', '_mysql')
105105

106-
excludeModule('xml', 'xml.parsers.expat', 'xml.sax')
107-
108106
# Most of the core Panda3D DLL's will be included implicitly due to
109107
# being referenced by the above Python code. Here we name a few more
110108
# that are also needed, but aren't referenced by any code. Again,

doc/ReleaseNotes

Lines changed: 92 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,107 @@
33
This minor release fixes some important regressions and bugs found
44
in 1.9.0, but also introduces a few minor features.
55

6-
It also reintroduces the deployment pipeline that was absent from
6+
It also reintroduces the deployment tools that were absent from
77
the previous release.
88

9-
* Textures were not being scaled to power-of-2 in some cases
10-
* Fix various issues with shader inputs
11-
* Bullet step function accidentally defaulted to step size of 0
12-
* Use model-path for finding libRocket assets
13-
* Fix inconsistent behavior with non-power-of-2 textures in rocket
14-
* Fix regression with memoryviews
15-
* Fix symbol error when loading libp3ffmpeg on Mac OS X
9+
The following issues were fixed:
10+
* SDK now properly installs in Mac OS X 10.11 "El Capitan"
11+
* Windows 8.1+ no longer applies DPI virtualization to Panda window
12+
* Fix ffmpeg library load issue on Mac OS X
1613
* Fix issues running maya2egg on Mac OS X
17-
* PStats now tracks memory residency of graphics buffers
18-
* Support wireframe and point rendering modes in OpenGL ES
19-
* Add missing keys to libRocket keymap
14+
* Fix compiler errors on different platforms
15+
* Fix various rare crashes
16+
* Fix crashes on shutdown in threaded pipeline
17+
* Fix low-level threading crash on ARM machines
18+
* More reliably and robustly handle failures opening OpenAL device
19+
* Textures were not being scaled to power-of-2 in some cases
20+
* Correct scaling of normal vectors with flatten operation
21+
* Correct positioning of viewing axis when showing lens frustum
22+
* Add dpi-window-resize option to auto-resize window on DPI change
23+
* Fix assertions when alpha-file-channel references unknown channel
24+
* Use OpenGL-style vertex colors by default on non-Windows systems
25+
* Default vertex column alignment is now 4 bytes
26+
* Add PNMImage premultiply/unpremultiply methods.
2027
* Fix incorrect parsing of numbers with exponents in Config.prc
21-
* Various performance optimizations
2228
* Fix for reading URLs mounted via the virtual file system
29+
* Fix shader generator memory leaks and runtime performance
30+
* Fix shader generator scaling of binormals and tangents
31+
* Expose _NET_WM_PID to window managers in X11
32+
* Fix a range of bugs in tinydisplay renderer.
33+
* Don't error when setting lens far distance to infinity
34+
* Allow passing custom lens to saveCubeMap/saveSphereMap
35+
* Fix errors in saveCubeMap/saveSphereMap in threaded pipeline
36+
* Fix DynamicTextFont.makeCopy()
37+
* Make Texture memory size estimation more accurate
38+
* Fix various window resizing issues
39+
* Fix PandaSystem.getCompiler() value for clang (it reported gcc)
40+
* x2egg no longer replaces face normals with vertex normals
41+
* Include Eigen headers in Mac and Windows SDK
42+
* Added geomipterrain-incorrect-normals setting, default=true
43+
* DisplayInformation resolution list was missing on Windows
44+
* Upgrade FMOD and Bullet versions on Windows and Mac OS X
45+
* Various performance optimizations
46+
* Fixed various other bugs not listed here.
47+
48+
Fixes and improvements for the runtime:
49+
* Fix splash screen freezing in the X11 web plug-in
50+
* pdeploy will now handle extracted files (eg. .ico and .cur)
51+
* Added more options for customizing splash screen
52+
* Fix missing xml and ast modules from morepy package
53+
* Certificate dialog is now localized to various languages
54+
* Fix packp3d error when Python file is not in a package
55+
* Pass on failing exit status from packaged application
56+
* Remove annoying ":Packager(warning): No such file" warning
57+
* Fix issue installing pdeploy-generated .pkg on OS X 10.11
58+
59+
Fixes for the Python API:
60+
* Fix mysterious and rare crash in tp_traverse
61+
* Bullet step function accidentally defaulted to step size of 0
62+
* Fix overflow of file offsets (eg. when seeking in huge files)
63+
* Fix regression with memoryviews
64+
* Fix hasattr/getattr of vector classes for invalid attributes
65+
* Allow passing a long to methods accepting an int
66+
* Fix crash when passing None to Filename constructor
67+
* MouseWatcherGroup was erroneously not exposed in 1.9.0
68+
* ShowBase no longer unmounts VFS when shutting down
69+
* No longer requires setting PATH to import panda3d.*
70+
* DirectDialog default geom is once again respected
71+
* DirectDialog no longer overrides custom frameSize
72+
* Fix WebcamVideo/MicrophoneAudio.getOptions() methods
73+
74+
Changes relating to the OpenGL renderer:
75+
* Various performance improvements
76+
* Fix point/line thickness setting
2377
* Improve GLSL error reporting
78+
* Fix Intel driver issues, particularly with geometry shaders
79+
* Add more error checking for parameter types
80+
* Integer shader inputs were not being converted to float properly
81+
* Fix crash passing an undersized array to a GLSL shader input
82+
* p3d_ColorScale et al may now be declared as vec3
83+
* Fix flickering when using trans_model_to_apiview in Cg
84+
* Support wireframe and point rendering modes in OpenGL ES
2485
* Fix issue with model disappearing in rare cases with GLSL
25-
* Fix shader generator memory leaks and runtime performance
86+
* Fix ColorWriteAttrib not working as it should
87+
* Allow deactivating PStats collectors for GPU timers
88+
* Memory residency of graphics buffers now tracked by PStats
89+
* Allow changing OpenGL coordinate system with gl-coordinate-system
90+
91+
Fixes for libRocket integration:
92+
* libRocket did not work on Mac OS X in 1.9.0
93+
* Fix inconsistent behavior with non-power-of-2 textures in rocket
94+
* Use model-path for finding libRocket assets
95+
* Add missing keys to libRocket keymap
96+
* libRocket elements showed up white in tinydisplay
97+
98+
New features:
99+
* Add -L (lighting) and -P (graphics pipe) pview options
26100
* Add M_confined mouse mode that keeps cursor in window
27-
* Expose _NET_WM_PID to window managers in X11
28-
* bam2egg supports collision sphere and plane solids
29101
* Add sample program demonstrating mouse modes
30-
* Add -L (lighting) and -P (graphics pipe) pview options
102+
* bam2egg supports collision sphere and plane solids
103+
* p3d_TransformTable GLSL input backported from 1.10 branch
104+
* Add openal-device setting for selecting OpenAL audio output
105+
* Add limited modification timestamp tracking for Ramdisk mounts
106+
* Support for Autodesk Maya 2016
31107

32108
------------------------ RELEASE 1.9.0 ------------------------
33109

0 commit comments

Comments
 (0)