diff --git a/makepanda/Panda3D-tpl.dmg b/makepanda/Panda3D-tpl.dmg deleted file mode 100644 index 55c6fa12a1..0000000000 Binary files a/makepanda/Panda3D-tpl.dmg and /dev/null differ diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 5f5d3b5bc6..27fc4d4dd4 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -6218,41 +6218,6 @@ Info_plist = """ """ -MAC_POSTINSTALL = """#!/usr/bin/python -import os, sys, plistlib -home = os.environ['HOME'] -if not os.path.isdir(os.path.join(home, '.MacOSX')): - sys.exit() -plist = dict() -envfile = os.path.join(home, '.MacOSX', 'environment.plist') -if os.path.exists(envfile): - try: - plist = plistlib.readPlist(envfile) - except: sys.exit(0) -else: - sys.exit(0) -paths = {'PATH' : '/Developer/Tools/Panda3D', 'DYLD_LIBRARY_PATH' : '/Developer/Panda3D/lib', 'PYTHONPATH' : '/Developer/Panda3D/lib', - 'MAYA_SCRIPT_PATH' : '/Developer/Panda3D/plugins', 'MAYA_PLUG_IN_PATH' : '/Developer/Panda3D/plugins'} -for env, path in dict(paths).items(): - if env in plist: - paths = plist[env].split(':') - if '' in paths: paths.remove('') - if path in paths: paths.remove(path) - if len(paths) == 0: - del plist[env] - else: - plist[env] = ':'.join(paths) -if len(plist) == 0: - os.remove(envfile) -else: - plistlib.writePlist(plist, envfile) -""" - -MAC_POSTFLIGHT = """#!/usr/bin/env bash" -RESULT=`/usr/bin/open 'http://www.panda3d.org/wiki/index.php/Getting_Started_on_OSX'`" -exit 0 -""" - # FreeBSD pkg-descr INSTALLER_PKG_DESCR_FILE = """ Panda3D is a game engine which includes graphics, audio, I/O, collision detection, and other abilities relevant to the creation of 3D games. Panda3D is open source and free software under the revised BSD license, and can be used for both free and commercial game development at no financial cost. @@ -6364,9 +6329,6 @@ def MakeInstallerOSX(): if (os.path.exists("dstroot")): oscmd("rm -rf dstroot") if (os.path.exists("Panda3D-rw.dmg")): oscmd('rm -f Panda3D-rw.dmg') - #TODO: add postflight script - #oscmd("sed -e 's@\\$1@%s@' < direct/src/directscripts/profilepaths-osx.command >> Panda3D-tpl-rw/panda3dpaths.command" % VERSION) - oscmd("mkdir -p dstroot/base/Developer/Panda3D/lib") oscmd("mkdir -p dstroot/base/Developer/Panda3D/panda3d") oscmd("mkdir -p dstroot/base/Developer/Panda3D/etc") @@ -6402,17 +6364,6 @@ def MakeInstallerOSX(): if 'lib/' + os.path.basename(libdep) in install_libs: oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), libname), True) - # Temporary script that should clean up the poison that the early 1.7.0 builds injected into environment.plist - oscmd("mkdir -p dstroot/scripts/base/") - postinstall = open("dstroot/scripts/base/postinstall", "w") - postinstall.write(MAC_POSTINSTALL) - postinstall.close() - postflight = open("dstroot/scripts/base/postflight", "w") - postflight.write(MAC_POSTFLIGHT) - postflight.close() - oscmd("chmod +x dstroot/scripts/base/postinstall") - oscmd("chmod +x dstroot/scripts/base/postflight") - oscmd("mkdir -p dstroot/tools/Developer/Tools/Panda3D") oscmd("mkdir -p dstroot/tools/Developer/Panda3D") oscmd("mkdir -p dstroot/tools/etc/paths.d") @@ -6457,31 +6408,6 @@ def MakeInstallerOSX(): oscmd("mkdir -p dstroot/samples/Developer/Examples/Panda3D") oscmd("cp -R samples/* dstroot/samples/Developer/Examples/Panda3D/") - # Dummy package uninstall16 which just contains a preflight script to remove /Applications/Panda3D/ . - oscmd("mkdir -p dstroot/scripts/uninstall16/") - preflight = open("dstroot/scripts/uninstall16/preflight", "w") - preflight.write( - "#!/usr/bin/python\n" - "import os, re, sys, shutil\n" - "if os.path.isdir('/Applications/Panda3D'): shutil.rmtree('/Applications/Panda3D')\n" - "bash_profile = os.path.join(os.environ['HOME'], '.bash_profile')\n" - "if not os.path.isfile(bash_profile): sys.exit(0)\n" - "pattern = re.compile('''PANDA_VERSION=[0-9][.][0-9][.][0-9]\n" - "PANDA_PATH=/Applications/Panda3D/[$A-Z.0-9_]+\n" - "if \[ -d \$PANDA_PATH \]\n" - "then(.+?)fi\n" - "''', flags = re.DOTALL | re.MULTILINE)\n" - "bpfile = open(bash_profile, 'r')\n" - "bpdata = bpfile.read()\n" - "bpfile.close()\n" - "newbpdata = pattern.sub('', bpdata)\n" - "if newbpdata == bpdata: sys.exit(0)\n" - "bpfile = open(bash_profile, 'w')\n" - "bpfile.write(newbpdata)\n" - "bpfile.close()\n") - preflight.close() - oscmd("chmod +x dstroot/scripts/uninstall16/preflight") - oscmd("chmod -R 0775 dstroot/*") DeleteCVS("dstroot") DeleteBuildFiles("dstroot") @@ -6492,7 +6418,7 @@ def MakeInstallerOSX(): oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/") oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Resources/en.lproj/") - pkgs = ["base", "tools", "headers", "uninstall16"] + pkgs = ["base", "tools", "headers"] if PkgSkip("PYTHON")==0: pkgs.append("pythoncode") if os.path.isdir("samples"): pkgs.append("samples") for pkg in pkgs: @@ -6504,12 +6430,8 @@ def MakeInstallerOSX(): if 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 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate' - if os.path.isdir("dstroot/scripts/" + pkg): - cmd += ' --scripts dstroot/scripts/' + pkg 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 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate' - if os.path.isdir("dstroot/scripts/" + pkg): - cmd += ' --scripts dstroot/scripts/' + pkg elif os.path.exists("/Developer/Tools/packagemaker"): cmd = '/Developer/Tools/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist' else: @@ -6525,14 +6447,8 @@ def MakeInstallerOSX(): dist.write('\n') dist.write(' Panda3D\n') dist.write(' \n') - dist.write(' \n') dist.write(' %s\n' % ReadFile("doc/LICENSE")) dist.write(' \n') - dist.write(' \n') dist.write(' \n') dist.write(' \n') if PkgSkip("PYTHON")==0: @@ -6541,9 +6457,6 @@ def MakeInstallerOSX(): dist.write(' \n') dist.write(' \n') dist.write(' \n') - dist.write(' \n' % VERSION) - dist.write(' \n') - dist.write(' \n') dist.write(' \n') dist.write(' \n') dist.write(' \n') @@ -6561,7 +6474,6 @@ def MakeInstallerOSX(): dist.write(' \n') dist.write(' \n') dist.write(' \n') - dist.write(' file:./Contents/Packages/uninstall16.pkg\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: