change a few buld configurations

- stop building voxelands.icns everytime while doing mac builds.

- give build option to build icns if the logo changes in the future.

- include an appdata file on install (used mostly in GNOME and KDE software
  installers to showcase applications.)
This commit is contained in:
Maverick 2016-01-08 01:28:26 +01:00
parent 208ee1dafc
commit ff604685e4
3 changed files with 51 additions and 3 deletions

View File

@ -30,6 +30,9 @@ else()
set(BUILD_SERVER 1 CACHE BOOL "Build server")
endif()
# conf options for building fresh voxelands.icns from voxelands.svg if a new icon is made.
set(REBUILD_ICNS 0 CACHE BOOL "Rebuild icns from voxelands.svg .")
set(CPU_OPTS 0 CACHE BOOL "Enable CPU optimizations")
if(NOT CMAKE_BUILD_TYPE)
@ -67,6 +70,7 @@ elseif(UNIX) # Linux, BSD etc
set(MANDIR "share/man")
set(EXAMPLE_CONF_DIR ${DOCDIR})
set(XDG_APPS_DIR "share/applications")
set(APPDATADIR "share/appdata")
set(ICONDIR "share/icons")
set(LOCALEDIR "share/${PROJECT_NAME}/locale")
else()
@ -76,6 +80,7 @@ elseif(UNIX) # Linux, BSD etc
set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
set(EXAMPLE_CONF_DIR ${DOCDIR})
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/appdata")
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/locale")
endif()
@ -90,6 +95,7 @@ endif()
if (UNIX AND NOT APPLE)
install(FILES "doc/voxelands.6" "doc/voxelands-server.6" DESTINATION "${MANDIR}/man6")
install(FILES "misc/freedesktop/voxelands.desktop" DESTINATION "${XDG_APPS_DIR}")
install(FILES "misc/voxelands.appdata.xml" DESTINATION "${APPDATADIR}")
install(FILES "misc/freedesktop/icons/scalable/apps/voxelands.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
install(FILES "misc/freedesktop/icons/192x192/apps/voxelands.png" DESTINATION "${ICONDIR}/hicolor/192x192/apps")
install(FILES "misc/freedesktop/icons/128x128/apps/voxelands.png" DESTINATION "${ICONDIR}/hicolor/128x128/apps")

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>voxelands.desktop</id>
<name>Voxelands</name>
<summary>The Fun-Focused Free Software Voxel World Game</summary>
<developer_name>Lisa "darkrose" Milne</developer_name>
<description>
<p>
Voxelands is a sandbox construction game based on Minetest, which
was inspired by earlier "voxel world" games such as Infiniminer.
</p>
<p>
Gameplay puts players in a fully destructible 3D game world where
they can place and dig numerous types of blocks, items and creatures
using a variety of tools. Inside the game world players can build
structures, artworks and anything else their creativity can think of
on multiplayer servers and singleplayer worlds across multiple game
modes.
</p>
</description>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0 and CC-BY-SA-3.0 and MIT</project_license>
<url type="bugtracker">http://forum.voxelands.com/viewforum.php?id=7</url>
<url type="donation">https://www.patreon.com/voxelands</url>
<url type="faq">http://forum.voxelands.com/viewforum.php?id=6</url>
<url type="help">http://forum.voxelands.com/viewforum.php?id=8</url>
<url type="homepage">http://www.voxelands.com/</url>
<project_group>none</project_group>
<screenshots>
<screenshot type="default">
<caption>Voxelands Character Creator</caption>
<image height="891" width="1584">http://www.voxelands.com/images/screenshot1.jpg</image>
</screenshot>
<screenshot>
<image height="891" width="1584">http://www.voxelands.com/images/screenshot2.jpg</image>
</screenshot>
</screenshots>
<updatecontact>darkrose_at_voxelands.com</updatecontact>
</component>

View File

@ -496,10 +496,13 @@ if(BUILD_CLIENT)
${CMAKE_SOURCE_DIR}/misc/mac/${xib}.xib
COMMENT "Compiling ${CMAKE_SOURCE_DIR}/${xib}.xib")
endforeach()
# Make icns from svg, just in case it was updated
add_custom_command (TARGET ${PROJECT_NAME} POST_BUILD
# Make icns from svg, just in case it was updated. Only rebuild from svg when asked.
# Most times use voxelands.icns from binary blob instead.
if(REBUILD_ICNS)
add_custom_command (TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/misc/mac/makeicns.sh
COMMENT "making ${PROJECT_NAME}.icns file from ${PROJECT_NAME}.svg")
COMMENT "making ${PROJECT_NAME}.icns file from ${PROJECT_NAME}.svg")
endif()
# Change to proper version and mac osx deployment version
add_custom_command (TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/misc/mac/makeplist.sh ${VERSION_STRING}