summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorFlorent Castelli <florent.castelli@gmail.com>2017-02-02 03:16:11 +0100
committerFlorent Castelli <florent.castelli@gmail.com>2017-02-02 03:51:31 +0100
commitdf91ebe513896b62f7113b462394d8a893fa8728 (patch)
tree5ec2263b4bf50b23a3143fa642611381cc7eeb2f /Tools
parentf20113fce2151425cc9649362475f79132110da9 (diff)
macOS: Make deploy-mac.py script idempotent
Running the same script twice would update the imports, copy them in the bundle on the first run, and remove them on the second run, resulting in a broken package.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/deploy-mac.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/Tools/deploy-mac.py b/Tools/deploy-mac.py
index 80976d3f9a..328ad625cd 100755
--- a/Tools/deploy-mac.py
+++ b/Tools/deploy-mac.py
@@ -139,23 +139,12 @@ if __name__ == '__main__':
installNameTool = args.install_name_tool
verbose = args.verbose
- try:
- shutil.rmtree(os.path.join(args.bundle, 'Contents/Frameworks/'))
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
-
for executable in os.listdir(os.path.join(args.bundle, 'Contents/MacOS')):
if executable.endswith('.dSYM'):
continue
fullPath = os.path.join(args.bundle, 'Contents/MacOS/', executable)
updateMachO(fullPath, splitPath(os.path.join(args.bundle, 'Contents/MacOS')), splitPath(args.root))
if args.qt_plugins:
- try:
- shutil.rmtree(os.path.join(args.bundle, 'Contents/PlugIns/'))
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
makedirs(os.path.join(args.bundle, 'Contents/PlugIns'))
makedirs(os.path.join(args.bundle, 'Contents/Resources'))
with open(os.path.join(args.bundle, 'Contents/Resources/qt.conf'), 'w') as conf: