From 72e22d79767010318a6de03d9f30d9ec8768dc45 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Tue, 4 Jun 2024 21:39:55 +0100 Subject: [PATCH] JAL-4421 Remove the disk_image_alias from the backgroundImageAlias altogether as it isn't needed and doesn't even make sense for a downloaded DMG --- utils/macos_dmg/jalview_customise_dsstore.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/utils/macos_dmg/jalview_customise_dsstore.py b/utils/macos_dmg/jalview_customise_dsstore.py index 27d68f9..2343fd8 100755 --- a/utils/macos_dmg/jalview_customise_dsstore.py +++ b/utils/macos_dmg/jalview_customise_dsstore.py @@ -38,7 +38,7 @@ if (args.dump and not args.input): exit("When --dump used, an --input must be given") if (args.dump): - with ds_store.DSStore.open(args.input, 'r+') as d: + with ds_store.DSStore.open(args.input, 'r') as d: print(f"d=") print(pprint.pformat(d['.']['bwsp'], width=1)) @@ -66,7 +66,7 @@ if (args.dump): # myprint(f"d['{f}']=", d[f]) # else: # myprint(f"# No filename '{filename}' found in DS_Store '{args.input}'") - exit(0) + exit(0) if (args.output and not (args.input or args.config)): exit("Need --input FILENAME or --config FILENAME to produce an --output") @@ -108,15 +108,7 @@ alias = mac_alias.Alias.from_bytes(inputds['.']['icvp']['backgroundImageAlias']) alias.volume.name = args.volumename alias.volume.posix_path = "/Volumes/" + args.volumename - -alias.volume.disk_image_alias.volume.name = "Macintosh HD" -alias.volume.disk_image_alias.volume.posix_path = "/" - -alias.volume.disk_image_alias.target.filename = args.dmg -alias.volume.disk_image_alias.target.folder_name = "Downloads" -alias.volume.disk_image_alias.target.carbon_path = f'Macintosh HD:Users:Jalview:Downloads:{args.dmg}' -alias.volume.disk_image_alias.target.posix_path = f'/Users/jalview/Downloads/{args.dmg}' - +alias.volume.disk_image_alias = None alias.target.filename = args.backgroundfile alias.target.folder_name = args.backgrounddir alias.target.carbon_path = f'{args.volumename}:{args.backgrounddir}:{args.backgroundfile}' -- 1.7.10.2