aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-03-20 18:13:51 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-03-20 18:14:01 +0100
commitfac6bea8f02d0929fab17f3fcdbd067d3870d975 (patch)
treefc4745da25f429d1cb6ab5ec2bc53f0fe84312ff
parent98f4c6c49ce42f3c83d21e5b8ae32eda02a79d49 (diff)
parent01e5327cfc4372158d7074fd8b277166bf271884 (diff)
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)
-rw-r--r--Makefile.am24
-rw-r--r--configure.ac14
-rw-r--r--contrib/macdeploy/DS_Storebin0 -> 15364 bytes
-rwxr-xr-xcontrib/macdeploy/macdeployqtplus15
4 files changed, 42 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am
index 4f623f6c64..e26627f3e3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,6 +15,7 @@ OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
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)
@@ -24,7 +25,8 @@ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
$(top_srcdir)/doc/README_windows.txt
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 \
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)
$(MKDIR_P) $(top_builddir)/release
- $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
- $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
- $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
+ STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
+ STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
+ STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
@test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \
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)
$(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)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
+if BUILD_DARWIN
$(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
appbundle: $(OSX_APP_BUILT)
diff --git a/configure.ac b/configure.ac
index 7ce5f683ee..45cd023bb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,7 @@ AC_PROG_CPP
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_OBJC
+AC_PROG_LN_S
m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
AC_PROG_MKDIR_P
AC_PROG_SED
@@ -222,6 +223,7 @@ case $host in
TARGET_OS=darwin
LEVELDB_TARGET_FLAGS="TARGET_OS=Darwin"
if test x$cross_compiling != xyes; then
+ BUILD_OS=darwin
AC_CHECK_PROG([PORT],port, port)
if test x$PORT = xport; then
dnl add default macports paths
@@ -238,6 +240,17 @@ case $host in
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
LIBS="$LIBS -L$bdb_prefix/lib"
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
CPPFLAGS="$CPPFLAGS -DMAC_OSX"
@@ -671,6 +684,7 @@ if test "x$use_tests$build_bitcoind$use_qt" = "xnonono"; then
fi
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([ENABLE_WALLET],[test x$enable_wallet == xyes])
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
diff --git a/contrib/macdeploy/DS_Store b/contrib/macdeploy/DS_Store
new file mode 100644
index 0000000000..b9a1e14864
--- /dev/null
+++ b/contrib/macdeploy/DS_Store
Binary files differ
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 533be6cffa..5c310df1fc 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -196,7 +196,8 @@ class DeploymentInfo(object):
def getFrameworks(binaryPath, verbose):
if verbose >= 3:
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()
if otool.returncode != 0:
if verbose >= 1:
@@ -221,7 +222,8 @@ def getFrameworks(binaryPath, verbose):
return libraries
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):
if verbose >= 3:
@@ -239,10 +241,11 @@ def changeIdentification(id, binaryPath, verbose):
runInstallNameTool("id", id, binaryPath)
def runStrip(binaryPath, verbose):
+ stripbin=os.getenv("STRIP", "strip")
if verbose >= 3:
print "Using strip:"
print " stripped", binaryPath
- subprocess.check_call(["strip", "-x", binaryPath])
+ subprocess.check_call([stripbin, "-x", binaryPath])
def copyFramework(framework, path, verbose):
if framework.sourceFilePath.startswith("Qt"):
@@ -347,6 +350,8 @@ def deployFrameworksForAppBundle(applicationBundle, strip, verbose):
def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
# Lookup available plugins, exclude unneeded
plugins = []
+ if deploymentInfo.pluginPath is None:
+ return
for dirpath, dirnames, filenames in os.walk(deploymentInfo.pluginPath):
pluginDirectory = os.path.relpath(dirpath, deploymentInfo.pluginPath)
if pluginDirectory == "designer":
@@ -421,8 +426,8 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
deployFrameworks([dependency], appBundleInfo.path, destinationPath, strip, verbose, deploymentInfo)
qt_conf="""[Paths]
-translations=Resources
-plugins=PlugIns
+Translations=Resources
+Plugins=PlugIns
"""
ap = ArgumentParser(description="""Improved version of macdeployqt.