Explorar o código

Remove dmg if it already exists

rdb %!s(int64=16) %!d(string=hai) anos
pai
achega
b87b855eff
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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())
         shutil.rmtree(tmproot.toOsSpecific())
         
         
         # Compress the .dmg (and make it read-only)
         # 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
         CMD = 'hdiutil convert "%s" -format UDBZ -o "p3d-setup.dmg"' % tmpdmg
         print ""
         print ""
         print CMD
         print CMD