From ed9c7a0eccdb01a2d6ac4b3d5096bba228c32208 Mon Sep 17 00:00:00 2001 From: Marco Biasini <marco.biasini@unibas.ch> Date: Fri, 1 Jun 2012 17:20:20 +0200 Subject: [PATCH] make sure to include boost.python libraries The boost.python library gets implictly include with gosty when buildinga full bundle, but we were missing it when building a minimal bundle. --- cmake_support/OST.cmake | 2 +- deployment/macos/deploy.py | 6 ++++-- deployment/macos/deps.py | 10 ++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cmake_support/OST.cmake b/cmake_support/OST.cmake index 3fd6a45f3..646adc2cf 100644 --- a/cmake_support/OST.cmake +++ b/cmake_support/OST.cmake @@ -305,7 +305,7 @@ macro(executable) add_executable(${_ARG_NAME} ${_ARG_SOURCES}) if (APPLE AND NOT _ARG_NO_RPATH AND NOT ENABLE_STATIC) set_target_properties(${_ARG_NAME} PROPERTIES - LINK_FLAGS "-Wl,-rpath,@loader_path/../lib") + LINK_FLAGS "-Wl,-rpath,@loader_path/../lib/") endif() if (_ARG_LINK) target_link_libraries(${_ARG_NAME} ${_ARG_LINK}) diff --git a/deployment/macos/deploy.py b/deployment/macos/deploy.py index 82a20a066..de10ec84c 100644 --- a/deployment/macos/deploy.py +++ b/deployment/macos/deploy.py @@ -20,6 +20,8 @@ if os.path.exists('DNG.app'): shutil.rmtree('DNG.app') if opts.no_gui: out_dir='ost-%s' % ost.VERSION + if os.path.exists(out_dir): + shutil.rmtree(out_dir) shutil.move('standalone', out_dir) sys.exit(0) bundle.create_bundle('DNG', opts.bundle) @@ -28,5 +30,5 @@ if opts.bundle: os.system('rm `find DNG.app/Contents/examples/ -name "*.pyc"` 2> /dev/null') os.system('rm -rf DNG.app/Contents/examples/code_fragments/') if opts.dmg: - os.system('rm -rf openstructure.dmg') - os.system('hdiutil create -srcFolder DNG.app openstructure.dmg') + os.system('rm -rf openstructure-%s.dmg' % ost.VERSION) + os.system('hdiutil create -srcFolder DNG.app openstructure-%s.dmg' % ost.VERSION) diff --git a/deployment/macos/deps.py b/deployment/macos/deps.py index 68f73d977..654744721 100644 --- a/deployment/macos/deps.py +++ b/deployment/macos/deps.py @@ -72,7 +72,7 @@ LIBEXEC_SCRIPTS=['ost_config'] LIBEXEC_BINARIES=[] GUI_LIBEXEC_BINARIES=['gosty'] BINARIES=['ldt', 'chemdict_tool', 'tmalign', 'tmscore'] -GUI_BINARIES=['gosty'] +GUI_BINARIES=[] GUI_COMPONENTS=['gfx', 'gui', 'info'] COMPONENTS=['mol', 'geom', 'conop', 'seq_alg', 'seq', 'img', 'img_alg', 'io', 'db', 'base'] @@ -224,6 +224,7 @@ def make_standalone(stage_dir, outdir, no_includes, force_no_rpath=False, scripts=SCRIPTS binaries=BINARIES components=COMPONENTS + libexec_scripts=LIBEXEC_SCRIPTS site_packages=SITE_PACKAGES libexec_binaries=LIBEXEC_BINARIES if not no_gui: @@ -235,10 +236,15 @@ def make_standalone(stage_dir, outdir, no_includes, force_no_rpath=False, print 'collecting dependencies' deps=collect_deps(stage_dir, components, binaries, libexec_binaries, site_packages, site_packages_dir) + # when running in non-gui mode, we are most likely missing the boost + # python library. Let's add it to the list of dependencies by + # inspecting "_ost_base.so". + _deps_for_lib(os.path.join(stage_dir, 'lib/openstructure/ost/_ost_base.so'), + deps, recursive=False) print 'copying dependencies' copy_deps(deps, outdir) print 'copying libexec binaries' - copy_binaries(stage_dir, outdir, LIBEXEC_BINARIES, LIBEXEC_SCRIPTS, + copy_binaries(stage_dir, outdir, libexec_binaries, libexec_scripts, 'libexec/openstructure') print 'copying binaries' copy_binaries(stage_dir, outdir, binaries, scripts, 'bin') -- GitLab