Skip to content

Commit 53442af

Browse files
committed
Merge bitcoin#9412: build: Fix 'make deploy' for OSX
2fb98f6 Fix bug in dmg builder so that it actually reads in the configuration file (Don Patterson) b01667c Mention RSVG dependency when creating the disk image on OSX (Jonas Schnelli) 09aefb5 build: Fix 'make deploy' for OSX (Cory Fields)
2 parents 1d2d676 + 2fb98f6 commit 53442af

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

Makefile.am

+8-1
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,16 @@ osx_volname:
111111
echo $(OSX_VOLNAME) >$@
112112

113113
if BUILD_DARWIN
114-
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
114+
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE)
115115
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 -volname $(OSX_VOLNAME)
116116

117+
$(OSX_BACKGROUND_IMAGE).png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
118+
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@
119+
$(OSX_BACKGROUND_IMAGE)@2x.png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
120+
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 72 -p 72 -o $@
121+
$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE).png $(OSX_BACKGROUND_IMAGE)@2x.png
122+
tiffutil -cathidpicheck $^ -out $@
123+
117124
deploydir: $(OSX_DMG)
118125
else
119126
APP_DIST_DIR=$(top_builddir)/dist

configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ case $host in
319319
fi
320320
fi
321321

322+
AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
322323
AC_CHECK_PROG([BREW],brew, brew)
323324
if test x$BREW = xbrew; then
324325
dnl These Homebrew packages may be keg-only, meaning that they won't be found

contrib/macdeploy/macdeployqtplus

+3-3
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ if config.dmg is not None:
791791
except subprocess.CalledProcessError as e:
792792
sys.exit(e.returncode)
793793

794-
m = re.search("/Volumes/(.+$)", output)
794+
m = re.search("/Volumes/(.+$)", output.decode())
795795
disk_root = m.group(0)
796796
disk_name = m.group(1)
797797

@@ -852,7 +852,7 @@ if config.dmg is not None:
852852
"items_positions" : "\n ".join(items_positions)
853853
}
854854
if "window_bounds" in fancy:
855-
params["window.bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
855+
params["window_bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
856856
if "icon_size" in fancy:
857857
params["icon_size"] = str(fancy["icon_size"])
858858
if bg_path is not None:
@@ -868,7 +868,7 @@ if config.dmg is not None:
868868
print(s)
869869

870870
p = subprocess.Popen(['osascript', '-'], stdin=subprocess.PIPE)
871-
p.communicate(input=s)
871+
p.communicate(input=s.encode('utf-8'))
872872
if p.returncode:
873873
print("Error running osascript.")
874874

doc/build-osx.md

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Dependencies
1818

1919
brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config homebrew/versions/protobuf260 --c++11 qt5 libevent
2020

21+
In case you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG
22+
23+
brew install librsvg
24+
2125
NOTE: Building with Qt4 is still supported, however, could result in a broken UI. Building with Qt5 is recommended.
2226

2327
Build Bitcoin Core

0 commit comments

Comments
 (0)