ilogtail
ilogtail copied to clipboard
[FEATURE]: Windows Support for iLogtail
Concisely describe the proposed feature Compile and run ilogtail on Windows.
Describe the solution you'd like (if any)
-
Fix windows compilation problems.
-
Make sure unittest pass on Windows.
-
Make sure ilogtail.exe works.
-
Add build solution for windows.
-
Add windows-build check in GitHub workflow. in https://github.com/alibaba/ilogtail/blob/main/.github/workflows/build.yaml Add a section
- name: Build core on Windows if: matrix.runner == 'windows-2019' ......
Resources:
-
Dependencies https://ilogtail-community-edition.oss-cn-shanghai.aliyuncs.com/prebuilt-dependencies/ilogtail-deps.windows-386.zip
-
An initial version of the build script build.bat.txt
-
Known problems to fix
diff --git a/core/common/util.cpp b/core/common/util.cpp index 0843f1b..4c3144f 100644 --- a/core/common/util.cpp +++ b/core/common/util.cpp @@ -25,7 +25,6 @@ #include <execinfo.h> #elif defined(_MSC_VER) #include <Rpc.h> -#include "WinUuid.h" #endif #include "logger/Logger.h" #include "StringTools.h" diff --git a/core/observer/network/NetworkConfig.h b/core/observer/network/NetworkConfig.h index 3ebd798..2b91f14 100644 --- a/core/observer/network/NetworkConfig.h +++ b/core/observer/network/NetworkConfig.h @@ -16,6 +16,8 @@ #pragma once +#include <numeric> + #include "common/Flags.h" #include "config/Config.h" #include "interface/type.h" diff --git a/core/plugin/LogtailPlugin.h b/core/plugin/LogtailPlugin.h index d427a87..b70ced6 100644 --- a/core/plugin/LogtailPlugin.h +++ b/core/plugin/LogtailPlugin.h @@ -17,6 +17,7 @@ #pragma once #include <cstdint> #include <cstdlib> +#include <numeric> #include <ostream> #include <json/json.h> #include "config/Config.h"
An updated build.bat and compile guide. There should be enough to complete "Fix windows compilation problems" task and a potential solution for Windows build. Windows编译.pdf build.bat.txt
Is there any progress on windows support ?
Is there any progress on windows support ?
The necessary steps have been provided as above. Interested developers in the community are welcome to claim them and complete the remaining tasks according to the above ideas.
code patch was committed in #556
If you want to use ilogtail as a service, you may wrap it by winsw