Instruction for building BornAgain installer with Visual Studio 2017 CE (with prebuild binaries) » History » Version 1

Version 1/6 - Next » - Current version
herck, 18 Oct 2017 16:16


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

Python version

The instructions in this wiki are for building with Python2. Do the following if Python3 is required:
  • Install Anaconda python3 in <PYTHON3_XX> path and use this path in the instructions instead of the <PYTHON2_XX> path.
  • Add -DBORNAGAIN_USE_PYTHON3=ON to the cmake command
Install Visual Studio 2017 Community Edition
  • Download online installer and run it
Install cmake

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

Install NSIS

version NSIS 3.02.1

Install Qt5.9.2
  • Use online installer

Select 5.9.2 and msvc2017 64-bit
Add to path c:\Qt\5.9.2\msvc2017_64\bin
Create environment variable QTDIR=C:\Qt\5.9.2\msvc2017_64

Install Python
  • Install Anaconda Python 2.7 64bit

from http://continuum.io/downloads
For all users, into C:\Anaconda (this path is hard coded in Core/CMakeLists.txt to pick up Python27.dll)
let it modify PATH

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)
  • Set environment variables

set QTDIR=<QTINSTALLDIR>\msvc2017_64
set PATH=<QTINSTALLDIR>\msvc2017_64\bin;C:\opt\local_x64\lib;<PYTHON2_64>;<PYTHON2_64>\Scripts;<PYTHON2_64>\Library\bin;%PATH%

  • Run cmake and build

cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_INCLUDE_PATH=C:/opt/local_x64/include -DCMAKE_LIBRARY_PATH=C:/opt/local_x64/lib ../BornAgain
cmake --build . --config Release
ctest

Making binary installer
  • After build is complete, installer is generated by running in the build directory the command

CPack -C Release

local_x64.zip (31.1 MB) herck, 18 Oct 2017 16:24

bornagaindeps_v1.zip - 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