Deploying a version of Avogadro

I have an altered version of Avogadro which compiles and runs on my computer.
However, when I share “Avogadro.app” with other users, the application crashes on launch.
The trouble is that other computers do not have the libraries that my computer has.
I have tried to use the macdeployqt tool that comes with Qt but this still does not work; it includes copies of the Qt libraries but these still link to other Qt libraries. Also, needed open babel libraries, etc. are still not included in the app.

What are the steps I need to take to compile a modified version of Avogadro that I can share directly with other users with the same OS? I want a simple way to hand off my modified version to other researchers in the group.

Thomas Sexton

On Tue, Aug 14, 2012 at 5:27 PM, Sexton, Thomas tsexton@mail.smu.edu wrote:

I have an altered version of Avogadro which compiles and runs on my computer.
However, when I share “Avogadro.app” with other users, the application crashes on launch.
The trouble is that other computers do not have the libraries that my computer has.
I have tried to use the macdeployqt tool that comes with Qt but this still does not work; it includes copies of the Qt libraries but these still link to other Qt libraries. Also, needed open babel libraries, etc. are still not included in the app.

What are the steps I need to take to compile a modified version of Avogadro that I can share directly with other users with the same OS? I want a simple way to hand off my modified version to other researchers in the group.

Avogadro uses CPack (part of cmake) to package binaries. On windows,
there’s a PACKAGE target in the MSVC project that you can build to
create an installer. On linux, you can do a “make package” or “make
package_source” on the command line. Sounds like you’re using mac,
though, which I have absolutely no experience with :wink: I imagine
there’s something similar – hopefully one of the apple guys will
chime in soon, but this might get you started.

Hope this helps,

Dave

What are the steps I need to take to compile a modified version of Avogadro that I can share directly with other users with the same OS? I want a simple way to hand off my modified version to other researchers in the group.

If you’re doing this on Mac, here’s what I do – a regular “make install” doesn’t work.

I still use the old avogadro-super package, which couples the latest Open Babel and Avogadro. (On Mac, I don’t need to compile zlib, Qt, etc. and the avogadro-squared still seems to do this.)

Then here’s the relevant part of my “nightly Avogadro” script for Mac. You may want to tinker with the various flags to cmake, use clang, etc.

CC=llvm-gcc CXX=llvm-g++ cmake …/…/avogadro-super/ -DCMAKE_CXX_FLAGS=-I/usr/X11/include -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_OSX_ARCHITECTURES=“x86_64” -DCMAKE_OSX_SYSROOT=’/Developer/SDKs/MacOSX10.6.sdk’ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5 -DENABLE_PYTHON=false -DENABLE_GLSL=false -DENABLE_AVO_PACKAGE=true -DENABLE_UPDATE_CHECKER=true -DENABLE_VERSIONED_PLUGIN_DIR=false -DENABLE_BOOST=false -DENABLE_TESTS=false -DBUILD_TESTING=false
make -j5
make -j5
rm -r /Applications/Avogadro.app
make install

if [ -e /Applications/Avogadro.app ]; then

cd /Applications/Avogadro.app/Contents
rm -fr bin
rm -rf plugins/designer
rm -rf plugins/phonon_backend
rm -rf plugins/sqldrivers
rm -rf MacOS/libphonon*
rm -rf Frameworks/phonon.framework
rm -rf Frameworks/Qt3Support.framework
rm -rf Frameworks/QtDBus.framework
rm -rf Frameworks/QtDesigner.framework
rm -rf Frameworks/QtTest.framework
rm -rf Frameworks/QtXmlPatterns.framework
rm -rf share/avogadro/i18n/qt_help*.qm
rm -rf share/avogadro/i18n/qtconfig*.qm

fi