These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- cmake 3.12 or later to generate build files
- C++ compiler with C++14 support (at least gcc 5, clang 3.4, msvc 2017)
- Qt libraries 5.9 or later (CI builds use Qt 5.9.5/Qt 5.15.2):
- QtCore
- QtGui
- QtWidgets
- QtConcurrent
- QtNetwork
- QtXml
- QtTest
- Boost (1.58 or later, header-only part)
- Ragel (6.8 or later; precompiled binary is provided for Windows; has to be installed from package managers on Linux or Homebrew on Mac)
- nsis to build installer for Windows (optional)
- Precompiled OpenSSl library to enable https support on Windows (optional)
All other dependencies are provided in 3rdparty directory.
This project is hosted on GitHub. You can clone this project directly using this command:
git clone https://github.com/variar/klogg
Here is how to build klogg on Ubuntu 18.04.
Install dependencies:
sudo apt-get install build-essential cmake qtbase5-dev libboost-all-dev ragel
Configure and build klogg:
cd <path_to_klogg_repository_clone>
mkdir build_root
cd build_root
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
cmake --build .
Binaries are placed into build_root/output
.
See .github/workflows/ci-build.yml
for more information on build process.
Install Microsoft Visual Studio 2017 or 2019 with C++ support. Community edition can be downloaded from Microsoft.
Intall latest Qt version using online installer. Make sure to select version matching Visual Studio installation. 64-bit libraries are recommended.
Install CMake from Kitware. Use version 3.14 or later for Visual Studio 2019 support.
Download the Boost source code from http://www.boost.org/users/download/.
Extract to some folder. Directory structure should be something like C:\Boost\boost_1_63_0
.
Then add BOOST_ROOT
environment variable pointing to main directory of Boost sources so CMake is able to fine it.
Prepare build environment for CMake. Open command prompt window and depending on version of Visual Studio run either
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevcmd" -arch=x64
or
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=x64
Next setup Qt paths:
<path_to_qt_installation>\bin\qtenv2.bat
Then add CMake to PATH:
set PATH=<path_to_cmake_bin>:$PATH
Configure klogg solution (use CMake generator matching Visual Studio version):
cd <path_to_project_root>
md build_root
cd build_root
cmake -G "Visual Studio 16 2019 Win64" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
CMake should generate klogg.sln
file in <path_to_project_root>\build_root
directory. Open solution and build it.
Binaries are placed into build_root/output
.
For https network urls support download precompiled openssl library https://mirror.firedaemon.com/OpenSSL/openssl-1.1.1l-dev.zip. Put libcrypto-1_1 and libssl-1_1 for desired architecture near klogg binaries.
Klogg requires macOS High Sierra (10.13) or higher.
Install Homebrew using terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Homebrew installer should also install xcode command line tools.
Download and install build dependencies:
brew install cmake ninja qt boost ragel
Usually path to qt installation looks like /usr/local/Cellar/qt/5.14.0/lib/cmake/Qt5
Configure and build klogg:
cd <path_to_klogg_repository_clone>
mkdir build_root
cd build_root
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DQt5_DIR=<path_to_qt_install> ..
cmake --build .
Binaries are placed into build_root/output
.
Tests are built by default. To turn them off pass -DBUILD_TESTS:BOOL=OFF
to cmake.
Tests use catch2 (bundled with klogg sources) and require Qt5Test module. Tests can be run using ctest tool provider by CMake:
cd <path_to_klogg_repository_clone>
cd build_root
ctest --build-config RelWithDebInfo --verbose