mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 03:03:22 -03:00
build: produce a .zip for macOS distribution
Instead of a .dmg. Co-authored-by: fanquake <fanquake@gmail.com>
This commit is contained in:
parent
c38561d6b1
commit
a128111c29
8 changed files with 17 additions and 18 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -74,7 +74,7 @@ src/qt/bitcoin-qt.includes
|
||||||
|
|
||||||
*.log
|
*.log
|
||||||
*.trs
|
*.trs
|
||||||
*.dmg
|
*.zip
|
||||||
|
|
||||||
*.json.h
|
*.json.h
|
||||||
*.raw.h
|
*.raw.h
|
||||||
|
|
17
Makefile.am
17
Makefile.am
|
@ -37,7 +37,7 @@ space := $(empty) $(empty)
|
||||||
|
|
||||||
OSX_APP=Bitcoin-Qt.app
|
OSX_APP=Bitcoin-Qt.app
|
||||||
OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
|
OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
|
||||||
OSX_DMG = $(OSX_VOLNAME).dmg
|
OSX_ZIP = $(OSX_VOLNAME).zip
|
||||||
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
|
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
|
||||||
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
|
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
|
||||||
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
|
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
|
||||||
|
@ -124,15 +124,16 @@ osx_volname:
|
||||||
echo $(OSX_VOLNAME) >$@
|
echo $(OSX_VOLNAME) >$@
|
||||||
|
|
||||||
if BUILD_DARWIN
|
if BUILD_DARWIN
|
||||||
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
$(OSX_ZIP): $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||||
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -dmg
|
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -zip
|
||||||
|
|
||||||
deploydir: $(OSX_DMG)
|
deploydir: $(OSX_ZIP)
|
||||||
else !BUILD_DARWIN
|
else !BUILD_DARWIN
|
||||||
APP_DIST_DIR=$(top_builddir)/dist
|
APP_DIST_DIR=$(top_builddir)/dist
|
||||||
|
|
||||||
$(OSX_DMG): deploydir
|
$(OSX_ZIP): 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))
|
if [ -n "$(SOURCE_DATE_EPOCH)" ]; then find $(APP_DIST_DIR) -exec touch -d @$(SOURCE_DATE_EPOCH) {} +; fi
|
||||||
|
cd $(APP_DIST_DIR) && find . | sort | $(ZIP) -X@ $@
|
||||||
|
|
||||||
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
|
||||||
INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
|
INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
|
||||||
|
@ -140,7 +141,7 @@ $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PAC
|
||||||
deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
|
deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
|
||||||
endif !BUILD_DARWIN
|
endif !BUILD_DARWIN
|
||||||
|
|
||||||
deploy: $(OSX_DMG)
|
deploy: $(OSX_ZIP)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(BITCOIN_QT_BIN): FORCE
|
$(BITCOIN_QT_BIN): FORCE
|
||||||
|
@ -313,7 +314,7 @@ EXTRA_DIST += \
|
||||||
test/util/data/txcreatesignv2.hex \
|
test/util/data/txcreatesignv2.hex \
|
||||||
test/util/rpcauth-test.py
|
test/util/rpcauth-test.py
|
||||||
|
|
||||||
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
|
CLEANFILES = $(OSX_ZIP) $(BITCOIN_WIN_INSTALLER)
|
||||||
|
|
||||||
DISTCHECK_CONFIGURE_FLAGS = --enable-man
|
DISTCHECK_CONFIGURE_FLAGS = --enable-man
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
||||||
export CONTAINER_NAME=ci_macos_cross
|
export CONTAINER_NAME=ci_macos_cross
|
||||||
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04"
|
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04"
|
||||||
export HOST=x86_64-apple-darwin
|
export HOST=x86_64-apple-darwin
|
||||||
export PACKAGES="cmake libz-dev python3-setuptools xorriso"
|
export PACKAGES="cmake libz-dev python3-setuptools xorriso zip"
|
||||||
export XCODE_VERSION=12.2
|
export XCODE_VERSION=12.2
|
||||||
export XCODE_BUILD_ID=12B45b
|
export XCODE_BUILD_ID=12B45b
|
||||||
export RUN_UNIT_TESTS=false
|
export RUN_UNIT_TESTS=false
|
||||||
|
|
|
@ -800,6 +800,7 @@ case $host in
|
||||||
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [install_name_tool])
|
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [install_name_tool])
|
||||||
AC_PATH_TOOL([OTOOL], [otool], [otool])
|
AC_PATH_TOOL([OTOOL], [otool], [otool])
|
||||||
AC_PATH_PROGS([XORRISOFS], [xorrisofs], [xorrisofs])
|
AC_PATH_PROGS([XORRISOFS], [xorrisofs], [xorrisofs])
|
||||||
|
AC_PATH_PROG([ZIP], [zip], [zip])
|
||||||
|
|
||||||
dnl libtool will try to strip the static lib, which is a problem for
|
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,
|
dnl cross-builds because strip attempts to call a hard-coded ld,
|
||||||
|
|
|
@ -315,7 +315,7 @@ mkdir -p "$DISTSRC"
|
||||||
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" \
|
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" \
|
||||||
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" && exit 1 )
|
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" && exit 1 )
|
||||||
)
|
)
|
||||||
make deploy ${V:+V=1} OSX_DMG="${OUTDIR}/${DISTNAME}-${HOST}-unsigned.dmg"
|
make deploy ${V:+V=1} OSX_ZIP="${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
(
|
(
|
||||||
|
|
|
@ -85,11 +85,8 @@ mkdir -p "$DISTSRC"
|
||||||
# Apply detached codesignatures to dist/ (in-place)
|
# Apply detached codesignatures to dist/ (in-place)
|
||||||
signapple apply dist/Bitcoin-Qt.app codesignatures/osx/dist
|
signapple apply dist/Bitcoin-Qt.app codesignatures/osx/dist
|
||||||
|
|
||||||
# Make a DMG from dist/
|
# Make a .zip from dist/
|
||||||
xorrisofs -D -l -V "$(< osx_volname)" -no-pad -r -dir-mode 0755 \
|
zip "${OUTDIR}/${DISTNAME}-${HOST}.zip" dist/*
|
||||||
-o "${OUTDIR}/${DISTNAME}-${HOST}.dmg" \
|
|
||||||
dist \
|
|
||||||
-- -volume_date all_file_dates ="$SOURCE_DATE_EPOCH"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -606,5 +606,5 @@ inspecting signatures in Mach-O binaries.")
|
||||||
((string-contains target "-linux-")
|
((string-contains target "-linux-")
|
||||||
(list (make-bitcoin-cross-toolchain target)))
|
(list (make-bitcoin-cross-toolchain target)))
|
||||||
((string-contains target "darwin")
|
((string-contains target "darwin")
|
||||||
(list clang-toolchain-15 binutils cmake-minimal xorriso python-signapple))
|
(list clang-toolchain-15 binutils cmake-minimal xorriso python-signapple zip))
|
||||||
(else '())))))
|
(else '())))))
|
||||||
|
|
|
@ -48,7 +48,7 @@ The paths are automatically configured and no other options are needed unless ta
|
||||||
|
|
||||||
#### For macOS cross compilation
|
#### For macOS cross compilation
|
||||||
|
|
||||||
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools xorriso
|
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools xorriso zip
|
||||||
|
|
||||||
Note: You must obtain the macOS SDK before proceeding with a cross-compile.
|
Note: You must obtain the macOS SDK before proceeding with a cross-compile.
|
||||||
Under the depends directory, create a subdirectory named `SDKs`.
|
Under the depends directory, create a subdirectory named `SDKs`.
|
||||||
|
|
Loading…
Add table
Reference in a new issue