Skip to content

Commit

Permalink
Merge pull request #81 from boombatower/desktop-file-plus-icon
Browse files Browse the repository at this point in the history
Add .desktop file and placeholder icon.
  • Loading branch information
mic-e committed Nov 10, 2014
2 parents 0524a6f + 54593bd commit 78f9599
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -52,6 +52,7 @@ configure_file(py/openage/config.py.in "${CMAKE_SOURCE_DIR}/py/openage/config.py
doxygen_configure(cpp/ py/)

add_subdirectory(cpp/)
add_subdirectory(dist/)
add_subdirectory(py/)

# process the included python sources, generate setup.py
Expand Down
13 changes: 13 additions & 0 deletions dist/CMakeLists.txt
@@ -0,0 +1,13 @@
message("Cropping gaben.png to create placeholder desktop icon...")

file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/dist")
execute_process(COMMAND python3 -c "
import PIL.Image;
cropped=PIL.Image.open('${GLOBAL_ASSET_DIR}/gaben.png').crop((92,137,604,649));
cropped.save('${CMAKE_BINARY_DIR}/dist/openage.png')")

install(FILES "${GLOBAL_ASSET_DIR}/dist/openage.desktop"
DESTINATION "${CMAKE_INSTALL_PREFIX}/usr/share/applications")

install(FILES "${CMAKE_BINARY_DIR}/dist/openage.png"
DESTINATION "${CMAKE_INSTALL_PREFIX}/usr/share/pixmaps")
15 changes: 15 additions & 0 deletions dist/README.md
@@ -0,0 +1,15 @@
# Distribution

Contains files useful for package distribution.

## Desktop file

The [openage.desktop](openage.desktop) file can be found in this directory and will be installed at
`/usr/share/applications/openage.desktop`.

## Desktop icon

In lieu of a logo/icon for openage a cropped version of [assets/gaben.png](/assets/gaben.png) is
created instead. See [assets/CMakeLists.txt](/assets/CMakeLists.txt) for details on how the icon
is generated. The final icon will be installed at `/usr/share/pixmaps/openage.png` via
`make install`.
10 changes: 10 additions & 0 deletions dist/openage.desktop
@@ -0,0 +1,10 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=openage
Comment=Free engine clone of Age of Empires II
Exec=openage --data=assets %u
Path=.openage
Terminal=true
Type=Application
Icon=openage
Categories=Game;StrategyGame;

0 comments on commit 78f9599

Please sign in to comment.