Skip to content

Commit

Permalink
merge bitcoin#24031: don't compress macOS DMG
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Jun 20, 2023
1 parent e8f6cb8 commit 5365419
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 111 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ libconftest.dylib*
*.log
*.trs
*.dmg
*.iso

*.json.h
*.raw.h
Expand Down
9 changes: 2 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if ENABLE_MAN
SUBDIRS += doc/man
endif
.PHONY: deploy FORCE
.INTERMEDIATE: $(OSX_TEMP_ISO) $(COVERAGE_INFO)
.INTERMEDIATE: $(COVERAGE_INFO)

export PYTHONPATH

Expand All @@ -35,7 +35,6 @@ space := $(empty) $(empty)
OSX_APP=Dash-Qt.app
OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
OSX_DMG = $(OSX_VOLNAME).dmg
OSX_TEMP_ISO = $(OSX_DMG:.dmg=).temp.iso
OSX_BACKGROUND_IMAGE=$(top_srcdir)/contrib/macdeploy/background.tiff
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/dash.icns
Expand Down Expand Up @@ -132,12 +131,9 @@ $(APP_DIST_DIR)/Applications:

$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt

$(OSX_TEMP_ISO): $(APP_DIST_EXTRAS)
$(OSX_DMG): deploydir
$(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))

$(OSX_DMG): $(OSX_TEMP_ISO)
$(DMG) dmg "$<" "$@"

$(APP_DIST_DIR)/.background/background.tiff:
$(MKDIR_P) $(@D)
cp $(OSX_BACKGROUND_IMAGE) $@
Expand All @@ -148,7 +144,6 @@ $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt: $(OSX_APP_BUILT) $(OSX_PACKAG
deploydir: $(APP_DIST_EXTRAS)
endif !BUILD_DARWIN

appbundle: $(OSX_APP_BUILT)
deploy: $(OSX_DMG)
endif

Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,6 @@ case $host in
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
AC_PATH_TOOL([OTOOL], [otool], otool)
AC_PATH_PROGS([XORRISOFS], [xorrisofs], xorrisofs)
AC_PATH_PROGS([DMG], [dmg], dmg)

dnl libtool will try to strip the static lib, which is a problem for
dnl cross-builds because strip attempts to call a hard-coded ld,
Expand Down
16 changes: 1 addition & 15 deletions contrib/guix/libexec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,6 @@ prepend_to_search_env_var() {
export "${1}=${2}${!1:+:}${!1}"
}

case "$HOST" in
*darwin*)
# When targeting darwin, zlib is required by native_libdmg-hfsplus.
zlib_store_path=$(store_path "zlib")
zlib_static_store_path=$(store_path "zlib" static)

prepend_to_search_env_var LIBRARY_PATH "${zlib_static_store_path}/lib:${zlib_store_path}/lib"
prepend_to_search_env_var C_INCLUDE_PATH "${zlib_store_path}/include"
prepend_to_search_env_var CPLUS_INCLUDE_PATH "${zlib_store_path}/include"
prepend_to_search_env_var OBJC_INCLUDE_PATH "${zlib_store_path}/include"
prepend_to_search_env_var OBJCPLUS_INCLUDE_PATH "${zlib_store_path}/include"
esac

# Set environment variables to point the CROSS toolchain to the right
# includes/libs for $HOST
case "$HOST" in
Expand Down Expand Up @@ -334,8 +321,7 @@ mkdir -p "$DISTSRC"
mkdir -p "unsigned-app-${HOST}"
cp --target-directory="unsigned-app-${HOST}" \
osx_volname \
contrib/macdeploy/detached-sig-create.sh \
"${BASEPREFIX}/${HOST}"/native/bin/dmg
contrib/macdeploy/detached-sig-create.sh
mv --target-directory="unsigned-app-${HOST}" dist
(
cd "unsigned-app-${HOST}"
Expand Down
7 changes: 2 additions & 5 deletions contrib/guix/libexec/codesign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,11 @@ mkdir -p "$DISTSRC"
# Apply detached codesignatures to dist/ (in-place)
signapple apply dist/Dash-Qt.app codesignatures/osx/dist

# Make an uncompressed DMG from dist/
# Make a DMG from dist/
xorrisofs -D -l -V "$(< osx_volname)" -no-pad -r -dir-mode 0755 \
-o uncompressed.dmg \
-o "${OUTDIR}/${DISTNAME}-${HOST}.dmg" \
dist \
-- -volume_date all_file_dates ="$SOURCE_DATE_EPOCH"

# Compress uncompressed.dmg and output to OUTDIR
./dmg dmg uncompressed.dmg "${OUTDIR}/${DISTNAME}-${HOST}.dmg"
;;
*)
exit 1
Expand Down
2 changes: 0 additions & 2 deletions contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,6 @@ parse, modify and abstract ELF, PE and MachO formats.")
bzip2
gzip
xz
zlib
(list zlib "static")
;; Build tools
gnu-make
libtool-2.4.7
Expand Down
11 changes: 1 addition & 10 deletions contrib/macdeploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,7 @@ redistributed.

[`xorrisofs`](https://www.gnu.org/software/xorriso/) is used to create the DMG.

`xorrisofs` cannot compress DMGs, so afterwards, the DMG tool from the
`libdmg-hfsplus` project is used to compress it. There are several bugs in this
tool and its maintainer has seemingly abandoned the project.

The DMG tool has the ability to create DMGs from scratch as well, but this functionality is
broken. Only the compression feature is currently used. Ideally, the creation could be fixed
and `xorrisofs` would no longer be necessary.

Background images and other features can be added to DMG files by inserting a
`.DS_Store` during creation.
A background image is added to DMG files by inserting a `.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
24 changes: 0 additions & 24 deletions depends/packages/native_libdmg-hfsplus.mk

This file was deleted.

2 changes: 1 addition & 1 deletion depends/packages/packages.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ darwin_native_packages = native_ds_store native_mac_alias
$(host_arch)_$(host_os)_native_packages += native_b2

ifneq ($(build_os),darwin)
darwin_native_packages += native_cctools native_libtapi native_libdmg-hfsplus
darwin_native_packages += native_cctools native_libtapi

ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
darwin_native_packages+= native_clang
Expand Down

This file was deleted.

0 comments on commit 5365419

Please sign in to comment.