Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# ro-Control editor configuration
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space

[*.{cpp,h,hpp}]
indent_size = 2

[*.{qml,js}]
indent_size = 4

[CMakeLists.txt]
indent_size = 4

[*.cmake]
indent_size = 4

[*.{yml,yaml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.{ts,xml}]
indent_size = 4

[*.sh]
indent_size = 4

[{Makefile,*.mk}]
indent_style = tab
27 changes: 27 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Normalize line endings to LF for all text files
* text=auto eol=lf

# Shell scripts must always use LF
*.sh text eol=lf
*.bash text eol=lf

# Windows-specific files that should keep CRLF
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Binary files - never normalize
*.png binary
*.ico binary
*.qm binary
*.o binary
*.a binary
*.so binary
*.dylib binary
*.dll binary
*.exe binary
*.rpm binary
*.deb binary
*.tar.gz binary
*.tar.xz binary
*.AppImage binary
14 changes: 1 addition & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,40 +136,28 @@ jobs:
- name: Verify Fedora 43 RPM compatibility
run: |
MAIN_RPM="$(find ~/rpmbuild/RPMS -maxdepth 2 -type f -name 'ro-control-*.x86_64.rpm' | head -n1)"
COMMON_RPM="$(find ~/rpmbuild/RPMS -maxdepth 2 -type f -name 'ro-control-common-*.noarch.rpm' | head -n1)"

if [[ -z "${MAIN_RPM}" ]]; then
echo "Failed to locate ro-control x86_64 RPM." >&2
exit 1
fi

if [[ -z "${COMMON_RPM}" ]]; then
echo "Failed to locate ro-control-common noarch RPM." >&2
exit 1
fi

rpm -qpR "${MAIN_RPM}" | tee /tmp/ro-control.requires
if grep -E 'PRIVATE_API' /tmp/ro-control.requires; then
echo "Forbidden Qt private ABI dependency detected." >&2
exit 1
fi

rpm -qpl "${MAIN_RPM}" | grep -Fx '/usr/bin/ro-control'
if rpm -qpl "${COMMON_RPM}" | grep -Fx '/usr/bin/ro-control'; then
echo "/usr/bin/ro-control must not be shipped by ro-control-common." >&2
exit 1
fi

cp "${MAIN_RPM}" /tmp/ro-control-x86_64.rpm
cp "${COMMON_RPM}" /tmp/ro-control-common-noarch.rpm

- name: Install and smoke-test RPMs
run: |
MAIN_RPM=/tmp/ro-control-x86_64.rpm
COMMON_RPM=/tmp/ro-control-common-noarch.rpm

dnf clean all
dnf -y --refresh --setopt=install_weak_deps=False install "${MAIN_RPM}" "${COMMON_RPM}"
dnf -y --refresh --setopt=install_weak_deps=False install "${MAIN_RPM}"

rpm -q ro-control
command -v ro-control
Expand Down
41 changes: 5 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ jobs:
cp packaging/rpm/ro-control.spec "${HOME}/rpmbuild/SPECS/ro-control.spec"
FEDORA_VERSION=43
MAIN_RPM_PATTERN="ro-control-[0-9]*.${RPM_ARCH}.rpm"
COMMON_RPM_PATTERN="ro-control-common-[0-9]*.noarch.rpm"

rpmbuild -ba "${HOME}/rpmbuild/SPECS/ro-control.spec" \
--define "_topdir ${HOME}/rpmbuild" \
Expand All @@ -175,15 +174,6 @@ jobs:
fi
cp "${MAIN_RPM_FILE}" "dist/rpm/ro-control-${RPM_ARCH}.rpm"

COMMON_RPM_FILE="$(find ~/rpmbuild/RPMS -maxdepth 2 -type f -name "${COMMON_RPM_PATTERN}" | head -n1)"
if [[ -n "${COMMON_RPM_FILE}" ]]; then
cp "${COMMON_RPM_FILE}" "dist/rpm/ro-control-common-noarch.rpm"
fi

if [[ "${RPM_ARCH}" == "x86_64" ]]; then
cp ~/rpmbuild/SRPMS/*.src.rpm dist/rpm/
fi

- name: Verify package metadata
env:
VERSION: ${{ needs.metadata.outputs.version }}
Expand All @@ -204,27 +194,18 @@ jobs:
fi
grep -Fx '/usr/bin/ro-control' "dist/rpm/ro-control-${VERSION}-${RPM_ARCH}-files.txt"

- name: Verify main/common package split
- name: Verify package payload
env:
RPM_ARCH: ${{ matrix.arch }}
run: |
MAIN_RPM_FILE="dist/rpm/ro-control-${RPM_ARCH}.rpm"
COMMON_RPM_FILE="dist/rpm/ro-control-common-noarch.rpm"

if [[ ! -f "${MAIN_RPM_FILE}" ]]; then
echo "Main ro-control RPM is missing." >&2
exit 1
fi

if [[ ! -f "${COMMON_RPM_FILE}" ]]; then
echo "ro-control-common noarch RPM is missing." >&2
exit 1
fi

if rpm -qpl "${COMMON_RPM_FILE}" | grep -Fx '/usr/bin/ro-control'; then
echo "/usr/bin/ro-control must not be shipped by ro-control-common." >&2
exit 1
fi
rpm -qpl "${MAIN_RPM_FILE}" | grep -Fx '/usr/share/metainfo/io.github.projectroasd.rocontrol.metainfo.xml'
rpm -qpl "${MAIN_RPM_FILE}" | grep -Fx '/usr/share/applications/io.github.projectroasd.rocontrol.desktop'

- name: Validate desktop metadata
run: |
Expand All @@ -238,19 +219,13 @@ jobs:
RPM_ARCH: ${{ matrix.arch }}
run: |
RPM_FILE="dist/rpm/ro-control-${RPM_ARCH}.rpm"
NOARCH_FILE="dist/rpm/ro-control-common-noarch.rpm"

if [[ ! -f "${RPM_FILE}" ]]; then
echo "Failed to locate built ${RPM_ARCH} RPM for smoke testing." >&2
exit 1
fi

if [[ ! -f "${NOARCH_FILE}" ]]; then
echo "Failed to locate ro-control-common noarch RPM for smoke testing." >&2
exit 1
fi

dnf install -y --nogpgcheck "${RPM_FILE}" "${NOARCH_FILE}"
dnf install -y --nogpgcheck "${RPM_FILE}"

INSTALLED_VERSION="$(ro-control --version | tr -d '\n')"
if [[ "${INSTALLED_VERSION}" != "${VERSION}" ]]; then
Expand Down Expand Up @@ -279,7 +254,7 @@ jobs:
with:
name: ro-control-rpm-${{ matrix.arch }}-${{ needs.metadata.outputs.version }}
path: |
dist/rpm/*
dist/rpm/ro-control-${{ matrix.arch }}.rpm

release:
name: Create GitHub Release
Expand All @@ -303,9 +278,3 @@ jobs:
files: |
dist/*x86_64.rpm
dist/*aarch64.rpm
dist/*noarch.rpm
dist/*.src.rpm
dist/*SHA256SUMS.txt
dist/*-requires.txt
dist/*-info.txt
dist/*-files.txt
13 changes: 1 addition & 12 deletions .github/workflows/rpm-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ jobs:
cp packaging/rpm/ro-control.spec "${HOME}/rpmbuild/SPECS/ro-control.spec"
FEDORA_VERSION=43
MAIN_RPM_PATTERN="ro-control-[0-9]*.${RPM_ARCH}.rpm"
COMMON_RPM_PATTERN="ro-control-common-[0-9]*.noarch.rpm"

rpmbuild -ba "${HOME}/rpmbuild/SPECS/ro-control.spec" \
--define "_topdir ${HOME}/rpmbuild" \
Expand All @@ -133,11 +132,6 @@ jobs:

cp "${MAIN_RPM_FILE}" "dist/rpm/ro-control-${RPM_ARCH}.rpm"

COMMON_RPM_FILE="$(find ~/rpmbuild/RPMS -maxdepth 2 -type f -name "${COMMON_RPM_PATTERN}" | head -n1)"
if [[ -n "${COMMON_RPM_FILE}" ]]; then
cp "${COMMON_RPM_FILE}" "dist/rpm/ro-control-common-noarch.rpm"
fi

- name: Validate metadata and RPM dependency surface
env:
RPM_ARCH: ${{ matrix.arch }}
Expand All @@ -146,7 +140,6 @@ jobs:
appstreamcli validate --no-net data/icons/io.github.projectroasd.rocontrol.metainfo.xml

MAIN_RPM_FILE="dist/rpm/ro-control-${RPM_ARCH}.rpm"
COMMON_RPM_FILE="dist/rpm/ro-control-common-noarch.rpm"

rpm -qpR "${MAIN_RPM_FILE}" | tee /tmp/ro-control.requires
if grep -E 'PRIVATE_API' /tmp/ro-control.requires; then
Expand All @@ -155,14 +148,10 @@ jobs:
fi

rpm -qpl "${MAIN_RPM_FILE}" | grep -Fx '/usr/bin/ro-control'
if [[ -f "${COMMON_RPM_FILE}" ]] && rpm -qpl "${COMMON_RPM_FILE}" | grep -Fx '/usr/bin/ro-control'; then
echo "/usr/bin/ro-control must only be shipped by the main RPM." >&2
exit 1
fi

- name: Upload RPM artifacts
uses: actions/upload-artifact@v7
with:
name: ro-control-${{ matrix.arch }}-rpm
path: |
dist/rpm/*
dist/rpm/ro-control-${{ matrix.arch }}.rpm
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ test_results/

# Translation compiled files
*.mo
*.qm

# Valgrind
vgcore.*
Expand Down
47 changes: 46 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ project(ro-control
LANGUAGES CXX
)

set(CPACK_PACKAGE_FILE_NAME
"${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_PROCESSOR}"
)

set(RO_CONTROL_POLICY_ID "io.github.ProjectRoASD.rocontrol.manage-drivers")
set(RO_CONTROL_HELPER_NAME "ro-control-helper")
set(RO_CONTROL_HELPER_BUILD_PATH
Expand All @@ -23,6 +27,33 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE)
endif()

# ─── LTO (Release) ────────────────────────────────────────────────────────────
option(ENABLE_LTO "Enable link-time optimization for release builds" ON)
if(ENABLE_LTO)
include(CheckIPOSupported)
check_ipo_supported(RESULT has_lto)
if(has_lto AND CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
endif()

# ─── Sanitizers (Debug) ──────────────────────────────────────────────────────
option(ENABLE_ASAN "Enable AddressSanitizer for debug builds" OFF)
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer for debug builds" OFF)

if(ENABLE_ASAN OR ENABLE_UBSAN)
set(SANITIZER_FLAGS "")
if(ENABLE_ASAN)
string(APPEND SANITIZER_FLAGS " -fsanitize=address")
endif()
if(ENABLE_UBSAN)
string(APPEND SANITIZER_FLAGS " -fsanitize=undefined")
endif()
string(STRIP "${SANITIZER_FLAGS}" SANITIZER_FLAGS)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${SANITIZER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${SANITIZER_FLAGS}")
endif()

# ─── Qt6 Setup ───────────────────────────────────────────────────────────────
# Qt's MOC, UIC, RCC run automatically
set(CMAKE_AUTOMOC ON)
Expand Down Expand Up @@ -76,6 +107,7 @@ set(BACKEND_SOURCES
src/backend/system/languagemanager.cpp
src/backend/system/uipreferencesmanager.cpp
src/backend/system/systeminfoprovider.cpp
src/backend/fan/fancontroller.cpp
)

set(APP_SOURCES
Expand Down Expand Up @@ -136,6 +168,10 @@ set_source_files_properties(src/qml/assets/icon-refresh.svg PROPERTIES
QT_RESOURCE_ALIAS "assets/icon-refresh.svg"
)

set_source_files_properties(src/qml/assets/icon-refresh-light.svg PROPERTIES
QT_RESOURCE_ALIAS "assets/icon-refresh-light.svg"
)

set_source_files_properties(src/qml/assets/icon-theme.svg PROPERTIES
QT_RESOURCE_ALIAS "assets/icon-theme.svg"
)
Expand All @@ -147,6 +183,7 @@ qt_add_qml_module(ro-control
src/qml/Main.qml
src/qml/pages/DriverPage.qml
src/qml/pages/MonitorPage.qml
src/qml/pages/FanPage.qml
src/qml/components/InfoBadge.qml
src/qml/components/RefreshToolButton.qml
src/qml/components/ActionButton.qml
Expand All @@ -159,6 +196,7 @@ qt_add_qml_module(ro-control
src/qml/assets/ro-control-logo.svg
src/qml/assets/icon-language.svg
src/qml/assets/icon-refresh.svg
src/qml/assets/icon-refresh-light.svg
src/qml/assets/icon-theme.svg
)

Expand Down Expand Up @@ -217,7 +255,12 @@ configure_file(
@ONLY
NEWLINE_STYLE UNIX
)
execute_process(COMMAND chmod +x ${RO_CONTROL_HELPER_BUILD_PATH})

file(CHMOD ${RO_CONTROL_HELPER_BUILD_PATH}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)

configure_file(
data/polkit/io.github.ProjectRoASD.rocontrol.policy.in
Expand Down Expand Up @@ -303,3 +346,5 @@ message(STATUS " CPU arch : ${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS " Qt version : ${Qt6_VERSION}")
message(STATUS " Install to : ${CMAKE_INSTALL_PREFIX}")
message(STATUS "")

include(CPack)
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# ro-Control

Native Qt6/QML desktop application for NVIDIA driver management and Linux system monitoring.

Primary packaging target:

- Fedora 43 KDE Plasma
- x86_64 and aarch64
Native Qt6/QML desktop application for NVIDIA driver management and Ro-ASD system monitoring.

## Overview

ro-Control focuses on three things:

- installing, updating, and cleaning NVIDIA drivers on Fedora-oriented Linux systems
- installing, updating, and cleaning NVIDIA drivers on Ro-ASD Linux systems
- monitoring CPU, GPU, and RAM telemetry in a native desktop UI
- exposing a small CLI for diagnostics and scripted driver operations

Expand Down
4 changes: 2 additions & 2 deletions data/icons/io.github.projectroasd.rocontrol.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Exec=ro-control
Icon=io.github.projectroasd.rocontrol
Terminal=false
Categories=System;Settings;HardwareSettings;
Keywords=nvidia;driver;gpu;monitor;system;fedora;
Keywords[tr]=nvidia;sürücü;gpu;monitör;sistem;fedora;
Keywords=nvidia;driver;gpu;monitor;system;ro-asd;
Keywords[tr]=nvidia;sürücü;gpu;monitör;sistem;ro-asd;
StartupNotify=true
StartupWMClass=io.github.projectroasd.rocontrol
SingleMainWindow=true
Loading
Loading