Instruction for building BornAgain installer with Visual Studio 2017 CE (with prebuild binaries)

Python version

Install Visual Studio 2017 Community Edition
Install cmake

select option "add cmake to the system PATH for all users"

Install NSIS

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
  • 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 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 (31.1 MB) herck, 18 Oct 2017 16:24 - fftw, libtiff, libgsl, 12.11.2018 (7.06 MB) pospelov, 13 Nov 2018 11:52

BornAgain-1.16.99-python3.8-win64.exe (23.6 MB) pospelov, 08 Jun 2020 16:45