From 09f5841d5359f6c5a8220f2086bdfc4a9573937a Mon Sep 17 00:00:00 2001 From: Valentino Orlandi Date: Sun, 22 Oct 2023 11:40:49 +0200 Subject: [PATCH] Added HOW_TO_COMPILE.md Moved out from README.md --- HOW_TO_COMPILE.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 HOW_TO_COMPILE.md diff --git a/HOW_TO_COMPILE.md b/HOW_TO_COMPILE.md new file mode 100644 index 00000000..15fefc62 --- /dev/null +++ b/HOW_TO_COMPILE.md @@ -0,0 +1,46 @@ +# How to compile + +
+ +### Requirements / Dependencies + +- C++ 20 +- Qt6 *(Framework 6.2+, Linguist, Widgets, Charts, Sql, Network)* +- CMake +- gcc / clang / msvc

+ +
+ +### Compilation steps + +- Prepare a build folder: +
`mkdir build && cd build`

+- Prepare **CMake**'s build files: +
`cmake ../logdoctor -DCMAKE_BUILD_TYPE=MinSizeRel`

+- Use **CMake** to compile the entire project: +
`cmake --build ./ --target all`

+ +#### Additional steps + +- **Linux** / **BSD**: + - No additional steps. Once compiling is done, you can move the executable file wherever you want and execute it from there.

+ +- **Windows**: + - Create a new folder and move the executable in it: +
`mkdir LogDoctor && move LogDoctor.exe .\LogDoctor`

+ - Add the needed libraries to the executable's folder:
+ - You need to know the path of your Qt installation, default is *C:\Qt*
+ - You need to know which compiler you used +
`cd C:\\\Qt\\\bin`

+ - Deploy Qt's libraries using Qt's additional tool: +
`windeployqt.exe C:\\\`

+ - Deploy C++ libraries by copying them: +
`copy "libstdc++-6.dll" C:\\\` +
`copy "libwinpthread-1.dll" C:\\\` +
`copy "libgcc_s_seh-1.dll" C:\\\`

+ - You can now move the executable's folder wherever you want and execute LogDoctor from there.

+ +- **Mac OS**: + - No additional steps. Once compiling is done, you can use the app bundle to execute LogDoctor. + +