mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
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.
This commit is contained in:
parent
f20113fce2
commit
df91ebe513
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user