Fixes for desktop-entry-spec & appstream

This commit is contained in:
Alex Koskovich 2024-03-04 15:13:49 +00:00 committed by Adam Honse
parent beec2c76c9
commit 04410b6611
16 changed files with 31 additions and 30 deletions

View file

@ -61,7 +61,7 @@ before_script:
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
"Linux 32 AppImage": "Linux 32 AppImage":
<<: *ccache_init <<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bullseye-32 image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-32
stage: build stage: build
script: script:
- export $(dpkg-architecture) - export $(dpkg-architecture)
@ -87,7 +87,7 @@ before_script:
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
"Linux 64 AppImage": "Linux 64 AppImage":
<<: *ccache_init <<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bullseye-64 image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-64
stage: build stage: build
script: script:
- export $(dpkg-architecture) - export $(dpkg-architecture)

View file

@ -545,9 +545,9 @@ contains(QMAKE_PLATFORM, linux) {
#-------------------------------------------------------------------------------------------# #-------------------------------------------------------------------------------------------#
target.path=$$PREFIX/bin/ target.path=$$PREFIX/bin/
desktop.path=$$PREFIX/share/applications/ desktop.path=$$PREFIX/share/applications/
desktop.files+=qt/OpenRGB.desktop desktop.files+=qt/org.openrgb.OpenRGB.desktop
icon.path=$$PREFIX/share/icons/hicolor/128x128/apps/ icon.path=$$PREFIX/share/icons/hicolor/128x128/apps/
icon.files+=qt/OpenRGB.png icon.files+=qt/org.openrgb.OpenRGB.png
metainfo.path=$$PREFIX/share/metainfo/ metainfo.path=$$PREFIX/share/metainfo/
metainfo.files+=qt/org.openrgb.OpenRGB.metainfo.xml metainfo.files+=qt/org.openrgb.OpenRGB.metainfo.xml
INSTALLS += target desktop icon metainfo udev_rules INSTALLS += target desktop icon metainfo udev_rules
@ -642,9 +642,9 @@ contains(QMAKE_PLATFORM, freebsd) {
target.path=$$PREFIX/bin/ target.path=$$PREFIX/bin/
desktop.path=$$PREFIX/share/applications/ desktop.path=$$PREFIX/share/applications/
desktop.files+=qt/OpenRGB.desktop desktop.files+=qt/org.openrgb.OpenRGB.desktop
icon.path=$$PREFIX/share/icons/hicolor/128x128/apps/ icon.path=$$PREFIX/share/icons/hicolor/128x128/apps/
icon.files+=qt/OpenRGB.png icon.files+=qt/org.openrgb.OpenRGB.png
metainfo.path=$$PREFIX/share/metainfo/ metainfo.path=$$PREFIX/share/metainfo/
metainfo.files+=qt/org.openrgb.OpenRGB.metainfo.xml metainfo.files+=qt/org.openrgb.OpenRGB.metainfo.xml
rules.path=$$PREFIX/lib/udev/rules.d/ rules.path=$$PREFIX/lib/udev/rules.d/

View file

@ -29,7 +29,7 @@ cd %{_builddir}
%make_install INSTALL_ROOT=%{buildroot} %make_install INSTALL_ROOT=%{buildroot}
#desktop #desktop
desktop-file-install %{_sourcedir}/%{_name}/qt/%{_name}.desktop desktop-file-install %{_sourcedir}/%{_name}/qt/org.%{name}.%{_name}.desktop
%post -n %{name} %post -n %{name}
if [ -S /run/udev/control ]; then if [ -S /run/udev/control ]; then
@ -39,8 +39,8 @@ fi
%files %files
%{_bindir}/%{name} %{_bindir}/%{name}
%{_datadir}/icons/hicolor/*/apps/%{_name}.png %{_datadir}/icons/hicolor/*/apps/org.%{name}.%{_name}.png
%{_datadir}/applications/%{_name}.desktop %{_datadir}/applications/org.%{name}.%{_name}.desktop
%{_metainfodir}/org.%{name}.%{_name}.metainfo.xml %{_metainfodir}/org.%{name}.%{_name}.metainfo.xml
%{_udevrulesdir}/60-%{name}.rules %{_udevrulesdir}/60-%{name}.rules
%license LICENSE %license LICENSE

View file

@ -343,6 +343,7 @@ int main(int argc, char* argv[])
{ {
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication a(argc, argv); QApplication a(argc, argv);
QGuiApplication::setDesktopFileName("org.openrgb.OpenRGB");
/*---------------------------------------------------------*\ /*---------------------------------------------------------*\
| Main UI widget | | Main UI widget |

View file

@ -6,7 +6,7 @@ OpenRGBDialog::OpenRGBDialog(std::vector<i2c_smbus_interface *>& bus, std::vecto
{ {
ui->setupUi(this); ui->setupUi(this);
QIcon icon(":OpenRGB.png"); QIcon icon(":org.openrgb.OpenRGB.png");
setWindowIcon(icon); setWindowIcon(icon);
QPalette pal; QPalette pal;

View file

@ -164,7 +164,7 @@ OpenRGBDialog2::OpenRGBDialog2(QWidget *parent) : QMainWindow(parent), ui(new Op
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Set window icon | | Set window icon |
\*-----------------------------------------------------*/ \*-----------------------------------------------------*/
QIcon logo(":OpenRGB.png"); QIcon logo(":org.openrgb.OpenRGB.png");
setWindowIcon(logo); setWindowIcon(logo);
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
@ -1702,7 +1702,7 @@ void OpenRGBDialog2::SetTrayIcon(bool tray_icon)
} }
else else
{ {
trayIcon->setIcon(QIcon(":OpenRGB.png")); trayIcon->setIcon(QIcon(":org.openrgb.OpenRGB.png"));
} }
} }

