### Build and Install CoolerControl with UI Assets Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/daemon/README.md Build the web assets first, then build and install the daemon. This ensures the web UI is included in the binary. ```bash cd ../coolercontrol-ui/ && make build make build sudo make install ``` -------------------------------- ### Development Build and Install Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/daemon/README.md Perform a development build for the UI assets, daemon, and desktop release binaries. Then, install the built daemon and desktop binaries. ```bash cd ../.. && make dev-build cd ../.. && make dev-install ``` -------------------------------- ### Build and Install CoolerControl Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol/README.md Standard commands to build and install the CoolerControl application. ```bash make build sudo make install ``` -------------------------------- ### Installation Rules Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol/CMakeLists.txt Specifies the installation directories for the 'coolercontrol' target. This ensures the application and its libraries are placed in standard system locations upon installation. ```cmake include(GNUInstallDirs) install( TARGETS coolercontrol BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ``` -------------------------------- ### Build and Install Development Binaries Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol/README.md Commands to build and install the daemon and desktop release binaries for development. ```bash cd .. && make dev-build ``` ```bash cd .. && make dev-install ``` -------------------------------- ### Install CoolerControl Daemon to Custom Prefix Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/README.md Installs the CoolerControl daemon to a specified custom installation prefix. ```bash make install prefix=/usr/local ``` -------------------------------- ### Install CoolerControl Daemon Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/README.md Installs the CoolerControl daemon to the default location (/usr/bin/). ```bash make install ``` -------------------------------- ### Project Setup and Qt6 Dependencies Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol/CMakeLists.txt Initializes the CMake project and finds the required Qt6 components. Ensure Qt6.3+ is available for full functionality. ```cmake cmake_minimum_required(VERSION 3.19) project(coolercontrol LANGUAGES CXX) find_package(Qt6 REQUIRED COMPONENTS Core Widgets WebEngineWidgets WebChannel DBus) ``` -------------------------------- ### Start Development Server Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol-ui/README.md Launches a development server with hot-reloading enabled, allowing for real-time updates in the browser during development. This is useful for rapid iteration. ```bash npm run dev ``` ```bash make dev ``` -------------------------------- ### Build UI Assets Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol-ui/README.md Installs NPM dependencies and builds the UI assets for the project. This command is essential for setting up the development environment. ```bash make build ``` -------------------------------- ### Run Nix Built Binaries (Daemon) Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/RELEASING.md Executes the built CoolerControl daemon binary from the Nix store. This command requires root privileges and assumes a root-less install. ```bash sudo ./result-1/bin/coolercontrold ``` -------------------------------- ### Build and Run Daemon for OpenAPI Update Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/RELEASING.md This command sequence is used to build and start a locally running daemon in debug mode, which is a prerequisite for updating the OpenAPI specification. It stops the existing service and then runs the development version. ```bash sudo systemctl stop coolercontrold && make dev-run ``` -------------------------------- ### Ceiling Division Example Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/RUST_STYLE.md Demonstrates how to perform ceiling division in Rust to clearly state intent. This is useful for calculating the number of chunks needed based on total length and chunk size. ```rust // Ceiling division, state intent clearly: let chunks = (len + chunk_size - 1) / chunk_size; // Or use a named helper: fn div_ceil(a: usize, b: usize) -> usize { (a + b - 1) / b } ``` -------------------------------- ### Build CoolerControl Daemon (Release) Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/README.md Use this command to build the release version of the daemon, which embeds UI assets. Ensure the UI is built first. ```bash make ``` -------------------------------- ### Define New Language Translations Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol-ui/src/i18n/README.md Example of a language file structure for adding new translations. ```ts export default { common: { save: '저장', // ... other translations }, // ... other modules } ``` -------------------------------- ### Update OpenAPI Specification Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/RELEASING.md Navigate to the openapi directory and execute the update script. This is done after starting the daemon in debug mode. ```bash cd openapi;./update.sh ``` -------------------------------- ### Run Nix Built Binaries (Client) Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/RELEASING.md Executes the built CoolerControl client binary from the Nix store. This command is for a non-native NixOS environment and disables GPU acceleration. ```bash ./result/bin/coolercontrol --disable-gpu ``` -------------------------------- ### Build and Run CoolerControl Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol/README.md Commands to build and run the CoolerControl application for development purposes. ```bash make ./build/coolercontrol ``` -------------------------------- ### Bump Version (Specific) Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/RELEASING.md Use this command to specify a version bump type (major, minor, patch) when updating the version. For example, to change from 1.0.0 to 1.1.0, use `v=minor`. ```makefile make bump v=minor ``` -------------------------------- ### List CoolerControl devices, channels, and modes Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/scripts/README.md Executes the cc.py script with the list flag to display system information. ```bash ./cc.py -l ``` -------------------------------- ### Run All Development Tests Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol/README.md Command to execute all tests for the UI assets, daemon, and desktop application. ```bash cd .. && make dev-test ``` -------------------------------- ### Build and Run CoolerControl Daemon (Debug) Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/README.md Builds and runs the daemon in debug mode. This command requires root privileges. ```bash make dev-run ``` -------------------------------- ### View Directory Structure Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol-ui/src/i18n/README.md The file structure for i18n configuration and locale definitions. ```bash src/i18n/ ├── index.ts # i18n configuration file ├── locales/ # Language files directory │ ├── en.ts # English │ ├── zh.ts # Chinese (Simplified) │ ├── zh-tw.ts # Chinese (Traditional) │ ├── ja.ts # Japanese │ ├── ru.ts # Russian │ ├── de.ts # German │ ├── fr.ts # French │ ├── es.ts # Spanish │ ├── ar.ts # Arabic │ ├── pt.ts # Portuguese │ ├── hi.ts # Hindi │ ├── ko.ts # Korean │ └── index.d.ts # Type definitions └── README.md # This documentation ``` -------------------------------- ### Format Code with Rustfmt Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/cc-detect/README.md Ensure code adheres to Rust formatting standards by running `make ci-fmt` from the repository root. ```bash make ci-fmt ``` -------------------------------- ### Build System Configuration Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrol/CMakeLists.txt Enables automatic handling of MOC, RCC, and UIC for Qt projects. These are essential for Qt's meta-object system, resource compilation, and user interface compilation. ```cmake set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) ``` -------------------------------- ### Run Development Tests Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/daemon/README.md Execute all tests for the UI assets, daemon, and desktop application during development. ```bash cd ../.. && make dev-test ``` -------------------------------- ### Create Release Artifacts Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/RELEASING.md This command initiates the process of creating release artifacts after verifying the milestone and ensuring signed commits and tags. It includes checking the diff, pushing the release, and verifying build pipelines. ```makefile make release ``` -------------------------------- ### Nix Build CoolerControl Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/RELEASING.md Builds the CoolerControl package using Nix, enabling experimental features and specifying the Nix command. The `-L` flag provides more detailed output. ```bash nix --extra-experimental-features nix-command build -f . coolercontrol -L ``` -------------------------------- ### Standard Rust Build and Test Source: https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/daemon/README.md Standard methods for building and testing a Rust application. Note that this does not handle web assets, and debug mode performance differs from release mode. ```bash cargo build cargo test cargo build --locked --release ```