build: Fix 'make deploy' for OSX

Native OSX uses system tools rather than 3rd party dependencies. rsvg-convert
is still required, though.
This commit is contained in:
Cory Fields 2016-06-03 16:36:26 -04:00 committed by Jonas Schnelli
parent 041331e1da
commit 09aefb5177
No known key found for this signature in database
GPG Key ID: 29D4BCB6416F53EC
3 changed files with 11 additions and 4 deletions

View File

@ -111,9 +111,16 @@ osx_volname:
echo $(OSX_VOLNAME) >$@
if BUILD_DARWIN
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE)
$(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)
$(OSX_BACKGROUND_IMAGE).png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@
$(OSX_BACKGROUND_IMAGE)@2x.png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 72 -p 72 -o $@
$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE).png $(OSX_BACKGROUND_IMAGE)@2x.png
tiffutil -cathidpicheck $^ -out $@
deploydir: $(OSX_DMG)
else
APP_DIST_DIR=$(top_builddir)/dist

View File

@ -319,6 +319,7 @@ case $host in
fi
fi
AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
AC_CHECK_PROG([BREW],brew, brew)
if test x$BREW = xbrew; then
dnl These Homebrew packages may be keg-only, meaning that they won't be found
@ -352,7 +353,6 @@ case $host in
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
AC_PATH_TOOL([OTOOL], [otool], otool)
AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage)
AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
AC_PATH_PROGS([IMAGEMAGICK_CONVERT], [convert],convert)
AC_PATH_PROGS([TIFFCP], [tiffcp],tiffcp)

View File

@ -791,7 +791,7 @@ if config.dmg is not None:
except subprocess.CalledProcessError as e:
sys.exit(e.returncode)
m = re.search("/Volumes/(.+$)", output)
m = re.search("/Volumes/(.+$)", output.decode())
disk_root = m.group(0)
disk_name = m.group(1)
@ -868,7 +868,7 @@ if config.dmg is not None:
print(s)
p = subprocess.Popen(['osascript', '-'], stdin=subprocess.PIPE)
p.communicate(input=s)
p.communicate(input=s.encode('utf-8'))
if p.returncode:
print("Error running osascript.")