==============
2. I re-built Botan-1.11 by following command:
C:\KAA_APP\thirdparty\archive\Botan-1.11.28>
python configure.py --cc=msvc --cpu=i386 && nmake install
and found all heares in
C:\KAA_APP\thirdparty\archive\Botan-1.11.28\build
So this line should be fixed. I will create the bug on this item on Kaa JIRA (on Monday). By the way, your are free to open new feature stories and bugs as well by yourself.
==============
Now this documentation is part of the
Linux page, but in the future it will be better to create a separate page to describe C++ SDK build options.
==============
MY STORY
Let me tell you my story of building Kaa C++ SDK on Windows. Maybe some steps would be helpful for you.
First of all, I didn't use build_sdk_thirdparty.bat. I only pick out commads for building Avro and Botan libraries.
Why? Because I wanted to create my custom third-parties storage. See "Artifacts location" for details.
==================
Artifacts location
==================
The result what I wanted to achive after building all Kaa C++ SDK third-parties is to separate debug and release headers/libraries.
So I created two directories:
C:\KAA_APP\thirdparty\install\debug
C:\KAA_APP\thirdparty\install\release
Each of these directories has the following structure:
bin\
include\
lib\
Also I
created several environment variables to have easy access to these
'release' and
'debug' directories.
Name: KAA_APP_THIRDPARTY_HOME
Value: C:\KAA_APP\thirdparty\install
Name: KAA_APP_THIRDPARTY_DEBUG
Value: %KAA_APP_THIRDPARTY_HOME%\debug
Name: KAA_APP_THIRDPARTY_RELEASE
Value: %KAA_APP_THIRDPARTY_HOME%\release
==================
env.bat script
==================
As I wanted to use both release and debug versions of libraries, I need ability to switch between these modes.
So I created two
env.bat script - both for
release and
debug modes and put it to
%KAA_APP_THIRDPARTY_HOME%See the attachments.
Each time I need something to re-build, I
open new console window and run the following:
Relese:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" && cd %KAA_APP_THIRDPARTY_HOME% && release.bat
Debug:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"&& cd %KAA_APP_THIRDPARTY_HOME% && debug.bat
In that way I have no conflicts with libraries' versions.
==================
Build tools
==================
==================
Building artifacts
==================
All downloaded Kaa C++ SDK third-party I saved to the C:\KAA_APP\thirdparty\archive directory and unpack them manually through GUI 7-Zip Manager.
Boost 1.60
I downloaded a pre-built package from here and installed it to C:\KAA_APP\thirdparty\archive.
Then I manually copied Boost headers directory (C:\KAA_APP\thirdparty\archive\boost_1_60_0\boost) to %KAA_APP_THIRDPARTY_DEBUG%\include and %KAA_APP_THIRDPARTY_RELEASE%\include.
Also I manually copied all libraries with -gd- suffix from C:\JBTC\agent-thirdparty\archive\boost_1_60_0\lib32-msvc-14.0 to %KAA_APP_THIRDPARTY_DEBUG%\lib and non-gd libraries to %KAA_APP_THIRDPARTY_DEBUG%\lib
Avro 1.7.5
Instead of using all-languages source package, I prefer to use only C++ assembly.
So I unpack this archive and run the following commads from the Avro root directory::
Release:
mkdir build_release && cd build_release
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=%KAA_APP_THIRDPARTY_RELEASE% -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
nmake install
Debug:
mkdir build_debug && cd build_debug
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=%KAA_APP_THIRDPARTY_DEBUG% -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug
nmake install
Botan 1.11
Unpack a downloaded archive and run the following commads from the Botan root directory:
Release:
python configure.py --cc=msvc --cpu=i386 --prefix=%KAA_APP_THIRDPARTY_RELEASE%
nmake install
Debug:
python configure.py --cc=msvc --cpu=i386 --prefix=%KAA_APP_THIRDPARTY_DEBUG% --with-debug-info --no-optimizations
nmake install
Note: Each time I need to re-build Botan, I removed the old directory and re-unpack the downloaded archive ( but I think it is paranoia :) )
==================
Kaa
==================
Unpack C++ SDK archive and run the following commads a from SDK root directory:
Release:
mkdir build_release && cd build_release
cmake -G "NMake Makefiles" -DKAA_DEBUG_ENABLED=0 -DCMAKE_INSTALL_PREFIX=%KAA_APP_THIRDPARTY_RELEASE% ..
nmake install
Debug:
mkdir build_debug && cd build_debug
cmake -G "NMake Makefiles" -DKAA_DEBUG_ENABLED=1 -DCMAKE_INSTALL_PREFIX=%KAA_APP_THIRDPARTY_DEBUG% ..
nmake install
==================
Results
==================
After all this, I have the following
--- %KAA_APP_THIRDPARTY_RELEASE%
------ bin
----------- avrogencpp.exe
----------- .....
------ docs
----------- .....
------ include
----------- avro
----------- boost
----------- botan
----------- kaa
------ lib
----------- avrocpp.dll
----------- avrocpp.lib
----------- libboost....lib
----------- boost....lib
----------- boost....dll
----------- botan.dll
----------- botan.lib
----------- kaacpp_s.lib
----------- kaacpp.dll
------ ssl
--- %KAA_APP_THIRDPARTY_DEBUG%
----------- The same as in %KAA_APP_THIRDPARTY_RELEASE% except Boost libraries will have -gd suffix in theirs names.
Sorry for inconvenience and I hope this helps :)
Best regards,
Denis