Obsolete instruction for building BornAgain installer with MSVC2015 CE (with prebuild binaries) » History » Version 26

« Previous - Version 26/28 (diff) - Next » - Current version
herck, 31 Jan 2017 11:05


Instruction for building BornAgain installer with MSVC2015 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

For both 32 and 64 bit:

Install MSVC 2015 Community Edition
  • Download online installer and run it

If it complains with "The specified program requires a newer version of Windows.", use the following recipe

Right click (on the installer) -> Properties -> Compatibility -> Uncheck "Run this program in compatibility mode for" for all users

See http://stackoverflow.com/questions/34076414/installing-visual-studio-community-2015-on-windows-7-sp1

Install cmake

by running cmake-3.2.3-win32-x86.exe
select option "add cmake to the system PATH for all users"

Install NSIS

version NSIS 3.0b1

Install Qt5.6
  • Use online installer

Select 5.6 and msvc2015 32-bit and msvc2015 64-bit
<QTINSTALLDIR> hereafter will refer to the location of the Qt installation: default is C:\Qt\5.6

Install Python
  • Install Anaconda Python 2.7 32bit

from http://continuum.io/downloads
For all users, into a directory of choice: <PYTHON2_32>
let it modify PATH

  • Install Anaconda Python 2.7 64bit

from http://continuum.io/downloads
For all users, into a directory of choice: <PYTHON2_64>
let it modify PATH

Unpack libraries and headers
  • Download local_x86.zip and local_x64.zip from this page
  • Unzip both in C:\opt

For 32 bit build:

Build BornAgain for MSVC 2015
  • Open VS2015 x86 Native Tools Command Prompt
  • Change to build directory (in same parent folder as BornAgain source)
  • Set environment variables

set QTDIR=<QTINSTALLDIR>\msvc2015
set PATH=<QTINSTALLDIR>\msvc2015\bin;C:\opt\local_x86\lib;<PYTHON2_32>;<PYTHON2_32>\Scripts;<PYTHON2_32>\Library\bin;%PATH%

  • Run cmake and build

cmake -G "Visual Studio 14 2015" -DCMAKE_INCLUDE_PATH=C:/opt/local_x86/include -DCMAKE_LIBRARY_PATH=C:/opt/local_x86/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

For 64 bit build:

Build BornAgain for MSVC 2015
  • Open VS2015 x64 Native Tools Command Prompt
  • Change to build directory (in same parent folder as BornAgain source)
  • Set environment variables

set QTDIR=<QTINSTALLDIR>\msvc2015_64
set PATH=<QTINSTALLDIR>\msvc2015_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 14 2015 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_x86.zip (25.9 MB) herck, 13 Oct 2017 16:02

local_x64.zip (27.2 MB) herck, 13 Oct 2017 16:02