Add icon and desktop entry for vsp executable

Icon is stored in /usr/share/pixmaps/vspIcon.png as a link to
/opt/OpenVSP/vspIcon.png.
Desktop entry file vsp.desktop in /usr/share/applications/ is created by
postinst script.
Both icon and dektop entry files are removed on removal of package.
This commit is contained in:
cibinjoseph
2019-10-19 14:54:36 +05:30
committed by Justin Gravett
parent c73bcde705
commit d1514acf88
4 changed files with 20 additions and 0 deletions

View File

@@ -127,3 +127,4 @@ INSTALL( DIRECTORY ../examples/scripts/ DESTINATION scripts )
INSTALL( DIRECTORY ../examples/textures/ DESTINATION textures )
INSTALL( FILES ../LICENSE DESTINATION . )
INSTALL( FILES ../README.md DESTINATION . )
INSTALL( FILES ../vspIcon.png DESTINATION .)

View File

@@ -6,3 +6,19 @@ ln -nsf /opt/OpenVSP/vspaero /usr/local/bin/vspaero;
ln -nsf /opt/OpenVSP/vspscript /usr/local/bin/vspscript;
ln -nsf /opt/OpenVSP/vspslicer /usr/local/bin/vspslicer;
ln -nsf /opt/OpenVSP/vspviewer /usr/local/bin/vspviewer;
echo "Setting up desktop entry ...";
ln -nsf /opt/OpenVSP/vspIcon.png /usr/share/pixmaps/vspIcon.png
cat >> /usr/share/applications/vsp.desktop <<EOL
[Desktop Entry]
Type=Application
Version=1.0
Name=OpenVSP
Comment=Parametric aircraft geometry tool
Icon=/usr/share/pixmaps/vspIcon.png
Exec=/usr/local/bin/vsp
Terminal=false
Categories=Education;Science;Physics;Engineering;
Keywords=airfoil;aircraft;model;design;
EOL
chmod +x /usr/share/applications/vsp.desktop;
desktop-file-install /usr/share/applications/vsp.desktop;

View File

@@ -6,3 +6,6 @@ rm -f /usr/local/bin/vspaero;
rm -f /usr/local/bin/vspscript;
rm -f /usr/local/bin/vspslicer;
rm -f /usr/local/bin/vspviewer;
echo "Removing desktop entry ...";
rm -f /usr/share/pixmaps/vspIcon.png
rm -f /usr/share/applications/vsp.desktop

BIN
vspIcon.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB