mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-24 07:47:49 -05:00
3.5 KiB
3.5 KiB
Compiling
This document details the process to compile OpenRGB from source on supported operating systems.
Windows
- You will need the Microsoft Visual 2019 C++ runtime installed. You can get it here
- To build the application yourself on Windows:
- Install Git
- Clone the OpenRGB-Qt-Packages git repo and run
install.bat(or optionallyinstall-chocolatey.batif you use the Chocolatey package manager). - In the OpenRGB source directory, run the
scripts\build-windows.batfile with arguments<Qt Version> <MSVC Version> <Bits>.
- Qt versions provided by
OpenRGB-Qt-Packagesinclude5.15.0(using MSVC2019) and6.8.3(using MSVC2022). - For example, for a Qt5 64-bit build,
.\scripts\build-windows.bat 5.15.0 2019 64
- You can also use Qt Creator to build and debug the project, you will need to install it from the Qt Online Installer or by downloading and extracting a binary release and manually configuring it.
Linux
- Install build dependencies
- Debian/Ubuntu:
sudo apt install git build-essential qtcreator qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libusb-1.0-0-dev libhidapi-dev pkgconf libmbedtls-dev qttools5-dev-tools - Fedora:
sudo dnf install automake gcc-c++ git hidapi-devel libusbx-devel mbedtls-devel pkgconf qt5-qtbase-devel qt5-linguist
- Debian/Ubuntu:
git clone https://gitlab.com/CalcProgrammer1/OpenRGBcd OpenRGBmkdir buildcd buildqmake ../OpenRGB.promake -j$(nproc)- You can then run the application from the compile directory with
./openrgbor install withmake install - You will also need to install the latest udev rules.
Packaging
You can also build OpenRGB generic AppImage packages and distribution-specific packages for Debian-based and Fedora-based distros. Install the build dependencies from the section above for your distribution before proceeding.
-
AppImage:
-
Debian/Ubuntu:
- Make sure OpenRGB is cloned in ~/OpenRGB before proceeding. Output .deb is in ~/.
sudo apt install debhelpercd ~/OpenRGBscripts/build-package-files.sh debian/changelogdpkg-buildpackage -us -B
-
Fedora:
- Make sure OpenRGB is cloned in ~/OpenRGB before proceeding. Output .rpm is in ~/rpmbuild/RPMS/.
sudo dnf install rpmdevtools dnf-plugins-corecd ~/rpmdev-setuptreetar -cf rpmbuild/SOURCES/OpenRGB.tar.gz OpenRGB/cd OpenRGB./scripts/build-package-files.sh fedora/OpenRGB.speccd ~/cp OpenRGB/fedora/OpenRGB.spec rpmbuild/SPECS/sudo dnf builddep rpmbuild/SPECS/OpenRGB.spec -ycd rpmbuild/SOURCEStar -xf OpenRGB.tar.gzcd ~/rpmbuild -ba rpmbuild/SPECS/OpenRGB.spec
MacOS
- Install build dependencies with Homebrew
- Install Homebrew by following the instructions at https://brew.sh/
brew install git qt5 hidapi libusb mbedtls@2brew link qt5
- Create a local certificate called OpenRGB with code signing capability
- git clone https://gitlab.com/CalcProgrammer1/OpenRGB
- cd OpenRGB
- qmake OpenRGB.pro
- make -j8
- macdeployqt OpenRGB.app -codesign=OpenRGB
- Copy the OpenRGB.app application package to Applications