From 03b062c96ebdbdc158b00d0b7a8d3995afe43ecc Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Sun, 8 Jun 2025 20:58:31 -0400 Subject: [PATCH] docs: add development docs --- doc/CMakeLists.txt | 4 +++ doc/dev/CMakeLists.txt | 20 ++++++++++++ doc/dev/build.md | 67 +++++++++++++++++++++++++++++++++++++++++ doc/dev/contributing.md | 13 ++++++++ doc/dev/mainpage.md | 13 ++++++++ 5 files changed, 117 insertions(+) create mode 100644 doc/dev/CMakeLists.txt create mode 100644 doc/dev/build.md create mode 100644 doc/dev/contributing.md create mode 100644 doc/dev/mainpage.md diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index af5ef89b0..0872ba47b 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -3,6 +3,7 @@ find_package(Doxygen QUIET) option(BUILD_USER_DOCS "Build and install user documentation" ${DOXYGEN_FOUND}) +option(BUILD_DEV_DOCS "Build and install developer documentation" OFF) if (DOXYGEN_FOUND) # Generic Doxygen options @@ -14,6 +15,9 @@ if (DOXYGEN_FOUND) if (BUILD_USER_DOCS) add_subdirectory(user) endif() + if (BUILD_DEV_DOCS) + add_subdirectory(dev) + endif() else() message(STATUS "Doxygen not found, skipping docs build") endif() diff --git a/doc/dev/CMakeLists.txt b/doc/dev/CMakeLists.txt new file mode 100644 index 000000000..f34b440b5 --- /dev/null +++ b/doc/dev/CMakeLists.txt @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2025 Chris Rizzitello +# SPDX-License-Identifier: MIT + +set(DOXYGEN_USE_MDFILE_AS_MAINPAGE mainpage.md) +set(DOXYGEN_EXCLUDE_PATTERNS "*unittests/*") + +# Files used to make our documents +doxygen_add_docs(dev-docs + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/src + COMMENT "Generating developer documentation" ALL) + +# HACK Only these will show in your IDE +target_sources(dev-docs PRIVATE + mainpage.md + contributing.md + build.md +) + +# missing install target is intended generate a local copy diff --git a/doc/dev/build.md b/doc/dev/build.md new file mode 100644 index 000000000..3362cb52a --- /dev/null +++ b/doc/dev/build.md @@ -0,0 +1,67 @@ +# Building Deskflow + +To build Deskflow you will a minimum of: + - [cmake] 3.24+ + - [Qt] 6.7.0+ + - [openssl] 3.0+ + - [libportal] 0.8+ (linux, bsd) + - [libei] 1.3+ (linux, bsd) + - [google_test] ^ + - [tomlplusplus] ^ + - [cli11] ^ + +> ^ Will be fetched if not found on the host system. + +By default a build of Deskflow will: + - The GUI application deskflow + - The Client application deskflow-client + - The Server application deskflow-server + - Documentation if [doxygen] was found on your system + - Tests that will be run as part of the build process. + +## Configuration +Deskflow supports the following build options + +CMake options: +| Option | Description | Default Value | Additional requirements | +:-------------------------:|:---------------------------------------:|:------------------:|:-----------------------:| +| BUILD_GUI | Build GUI | ON | | +| BUILD_USER_DOCS | Build user documentation | DOXYGEN_FOUND | `Doxygen` | +| BUILD_DEV_DOCS | Build development documentation | OFF | `Doxygen` | +| BUILD_INSTALLER | Build installers/packages | ON | | +| BUILD_TESTS | Build unit tests and legacy tests | ON | `gtest`| +| BUILD_UNIFIED | Build unified binary (client+server) | OFF | | +| ENABLE_COVERAGE | Enable test coverage | OFF | `gcov` | +| SKIP_BUILD_TESTS | Skip running of tests at build time | OFF | | + +Example cmake configuration. +`cmake -S. -Bbuild -DCMAKE_INSTALL_PREFIX=` + +### Windows Configuration + It is recommended to use vcpkg to get the dependencies to install. The first configuration will build all depends while configuing the project. If you do not want to instal qt via vcpkg you should remove the qt packages from vcpkg.json in the of the project BEFORE attempting to configure the project. + +## Build +After Configuring you should be able to run make to build all targets. + +`cmake --build build` + +## Install + To test installation run `DESTDIR= cmake --install build` to install into `/`
+ Running `cmake --install build` will install to the `CMAKE_INSTALL_PREFIX` + +## Making Deskflow packages + Deskflow can generate several packages using cpack. + To generate packages build the `package` or `package_source` target. + Example: ` cmake --build build --target package package_source` would generate both package and package source packages. + Deskflow can generate several package types depending on the system. Archive-based packages should work on all platforms. On Linux deb and rpm info is set up, flatpaks can be generated from the included file in deploy/linux and a PKGBUILD for Arch linux is generated in the build folder. On macos a dmg file will be created and signed. For windows wix can be used to create an installer. + + +[Qt]:https://www.qt.io +[doxygen]:http://www.stack.nl/~dimitri/doxygen/ +[cmake]:https://cmake.org/ +[openssl]:https://www.openssl.org/ +[google_test]:https://github.com/google/googletest +[tomlplusplus]:https://github.com/marzer/tomlplusplus +[cli11]:https://github.com/CLIUtils/CLI11 +[libei]:https://gitlab.freedesktop.org/libinput/libei +[libportal]:https://github.com/flatpak/libportal diff --git a/doc/dev/contributing.md b/doc/dev/contributing.md new file mode 100644 index 000000000..26283af90 --- /dev/null +++ b/doc/dev/contributing.md @@ -0,0 +1,13 @@ +# Contributing to Deskflow + +Thanks for your interest in contributing to Deskflow! We welcome all kinds of contributions — bug reports, feature suggestions, documentation improvements, and code. + +## Read the Full Guidelines + +To keep this repository clean and contribution-friendly, we've outlined our full contributing guidelines on the Deskflow Wiki: + +👉 [How to Contribute to Deskflow](https://github.com/deskflow/deskflow/wiki/Contributing) + +Please take a moment to read through the page before opening an issue or submitting a pull request. + +Thanks again for helping make Deskflow better! diff --git a/doc/dev/mainpage.md b/doc/dev/mainpage.md new file mode 100644 index 000000000..31978046b --- /dev/null +++ b/doc/dev/mainpage.md @@ -0,0 +1,13 @@ +**Deskflow** is a free and open source keyboard and mouse sharing app. +Use the keyboard, mouse, or trackpad of one computer to control nearby computers, +and work seamlessly between them. + +Check out our [Building] guide +or our general [Contributing] section + +## More info + +For more info, see our [Wiki](https://github.com/deskflow/deskflow/wiki). + +[Contributing]:contributing.md +[Building]:build.md