]> granicus.if.org Git - icinga2/blob - BUILD_WINDOWS.md
Merge pull request #6373 from Icinga/fix/docs-default-command-imports
[icinga2] / BUILD_WINDOWS.md
1 # Build Icinga 2 on Windows
2
3 The Icinga Project is providing Windows MSI packages under https://packages.icinga.com/windows/
4
5 > **Note:**
6 > This is a developer documentation on how to build Icinga 2 on Windows!
7
8 Also see [INSTALL.md](INSTALL.md) for Linux build instructions.
9
10 ## Requirements
11
12 * 32 or 64-bit system
13 * Visual Studio >= 14 2015
14 * CMake >= 2.6
15 * OpenSSL >= 1.0.1
16 * Flex and Bison
17
18 ## Install Requirements
19
20 **Visual Studio**
21
22 Download from [visualstudio.com](https://www.visualstudio.com/en/downloads/)
23
24 The Community Edition is available for free, and is what we use to build.
25
26 Workloads to install:
27 * C++ Desktop
28 * .NET Desktop
29
30 **OpenSSL for Icinga**
31
32 See our [openssl-windows GitHub project](https://github.com/Icinga/openssl-windows).
33
34 You will need to install a binary dist version to 'C:\\Program Files\\OpenSSL'.
35
36 There is a Powershell script to help you downloading: `.\tools\win32\download-openssl.ps1`
37
38 **Chocolatey**
39
40 A simple package manager for Windows, please see [install instructions](https://chocolatey.org/install).
41
42 **Git**
43
44 Best to use Chocolatey, see [package details](https://chocolatey.org/packages/git).
45
46 ```
47 choco install git
48 ```
49
50 **Flex / Bison**
51
52 Best to use Chocolatey, see [package details](https://chocolatey.org/packages/winflexbison3).
53
54 ```
55 choco install winflexbison3
56 ```
57
58 **CMake**
59
60 Best to use Chocolatey, see [package details](https://chocolatey.org/packages/cmake)
61 or download from: [cmake.org](https://cmake.org/download/)
62
63 ```
64 choco install cmake
65 ```
66
67 **WIX**
68
69 Best to use Chocolatey, see [package details](https://chocolatey.org/packages/wixtoolset).
70
71 ```
72 choco install wixtoolset
73 ```
74
75 **Boost**
76
77 Download third party Windows binaries from: [boost.org](http://www.boost.org/users/download/)
78
79 For example: `https://dl.bintray.com/boostorg/release/1.65.1/binaries/boost_1_65_1-msvc-14.1-64.exe`
80
81 *Warnings:*
82 * Must match your Visual Studio version!
83 * CMake might not support the latest Boost version (we used CMake 3.10 and Boost 1_65_1)
84
85 Run the installer exe.
86
87 ## Build Icinga 2
88
89 Run with VC Native x64 Command Prompt:
90
91 ```
92 powershell .\tools\win32\configure.ps1
93 powershell .\tools\win32\build.ps1
94 powershell .\tools\win32\test.ps1
95 ```
96
97 See these scripts for details.
98
99 ## AppVeyor
100
101 We are building [Icinga 2 with AppVeyor](https://ci.appveyor.com/project/icinga/icinga2) for testing and CI integration.
102
103 Please check `appveyor.yml` for our instructions.