瀏覽代碼

Remove dmg if it already exists

rdb 16 年之前
父節點
當前提交
b87b855eff
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      direct/src/plugin_installer/make_installer.py

+ 2 - 0
direct/src/plugin_installer/make_installer.py

@@ -269,6 +269,8 @@ def makeInstaller():
         shutil.rmtree(tmproot.toOsSpecific())
         
         # Compress the .dmg (and make it read-only)
+        if os.path.exists("p3d-setup.dmg"):
+            os.remove("p3d-setup.dmg")
         CMD = 'hdiutil convert "%s" -format UDBZ -o "p3d-setup.dmg"' % tmpdmg
         print ""
         print CMD