-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: Add macOS deploy
target and enable it in Guix
#129
Changes from all commits
bce7bea
6ac45b7
fb23c32
984c548
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
# Copyright (c) 2024-present The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or https://opensource.org/license/mit/. | ||
|
||
if [ -n "$SOURCE_DATE_EPOCH" ]; then | ||
find . -exec touch -d "@$SOURCE_DATE_EPOCH" {} + | ||
fi | ||
|
||
find . | sort | "$1" -X@ "$2" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -284,7 +284,7 @@ mkdir -p "$DISTSRC" | |
# Install built Bitcoin Core to $INSTALLPATH | ||
case "$HOST" in | ||
*darwin*) | ||
make install-strip DESTDIR="${INSTALLPATH}" ${V:+V=1} | ||
cmake --install build --strip --prefix "${INSTALLPATH}" ${V:+--verbose} | ||
;; | ||
*) | ||
cmake --install build --prefix "${INSTALLPATH}" ${V:+--verbose} | ||
|
@@ -293,13 +293,12 @@ mkdir -p "$DISTSRC" | |
|
||
case "$HOST" in | ||
*darwin*) | ||
make osx_volname ${V:+V=1} | ||
make deploydir ${V:+V=1} | ||
cmake --build build --target deploy ${V:+--verbose} | ||
mv build/dist/Bitcoin-Core.zip "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip" | ||
mkdir -p "unsigned-app-${HOST}" | ||
cp --target-directory="unsigned-app-${HOST}" \ | ||
osx_volname \ | ||
contrib/macdeploy/detached-sig-create.sh | ||
mv --target-directory="unsigned-app-${HOST}" dist | ||
mv --target-directory="unsigned-app-${HOST}" build/dist | ||
( | ||
cd "unsigned-app-${HOST}" | ||
find . -print0 \ | ||
|
@@ -308,7 +307,6 @@ mkdir -p "$DISTSRC" | |
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" \ | ||
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" && exit 1 ) | ||
) | ||
make deploy ${V:+V=1} OSX_ZIP="${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip" | ||
;; | ||
esac | ||
( | ||
|
@@ -389,7 +387,7 @@ mkdir -p "$DISTSRC" | |
|
||
case "$HOST" in | ||
*mingw*) | ||
cp -rf --target-directory=. "${DISTSRC}/contrib/windeploy" | ||
cp -rf --target-directory=. contrib/windeploy | ||
Comment on lines
-392
to
+390
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change was unneeded. |
||
( | ||
cd ./windeploy | ||
mkdir -p unsigned | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,6 +282,9 @@ $(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_ | |
-e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS))|' \ | ||
-e 's|@CPPFLAGS_RELEASE@|$(strip $(host_release_CPPFLAGS))|' \ | ||
-e 's|@CPPFLAGS_DEBUG@|$(strip $(host_debug_CPPFLAGS))|' \ | ||
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS))|' \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In bce7bea: What ended up pointing out this error? I'm suprised that all builds (regardless of Guix) weren't broken if this was missing? Or I guess up until this point, nobody has tested setting LDFLAGS in a CMake build with depends? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another weird observation. #129 (comment) for 99935f1 was produced on Ubuntu 23.10. But it must fail to pass There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Isn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Anyone building depends for any There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Everyone has such an opportunity now :) |
||
-e 's|@LDFLAGS_RELEASE@|$(strip $(host_release_LDFLAGS))|' \ | ||
-e 's|@LDFLAGS_DEBUG@|$(strip $(host_debug_LDFLAGS))|' \ | ||
-e 's|@no_qt@|$(NO_QT)|' \ | ||
-e 's|@no_qr@|$(NO_QR)|' \ | ||
-e 's|@no_zmq@|$(NO_ZMQ)|' \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to run as part of the configure step and so we have an incomplete app bundle called Bitcoin-Qt.app created in the build directory.
Should these steps be part of their own custom command and only called as part of the deploydir and deploy targets? And perhaps the file cleaned up after the zip is created?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've considered this option while working on this PR and chosen this implementation for the following reasons:
I'd be happy to consider benefits of the alternative approach, if any.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a noob and after running the build I see this bundle in the build root and think it's the app bundle and not just a template used to produce a real one in
dist
.It's only a NIT and just something unobvious to me so I had to investigate what it was.