Merge branch 'release/1.9.x'

This commit is contained in:
rdb 2015-11-13 19:26:57 +01:00
commit 1d2ba26e26
3 changed files with 30 additions and 18 deletions

View File

@ -99,10 +99,6 @@ Mac OS X
On Mac OS X, you will need to download a set of precompiled thirdparty packages in order to
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).
In order to build the installer on Mac OS X you will need to install PackageMaker.
This can be obtained from the "Auxiliary Tools for Xcode" which can be downloaded
from Apple [here](https://developer.apple.com/downloads/).
After placing the thirdparty directory inside the panda3d source directory,
you may build Panda3D using a command like the following:

View File

@ -6844,8 +6844,9 @@ def MakeInstallerOSX():
if PkgSkip("PYTHON")==0: pkgs.append("pythoncode")
if os.path.isdir("samples"): pkgs.append("samples")
for pkg in pkgs:
identifier = "org.panda3d.panda3d.%s.pkg" % pkg
plist = open("/tmp/Info_plist", "w")
plist.write(Info_plist % { "package_id" : "org.panda3d.panda3d.%s.pkg" % pkg, "version" : VERSION })
plist.write(Info_plist % { "package_id" : identifier, "version" : VERSION })
plist.close()
if not os.path.isdir("dstroot/" + pkg):
os.makedirs("dstroot/" + pkg)
@ -6855,7 +6856,12 @@ def MakeInstallerOSX():
else:
target = ''
if os.path.exists("/Developer/usr/bin/packagemaker"):
if os.path.exists("/usr/bin/pkgbuild"):
# This new package builder is used in Lion and above.
cmd = '/usr/bin/pkgbuild --identifier ' + identifier + ' --version ' + VERSION + ' --root dstroot/' + pkg + '/ dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg'
# In older versions, we use PackageMaker. Apple keeps changing its location.
elif os.path.exists("/Developer/usr/bin/packagemaker"):
cmd = '/Developer/usr/bin/packagemaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg ' + target + ' --domain system --root dstroot/' + pkg + '/ --no-relocate'
elif os.path.exists("/Applications/Xcode.app/Contents/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"):
cmd = '/Applications/Xcode.app/Contents/Applications/PackageMaker.app/Contents/MacOS/PackageMaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg ' + target + ' --domain system --root dstroot/' + pkg + '/ --no-relocate'
@ -6866,7 +6872,7 @@ def MakeInstallerOSX():
elif os.path.exists("/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"):
cmd = '/Applications/PackageMaker.app/Contents/MacOS/PackageMaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg ' + target + ' --domain system --root dstroot/' + pkg + '/ --no-relocate'
else:
exit("PackageMaker could not be found!")
exit("Neither pkgbuild nor PackageMaker could be found!")
oscmd(cmd)
if os.path.isfile("/tmp/Info_plist"):

View File

@ -203,16 +203,20 @@ get_perspective_projection_mat(CoordinateSystem cs) const {
case CS_yup_right:
return FLOATNAME(LMatrix4)( a, 0.0f, 0.0f, 0.0f,
0.0f, e, 0.0f, 0.0f,
d, b, -c,-1.0f,
d, b, -c, -1.0f,
0.0f, 0.0f, f, 0.0f);
case CS_zup_left:
return FLOATNAME(LMatrix4)::convert_mat(CS_zup_right, CS_zup_left) *
get_perspective_projection_mat(CS_zup_right);
return FLOATNAME(LMatrix4)( a, 0.0f, 0.0f, 0.0f,
0.0f, b, -c, -1.0f,
d, e, 0.0f, 0.0f,
0.0f, 0.0f, f, 0.0f);
case CS_yup_left:
return FLOATNAME(LMatrix4)::convert_mat(CS_yup_right, CS_yup_left) *
get_perspective_projection_mat(CS_yup_right);
return FLOATNAME(LMatrix4)( a, 0.0f, 0.0f, 0.0f,
0.0f, e, 0.0f, 0.0f,
-d, -b, c, 1.0f,
0.0f, 0.0f, f, 0.0f);
default:
mathutil_cat.error()
@ -251,8 +255,10 @@ get_ortho_projection_mat(CoordinateSystem cs) const {
*/
switch (cs) {
case CS_zup_right:
return FLOATNAME(LMatrix4)::convert_mat(CS_yup_right, CS_zup_right) *
get_ortho_projection_mat(CS_yup_right);
return FLOATNAME(LMatrix4)( a, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, -c, 0.0f,
0.0f, -b, 0.0f, 0.0f,
-d, -e, -f, 1.0f);
case CS_yup_right:
return FLOATNAME(LMatrix4)( a, 0.0f, 0.0f, 0.0f,
@ -261,12 +267,16 @@ get_ortho_projection_mat(CoordinateSystem cs) const {
-d, -e, -f, 1.0f);
case CS_zup_left:
return FLOATNAME(LMatrix4)::convert_mat(CS_zup_right, CS_zup_left) *
get_ortho_projection_mat(CS_zup_right);
return FLOATNAME(LMatrix4)( a, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, -c, 0.0f,
0.0f, b, 0.0f, 0.0f,
-d, -e, -f, 1.0f);
case CS_yup_left:
return FLOATNAME(LMatrix4)::convert_mat(CS_yup_right, CS_yup_left) *
get_ortho_projection_mat(CS_yup_right);
return FLOATNAME(LMatrix4)( a, 0.0f, 0.0f, 0.0f,
0.0f, b, 0.0f, 0.0f,
0.0f, 0.0f, c, 0.0f,
-d, -e, -f, 1.0f);
default:
mathutil_cat.error()