Instruction for building BornAgain installer with Visual Studio 2017 CE (with prebuild binaries)¶
Install Visual Studio 2017 Community Edition¶
- Download online installer and run it
- Install latest cmake installer from http://www.cmake.org/download and run it
select option "add cmake to the system PATH for all users"
- Install latest NSIS from http://nsis.sourceforge.net/Download
version NSIS 3.05.1
Install latest Qt¶
- Use online installer
Select 5.14.1 and msvc2017 64-bit
Add to path c:\Qt\5.14.1\msvc2017_64\bin
Create environment variable QTDIR=C:\Qt\5.14.1\msvc2017_64
- Install Python 3.7 64bit from official web site
Make sure it is 64 bit. Default download is 32 bits!
During installation allow installer to add Python to PATH for all users
From command line in Windows shell "pip3 install numpy", "pip3 install matplotlib"
Unpack libraries and headers¶
- Download local_x64.zip from this page
- Unzip both in C:\opt
Build BornAgain with Visual Studio 2017¶
- Open "x64 Native Tools Command Prompt for VS 2017"
- Change to build directory (in same parent folder as BornAgain source)
- Run cmake and build
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INCLUDE_PATH=C:/opt/local_x64/include -DCMAKE_LIBRARY_PATH=C:/opt/local_x64/lib ../BornAgain
cmake --build . --config Release
Making binary installer¶
- After build is complete, installer is generated by running in the build directory the command
CPack -C Release