diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index 2b744e936a..0349e423bd 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -523,6 +523,7 @@ verbose = config.verbose # ------------------------------------------------ app_bundle = config.app_bundle[0] +appname = config.appname[0] if not os.path.exists(app_bundle): sys.stderr.write("Error: Could not find app bundle \"{}\"\n".format(app_bundle)) @@ -531,13 +532,12 @@ if not os.path.exists(app_bundle): # ------------------------------------------------ if os.path.exists("dist"): - print("+ Removing old dist folder +") - + print("+ Removing existing dist folder +") shutil.rmtree("dist") -# ------------------------------------------------ - -appname = config.appname[0] +if os.path.exists(appname + ".dmg"): + print("+ Removing existing DMG +") + os.unlink(appname + ".dmg") # ------------------------------------------------