aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-01-05 10:17:51 +0800
committerfanquake <fanquake@gmail.com>2022-01-05 10:25:03 +0800
commit3e5dd94c423bedfa8b70a1e00df632a22dbd4574 (patch)
treec0bac3adf3b88d9545aff9f2451237caf0e917c3 /contrib
parent1aabbf33d74bae9cdd0523f95e2e8212439792cb (diff)
parente09773d20a9230ba7aa2cbb7e87fdc5187ddfec6 (diff)
downloadbitcoin-3e5dd94c423bedfa8b70a1e00df632a22dbd4574.tar.xz
Merge bitcoin/bitcoin#23909: build: use a static .tiff for macOS .dmg rather than generating
e09773d20a9230ba7aa2cbb7e87fdc5187ddfec6 build: use a static .tiff for macOS .dmg over generating (fanquake) Pull request description: For demonstration, after [discussion in #23778](https://github.com/bitcoin/bitcoin/pull/23778#issuecomment-1003005503), and the question as to why we can't just have a `background.tiff` that we copy into the macOS DMG, and do away with the somewhat convoluted image generation steps. From my understanding, the only reason we have this image generation as part of our build system is so that forks of Core can adapt the imagery for their own branding via `PACKAGE_NAME`. It don't think it provides much value to us, and could just have a static .tiff that we copy into the dmg (replacing the .svg that currently lives in macdeploy/). Doing this would eliminate the following build dependencies: For native macOS: * `sed` (usage in Makefile.am) * `librsvg` (rsvg-convert) * `tiffutil` Linux macOS cross-compile: * `sed` (usage in Makefille.am) * `librsvg` * `tiffcp` * `convert` (imagemagick) * `font-tuffy` Guix Build: ```bash bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum c98d67796863f4b1bab0ad600d46bd74e744d94072cbd4bc856a6aeaba3bb329 guix-build-e09773d20a92/output/dist-archive/bitcoin-e09773d20a92.tar.gz 3336f90bab312798cb7665e2b4ae24d1a270fb240647d5fed8dbfcd83e3ed37e guix-build-e09773d20a92/output/x86_64-apple-darwin/SHA256SUMS.part 8fd680c7ee158c64bad212385df7b0b302c6c2143d4e672b4b0eb5da41f9256d guix-build-e09773d20a92/output/x86_64-apple-darwin/bitcoin-e09773d20a92-osx-unsigned.dmg 34f54177c2f0700e8cfaf5d85d91e404807cd9d411e22006cdff82653e5f4af2 guix-build-e09773d20a92/output/x86_64-apple-darwin/bitcoin-e09773d20a92-osx-unsigned.tar.gz da6b8f54ef755d40330c8eac4f5bd0329637e827be9ee61318600d5d0bdcc3dc guix-build-e09773d20a92/output/x86_64-apple-darwin/bitcoin-e09773d20a92-osx64.tar.gz ``` ![dmg](https://user-images.githubusercontent.com/863730/147847717-8121c2d2-cdd4-4781-8397-3bf2893d52cc.png) ACKs for top commit: hebasto: ACK e09773d20a9230ba7aa2cbb7e87fdc5187ddfec6 jarolrod: ACK e09773d20a9230ba7aa2cbb7e87fdc5187ddfec6 Zero-1729: ACK e09773d20a9230ba7aa2cbb7e87fdc5187ddfec6 Tree-SHA512: 0ad06699a5451daa8cfaaa46759eb7bd85254a72e23f857f70d433a2ffb1a4bf6dd464d9c4ac9f8c20aab045f4e2b61c6dcdcbcceef96ce515b1a0c501665b1f
Diffstat (limited to 'contrib')
-rw-r--r--contrib/guix/manifest.scm22
-rw-r--r--contrib/macdeploy/background.svg34
-rw-r--r--contrib/macdeploy/background.tiffbin0 -> 18464 bytes
-rwxr-xr-xcontrib/macdeploy/macdeployqtplus2
4 files changed, 2 insertions, 56 deletions
diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm
index 5805006053..6ecb324457 100644
--- a/contrib/guix/manifest.scm
+++ b/contrib/guix/manifest.scm
@@ -17,7 +17,6 @@
(gnu packages gcc)
(gnu packages gnome)
(gnu packages image)
- (gnu packages imagemagick)
(gnu packages installers)
(gnu packages linux)
(gnu packages llvm)
@@ -202,25 +201,6 @@ chain for " target " development."))
(package-with-extra-patches base-nsis
(search-our-patches "nsis-SConstruct-sde-support.patch")))
-(define-public font-tuffy
- (package
- (name "font-tuffy")
- (version "20120614")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "http://tulrich.com/fonts/tuffy-" version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "02vf72bgrp30vrbfhxjw82s115z27dwfgnmmzfb0n9wfhxxfpyf6"))))
- (build-system font-build-system)
- (home-page "http://tulrich.com/fonts/")
- (synopsis "The Tuffy Truetype Font Family")
- (description
- "Thatcher Ulrich's first outline font design. He started with the goal of producing a neutral, readable sans-serif text font. There are lots of \"expressive\" fonts out there, but he wanted to start with something very plain and clean, something he might want to actually use. ")
- (license license:public-domain)))
-
(define-public lief
(package
(name "python-lief")
@@ -653,5 +633,5 @@ inspecting signatures in Mach-O binaries.")
(else
(make-bitcoin-cross-toolchain target)))))
((string-contains target "darwin")
- (list clang-toolchain-10 binutils imagemagick libtiff librsvg font-tuffy cmake xorriso python-signapple))
+ (list clang-toolchain-10 binutils cmake xorriso python-signapple))
(else '())))))
diff --git a/contrib/macdeploy/background.svg b/contrib/macdeploy/background.svg
deleted file mode 100644
index 9c330af451..0000000000
--- a/contrib/macdeploy/background.svg
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
- "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
-<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="1000pt" height="640pt" viewBox="0 0 1000 640" preserveAspectRatio="xMidYMid meet">
- <!-- kate: space-indent off;
- Copyright (c) 2015 The Bitcoin Core developers
- Distributed under the MIT software license, see the accompanying
- file COPYING or http://www.opensource.org/licenses/mit-license.php.
- -->
- <style type="text/css"><![CDATA[
- text {
- font-family: "Tuffy";
- font-size: 86px;
- fill: gray;
- text-anchor: middle;
- }
- ]]></style>
- <defs>
- <linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
- <stop offset="0%" style="stop-color:rgb(239,239,239);stop-opacity:1" />
- <stop offset="33%" style="stop-color:rgb(239,239,239);stop-opacity:1" />
- <stop offset="80%" style="stop-color:rgb(205,205,205);stop-opacity:1" />
- <stop offset="100%" style="stop-color:rgb(204,204,204);stop-opacity:1" />
- </linearGradient>
- </defs>
- <rect width="1000" height="640" style="fill:url(#gradient);stroke-width:0" />
- <g transform="translate(500,0) scale(0.9, 1)">
- <text x="0" y="114">PACKAGE_NAME</text>
- </g>
- <g transform="translate(0.000000,640.000000) scale(0.100000,-0.100000)"
- fill="#000000" stroke="none">
- <path d="M4995 3705 c-24 -23 -25 -29 -25 -165 l0 -140 -306 0 -306 0 -29 -29 c-29 -29 -29 -31 -29 -141 0 -110 0 -112 29 -141 l29 -29 306 0 306 0 0 -140 c0 -136 1 -142 25 -165 16 -17 35 -25 57 -25 29 0 72 32 306 226 180 149 274 233 278 250 13 53 -2 70 -278 299 -235 194 -277 225 -306 225 -22 0 -41 -8 -57 -25z" fixlter="url(#glow)"/>
- </g>
-</svg>
diff --git a/contrib/macdeploy/background.tiff b/contrib/macdeploy/background.tiff
new file mode 100644
index 0000000000..1fb088c837
--- /dev/null
+++ b/contrib/macdeploy/background.tiff
Binary files differ
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 055a932eee..3b76108034 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -575,7 +575,7 @@ if config.dmg is not None:
os.mkdir(os.path.dirname(bg_path))
if verbose:
print('background.tiff', "->", bg_path)
- shutil.copy2('background.tiff', bg_path)
+ shutil.copy2('contrib/macdeploy/background.tiff', bg_path)
os.symlink("/Applications", os.path.join(disk_root, "Applications"))