Updated Build and Deployment (markdown)

master
Martin Polanka 9 years ago
parent 19f48652c0
commit f36a174583

@ -146,28 +146,27 @@ _**TODO**_
## Windows Worker
From beginning we are determined to support Windows operating system on which some of the workers may run (especially for projects in C# programming language). Support for Windows is quite hard and time consuming and there were several problems during this. To ensure capability of compilation on Windows we set up CI for Windows named [Appveyor](http://www.appveyor.com/). However installation should be easy due to Visual Studio NuGet package manager.
There are only two dependencies needed. **Windows 7 and higher** and **Visual Studio 2015**. Visual Studio itself contains all features needed for compilation. All dependencies as libraries and such are either installed through NuGet package manager or are managed as submodules in git repository.
**Installation Pipeline:**
* Download git repository of **worker**
* Initialize and download all git submodules
* Run cmake in default directory of repository with at least VS 2015
```
cmake -G "Visual Studio 14 2015"
```
* When cmake does its job open generated solution file in VS 2015+
* For entire solution add these NuGet packages:
* boost
* boost_system-vc140
* boost_filesystem-vc140
* boost_program_options-vc140
* rmt_curl
* fix8.dependencies.zmq
* Build ALL_BUILD target
* Download certificate bundle for libcurl ([here](http://curl.haxx.se/ca/cacert.pem)) and copy it to working directory
* Rename downloaded certificate bundle to "curl-ca-bundle.crt"
* Run tests with **ctest** program or whole worker with **recodex-worker.exe** binary
Installation binary can be created through cmake (cpack respectively), this is done by using [NSIS](http://nsis.sourceforge.net/), which have to be installed on machine. Installation package is then created by running **PACKAGE** target in VS solution.
There are only two additional dependencies needed, **Windows 7 and higher** and **Visual Studio 2015+**. Simple installation batch script is provided with worker which should do all the work on Windows machine. Officially only VS2015 and 32-bit compilation is supported, because of hardcoded compile options in installation script. If different VS is needed or different platform, script should be changed to appropriate values, it should be quite simple and straightforward.
Mentioned script is placed in *install* directory alongside supportive scripts for UNIX systems and is named *win-build.cmd*. Provided script will do almost all the work connected with building and dependency resolving (using **NuGet** package manager). Script should be run under 32-bit version of **Developer Command Prompt for VS2015** and from *install* directory.
Building and installing of worker is then quite simple, script has command line parameters which can be used to specify what will be done:
* *-build* - Don't have to be specified. Build worker and all its test, all is saved in *build* folder and subfolders.
* *-clean* - Cleanup of downloaded NuGet packages and built application/libraries.
* *-test* - Build worker and run tests on compiled test cases.
* *-package* - Clickable installation generation using cpack and NSIS. [NSIS](http://nsis.sourceforge.net/) have to be installed on machine to get this to work.
```
install> win-build.cmd # same as: win-build.cmd -build
install> win-build.cmd -clean
install> win-build.cmd -test
install> win-build.cmd -package
```
All build binaries and cmake temporary files can be found in *build* folder, classically there will be subfolder *Release* which will contain compiled application with all needed dlls. Once if clickable installation binary is created, it can be found in *build* folder named something like *recodex-worker-${VERSION}-win32.exe*.
**Clickable installation feature:**
![NSIS Installation](https://github.com/ReCodEx/GlobalWiki/blob/master/images/nsis_installation.png)
## WebApp

Loading…
Cancel
Save