View file

@ -1,9 +1,10 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Encoding=UTF-8 Version=1.5
Name=OpenRGB Name=OpenRGB
Comment=Control RGB lighting Comment=Control RGB lighting
Icon=org.openrgb.OpenRGB
TryExec=openrgb
Exec=openrgb Exec=openrgb
Icon=OpenRGB
Terminal=false Terminal=false
Categories=Utility; Categories=Utility;

View file

@ -2,23 +2,21 @@
<!-- Copyright 2021 Artem Polishchuk <ego.cordatus@gmail.com> --> <!-- Copyright 2021 Artem Polishchuk <ego.cordatus@gmail.com> -->
<component type="desktop-application"> <component type="desktop-application">
<id>org.openrgb.OpenRGB</id> <id>org.openrgb.OpenRGB</id>
<launchable type="desktop-id">OpenRGB.desktop</launchable> <launchable type="desktop-id">org.openrgb.OpenRGB.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license> <metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0-or-later</project_license> <project_license>GPL-2.0-or-later</project_license>
<developer_name>OpenRGB Developers and Contributors</developer_name> <developer id="org.openrgb">
<name>OpenRGB Developers and Contributors</name>
</developer>
<name>OpenRGB</name> <name>OpenRGB</name>
<provides> <provides>
<binary>openrgb</binary> <binary>openrgb</binary>
</provides> </provides>
<content_rating type="oars-1.0"> <content_rating type="oars-1.0" />
</content_rating>
<summary> <summary>Open source RGB lighting control that doesn't depend on manufacturer software</summary>
Open source RGB lighting control that doesn't depend on manufacturer
software.
</summary>
<description> <description>
<p> <p>

View file

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Before After
Before After

View file

@ -1,6 +1,6 @@
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>OpenRGB.png</file> <file>org.openrgb.OpenRGB.png</file>
<file>fonts/OpenRGB.ttf</file> <file>fonts/OpenRGB.ttf</file>
<file>OpenRGBGreyscale.png</file> <file>OpenRGBGreyscale.png</file>
</qresource> </qresource>

View file

@ -1,6 +1,6 @@
--- a/OpenRGB.pro 2022-05-02 15:26:15.375947000 +0200 --- a/OpenRGB.pro 2022-05-02 15:26:15.375947000 +0200
+++ b/OpenRGB.pro 2022-05-02 15:29:01.997135000 +0200 +++ b/OpenRGB.pro 2022-05-02 15:29:01.997135000 +0200
@@ -447,8 +447,6 @@ @@ -449,8 +449,6 @@
# Linux-specific Configuration # # Linux-specific Configuration #
#-----------------------------------------------------------------------------------------------# #-----------------------------------------------------------------------------------------------#
contains(QMAKE_PLATFORM, linux) { contains(QMAKE_PLATFORM, linux) {
@ -9,14 +9,15 @@
HEADERS -= $$CONTROLLER_H_WIN HEADERS -= $$CONTROLLER_H_WIN
HEADERS += \ HEADERS += \
--- a/qt/OpenRGB.desktop 2022-05-02 15:25:52.150332000 +0200 --- a/qt/org.openrgb.OpenRGB.desktop
+++ b/qt/OpenRGB.desktop 2022-05-02 15:28:27.749598000 +0200 +++ b/qt/org.openrgb.OpenRGB.desktop
@@ -3,7 +3,7 @@ @@ -4,7 +4,7 @@ Version=1.5
Encoding=UTF-8
Name=OpenRGB Name=OpenRGB
Comment=Control RGB lighting Comment=Control RGB lighting
Icon=org.openrgb.OpenRGB
-TryExec=openrgb
-Exec=openrgb -Exec=openrgb
+TryExec=OpenRGB
+Exec=OpenRGB +Exec=OpenRGB
Icon=OpenRGB
Terminal=false Terminal=false
Categories=Utility; Categories=Utility;

View file

@ -74,7 +74,7 @@ make install INSTALL_ROOT=AppDir
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
export QML_SOURCES_PATHS="$REPO_ROOT"/src export QML_SOURCES_PATHS="$REPO_ROOT"/src
linuxdeploy-"$ARCH".AppImage --appdir AppDir -e "$TARGET" -i "$REPO_ROOT"/qt/OpenRGB.png -d "$REPO_ROOT"/qt/OpenRGB.desktop linuxdeploy-"$ARCH".AppImage --appdir AppDir -e "$TARGET" -i "$REPO_ROOT"/qt/org.openrgb.OpenRGB.png -d "$REPO_ROOT"/qt/org.openrgb.OpenRGB.desktop
linuxdeploy-plugin-qt-"$ARCH".AppImage --appdir AppDir linuxdeploy-plugin-qt-"$ARCH".AppImage --appdir AppDir
linuxdeploy-"$ARCH".AppImage --appdir AppDir --output appimage linuxdeploy-"$ARCH".AppImage --appdir AppDir --output appimage