From 8d2ab9625abf545043753809e4d07a245ee3fb52 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 26 Oct 2009 15:12:23 +0000 Subject: [PATCH] Fixes for Mac --- direct/src/plugin_installer/make_installer.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/direct/src/plugin_installer/make_installer.py b/direct/src/plugin_installer/make_installer.py index 2f6987c060..05691df7b0 100755 --- a/direct/src/plugin_installer/make_installer.py +++ b/direct/src/plugin_installer/make_installer.py @@ -266,13 +266,14 @@ def makeInstaller(): shutil.rmtree(tmproot) if os.path.exists("p3d-setup.pkg"): os.remove("p3d-setup.pkg") - tmproot.makeDir() + if not os.path.exists(tmproot): + os.makedirs(tmproot) dst_npapi = os.path.join(tmproot, "Library", "Internet Plug-Ins", npapi) dst_panda3d = os.path.join(tmproot, "usr", "bin", panda3d) dst_panda3dapp = os.path.join(tmproot, "Applications", panda3dapp) - dst_npapi.makeDir() - dst_panda3d.makeDir() - dst_panda3dapp.makeDir() + if not os.path.exists(dst_npapi): os.makedirs(dst_npapi) + if not os.path.exists(dst_panda3d): os.makedirs(dst_panda3d) + if not os.path.exists(dst_panda3dapp): os.makedirs(dst_panda3dapp) shutil.copytree(pluginFiles[npapi], dst_npapi) shutil.copyfile(pluginFiles[panda3d], dst_panda3d) shutil.copytree(pluginFiles[panda3dapp], dst_panda3dapp) @@ -291,7 +292,7 @@ def makeInstaller(): shutil.rmtree(tmproot) # Pack the .pkg into a .dmg - tmproot.makeDir() + if not os.path.exists(tmproot): os.makedirs(tmproot) shutil.copyfile("p3d-setup.pkg", os.path.join(tmproot, "p3d-setup.pkg")) tmpdmg = tempfile.mktemp('', 'p3d-setup') + ".dmg" CMD = 'hdiutil create "%s" -srcfolder "%s"' % (tmpdmg, tmproot)