Skip to content

Commit

Permalink
desktop entries
Browse files Browse the repository at this point in the history
  • Loading branch information
vayerx committed Aug 17, 2011
1 parent 16b464c commit 5a71ca3
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 7 deletions.
25 changes: 18 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,25 @@ AddShadowgroundsBinary( survivor "PROJECT_SURVIVOR=1;GAMEDATA_PATH=\"${SURVIVOR_
# Installation
# ------------------------------------------------

IF( UNIX AND NOT APPLE AND NOT CYGWIN )
OPTION( ENABLE_DESKTOP_ENTRY "Enable installation of desktop entry files" ON )
SET( DATAROOT_DIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Root of data directories")
SET( ICON_DIR "${DATAROOT_DIR}/pixmaps" CACHE STRING "Icon directory for desktop entry")
SET( DESKTOP_DIR "${DATAROOT_DIR}/applications/" CACHE STRING "Desktop file directory for desktop entry")
ENDIF( UNIX AND NOT APPLE AND NOT CYGWIN )

FOREACH( game ${INSTALLONLY} )
INSTALL(
TARGETS ${game}
COMPONENT ${game}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
DESTINATION bin
#CONFIGURATIONS Release Gentoo
)
INSTALL(
TARGETS ${game}
COMPONENT ${game}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
DESTINATION bin
#CONFIGURATIONS Release Gentoo
)
IF( ENABLE_DESKTOP_ENTRY AND DESKTOP_DIR AND ICON_DIR )
INSTALL(FILES icons/${game}.desktop DESTINATION ${DESKTOP_DIR} )
INSTALL(FILES icons/${game}.xpm DESTINATION ${ICON_DIR} )
ENDIF( ENABLE_DESKTOP_ENTRY AND DESKTOP_DIR AND ICON_DIR )
ENDFOREACH( game )


Expand Down
10 changes: 10 additions & 0 deletions icons/shadowgrounds.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Shadowgrounds
GenericName=Action Game
Comment=3rd-person alien shooter
Icon=shadowgrounds
Exec=shadowgrounds
Categories=Game;ActionGame;

File renamed without changes.
10 changes: 10 additions & 0 deletions icons/survivor.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Shadowgrounds Survivor
GenericName=Action Game
Comment=3rd-person alien shooter
Icon=survivor
Exec=survivor
Categories=Game;ActionGame;

File renamed without changes.

0 comments on commit 5a71ca3

Please sign in to comment.