auto generate desktop file using qmake

This commit is contained in:
Roy Qu 2022-01-05 09:42:26 +08:00
parent e3b9565b84
commit 5930952ec6
2 changed files with 9 additions and 3 deletions

View File

@ -13,6 +13,8 @@ linux: {
PREFIX = /usr/local PREFIX = /usr/local
} }
QMAKE_SUBSTITUTES += redpandaide.desktop.in
resources.path = $${PREFIX}/share/$${APP_NAME} resources.path = $${PREFIX}/share/$${APP_NAME}
resources.files += linux/templates resources.files += linux/templates
INSTALLS += resources INSTALLS += resources
@ -27,4 +29,8 @@ linux: {
pixmaps.files += linux/redpandaide.png pixmaps.files += linux/redpandaide.png
INSTALLS += pixmaps INSTALLS += pixmaps
desktop.path = $${PREFIX}/share/applications
desktop.files += redpandaide.desktop
INSTALLS += desktop
} }

View File

@ -1,7 +1,7 @@
[Desktop Entry] [Desktop Entry]
Comment=A lightweighted QT-based C/C++ IDE Comment=A lightweighted QT-based C/C++ IDE
Comment[zh_CN]=基于QT的轻量级C/C++集成开发环境 Comment[zh_CN]=基于QT的轻量级C/C++集成开发环境
Exec=/opt/RedPandaIDE/bin/RedPandaIDE %F Exec=RedPandaIDE %F
GenericName=Red Panda C++ GenericName=Red Panda C++
GenericName[zh_CN]=小熊猫C++ GenericName[zh_CN]=小熊猫C++
MimeType=application/pdf MimeType=application/pdf
@ -11,5 +11,5 @@ StartupNotify=false
Terminal=false Terminal=false
Type=Application Type=Application
Categories=Development;Qt; Categories=Development;Qt;
Icon=/opt/RedPandaIDE/redpandaide.png Icon=$${PREFIX}/share/pixmaps/redpandaide.png
Path=/opt/RedPandaIDE/bin Path=$${PREFIX}/bin