Windows build » History » Version 17

pospelov, 05 Sep 2013 11:16

1 1 herck
h1. Windows build
2 1 herck
3 9 pospelov
Experimental compilation under Windows using Mingw or Microsoft Visual Studio.
4 6 pospelov
To be updated.
5 1 herck
6 13 pospelov
7 6 pospelov
h5. Install packages for happier life
8 1 herck
9 6 pospelov
* Atlassian SourceTree (v0.9.2.3) 
10 6 pospelov
> https://www.atlassian.com/software/sourcetree/overview
11 6 pospelov
* Kate from KDE 
12 6 pospelov
> http://download.kde.org/stable/kdewin/installer/kdewin-installer-gui-latest.exe.mirrorlist 
13 1 herck
* far manager
14 1 herck
> http://www.farmanager.com/download.php?l=en
15 9 pospelov
* WinSCP
16 9 pospelov
> http://winscp.net/eng/index.php
17 9 pospelov
18 14 pospelov
First assure compilation of MinGW, then switch to Visual Studio recipe
19 9 pospelov
20 9 pospelov
h2. Mingw build
21 9 pospelov
22 6 pospelov
h5. Install Qt, cmake
23 1 herck
24 6 pospelov
* Install Qt 5.1.0, MinGW is part of this installer
25 6 pospelov
> http://qt-project.org/downloads
26 1 herck
27 1 herck
* install cmake
28 1 herck
> http://www.cmake.org/cmake/resources/software.html by running cmake-2.8.11.2-win32-x86.exe
29 10 pospelov
30 16 pospelov
h5. Install Python and Co
31 16 pospelov
32 16 pospelov
* Install Python
33 16 pospelov
> install through http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi into C:/Python27
34 16 pospelov
35 16 pospelov
* install numpy 
36 16 pospelov
> from unofficial http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy   by running   numpy-unoptimized-1.7.1.win32-py2.7.‌exe
37 16 pospelov
38 16 pospelov
* install matplotlib 
39 16 pospelov
> from http://matplotlib.org/downloads.html  by running matplotlib-1.2.1.win32-py2.7.exe
40 16 pospelov
41 16 pospelov
> (alternative install Anaconda pack (python + mingw + numpy) from http://continuum.io/downloads ) Not checked!
42 16 pospelov
43 16 pospelov
h5. %PATH%
44 16 pospelov
45 16 pospelov
* Add to PATH C:\Qt\Tools\mingw48_32\bin;C:\Qt\Tools\mingw48_32\lib;C:\Qt\5.1.0\mingw48_32\bin;C:\Qt\Tools\QtCreator\bin
46 16 pospelov
47 16 pospelov
48 10 pospelov
h5. Comment about installation of additional libraries
49 11 pospelov
> All further installations should end up in C:\opt\local
50 1 herck
51 6 pospelov
h5. Install gsl, fftw3
52 6 pospelov
53 6 pospelov
* Install gsl 
54 1 herck
> using corresponding gnuwin32 setup file from http://gnuwin32.sourceforge.net/packages.html
55 12 pospelov
> copy "C:\Program Files (x86)\GnuWin32\include\gsl"  to "C:\opt\local\include\gsl"
56 12 pospelov
> copy libgsl.dll and libgslcblas.dll  from "C:\Program Files (x86)\GnuWin32\bin" to "C:\opt\local\lib"
57 1 herck
58 6 pospelov
* Install fftw3 
59 12 pospelov
> from http://www.fftw.org/install/windows.html download  fftw-3.3.3-dll32.zip
60 12 pospelov
> unpack archive somewhere
61 6 pospelov
> copy fftw3.h to C:\opt\local\include
62 6 pospelov
> copy libfftw3-3.dll and libfftw3-3.def to C:\opt\local\lib
63 6 pospelov
64 15 pospelov
h5. install BOOST
65 15 pospelov
66 6 pospelov
* install zlib and bzip2
67 6 pospelov
> from http://www.zlib.net/ into C:/opt/local/source/zlib-1.2.8
68 6 pospelov
> from http://www.bzip.org/downloads.html into C:/opt/local/source/bzip2-1.0.6
69 6 pospelov
>> Patch bzip2 installation (necessary for MSVC build later)
70 6 pospelov
>> Namely delete first line ("LIBRARY   LIBBZ2") from file libbz2.def
71 6 pospelov
>> This will remove unnecessary dependency from external bzip2 during MSVC boost compilation
72 6 pospelov
73 6 pospelov
74 6 pospelov
* Download and compile boost_1_54_0 
75 6 pospelov
> from http://sourceforge.net/projects/boost/files/boost/1.54.0/ and unpack
76 6 pospelov
> cd <BOOSTDIR>
77 6 pospelov
> bootstrap.bat mingw
78 6 pospelov
> b2 install --prefix=c:/opt/local toolset=gcc -sBZIP2_SOURCE="C:\opt\local\source\bzip2-1.0.6"   -sZLIB_SOURCE="C:\opt\local\source\zlib-1.2.8" address-model=32 variant=release link=static,shared threading=single,multi
79 6 pospelov
> Move c:/opt/local/include/boost_1.54/boost directory into c:/opt/local/include/boost
80 6 pospelov
81 6 pospelov
82 6 pospelov
h5. %PATH%
83 1 herck
84 17 pospelov
* Add c:\home\pospelov\development\git\BornAgain\lib;c:\opt\local\lib to PATH
85 17 pospelov
86 6 pospelov
87 6 pospelov
h5. Where we are?
88 6 pospelov
89 6 pospelov
* At this point Qt creator should work (except App and GUI)
90 6 pospelov
91 6 pospelov
* At this point cmake should work too
92 8 pospelov
> cmake -G "MinGW Makefiles"  ../BornAgain