Skip to content

Commit

Permalink
Merge #2400: [Build] [Depends] Unify macOS deploy target
Browse files Browse the repository at this point in the history
a68c7d5 depends: mac_alias 2.2.0 (fanquake)
d8e2baf doc: Add explicit macdeployqtplus dependencies install step (Hennadii Stepanov)
013305d macdeploy: use Python 3.6 (fanquake)
faf77c3 macdeploy: remove runHDIUtil in favor of directly calling subprocess.run (fanquake)
8bcfd58 macdeploy: remove existing PIVX-Core.dmg if present (fanquake)
023d3ca macdeploy: move qt_conf to where it's used (fanquake)
7cdb5bb macdeploy: consolidate .DS_Store generation (fanquake)
4da04d7 macdeploy: assume plistlib is available (fanquake)
56ab77a macdeploy: have a single level of logging output (fanquake)
d111cdf macdeploy: remove add-resources argument (fanquake)
4312410 macdeploy: remove codesigning argument (fanquake)
c2ee635 build: automatically determine macOS translations (fanquake)
1c44ecf scripts: filter more qt plugins we don't use in macdeployqtplus (fanquake)
c854f78 scripts: misc cleanups in macdeployqtplus (fanquake)
a3873ea scripts: use format() in macdeployqtplus (fanquake)
a65bea5 scripts: add type annotations to macdeployqtplus (fanquake)
ba179e5 build: Drop macports support (Ben Woosley)

Pull request description:

  This is a companion to #2272 that focuses on on the `.dmg` creation aspect of macOS builds (ie, `make deploy`). The following upstream PRs are backported here:
   - bitcoin#15175
   - bitcoin#16477
   - bitcoin#20422
   - bitcoin#20890
   - bitcoin#21658

  Also worth mentioning: This drops support for MacPorts entirely, which has been antiquated and un-maintained for quite some time, and never actually used by any PIVX macOS build doc.

ACKs for top commit:
  furszy:
    Tested using depends, ACK a68c7d5.
  random-zebra:
    utACK a68c7d5 and merging...

Tree-SHA512: 3e9fa81a905ca3e90f07ff1213ec69dd1220a19a6a215f256ab67f2594476dc95e8fe88f15a1c9f3314b1757a7a2e5d8e6d7a790d85c117bf4236a3833757430
  • Loading branch information
random-zebra committed Jun 11, 2021
2 parents 1653e67 + a68c7d5 commit fbebade
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 472 deletions.
13 changes: 3 additions & 10 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ OSX_DMG = $(OSX_VOLNAME).dmg
OSX_BACKGROUND_SVG=background.svg
OSX_BACKGROUND_IMAGE=background.tiff
OSX_BACKGROUND_IMAGE_DPIS=36 72
OSX_DSSTORE_GEN=$(top_srcdir)/contrib/macdeploy/custom_dsstore.py
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW

DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
DIST_CONTRIB = $(top_srcdir)/contrib/pivx-cli.bash-completion \
Expand Down Expand Up @@ -72,9 +69,8 @@ LINUX_PACKAGING = $(top_srcdir)/share/pixmaps/pivx16.xpm \
$(top_srcdir)/share/pixmaps/pivx32.xpm \
$(top_srcdir)/share/pixmaps/pivx128.png

OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_INSTALLER_ICONS) \
$(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_SVG) \
$(OSX_DSSTORE_GEN) \
$(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh

Expand Down Expand Up @@ -140,7 +136,7 @@ osx_volname:

if BUILD_DARWIN
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE)
$(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)
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -dmg

$(OSX_BACKGROUND_IMAGE).png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@
Expand Down Expand Up @@ -170,11 +166,8 @@ $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE_DPIF
$(MKDIR_P) $(@D)
$(TIFFCP) -c none $(OSX_BACKGROUND_IMAGE_DPIFILES) $@

$(APP_DIST_DIR)/.DS_Store: $(OSX_DSSTORE_GEN)
$(PYTHON) $< "$@" "$(OSX_VOLNAME)"

$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/PIVX-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
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
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)

deploydir: $(APP_DIST_EXTRAS)
endif
Expand Down
11 changes: 0 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -550,17 +550,6 @@ case $host in
TARGET_OS=darwin
if test x$cross_compiling != xyes; then
BUILD_OS=darwin
AC_CHECK_PROG([PORT],port, port)
if test x$PORT = xport; then
dnl add default macports paths
CPPFLAGS="$CPPFLAGS -isystem /opt/local/include"
LIBS="$LIBS -L/opt/local/lib"
if test -d /opt/local/include/db48; then
CPPFLAGS="$CPPFLAGS -I/opt/local/include/db48"
LIBS="$LIBS -L/opt/local/lib/db48"
fi
fi

AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
AC_CHECK_PROG([BREW],brew, brew)
if test x$BREW = xbrew; then
Expand Down
8 changes: 2 additions & 6 deletions contrib/macdeploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ The `macdeployqtplus` script should not be run manually. Instead, after building
make deploy
```

During the deployment process, the disk image window will pop up briefly
when the fancy settings are applied. This is normal, please do not interfere,
the process will unmount the DMG and cleanup before finishing.

When complete, it will have produced `PIVX-Qt.dmg`.
When complete, it will have produced `PIVX-Core.dmg`.

## SDK Extraction

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

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

As of OS X 10.9 Mavericks, using an Apple-blessed key to sign binaries is a requirement in
order to satisfy the new Gatekeeper requirements. Because this private key cannot be
Expand Down
32 changes: 0 additions & 32 deletions contrib/macdeploy/fancy.plist

This file was deleted.

Loading

0 comments on commit fbebade

Please sign in to comment.