Skip to content

Commit 3d41521

Browse files
committed
build: perform /Applications symlink generation in macdeployqtplus
By generating the symlink earlier in the macdeploy process, we can unify the logic in the deploy script.
1 parent dac6936 commit 3d41521

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

Makefile.am

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,8 @@ $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
128128
deploydir: $(OSX_DMG)
129129
else !BUILD_DARWIN
130130
APP_DIST_DIR=$(top_builddir)/dist
131-
APP_DIST_EXTRAS=$(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
132131

133-
$(APP_DIST_DIR)/Applications:
134-
@rm -f $@
135-
@cd $(@D); $(LN_S) /Applications $(@F)
136-
137-
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
138-
139-
$(OSX_TEMP_ISO): $(APP_DIST_EXTRAS)
132+
$(OSX_TEMP_ISO): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
140133
$(XORRISOFS) -D -l -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -o $@ $(APP_DIST_DIR) -- $(if $(SOURCE_DATE_EPOCH),-volume_date all_file_dates =$(SOURCE_DATE_EPOCH))
141134

142135
$(OSX_DMG): $(OSX_TEMP_ISO)
@@ -145,7 +138,7 @@ $(OSX_DMG): $(OSX_TEMP_ISO)
145138
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
146139
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
147140

148-
deploydir: $(APP_DIST_EXTRAS)
141+
deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
149142
endif !BUILD_DARWIN
150143

151144
appbundle: $(OSX_APP_BUILT)

contrib/macdeploy/macdeployqtplus

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,12 @@ shutil.copy2(tiff_path, bg_path)
554554

555555
# ------------------------------------------------
556556

557+
print("+ Generating symlink for /Applications +")
558+
559+
os.symlink("/Applications", os.path.join('dist', "Applications"))
560+
561+
# ------------------------------------------------
562+
557563
if config.dmg is not None:
558564

559565
print("+ Preparing .dmg disk image +")
@@ -577,11 +583,6 @@ if config.dmg is not None:
577583
print("Attaching temp image...")
578584
output = run(["hdiutil", "attach", tempname, "-readwrite"], check=True, universal_newlines=True, stdout=PIPE).stdout
579585

580-
m = re.search(r"/Volumes/(.+$)", output)
581-
disk_root = m.group(0)
582-
583-
os.symlink("/Applications", os.path.join(disk_root, "Applications"))
584-
585586
print("+ Finalizing .dmg disk image +")
586587

587588
run(["hdiutil", "detach", f"/Volumes/{appname}"], universal_newlines=True)

0 commit comments

Comments
 (0)