Skip to content

Commit 30dc3c1

Browse files
committed
Merge pull request #6116
d1a3866 build: Cope with spaces in filenames when creating/applying OSX sigs (Cory Fields) 7cef321 [Mac only] rename Bitcoin-Qt.app to "Bitcoin Core.app" (Jonas Schnelli)
2 parents 377711f + d1a3866 commit 30dc3c1

File tree

11 files changed

+35
-36
lines changed

11 files changed

+35
-36
lines changed

Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
1414
BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT)
1515
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
1616

17-
OSX_APP=Bitcoin-Qt.app
18-
OSX_DMG=Bitcoin-Qt.dmg
17+
OSX_APP=Bitcoin-Core.app
18+
OSX_DMG=Bitcoin-Core.dmg
1919
OSX_BACKGROUND_IMAGE=background.tiff
2020
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
2121
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
@@ -106,7 +106,7 @@ $(APP_DIST_DIR)/Applications:
106106
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
107107

108108
$(OSX_DMG): $(APP_DIST_EXTRAS)
109-
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist
109+
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
110110

111111
$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
112112
$(MKDIR_P) $(@D)

contrib/gitian-descriptors/gitian-osx-signer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ script: |
3333
3434
tar -xf ${UNSIGNED}
3535
./detached-sig-apply.sh ${UNSIGNED} signature.tar.gz
36-
${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o uncompressed.dmg signed-app
36+
${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o uncompressed.dmg signed-app
3737
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ script: |
120120
popd
121121
122122
make deploy
123-
${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
123+
${WRAP_DIR}/dmg dmg Bitcoin-Core.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
124124
125125
cd installed
126126
find . -name "lib*.la" -delete

contrib/macdeploy/DS_Store

0 Bytes
Binary file not shown.

contrib/macdeploy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ This script should not be run manually, instead, after building as usual:
1111
During the process, the disk image window will pop up briefly where the fancy
1212
settings are applied. This is normal, please do not interfere.
1313

14-
When finished, it will produce `Bitcoin-Qt.dmg`.
14+
When finished, it will produce `Bitcoin-Core.dmg`.
1515

contrib/macdeploy/detached-sig-apply.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#!/bin/sh
22
set -e
33

4-
UNSIGNED=$1
5-
SIGNATURE=$2
4+
UNSIGNED="$1"
5+
SIGNATURE="$2"
66
ARCH=x86_64
77
ROOTDIR=dist
8-
BUNDLE=${ROOTDIR}/Bitcoin-Qt.app
98
TEMPDIR=signed.temp
109
OUTDIR=signed-app
1110

@@ -31,21 +30,21 @@ if [ -z "${CODESIGN_ALLOCATE}" ]; then
3130
CODESIGN_ALLOCATE=${TEMPDIR}/codesign_allocate
3231
fi
3332

34-
for i in `find ${TEMPDIR} -name "*.sign"`; do
35-
SIZE=`stat -c %s ${i}`
36-
TARGET_FILE=`echo ${i} | sed 's/\.sign$//'`
33+
find ${TEMPDIR} -name "*.sign" | while read i; do
34+
SIZE=`stat -c %s "${i}"`
35+
TARGET_FILE="`echo "${i}" | sed 's/\.sign$//'`"
3736

3837
echo "Allocating space for the signature of size ${SIZE} in ${TARGET_FILE}"
39-
${CODESIGN_ALLOCATE} -i ${TARGET_FILE} -a ${ARCH} ${SIZE} -o ${i}.tmp
38+
${CODESIGN_ALLOCATE} -i "${TARGET_FILE}" -a ${ARCH} ${SIZE} -o "${i}.tmp"
4039

41-
OFFSET=`${PAGESTUFF} ${i}.tmp -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
40+
OFFSET=`${PAGESTUFF} "${i}.tmp" -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
4241
if [ -z ${QUIET} ]; then
4342
echo "Attaching signature at offset ${OFFSET}"
4443
fi
4544

46-
dd if=$i of=${i}.tmp bs=1 seek=${OFFSET} count=${SIZE} 2>/dev/null
47-
mv ${i}.tmp ${TARGET_FILE}
48-
rm ${i}
45+
dd if="$i" of="${i}.tmp" bs=1 seek=${OFFSET} count=${SIZE} 2>/dev/null
46+
mv "${i}.tmp" "${TARGET_FILE}"
47+
rm "${i}"
4948
echo "Success."
5049
done
5150
mv ${TEMPDIR}/${ROOTDIR} ${OUTDIR}

contrib/macdeploy/detached-sig-create.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
ROOTDIR=dist
5-
BUNDLE=${ROOTDIR}/Bitcoin-Qt.app
5+
BUNDLE="${ROOTDIR}/Bitcoin Core.app"
66
CODESIGN=codesign
77
TEMPDIR=sign.temp
88
TEMPLIST=${TEMPDIR}/signatures.txt
@@ -19,19 +19,19 @@ mkdir -p ${TEMPDIR}
1919

2020
${CODESIGN} -f --file-list ${TEMPLIST} "$@" "${BUNDLE}"
2121

22-
for i in `grep -v CodeResources ${TEMPLIST}`; do
23-
TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`"
24-
SIZE=`pagestuff $i -p | tail -2 | grep size | sed 's/[^0-9]*//g'`
25-
OFFSET=`pagestuff $i -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
22+
grep -v CodeResources < "${TEMPLIST}" | while read i; do
23+
TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`"
24+
SIZE=`pagestuff "$i" -p | tail -2 | grep size | sed 's/[^0-9]*//g'`
25+
OFFSET=`pagestuff "$i" -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
2626
SIGNFILE="${TEMPDIR}/${TARGETFILE}.sign"
27-
DIRNAME="`dirname ${SIGNFILE}`"
27+
DIRNAME="`dirname "${SIGNFILE}"`"
2828
mkdir -p "${DIRNAME}"
2929
echo "Adding detached signature for: ${TARGETFILE}. Size: ${SIZE}. Offset: ${OFFSET}"
30-
dd if=$i of=${SIGNFILE} bs=1 skip=${OFFSET} count=${SIZE} 2>/dev/null
30+
dd if="$i" of="${SIGNFILE}" bs=1 skip=${OFFSET} count=${SIZE} 2>/dev/null
3131
done
3232

33-
for i in `grep CodeResources ${TEMPLIST}`; do
34-
TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`"
33+
grep CodeResources < "${TEMPLIST}" | while read i; do
34+
TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`"
3535
RESOURCE="${TEMPDIR}/${TARGETFILE}"
3636
DIRNAME="`dirname "${RESOURCE}"`"
3737
mkdir -p "${DIRNAME}"
@@ -41,6 +41,6 @@ done
4141

4242
rm ${TEMPLIST}
4343

44-
tar -C ${TEMPDIR} -czf ${OUT} .
45-
rm -rf ${TEMPDIR}
44+
tar -C "${TEMPDIR}" -czf "${OUT}" .
45+
rm -rf "${TEMPDIR}"
4646
echo "Created ${OUT}"

contrib/macdeploy/fancy.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<integer>370</integer>
2323
<integer>156</integer>
2424
</array>
25-
<key>Bitcoin-Qt.app</key>
25+
<key>Bitcoin Core.app</key>
2626
<array>
2727
<integer>128</integer>
2828
<integer>156</integer>

contrib/macdeploy/macdeployqtplus

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class FrameworkInfo(object):
155155
class ApplicationBundleInfo(object):
156156
def __init__(self, path):
157157
self.path = path
158-
appName = os.path.splitext(os.path.basename(path))[0]
158+
appName = "Bitcoin-Qt"
159159
self.binaryPath = os.path.join(path, "Contents", "MacOS", appName)
160160
if not os.path.exists(self.binaryPath):
161161
raise RuntimeError("Could not find bundle binary for " + path)
@@ -596,7 +596,7 @@ if os.path.exists("dist"):
596596

597597
# ------------------------------------------------
598598

599-
target = os.path.join("dist", app_bundle)
599+
target = os.path.join("dist", "Bitcoin Core.app")
600600

601601
if verbose >= 2:
602602
print "+ Copying source bundle +"
@@ -837,7 +837,7 @@ if config.dmg is not None:
837837
items_positions.append(itemscript.substitute(params))
838838

839839
params = {
840-
"disk" : "Bitcoin-Qt",
840+
"disk" : "Bitcoin-Core",
841841
"window_bounds" : "300,300,800,620",
842842
"icon_size" : "96",
843843
"background_commands" : "",

doc/build-osx.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Creating a release build
100100
------------------------
101101
You can ignore this section if you are building `bitcoind` for your own use.
102102

103-
bitcoind/bitcoin-cli binaries are not included in the Bitcoin-Qt.app bundle.
103+
bitcoind/bitcoin-cli binaries are not included in the Bitcoin-Core.app bundle.
104104

105105
If you are building `bitcoind` or `Bitcoin-Qt` for others, your build machine should be set up
106106
as follows for maximum compatibility:
@@ -111,7 +111,7 @@ All dependencies should be compiled with these flags:
111111
-arch x86_64
112112
-isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
113113

114-
Once dependencies are compiled, see [doc/release-process.md](release-process.md) for how the Bitcoin-Qt.app
114+
Once dependencies are compiled, see [doc/release-process.md](release-process.md) for how the Bitcoin-Core.app
115115
bundle is packaged and signed to create the .dmg disk image that is distributed.
116116

117117
Running

0 commit comments

Comments
 (0)