|
|
(18 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| These instructions are to allow users to build Avogadro from the very latest code. Be aware that Avogadro may fail to build or work properly at any given time when built from the instructions below. | | These instructions are to allow users to build Avogadro from the very latest code. Be aware that Avogadro may fail to build or work properly at any given time when built from the instructions below. |
| | | |
− | ;Compiling Avogadro for Windows is a complex task and it is recommended that you download the pre-made installer found on the download page. For the adventurous, here are Windows Visual Studio 2008 instructions that may or may not work. | + | ;Compiling Avogadro for Windows is a complex task and it is recommended that you download the pre-made installer found on the download page. For the adventurous, here are Windows Visual Studio 2008/2010 instructions that may or may not work. For various steps in the process, there may be downloadable binaries on the web. However, for completeness we build all dependencies. |
− |
| |
− | There are also [[Compiling_on_Linux_and_Mac_OS_X|instructions for Linux and Mac OS X]] available.
| |
| | | |
− | = Windows Visual Studio 2008 (Express) =
| + | * [[Compiling_on_Windows_with_MSVC_2008]] |
− |
| + | * [[Compiling_on_Windows_with_MSVC_2010]] |
− | == Dependencies ==
| |
| | | |
− | ;[http://tortoisesvn.tigris.org/ TortoiseSVN] (Subversion for Windows)
| + | There are also [[Compiling_on_Linux_and_Mac_OS_X|instructions for Linux and Mac OS X]] available. |
− | ;[http://www.cmake.org CMake] (>=2.6.0)
| |
− | ;[[#Building Qt4|Qt4]] (>=4.4.0)
| |
− | ;[[#Building Eigen 2|Eigen]]
| |
− | ;[http://www.boostpro.com/products/free Boost libraries] (>=1.36.0)
| |
− | ;[[#Building OpenBabel 2|OpenBabel]]
| |
− | ;[http://code.google.com/p/msysgit/ msysgit] (Git for Windows, optional)
| |
− | | |
− | === Building Qt4 ===
| |
− | | |
− | Follow the instructions for [http://wiki.qtcentre.org/index.php?title=Qt4_with_Visual_Studio Qt4 with Visual Studio]. Extract and build Qt4 in the <code>c:\qt\<version></code> directory (eg. <code>c:\qt\4.4.3</code> for version 4.4.3).
| |
− | | |
− | === Building Eigen ===
| |
− | | |
− | There is no need to build Eigen since it's a template library consisting of headers. We simply extract the files to <nowiki>c:\eigen2</nowiki>.
| |
− | | |
− | #Checkout Eigen trunk <code>svn://anonsvn.kde.org/home/kde/trunk/kdesupport/eigen2</code> to the <nowiki>c:\eigen2</nowiki> directory.
| |
− | | |
− | You should now have the Eigen headers in <code>c:\eigen2\Eigen</code>
| |
− | | |
− | === Building OpenBabel ===
| |
− | | |
− | #Checkout OpenBabel trunk <code>https://openbabel.svn.sourceforge.net/svnroot/openbabel/openbabel/trunk</code> to the <nowiki>c:\openbabel</nowiki> directory.
| |
− | | |
− | ==== Running cmake ====
| |
− | ===== Using the Visual Studio 2008 Command Prompt =====
| |
− | | |
− | Since we are using cmake 2.6, the installed [http://www.boostpro.com/products/free boost libraries] will be found automatically.
| |
− | | |
− | cd c:\openbabel
| |
− | mkdir build
| |
− | cd build
| |
− | cmake -DZLIB_INCLUDE_DIR=c:\openbabel\include -DZLIB_LIBRARY=c:\openbabel\windows-vc2005\zlib1.lib
| |
− | -DLIBXML2_INCLUDE_DIR=c:\openbabel\include -DLIBXML2_LIBRARIES=c:\openbabel\windows-vc2005\libxml2.lib ..
| |
− | | |
− | ===== Using the CMake graphical user interface =====
| |
− | | |
− | # Open the CMake GUI: Start > All programs > CMake 2.6 > cmake-gui(beta)
| |
− | # Set the "Where is the source code" field to <code>c:/openbabel</code>
| |
− | # Set the "Where to build the binaries" field to <code>c:/openbabel/build</code>
| |
− | # Press the "Configure" button
| |
− | # Set the combo box (on the right of the search field) to "Grouped View"
| |
− | # Edit the ZLIB and LIBXML2 fields so they resemble the screenshot
| |
− | | |
− | == Building Avogadro ==
| |
− | | |
− | #Download Avogadro trunk from <code>http://github.com/cryos/avogadro/zipball/master</code> and uncompress it to the <nowiki>c:\avogadro</nowiki> directory.
| |
− | #Open the Visual Studio 2005 Command Prompt.
| |
− | #Create the Avogadro vs2005 solution:
| |
− | #:<code>set PATH=%PATH%;c:\qt4\<version>\bin</code>
| |
− | #:<code>cd c:\avogadro</code>
| |
− | #:<code>mkdir build</code>
| |
− | #:<code>cd build</code>
| |
− | #:<code>..\scripts\cmake-vs2005.bat</code>
| |
− | #Select the '''Release''' solution configuration.
| |
− | #Open the Avogadro vs2005 solution <code>c:\avogadro\build\avogadro.sln</code>
| |
− | # Add '''obconv.lib''' to the ''Additional Dependencies'' of the '''avogadro-app''' target (Right click->Properties->Linker->Input)
| |
− | # Add '''obconv.lib''' to the ''Additional Dependencies'' of the '''animationextension''' target
| |
− | # Add '''obfprt.lib oberror.lib''' to the ''Additional Dependencies'' of the '''autoopttool''' target
| |
− | # Add '''obfprt.lib obconv.lib''' to the ''Additional Dependencies'' of the '''drawtool''' target
| |
− | # Add '''obfprt.lib oberror.lib''' to the ''Additional Dependencies'' of the '''forcefieldextension''' target
| |
− | # Add '''obconv.lib''' to the ''Additional Dependencies'' of the '''gamessextension''' target
| |
− | #Select all the targets except: '''ALL_BUILD''', '''avogadro-app''', '''INSTALL''', '''uninstall''', '''update-translations''', '''ZERO_CHECK'''.
| |
− | #Disabled Embed Manifest (Right Click->Properties->Manifest Tool->Input and Output, set ''Embed Manifest'' to '''No''', Click OK). Embed Manifest causes plugins to no properly load on older versions of Windows.
| |
− | #Build the Solution
| |
− | | |
− | == Running Avogadro ==
| |
− | | |
− | Currently this is tricky. I have not found an easy way to make this work real nice. The problem is that all the DLLs (and OpenBabel's .obf files) are all over the place and I'm not good enough at vs2005 to know how to specify these additional paths. The way I do it is by copying all the dll files to the <code>c:\avogadro\build\avogadro\src\release</code> directory and run <code>avogadro.exe</code> from there.
| |
− | | |
− | == Building the Installer ==
| |
− | ''Requires [http://nsis.sourceforge.net/ NSIS] (nullsoft scriptable install system)''
| |
− | | |
− | #Place all files (including plugins, dependencies [Qt4 | OpenBabel], etc.) in scripts\installer\dist
| |
− | #Right Click <code>setup.nsi</code> and choose '''Compile NSIS Script'''
| |
| | | |
− | This will create the AvogadroSetup.exe file.
| + | [[Category:Developer]] |
These instructions are to allow users to build Avogadro from the very latest code. Be aware that Avogadro may fail to build or work properly at any given time when built from the instructions below.