Skip to content

Commit 16b31cc

Browse files
committed
Merge #20422: build: mac deployment unification
b685f60 build: mac_alias 2.1.1 (fanquake) 5d2cbdf macdeploy: use Python 3.6 (fanquake) a42aa94 macdeploy: remove runHDIUtil in favor of directly calling subprocess.run (fanquake) adaa262 macdeploy: remove existing Bitcoin-Core.dmg if present (fanquake) ccb0325 macdeploy: move qt_conf to where it's used (fanquake) 6390a04 macdeploy: consolidate .DS_Store generation (fanquake) 32347cd macdeploy: assume plistlib is available (fanquake) 0ab4018 macdeploy: have a single level of logging output (fanquake) 827d382 macdeploy: remove add-resources argument (fanquake) 464b34d macdeploy: remove codesigning argument (fanquake) 4d70d3d build: automatically determine macOS translations (fanquake) Pull request description: This consolidates our macOS build code so that `.DS_Store` generation is the same when running `make deploy` for macOS when building on Linux and macOS, rather than maintaining two version of code that essentially do the same thing (just slightly differently). It also removes unused code and any AppleScript usage, automates finding translation files and generally simplifies `macdeployqtplus`. It also gets rid of the annoying "popping up" behaviour during DMG generation, names the created image `Bitcoin-Core.dmg` rather than `Bitcoin-Qt.dmg`. ACKs for top commit: dergoegge: ACK b685f60 - Less and cleaner code looks good. I tested this with `make deploy` and everything still works + the popup during DMG generation is gone. Tree-SHA512: dcd38344e2dfcfa7ffbccf6226a71425c4d16b421a4881d5ee37b8e7ef393b3e8077262444c39b11912269d8cf688aba897e6518cba8361eb24a03fdd03b8caf
2 parents 1a9fa4c + b685f60 commit 16b31cc

File tree

7 files changed

+181
-497
lines changed

7 files changed

+181
-497
lines changed

Makefile.am

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ OSX_DMG = $(OSX_VOLNAME).dmg
3636
OSX_BACKGROUND_SVG=background.svg
3737
OSX_BACKGROUND_IMAGE=background.tiff
3838
OSX_BACKGROUND_IMAGE_DPIS=36 72
39-
OSX_DSSTORE_GEN=$(top_srcdir)/contrib/macdeploy/custom_dsstore.py
4039
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
41-
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
4240
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
4341
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
44-
OSX_QT_TRANSLATIONS = ar,bg,ca,cs,da,de,es,fa,fi,fr,gd,gl,he,hu,it,ja,ko,lt,lv,pl,pt,ru,sk,sl,sv,uk,zh_CN,zh_TW
4542

4643
DIST_CONTRIB = \
4744
$(top_srcdir)/contrib/linearize/linearize-data.py \
@@ -59,9 +56,8 @@ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
5956
$(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
6057
$(top_srcdir)/doc/README_windows.txt
6158

62-
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
59+
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_INSTALLER_ICONS) \
6360
$(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_SVG) \
64-
$(OSX_DSSTORE_GEN) \
6561
$(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
6662
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
6763

@@ -117,7 +113,7 @@ osx_volname:
117113

118114
if BUILD_DARWIN
119115
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE)
120-
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 -volname $(OSX_VOLNAME)
116+
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -dmg
121117

122118
$(OSX_BACKGROUND_IMAGE).png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
123119
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@
@@ -147,11 +143,8 @@ $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE_DPIF
147143
$(MKDIR_P) $(@D)
148144
$(TIFFCP) -c none $(OSX_BACKGROUND_IMAGE_DPIFILES) $@
149145

150-
$(APP_DIST_DIR)/.DS_Store: $(OSX_DSSTORE_GEN)
151-
$(PYTHON) $< "$@" "$(OSX_VOLNAME)"
152-
153146
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
154-
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
147+
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
155148

156149
deploydir: $(APP_DIST_EXTRAS)
157150
endif

contrib/macdeploy/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ The `macdeployqtplus` script should not be run manually. Instead, after building
66
make deploy
77
```
88

9-
During the deployment process, the disk image window will pop up briefly
10-
when the fancy settings are applied. This is normal, please do not interfere,
11-
the process will unmount the DMG and cleanup before finishing.
12-
13-
When complete, it will have produced `Bitcoin-Qt.dmg`.
9+
When complete, it will have produced `Bitcoin-Core.dmg`.
1410

1511
## SDK Extraction
1612

@@ -111,7 +107,7 @@ broken. Only the compression feature is currently used. Ideally, the creation co
111107
and `genisoimage` would no longer be necessary.
112108

113109
Background images and other features can be added to DMG files by inserting a
114-
`.DS_Store` before creation. This is generated by the script `contrib/macdeploy/custom_dsstore.py`.
110+
`.DS_Store` during creation.
115111

116112
As of OS X 10.9 Mavericks, using an Apple-blessed key to sign binaries is a requirement in
117113
order to satisfy the new Gatekeeper requirements. Because this private key cannot be

contrib/macdeploy/custom_dsstore.py

Lines changed: 0 additions & 58 deletions
This file was deleted.

contrib/macdeploy/fancy.plist

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)