Windows build » History » Version 69

pospelov, 16 Jul 2015 10:50

1 1 herck
h1. Windows build
2 1 herck
3 61 pospelov
4 1 herck
BornAgain compilation under Windows using Microsoft Visual Studio 2013.
5 68 pospelov
> see also [[Obsolete instruction for MSVC2012]]
6 1 herck
7 1 herck
8 68 pospelov
9 69 pospelov
10 68 pospelov
h1. To install x86
11 68 pospelov
12 63 pospelov
h5. Install VS.NET2013
13 47 pospelov
14 47 pospelov
* Install Visual Studio using our VS.NET2012 package
15 66 pospelov
> Download and install Microsoft Visual Studio 2013 Language Pack from http://www.microsoft.com/en-US/download/details.aspx?id=40783
16 66 pospelov
> Set English in Tools -> Optionen -> Internationale
17 67 pospelov
18 67 pospelov
19 67 pospelov
h5. Install cmake
20 67 pospelov
21 67 pospelov
* Install cmake from http://www.cmake.org/download 
22 67 pospelov
> by running cmake-3.2.3-win32-x86.exe
23 67 pospelov
> select option "add cmake to the system PATH for all users"
24 67 pospelov
25 67 pospelov
26 67 pospelov
h5. Install NSIS
27 67 pospelov
28 67 pospelov
* Install NSIS from http://nsis.sourceforge.net/Download 
29 1 herck
> version NSIS 3.0b1
30 67 pospelov
31 68 pospelov
h5. Install Qt5.5
32 1 herck
33 68 pospelov
* Use online installer
34 68 pospelov
> Deselect 5.4, select 5.5 and msvc2013 32-bit and msvc2013 64-bit
35 68 pospelov
> Add to path c:\Qt\5.5\msvc2013\bin
36 69 pospelov
> Create environment variable QTDIR=C:\Qt\5.5\msvc2013
37 68 pospelov
38 67 pospelov
h5. Create directory C:\opt\local_x86
39 67 pospelov
> C:\opt\local_x86\include
40 67 pospelov
> C:\opt\local_x86\lib
41 67 pospelov
42 67 pospelov
43 67 pospelov
h5. Install boost
44 67 pospelov
45 67 pospelov
* Install boost from http://sourceforge.net/projects/boost/files/boost-binaries
46 67 pospelov
> by running boost_1_58_0-msvc-12.0-32.exe
47 67 pospelov
> Install in the temporary directory C:\temp\boost_1_58_0
48 67 pospelov
> Copy content of the directory C:\temp\boost_1_58_0\lib32-msvc-12.0\* in the C:\opt\local_x86\lib\.
49 67 pospelov
> Copy whole directory C:\temp\boost_1_58_0\boost into C:\opt\local_x86\include\.
50 67 pospelov
51 67 pospelov
52 67 pospelov
h5. Install fftw3
53 67 pospelov
54 67 pospelov
* Install fftw3 from http://www.fftw.org/install/windows.html
55 67 pospelov
> download  fftw-3.3.4-dll32.zip and unpack into temporary directory C:\temp\fftw3
56 67 pospelov
> generate lib file
57 67 pospelov
>> open "VS2013 x86 Native Tools Command Prompt" from Windows menu All Programs/Microsoft Visual Studio 2013/Tools
58 67 pospelov
>> cd C:\temp\fftw3
59 67 pospelov
>> lib /def:libfftw3-3.def
60 67 pospelov
61 67 pospelov
> copy c:\temp\fftw3\fftw3.h to C:\opt\local_x86\include\.
62 67 pospelov
> copy c:\temp\fftw3\libfftw3-3.lib to C:\opt\local_x86\lib\.
63 1 herck
> copy c:\temp\fftw3\libfftw3-3.def to C:\opt\local_x86\lib\.
64 1 herck
> copy c:\temp\fftw3\libfftw3-3.dll to C:\opt\local_x86\lib\.
65 68 pospelov
66 68 pospelov
h5. Install GSL
67 68 pospelov
68 68 pospelov
* All previous recepies disappeared from internet
69 68 pospelov
* Found out that one
70 68 pospelov
> Download gsl-1.16_winbin.zip from https://azylstra.net/blog/post/building-gsl-on-windows
71 68 pospelov
> Unpack to C:\temp\gsl-1.16
72 68 pospelov
> Copy directory C:\temp\gsl-1.16\gsl\x86\include\gsl to  C:\opt\local_x86\include\.
73 68 pospelov
> Copy content C:\temp\gsl-1.16\gsl\x86\lib\* to  C:\opt\local_x86\lib\.
74 68 pospelov
75 68 pospelov
h5. PATH
76 68 pospelov
77 68 pospelov
* Add c:\opt\local_x86\lib to PATH
78 68 pospelov
79 69 pospelov
h5. Generate project file for MSVS 2013
80 1 herck
81 69 pospelov
* Change to build directory
82 69 pospelov
> C:\development\build-x86
83 69 pospelov
> cmake -G "Visual Studio 122" -DCMAKE_INCLUDE_PATH=C:/opt/local_x86/include -DCMAKE_LIBRARY_PATH=C:/opt/local_x86/lib ../BornAgain
84 69 pospelov
* When open BornAgain.sln in Microsoft Visual Studio, select Release/32bit build type. Build project.
85 69 pospelov
86 69 pospelov
h5. Making binary installer
87 69 pospelov
88 69 pospelov
* After build is complete, installer is generated by running in the build directory the command
89 69 pospelov
> CPack -C Release
90 69 pospelov
91 69 pospelov
92 69 pospelov
h2. Useful programs
93 69 pospelov
94 69 pospelov
* FarManager together with Conemy helps to work in console, for example it gives possibility to scroll long output
95 69 pospelov
> Install FarManager from http://www.farmanager.com/download.php?l=en
96 69 pospelov
> Install conemy http://conemu.github.io/