Skip to content

Commit 22437fc

Browse files
committed
build: Run libdmg-hfsplus's DMG tool in make deploy
Previously, the compression of the .iso file to a .dmg file was done outside of `make deploy' in order to use the faketime-wrapped version of libdmg-hfsplus's DMG tool. Specifying the faketime-wrapped version of the DMG tool to ./configure fixes this and simplifies build scripts.
1 parent b76abae commit 22437fc

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ src/qt/bitcoin-qt.includes
7676
*.log
7777
*.trs
7878
*.dmg
79+
*.iso
7980

8081
*.json.h
8182
*.raw.h

Makefile.am

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ space := $(empty) $(empty)
3535
OSX_APP=Bitcoin-Qt.app
3636
OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
3737
OSX_DMG = $(OSX_VOLNAME).dmg
38+
OSX_TEMP_ISO = $(OSX_DMG:.dmg=).temp.iso
3839
OSX_BACKGROUND_SVG=background.svg
3940
OSX_BACKGROUND_IMAGE=background.tiff
4041
OSX_BACKGROUND_IMAGE_DPIS=36 72
@@ -135,9 +136,13 @@ $(APP_DIST_DIR)/Applications:
135136

136137
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
137138

138-
$(OSX_DMG): $(APP_DIST_EXTRAS)
139+
.INTERMEDIATE: $(OSX_TEMP_ISO)
140+
$(OSX_TEMP_ISO): $(APP_DIST_EXTRAS)
139141
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -apple -o $@ dist
140142

143+
$(OSX_DMG): $(OSX_TEMP_ISO)
144+
$(DMG) dmg "$<" "$@"
145+
141146
dpi%.$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_SVG)
142147
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d $* -p $* | $(IMAGEMAGICK_CONVERT) - $@
143148
OSX_BACKGROUND_IMAGE_DPIFILES := $(foreach dpi,$(OSX_BACKGROUND_IMAGE_DPIS),dpi$(dpi).$(OSX_BACKGROUND_IMAGE))

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ case $host in
670670
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
671671
AC_PATH_TOOL([OTOOL], [otool], otool)
672672
AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage)
673+
AC_PATH_PROGS([DMG], [dmg], dmg)
673674
AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
674675
AC_PATH_PROGS([IMAGEMAGICK_CONVERT], [convert],convert)
675676
AC_PATH_PROGS([TIFFCP], [tiffcp],tiffcp)

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ script: |
3838
3939
WRAP_DIR=$HOME/wrapped
4040
HOSTS="x86_64-apple-darwin18"
41-
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
41+
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage DMG=$WRAP_DIR/dmg"
4242
FAKETIME_HOST_PROGS=""
4343
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
4444
@@ -132,7 +132,6 @@ script: |
132132
133133
make osx_volname
134134
make deploydir
135-
OSX_VOLNAME="$(cat osx_volname)"
136135
mkdir -p unsigned-app-${i}
137136
cp osx_volname unsigned-app-${i}/
138137
cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i}
@@ -145,8 +144,7 @@ script: |
145144
find . | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz
146145
popd
147146
148-
make deploy
149-
${WRAP_DIR}/dmg dmg "${OSX_VOLNAME}.dmg" ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
147+
make deploy OSX_DMG="${OUTDIR}/${DISTNAME}-osx-unsigned.dmg"
150148
151149
cd installed
152150
find . -name "lib*.la" -delete

0 commit comments

Comments
 (0)