|
|
(31 intermediate revisions by 5 users not shown) |
Line 1: |
Line 1: |
− | = Windows Visual Studio 2005 =
| + | 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 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 2005 instructions that may or may not work.
| |
− | == Dependencies ==
| |
| | | |
− | ;[http://tortoisesvn.tigris.org/ TortoiseSVN] (SVN for Windows) | + | ;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. |
− | ;[http://www.cmake.org CMake] (>=2.4.8)
| |
− | ;[[#Building Qt4|Qt4]] (>=4.3.4)
| |
− | ;[[#Building Eigen 2|Eigen]]
| |
− | ;[[#Building OpenBabel 2|OpenBabel]]
| |
| | | |
− | === Building Qt4 ===
| + | * [[Compiling_on_Windows_with_MSVC_2008]] |
| + | * [[Compiling_on_Windows_with_MSVC_2010]] |
| | | |
− | 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.3.2</code> for version 4.3.2).
| + | There are also [[Compiling_on_Linux_and_Mac_OS_X|instructions for Linux and Mac OS X]] available. |
| | | |
− | === Building Eigen ===
| + | [[Category:Developer]] |
− | | |
− | #Checkout Eigen trunk <code>svn://anonsvn.kde.org/home/kde/trunk/kdesupport/eigen</code> to the <nowiki>c:\eigen</nowiki> directory.
| |
− | #Open the Visual Studio 2005 Command Prompt.
| |
− | #Create the Eigen vs2005 solution:
| |
− | #:<code>cd c:\eigen</code>
| |
− | #:<code>mkdir build</code>
| |
− | #:<code>cd build</code>
| |
− | #:<code>cmake -G "Visual Studio 8 2005" -DCMAKE_INSTALL_PREFIX=c:\eigen ..</code>
| |
− | #Open the Eigen vs2005 solution <code>c:\eigen\build\eigen.sln</code>
| |
− | #Build the '''INSTALL''' target explicitly.
| |
− | | |
− | You should now have the Eigen headers in <code>c:\eigen\include\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.
| |
− | #Open the OpenBabel vs2005 solution <code>c:\openbabel\windows-vc2005\openbabelOBF.sln</code>
| |
− | #Build all the targets except '''FastSearch''', '''OBConsole''', '''OBCSharp''', '''OBGUI''', '''OBJava''' and '''OBPythonOBF''' (grab some coffee this can take a while).
| |
− | | |
− | == Building Avogadro ==
| |
− | | |
− | #Checkout Avogadro trunk <code>https://avogadro.svn.sourceforge.net/svnroot/avogadro/trunk</code> 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.
| |
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.