Browse Source

Merge pull request #3885

01e5327 build: hook up "make deploy" for cross osx builds (Cory Fields)
c4a10db build: ensure the correct strip is used for osx/win32 (Cory Fields)
b62bbb1 build: if cross-compiling for an apple host, locate some additional tools (Cory Fields)
0f21d39 build: fix qt.conf case-sensitivity in the deployed dmg (Cory Fields)
275d6a3 build: allow correct tools to be used for dmg creation. (Cory Fields)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
fac6bea8f0
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 24
      Makefile.am
  2. 14
      configure.ac
  3. BIN
      contrib/macdeploy/DS_Store
  4. 15
      contrib/macdeploy/macdeployqtplus

24
Makefile.am

@ -15,6 +15,7 @@ OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md) DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
@ -24,7 +25,8 @@ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
$(top_srcdir)/doc/README_windows.txt $(top_srcdir)/doc/README_windows.txt
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
$(top_srcdir)/contrib/macdeploy/background.png $(top_srcdir)/contrib/macdeploy/background.png \
$(top_srcdir)/contrib/macdeploy/DS_Store
COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
@ -45,9 +47,9 @@ distcleancheck:
$(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN) $(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN)
$(MKDIR_P) $(top_builddir)/release $(MKDIR_P) $(top_builddir)/release
$(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
$(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
$(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
@test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \ @test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \
echo error: could not build $@ echo error: could not build $@
@ -72,15 +74,25 @@ $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN) $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
$(MKDIR_P) $(@D) $(MKDIR_P) $(@D)
$(INSTALL_STRIP_PROGRAM) $< $@ STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \ OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \ $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/MacOS/Bitcoin-Qt
if BUILD_DARWIN
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
else
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
$(MKDIR_P) dist/.background
$(INSTALL) contrib/macdeploy/background.png dist/.background
$(INSTALL) contrib/macdeploy/DS_Store dist/.DS_Store
cd dist; $(LN_S) /Applications Applications
$(GENISOIMAGE) -no-cache-inodes -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist
endif
if TARGET_DARWIN if TARGET_DARWIN
appbundle: $(OSX_APP_BUILT) appbundle: $(OSX_APP_BUILT)

14
configure.ac

@ -121,6 +121,7 @@ AC_PROG_CPP
AC_PROG_CXXCPP AC_PROG_CXXCPP
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_OBJC AC_PROG_OBJC
AC_PROG_LN_S
m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX]) m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
AC_PROG_MKDIR_P AC_PROG_MKDIR_P
AC_PROG_SED AC_PROG_SED
@ -222,6 +223,7 @@ case $host in
TARGET_OS=darwin TARGET_OS=darwin
LEVELDB_TARGET_FLAGS="TARGET_OS=Darwin" LEVELDB_TARGET_FLAGS="TARGET_OS=Darwin"
if test x$cross_compiling != xyes; then if test x$cross_compiling != xyes; then
BUILD_OS=darwin
AC_CHECK_PROG([PORT],port, port) AC_CHECK_PROG([PORT],port, port)
if test x$PORT = xport; then if test x$PORT = xport; then
dnl add default macports paths dnl add default macports paths
@ -238,6 +240,17 @@ case $host in
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include" CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
LIBS="$LIBS -L$bdb_prefix/lib" LIBS="$LIBS -L$bdb_prefix/lib"
fi fi
else
case $build_os in
*darwin*)
BUILD_OS=darwin
;;
*)
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
AC_PATH_TOOL([OTOOL], [otool], otool)
AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage)
;;
esac
fi fi
CPPFLAGS="$CPPFLAGS -DMAC_OSX" CPPFLAGS="$CPPFLAGS -DMAC_OSX"
@ -671,6 +684,7 @@ if test "x$use_tests$build_bitcoind$use_qt" = "xnonono"; then
fi fi
AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin]) AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows]) AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet == xyes]) AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet == xyes])
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes]) AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])

BIN
contrib/macdeploy/DS_Store

Binary file not shown.

15
contrib/macdeploy/macdeployqtplus

@ -196,7 +196,8 @@ class DeploymentInfo(object):
def getFrameworks(binaryPath, verbose): def getFrameworks(binaryPath, verbose):
if verbose >= 3: if verbose >= 3:
print "Inspecting with otool: " + binaryPath print "Inspecting with otool: " + binaryPath
otool = subprocess.Popen(["otool", "-L", binaryPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE) otoolbin=os.getenv("OTOOL", "otool")
otool = subprocess.Popen([otoolbin, "-L", binaryPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
o_stdout, o_stderr = otool.communicate() o_stdout, o_stderr = otool.communicate()
if otool.returncode != 0: if otool.returncode != 0:
if verbose >= 1: if verbose >= 1:
@ -221,7 +222,8 @@ def getFrameworks(binaryPath, verbose):
return libraries return libraries
def runInstallNameTool(action, *args): def runInstallNameTool(action, *args):
subprocess.check_call(["install_name_tool", "-"+action] + list(args)) installnametoolbin=os.getenv("INSTALLNAMETOOL", "install_name_tool")
subprocess.check_call([installnametoolbin, "-"+action] + list(args))
def changeInstallName(oldName, newName, binaryPath, verbose): def changeInstallName(oldName, newName, binaryPath, verbose):
if verbose >= 3: if verbose >= 3:
@ -239,10 +241,11 @@ def changeIdentification(id, binaryPath, verbose):
runInstallNameTool("id", id, binaryPath) runInstallNameTool("id", id, binaryPath)
def runStrip(binaryPath, verbose): def runStrip(binaryPath, verbose):
stripbin=os.getenv("STRIP", "strip")
if verbose >= 3: if verbose >= 3:
print "Using strip:" print "Using strip:"
print " stripped", binaryPath print " stripped", binaryPath
subprocess.check_call(["strip", "-x", binaryPath]) subprocess.check_call([stripbin, "-x", binaryPath])
def copyFramework(framework, path, verbose): def copyFramework(framework, path, verbose):
if framework.sourceFilePath.startswith("Qt"): if framework.sourceFilePath.startswith("Qt"):
@ -347,6 +350,8 @@ def deployFrameworksForAppBundle(applicationBundle, strip, verbose):
def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose): def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
# Lookup available plugins, exclude unneeded # Lookup available plugins, exclude unneeded
plugins = [] plugins = []
if deploymentInfo.pluginPath is None:
return
for dirpath, dirnames, filenames in os.walk(deploymentInfo.pluginPath): for dirpath, dirnames, filenames in os.walk(deploymentInfo.pluginPath):
pluginDirectory = os.path.relpath(dirpath, deploymentInfo.pluginPath) pluginDirectory = os.path.relpath(dirpath, deploymentInfo.pluginPath)
if pluginDirectory == "designer": if pluginDirectory == "designer":
@ -421,8 +426,8 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
deployFrameworks([dependency], appBundleInfo.path, destinationPath, strip, verbose, deploymentInfo) deployFrameworks([dependency], appBundleInfo.path, destinationPath, strip, verbose, deploymentInfo)
qt_conf="""[Paths] qt_conf="""[Paths]
translations=Resources Translations=Resources
plugins=PlugIns Plugins=PlugIns
""" """
ap = ArgumentParser(description="""Improved version of macdeployqt. ap = ArgumentParser(description="""Improved version of macdeployqt.

Loading…
Cancel
Save