mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
commit
6dfc21f9bd
@ -477,18 +477,18 @@ File Type: EXECUTABLE IMAGE
|
|||||||
|
|
||||||
Image has the following dependencies:
|
Image has the following dependencies:
|
||||||
|
|
||||||
boost_coroutine-vc142-mt-gd-x64-1_80.dll
|
boost_coroutine-vc142-mt-gd-x64-1_81.dll
|
||||||
boost_date_time-vc142-mt-gd-x64-1_80.dll
|
boost_date_time-vc142-mt-gd-x64-1_81.dll
|
||||||
boost_filesystem-vc142-mt-gd-x64-1_80.dll
|
boost_filesystem-vc142-mt-gd-x64-1_81.dll
|
||||||
boost_thread-vc142-mt-gd-x64-1_80.dll
|
boost_thread-vc142-mt-gd-x64-1_81.dll
|
||||||
boost_regex-vc142-mt-gd-x64-1_80.dll
|
boost_regex-vc142-mt-gd-x64-1_81.dll
|
||||||
libssl-1_1-x64.dll
|
libssl-1_1-x64.dll
|
||||||
libcrypto-1_1-x64.dll
|
libcrypto-1_1-x64.dll
|
||||||
WS2_32.dll
|
WS2_32.dll
|
||||||
dbghelp.dll
|
dbghelp.dll
|
||||||
SHLWAPI.dll
|
SHLWAPI.dll
|
||||||
msi.dll
|
msi.dll
|
||||||
boost_unit_test_framework-vc142-mt-gd-x64-1_80.dll
|
boost_unit_test_framework-vc142-mt-gd-x64-1_81.dll
|
||||||
KERNEL32.dll
|
KERNEL32.dll
|
||||||
SHELL32.dll
|
SHELL32.dll
|
||||||
ADVAPI32.dll
|
ADVAPI32.dll
|
||||||
@ -1763,7 +1763,7 @@ mkdir build
|
|||||||
cd .\build\
|
cd .\build\
|
||||||
|
|
||||||
& "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" `
|
& "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" `
|
||||||
-DBoost_INCLUDE_DIR=C:\local\boost_1_80_0-Win64 `
|
-DBoost_INCLUDE_DIR=C:\local\boost_1_81_0-Win64 `
|
||||||
-DBISON_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe `
|
-DBISON_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe `
|
||||||
-DFLEX_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_flex.exe `
|
-DFLEX_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_flex.exe `
|
||||||
-DICINGA2_WITH_MYSQL=OFF -DICINGA2_WITH_PGSQL=OFF -DICINGA2_UNITY_BUILD=OFF ..
|
-DICINGA2_WITH_MYSQL=OFF -DICINGA2_WITH_PGSQL=OFF -DICINGA2_UNITY_BUILD=OFF ..
|
||||||
@ -1936,16 +1936,16 @@ Download the [boost-binaries](https://sourceforge.net/projects/boost/files/boost
|
|||||||
- 64 for 64 bit builds
|
- 64 for 64 bit builds
|
||||||
|
|
||||||
```
|
```
|
||||||
https://sourceforge.net/projects/boost/files/boost-binaries/1.80.0/boost_1_80_0-msvc-14.2-64.exe/download
|
https://sourceforge.net/projects/boost/files/boost-binaries/1.81.0/boost_1_81_0-msvc-14.2-64.exe/download
|
||||||
```
|
```
|
||||||
|
|
||||||
Run the installer and leave the default installation path in `C:\local\boost_1_80_0`.
|
Run the installer and leave the default installation path in `C:\local\boost_1_81_0`.
|
||||||
|
|
||||||
|
|
||||||
##### Source & Compile
|
##### Source & Compile
|
||||||
|
|
||||||
In order to use the boost development header and library files you need to [download](https://www.boost.org/users/download/)
|
In order to use the boost development header and library files you need to [download](https://www.boost.org/users/download/)
|
||||||
Boost and then extract it to e.g. `C:\local\boost_1_80_0`.
|
Boost and then extract it to e.g. `C:\local\boost_1_81_0`.
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
>
|
>
|
||||||
@ -1953,12 +1953,12 @@ Boost and then extract it to e.g. `C:\local\boost_1_80_0`.
|
|||||||
> the archive contains more than 70k files.
|
> the archive contains more than 70k files.
|
||||||
|
|
||||||
In order to integrate Boost into Visual Studio, open the `Developer Command Prompt` from the start menu,
|
In order to integrate Boost into Visual Studio, open the `Developer Command Prompt` from the start menu,
|
||||||
and navigate to `C:\local\boost_1_80_0`.
|
and navigate to `C:\local\boost_1_81_0`.
|
||||||
|
|
||||||
Execute `bootstrap.bat` first.
|
Execute `bootstrap.bat` first.
|
||||||
|
|
||||||
```
|
```
|
||||||
cd C:\local\boost_1_80_0
|
cd C:\local\boost_1_81_0
|
||||||
bootstrap.bat
|
bootstrap.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -2041,8 +2041,8 @@ You need to specify the previously installed component paths.
|
|||||||
|
|
||||||
Variable | Value | Description
|
Variable | Value | Description
|
||||||
----------------------|----------------------------------------------------------------------|-------------------------------------------------------
|
----------------------|----------------------------------------------------------------------|-------------------------------------------------------
|
||||||
`BOOST_ROOT` | `C:\local\boost_1_80_0` | Root path where you've extracted and compiled Boost.
|
`BOOST_ROOT` | `C:\local\boost_1_81_0` | Root path where you've extracted and compiled Boost.
|
||||||
`BOOST_LIBRARYDIR` | Binary: `C:\local\boost_1_80_0\lib64-msvc-14.2`, Source: `C:\local\boost_1_80_0\stage` | Path to the static compiled Boost libraries, directory must contain `lib`.
|
`BOOST_LIBRARYDIR` | Binary: `C:\local\boost_1_81_0\lib64-msvc-14.2`, Source: `C:\local\boost_1_81_0\stage` | Path to the static compiled Boost libraries, directory must contain `lib`.
|
||||||
`BISON_EXECUTABLE` | `C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe` | Path to the Bison executable.
|
`BISON_EXECUTABLE` | `C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe` | Path to the Bison executable.
|
||||||
`FLEX_EXECUTABLE` | `C:\ProgramData\chocolatey\lib\winflexbison\tools\win_flex.exe` | Path to the Flex executable.
|
`FLEX_EXECUTABLE` | `C:\ProgramData\chocolatey\lib\winflexbison\tools\win_flex.exe` | Path to the Flex executable.
|
||||||
`ICINGA2_WITH_MYSQL` | OFF | Requires extra setup for MySQL if set to `ON`. Not supported for client setups.
|
`ICINGA2_WITH_MYSQL` | OFF | Requires extra setup for MySQL if set to `ON`. Not supported for client setups.
|
||||||
@ -2079,8 +2079,8 @@ $env:ICINGA2_INSTALLPATH = 'C:\Program Files\Icinga2-debug'
|
|||||||
$env:ICINGA2_BUILDPATH='debug'
|
$env:ICINGA2_BUILDPATH='debug'
|
||||||
$env:CMAKE_BUILD_TYPE='Debug'
|
$env:CMAKE_BUILD_TYPE='Debug'
|
||||||
$env:OPENSSL_ROOT_DIR='C:\OpenSSL-Win64'
|
$env:OPENSSL_ROOT_DIR='C:\OpenSSL-Win64'
|
||||||
$env:BOOST_ROOT='C:\local\boost_1_80_0'
|
$env:BOOST_ROOT='C:\local\boost_1_81_0'
|
||||||
$env:BOOST_LIBRARYDIR='C:\local\boost_1_80_0\lib64-msvc-14.2'
|
$env:BOOST_LIBRARYDIR='C:\local\boost_1_81_0\lib64-msvc-14.2'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Icinga 2 in Visual Studio
|
#### Icinga 2 in Visual Studio
|
||||||
|
@ -13,7 +13,7 @@ function ThrowOnNativeFailure {
|
|||||||
|
|
||||||
$VsVersion = 2019
|
$VsVersion = 2019
|
||||||
$MsvcVersion = '14.2'
|
$MsvcVersion = '14.2'
|
||||||
$BoostVersion = @(1, 80, 0)
|
$BoostVersion = @(1, 81, 0)
|
||||||
$OpensslVersion = '1_1_1t'
|
$OpensslVersion = '1_1_1t'
|
||||||
|
|
||||||
switch ($Env:BITS) {
|
switch ($Env:BITS) {
|
||||||
|
@ -128,15 +128,15 @@ String::operator const std::string&() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Conversion function to boost::string_view.
|
* Conversion function to boost::beast::string_view.
|
||||||
*
|
*
|
||||||
* This allows using String as the value for HTTP headers in boost::beast::http::basic_fields::set.
|
* This allows using String as the value for HTTP headers in boost::beast::http::basic_fields::set.
|
||||||
*
|
*
|
||||||
* @return A boost::string_view representing this string.
|
* @return A boost::beast::string_view representing this string.
|
||||||
*/
|
*/
|
||||||
String::operator boost::string_view() const
|
String::operator boost::beast::string_view() const
|
||||||
{
|
{
|
||||||
return boost::string_view(m_Data);
|
return boost::beast::string_view(m_Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *String::CStr() const
|
const char *String::CStr() const
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "base/i2-base.hpp"
|
#include "base/i2-base.hpp"
|
||||||
#include "base/object.hpp"
|
#include "base/object.hpp"
|
||||||
|
#include <boost/beast/core.hpp>
|
||||||
#include <boost/range/iterator.hpp>
|
#include <boost/range/iterator.hpp>
|
||||||
#include <boost/utility/string_view.hpp>
|
#include <boost/utility/string_view.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@ -73,7 +74,7 @@ public:
|
|||||||
bool operator<(const String& rhs) const;
|
bool operator<(const String& rhs) const;
|
||||||
|
|
||||||
operator const std::string&() const;
|
operator const std::string&() const;
|
||||||
operator boost::string_view() const;
|
operator boost::beast::string_view() const;
|
||||||
|
|
||||||
const char *CStr() const;
|
const char *CStr() const;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ void HttpHandler::ProcessRequest(
|
|||||||
Dictionary::Ptr node = m_UrlTree;
|
Dictionary::Ptr node = m_UrlTree;
|
||||||
std::vector<HttpHandler::Ptr> handlers;
|
std::vector<HttpHandler::Ptr> handlers;
|
||||||
|
|
||||||
Url::Ptr url = new Url(request.target().to_string());
|
Url::Ptr url = new Url(std::string(request.target()));
|
||||||
auto& path (url->GetPath());
|
auto& path (url->GetPath());
|
||||||
|
|
||||||
for (std::vector<String>::size_type i = 0; i <= path.size(); i++) {
|
for (std::vector<String>::size_type i = 0; i <= path.size(); i++) {
|
||||||
|
@ -246,7 +246,7 @@ bool HandleAccessControl(
|
|||||||
if (!allowedOrigins.empty()) {
|
if (!allowedOrigins.empty()) {
|
||||||
auto& origin (request[http::field::origin]);
|
auto& origin (request[http::field::origin]);
|
||||||
|
|
||||||
if (allowedOrigins.find(origin.to_string()) != allowedOrigins.end()) {
|
if (allowedOrigins.find(std::string(origin)) != allowedOrigins.end()) {
|
||||||
response.set(http::field::access_control_allow_origin, origin);
|
response.set(http::field::access_control_allow_origin, origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,7 +536,7 @@ void HttpServerConnection::ProcessMessages(boost::asio::yield_context yc)
|
|||||||
if (!authenticatedUser) {
|
if (!authenticatedUser) {
|
||||||
CpuBoundWork fetchingAuthenticatedUser (yc);
|
CpuBoundWork fetchingAuthenticatedUser (yc);
|
||||||
|
|
||||||
authenticatedUser = ApiUser::GetByAuthHeader(request[http::field::authorization].to_string());
|
authenticatedUser = ApiUser::GetByAuthHeader(std::string(request[http::field::authorization]));
|
||||||
}
|
}
|
||||||
|
|
||||||
Log logMsg (LogInformation, "HttpServerConnection");
|
Log logMsg (LogInformation, "HttpServerConnection");
|
||||||
|
@ -31,10 +31,10 @@ if (-not (Test-Path env:OPENSSL_ROOT_DIR)) {
|
|||||||
$env:OPENSSL_ROOT_DIR = 'c:\local\OpenSSL-Win64'
|
$env:OPENSSL_ROOT_DIR = 'c:\local\OpenSSL-Win64'
|
||||||
}
|
}
|
||||||
if (-not (Test-Path env:BOOST_ROOT)) {
|
if (-not (Test-Path env:BOOST_ROOT)) {
|
||||||
$env:BOOST_ROOT = 'c:\local\boost_1_80_0'
|
$env:BOOST_ROOT = 'c:\local\boost_1_81_0'
|
||||||
}
|
}
|
||||||
if (-not (Test-Path env:BOOST_LIBRARYDIR)) {
|
if (-not (Test-Path env:BOOST_LIBRARYDIR)) {
|
||||||
$env:BOOST_LIBRARYDIR = 'c:\local\boost_1_80_0\lib64-msvc-14.2'
|
$env:BOOST_LIBRARYDIR = 'c:\local\boost_1_81_0\lib64-msvc-14.2'
|
||||||
}
|
}
|
||||||
if (-not (Test-Path env:FLEX_BINARY)) {
|
if (-not (Test-Path env:FLEX_BINARY)) {
|
||||||
$env:FLEX_BINARY = 'C:\ProgramData\chocolatey\bin\win_flex.exe'
|
$env:FLEX_BINARY = 'C:\ProgramData\chocolatey\bin\win_flex.exe'
|
||||||
|
@ -33,10 +33,10 @@ if (-not (Test-Path env:OPENSSL_ROOT_DIR)) {
|
|||||||
$env:OPENSSL_ROOT_DIR = "c:\local\OpenSSL_1_1_1t-Win${env:BITS}"
|
$env:OPENSSL_ROOT_DIR = "c:\local\OpenSSL_1_1_1t-Win${env:BITS}"
|
||||||
}
|
}
|
||||||
if (-not (Test-Path env:BOOST_ROOT)) {
|
if (-not (Test-Path env:BOOST_ROOT)) {
|
||||||
$env:BOOST_ROOT = "c:\local\boost_1_80_0-Win${env:BITS}"
|
$env:BOOST_ROOT = "c:\local\boost_1_81_0-Win${env:BITS}"
|
||||||
}
|
}
|
||||||
if (-not (Test-Path env:BOOST_LIBRARYDIR)) {
|
if (-not (Test-Path env:BOOST_LIBRARYDIR)) {
|
||||||
$env:BOOST_LIBRARYDIR = "c:\local\boost_1_80_0-Win${env:BITS}\lib${env:BITS}-msvc-14.2"
|
$env:BOOST_LIBRARYDIR = "c:\local\boost_1_81_0-Win${env:BITS}\lib${env:BITS}-msvc-14.2"
|
||||||
}
|
}
|
||||||
if (-not (Test-Path env:FLEX_BINARY)) {
|
if (-not (Test-Path env:FLEX_BINARY)) {
|
||||||
$env:FLEX_BINARY = 'C:\ProgramData\chocolatey\bin\win_flex.exe'
|
$env:FLEX_BINARY = 'C:\ProgramData\chocolatey\bin\win_flex.exe'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user