diff --git a/Red_Panda_CPP.pro b/Red_Panda_CPP.pro index 549091a7..1d354145 100644 --- a/Red_Panda_CPP.pro +++ b/Red_Panda_CPP.pro @@ -13,6 +13,8 @@ linux: { PREFIX = /usr/local } + QMAKE_SUBSTITUTES += redpandaide.desktop.in + resources.path = $${PREFIX}/share/$${APP_NAME} resources.files += linux/templates INSTALLS += resources @@ -27,4 +29,8 @@ linux: { pixmaps.files += linux/redpandaide.png INSTALLS += pixmaps + desktop.path = $${PREFIX}/share/applications + desktop.files += redpandaide.desktop + INSTALLS += desktop + } diff --git a/linux/redpandaide.desktop b/redpandaide.desktop.in similarity index 75% rename from linux/redpandaide.desktop rename to redpandaide.desktop.in index 4077565f..4c117353 100644 --- a/linux/redpandaide.desktop +++ b/redpandaide.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] Comment=A lightweighted QT-based C/C++ IDE Comment[zh_CN]=基于QT的轻量级C/C++集成开发环境 -Exec=/opt/RedPandaIDE/bin/RedPandaIDE %F +Exec=RedPandaIDE %F GenericName=Red Panda C++ GenericName[zh_CN]=小熊猫C++ MimeType=application/pdf @@ -11,5 +11,5 @@ StartupNotify=false Terminal=false Type=Application Categories=Development;Qt; -Icon=/opt/RedPandaIDE/redpandaide.png -Path=/opt/RedPandaIDE/bin +Icon=$${PREFIX}/share/pixmaps/redpandaide.png +Path=$${PREFIX}/bin