diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py
index b9d9074c3d..2803e1cbcb 100755
--- a/makepanda/makepanda.py
+++ b/makepanda/makepanda.py
@@ -6754,7 +6754,6 @@ def MakeInstallerOSX():
if (os.path.exists("Panda3D-rw.dmg")): oscmd('rm -f Panda3D-rw.dmg')
oscmd("mkdir -p dstroot/base/Developer/Panda3D/lib")
- oscmd("mkdir -p dstroot/base/Developer/Panda3D/panda3d")
oscmd("mkdir -p dstroot/base/Developer/Panda3D/etc")
oscmd("cp %s/etc/Config.prc dstroot/base/Developer/Panda3D/etc/Config.prc" % GetOutputDir())
oscmd("cp %s/etc/Confauto.prc dstroot/base/Developer/Panda3D/etc/Confauto.prc" % GetOutputDir())
@@ -6762,24 +6761,18 @@ def MakeInstallerOSX():
oscmd("cp -R doc/LICENSE dstroot/base/Developer/Panda3D/LICENSE")
oscmd("cp -R doc/ReleaseNotes dstroot/base/Developer/Panda3D/ReleaseNotes")
oscmd("cp -R %s/Frameworks dstroot/base/Developer/Panda3D/Frameworks" % GetOutputDir())
- oscmd("cp -R %s/*.so dstroot/base/Developer/Panda3D/" % GetOutputDir())
- oscmd("cp -R %s/*.py dstroot/base/Developer/Panda3D/" % GetOutputDir())
if os.path.isdir(GetOutputDir()+"/plugins"):
oscmd("cp -R %s/plugins dstroot/base/Developer/Panda3D/plugins" % GetOutputDir())
- install_libs = []
- for base in os.listdir(GetOutputDir()+"/lib"):
- if (not base.endswith(".a")):
- install_libs.append("lib/"+base)
- for base in os.listdir(GetOutputDir()+"/panda3d"):
- if (not base.endswith(".a")):
- install_libs.append("panda3d/"+base)
+ # Libraries that shouldn't be in base, but are instead in other modules.
+ no_base_libs = ['libp3ffmpeg', 'libp3fmod_audio', 'libfmodex', 'libfmodexL']
- for base in install_libs:
- libname = "dstroot/base/Developer/Panda3D/" + base
- # We really need to specify -R in order not to follow symlinks
- # On OSX, just specifying -P is not enough to do that.
- oscmd("cp -R -P " + GetOutputDir() + "/" + base + " " + libname)
+ for base in os.listdir(GetOutputDir()+"/lib"):
+ if not base.endswith(".a") and base.split('.')[0] not in no_base_libs:
+ libname = "dstroot/base/Developer/Panda3D/lib/" + base
+ # We really need to specify -R in order not to follow symlinks
+ # On OSX, just specifying -P is not enough to do that.
+ oscmd("cp -R -P " + GetOutputDir() + "/lib/" + base + " " + libname)
oscmd("mkdir -p dstroot/tools/Developer/Panda3D/bin")
oscmd("mkdir -p dstroot/tools/Developer/Tools")
@@ -6799,12 +6792,14 @@ def MakeInstallerOSX():
if PkgSkip("PYTHON")==0:
PV = SDK["PYTHONVERSION"].replace("python", "")
oscmd("mkdir -p dstroot/pythoncode/usr/local/bin")
- oscmd("mkdir -p dstroot/pythoncode/Developer/Panda3D")
+ oscmd("mkdir -p dstroot/pythoncode/Developer/Panda3D/panda3d")
oscmd("mkdir -p dstroot/pythoncode/Library/Python/%s/site-packages" % PV)
WriteFile("dstroot/pythoncode/Library/Python/%s/site-packages/Panda3D.pth" % PV, "/Developer/Panda3D")
oscmd("cp -R %s/pandac dstroot/pythoncode/Developer/Panda3D/pandac" % GetOutputDir())
oscmd("cp -R %s/direct dstroot/pythoncode/Developer/Panda3D/direct" % GetOutputDir())
oscmd("ln -s %s dstroot/pythoncode/usr/local/bin/ppython" % SDK["PYTHONEXEC"])
+ oscmd("cp -R %s/*.so dstroot/pythoncode/Developer/Panda3D/" % GetOutputDir())
+ oscmd("cp -R %s/*.py dstroot/pythoncode/Developer/Panda3D/" % GetOutputDir())
if os.path.isdir(GetOutputDir()+"/Pmw"):
oscmd("cp -R %s/Pmw dstroot/pythoncode/Developer/Panda3D/Pmw" % GetOutputDir())
compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/Pmw")
@@ -6813,6 +6808,26 @@ def MakeInstallerOSX():
if ((base != "extensions") and (base != "extensions_native")):
compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/direct/"+base)
+ for base in os.listdir(GetOutputDir()+"/panda3d"):
+ if base.endswith('.py') or base.endswith('.so'):
+ libname = "dstroot/pythoncode/Developer/Panda3D/panda3d/" + base
+ # We really need to specify -R in order not to follow symlinks
+ # On OSX, just specifying -P is not enough to do that.
+ oscmd("cp -R -P " + GetOutputDir() + "/panda3d/" + base + " " + libname)
+
+ if not PkgSkip("FFMPEG"):
+ oscmd("mkdir -p dstroot/ffmpeg/Developer/Panda3D/lib")
+ oscmd("cp -R %s/lib/libp3ffmpeg.* dstroot/ffmpeg/Developer/Panda3D/lib/" % GetOutputDir())
+
+ #if not PkgSkip("OPENAL"):
+ # oscmd("mkdir -p dstroot/openal/Developer/Panda3D/lib")
+ # oscmd("cp -R %s/lib/libp3openal_audio.* dstroot/openal/Developer/Panda3D/lib/" % GetOutputDir())
+
+ if not PkgSkip("FMODEX"):
+ oscmd("mkdir -p dstroot/fmodex/Developer/Panda3D/lib")
+ oscmd("cp -R %s/lib/libp3fmod_audio.* dstroot/fmodex/Developer/Panda3D/lib/" % GetOutputDir())
+ oscmd("cp -R %s/lib/libfmodex* dstroot/fmodex/Developer/Panda3D/lib/" % GetOutputDir())
+
oscmd("mkdir -p dstroot/headers/Developer/Panda3D")
oscmd("cp -R %s/include dstroot/headers/Developer/Panda3D/include" % GetOutputDir())
@@ -6831,7 +6846,10 @@ def MakeInstallerOSX():
oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Resources/en.lproj/")
pkgs = ["base", "tools", "headers"]
- if PkgSkip("PYTHON")==0: pkgs.append("pythoncode")
+ if not PkgSkip("PYTHON"): pkgs.append("pythoncode")
+ if not PkgSkip("FFMPEG"): pkgs.append("ffmpeg")
+ #if not PkgSkip("OPENAL"): pkgs.append("openal")
+ if not PkgSkip("FMODEX"): pkgs.append("fmodex")
if os.path.isdir("samples"): pkgs.append("samples")
for pkg in pkgs:
identifier = "org.panda3d.panda3d.%s.pkg" % pkg
@@ -6872,13 +6890,8 @@ def MakeInstallerOSX():
dist.write(' \n')
dist.write(' %s\n' % ReadFile("doc/LICENSE"))
dist.write(' \n')
- dist.write(' \n')
- dist.write(' \n')
- if PkgSkip("PYTHON")==0:
- dist.write(' \n')
- if os.path.isdir("samples"):
- dist.write(' \n')
- dist.write(' \n')
+ for pkg in pkgs:
+ dist.write(' \n' % (pkg))
dist.write(' \n')
dist.write(' \n')
dist.write(' \n')
@@ -6886,24 +6899,42 @@ def MakeInstallerOSX():
dist.write(' \n')
dist.write(' \n')
dist.write(' \n')
- if PkgSkip("PYTHON")==0:
- dist.write(' \n')
+
+ if not PkgSkip("PYTHON"):
+ dist.write(' \n')
dist.write(' \n')
dist.write(' \n')
+
+ if not PkgSkip("FFMPEG"):
+ dist.write(' \n')
+ else:
+ dist.write(' It is not required for loading .wav or .ogg files, which Panda3D can read out of the box.">\n')
+ dist.write(' \n')
+ dist.write(' \n')
+
+ #if not PkgSkip("OPENAL"):
+ # dist.write(' \n')
+ # dist.write(' \n')
+ # dist.write(' \n')
+
+ if not PkgSkip("FMODEX"):
+ dist.write(' \n')
+ dist.write(' \n')
+ dist.write(' \n')
+
if os.path.isdir("samples"):
dist.write(' \n')
dist.write(' \n')
dist.write(' \n')
+
dist.write(' \n')
- dist.write(' file:./Contents/Packages/base.pkg\n' % (GetDirectorySize("dstroot/base") // 1024))
- dist.write(' file:./Contents/Packages/tools.pkg\n' % (GetDirectorySize("dstroot/tools") // 1024))
- if PkgSkip("PYTHON")==0:
- dist.write(' file:./Contents/Packages/pythoncode.pkg\n' % (GetDirectorySize("dstroot/pythoncode") // 1024))
- if os.path.isdir("samples"):
- dist.write(' file:./Contents/Packages/samples.pkg\n' % (GetDirectorySize("dstroot/samples") // 1024))
- dist.write(' file:./Contents/Packages/headers.pkg\n' % (GetDirectorySize("dstroot/headers") // 1024))
+ for pkg in pkgs:
+ size = GetDirectorySize("dstroot/" + pkg) // 1024
+ dist.write(' file:./Contents/Packages/%s.pkg\n' % (pkg, size, pkg))
dist.write('\n')
dist.close()