Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
0.8.02 release prep, wip
Browse files Browse the repository at this point in the history
* appdata.xml
* CMakeLists.txt
* icon location changes

Don't try to use cmake yet.

@linux-player9 we are making progress ;)
  • Loading branch information
andy5995 committed Sep 26, 2018
1 parent bc8d1f8 commit 8fca3b1
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 90 deletions.
123 changes: 59 additions & 64 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,91 +1,86 @@
##################################################################################
# Game data
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.2 )
CMAKE_MINIMUM_REQUIRED( VERSION 3.2.0 )
PROJECT( ZetaGlest )

OPTION(WANT_INSTALL_DATA "Install ZetaGlest's data" ON)
OPTION(WANT_INSTALL_DATA "Install ZetaGlest's data" OFF)

IF(NOT DATADIR)
SET(DATADIR "share/zetaglest/" CACHE STRING "The installation path for data files ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(NOT ZETAGLEST_APPDATA_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
SET(ZETAGLEST_APPDATA_INSTALL_PATH "share/metainfo/" CACHE STRING "The installation path for appdata files ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(NOT ZETAGLEST_DESKTOP_INSTALL_PATH)
SET(ZETAGLEST_DESKTOP_INSTALL_PATH "share/applications/" CACHE STRING "The installation path for desktop files ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(NOT INSTALL_DIR_ICON)
SET(INSTALL_DIR_ICON "share/pixmaps/" CACHE STRING "The installation path for icon files ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(NOT ZETAGLEST_MENU_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
#SET(ZETAGLEST_MENU_INSTALL_PATH "share/menu/" CACHE STRING "The installation path for menu file ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
IF(NOT INSTALL_DIR_BIN AND NOT "${ZETAGLEST_MENU_INSTALL_PATH}" STREQUAL "")
SET(INSTALL_DIR_BIN "bin/" CACHE STRING "The installation path for binaries ${COMMON_INFO_ABOUT_PATH}")
ENDIF()
FOREACH(ZG_PATH BIN ICON)
IF(NOT "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}" STREQUAL "")
IF(IS_ABSOLUTE "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}")
SET(ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}/")
ELSE()
SET(ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}/")
ENDIF()
STRING(REGEX REPLACE "//+" "/" ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH}")
#
# In this file where the INSTALL() directive is used, nothing is actually installed
# until `make install` is issued. This extra condition isn't really needed, but
# may help prevent overwriting or trying to install data to an existing
# zetaglest data directory.
#
if(WANT_INSTALL_DATA)

IF(NOT INSTALL_DIR_APPDATA)
SET(INSTALL_DIR_APPDATA "${CMAKE_INSTALL_PREFIX}/share/metainfo/" CACHE PATH "The installation path for appdata files")
ENDIF()
ENDFOREACH()

CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/others/menu/zetaglest.menu.in"
"${PROJECT_BINARY_DIR}/others/menu/zetaglest.menu.in" COPYONLY)
IF(BUILD_MAP_EDITOR OR NOT DEFINED BUILD_MAP_EDITOR)
FILE(READ "${PROJECT_SOURCE_DIR}/others/menu/zetaglest_editor.menu.in" EDITOR_MENU)
FILE(APPEND "${PROJECT_BINARY_DIR}/others/menu/zetaglest.menu.in" "${EDITOR_MENU}")
ENDIF()
CONFIGURE_FILE("${PROJECT_BINARY_DIR}/others/menu/zetaglest.menu.in"
"${PROJECT_BINARY_DIR}/others/menu/zetaglest")
IF(NOT INSTALL_DIR_MENU)
SET(INSTALL_DIR_MENU "${CMAKE_INSTALL_PREFIX}/share/menu/" CACHE PATH "The installation path for menus")
ENDIF()

FOREACH(ZG_PATH BIN ICON)
IF(NOT "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}" STREQUAL "")
IF(IS_ABSOLUTE "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}")
SET(ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}/")
ELSE()
SET(ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}/")
ENDIF()
STRING(REGEX REPLACE "//+" "/" ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH}")
ENDIF()
ENDFOREACH()

CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/others/menu/zetaglest.menu.in"
"${PROJECT_BINARY_DIR}/others/menu/zetaglest.menu.in" COPYONLY)
IF(BUILD_MAP_EDITOR OR NOT DEFINED BUILD_MAP_EDITOR)
FILE(READ "${PROJECT_SOURCE_DIR}/others/menu/zetaglest_editor.menu.in" EDITOR_MENU)
FILE(APPEND "${PROJECT_BINARY_DIR}/others/menu/zetaglest.menu.in" "${EDITOR_MENU}")
ENDIF()
CONFIGURE_FILE("${PROJECT_BINARY_DIR}/others/menu/zetaglest.menu.in"
"${PROJECT_BINARY_DIR}/others/menu/zetaglest")

# Installation of the data
INSTALL(DIRECTORY "${PROJECT_SOURCE_DIR}/data"
"${PROJECT_SOURCE_DIR}/docs"
"${PROJECT_SOURCE_DIR}/maps"
"${PROJECT_SOURCE_DIR}/scenarios"
"${PROJECT_SOURCE_DIR}/techs"
"${PROJECT_SOURCE_DIR}/tilesets"
"${PROJECT_SOURCE_DIR}/tutorials"
DESTINATION ${DATADIR}
OPTIONAL REGEX "/.git" EXCLUDE)
# Installation of the data
INSTALL(DIRECTORY "${PROJECT_SOURCE_DIR}/data"
"${PROJECT_SOURCE_DIR}/docs"
"${PROJECT_SOURCE_DIR}/maps"
"${PROJECT_SOURCE_DIR}/scenarios"
"${PROJECT_SOURCE_DIR}/techs"
"${PROJECT_SOURCE_DIR}/tilesets"
"${PROJECT_SOURCE_DIR}/tutorials"
DESTINATION ${INSTALL_DIR_DATA}
OPTIONAL REGEX "/.git" EXCLUDE)

IF(UNIX AND NOT "${ZETAGLEST_APPDATA_INSTALL_PATH}" STREQUAL "")
INSTALL(FILES "${PROJECT_SOURCE_DIR}/others/appdata/zetaglest.appdata.xml"
DESTINATION ${ZETAGLEST_APPDATA_INSTALL_PATH})
DESTINATION ${INSTALL_DIR_APPDATA})

IF(BUILD_MAP_EDITOR OR NOT DEFINED BUILD_MAP_EDITOR)
INSTALL(FILES "${PROJECT_SOURCE_DIR}/others/appdata/zetaglest_editor.appdata.xml"
DESTINATION ${ZETAGLEST_APPDATA_INSTALL_PATH})
ENDIF()
ENDIF()
IF(UNIX AND NOT "${ZETAGLEST_MENU_INSTALL_PATH}" STREQUAL "")
DESTINATION ${INSTALL_DIR_APPDATA})

INSTALL(FILES
"${PROJECT_BINARY_DIR}/others/menu/zetaglest"
DESTINATION ${ZETAGLEST_MENU_INSTALL_PATH})
ENDIF()
DESTINATION ${INSTALL_DIR_MENU})

IF(UNIX AND NOT APPLE)
INSTALL(FILES
IF(UNIX AND NOT APPLE)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/others/icons/zetaglest.png"
"${PROJECT_SOURCE_DIR}/others/icons/zetaglest.xpm"
DESTINATION ${INSTALL_DIR_ICON})
ENDIF()

INSTALL(FILES
"${PROJECT_SOURCE_DIR}/others/desktop/zetaglest.desktop"
DESTINATION ${ZETAGLEST_DESKTOP_INSTALL_PATH})
DESTINATION ${INSTALL_DIR_DESKTOP})

IF(BUILD_MAP_EDITOR OR NOT DEFINED BUILD_MAP_EDITOR)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/others/desktop/zetaglest_editor.desktop"
DESTINATION ${ZETAGLEST_DESKTOP_INSTALL_PATH})
DESTINATION ${INSTALL_DIR_DESKTOP})
ENDIF()
IF(BUILD_MODEL_VIEWER OR NOT DEFINED BUILD_MODEL_VIEWER)
INSTALL(FILES

INSTALL(FILES
"${PROJECT_SOURCE_DIR}/others/desktop/zetaglest_g3dviewer.desktop"
DESTINATION ${ZETAGLEST_DESKTOP_INSTALL_PATH})
ENDIF()
DESTINATION ${INSTALL_DIR_DESKTOP})

ENDIF()
14 changes: 7 additions & 7 deletions others/appdata/zetaglest.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
<image>http://megaglest.org/uploads/images/appdata/game5.png</image>
</screenshot>
</screenshots>
<url type="homepage">http://megaglest.org</url>
<url type="bugtracker">http://bugs.megaglest.org</url>
<url type="homepage">https://zetaglest.github.io/docs/</url>
<url type="bugtracker">https://github.com/ZetaGlest/zetaglest-source/issues</url>
<url type="faq">http://faq.megaglest.org</url>
<url type="help">http://readme.megaglest.org</url>
<url type="donation">http://megaglest.org/donations</url>
<url type="translate">http://translate.megaglest.org</url>
<developer_name>The MegaGlest Team</developer_name>
<update_contact>contact_at_megaglest.org</update_contact>
<url type="help">https://zetaglest.github.io/docs/</url>
<!-- <url type="donation">http://megaglest.org/donations</url> -->
<!-- <url type="translate">http://translate.megaglest.org</url> -->
<developer_name>The ZetaGlest Team</developer_name>
<update_contact>https://github.com/ZetaGlest/zetaglest-source#contact</update_contact>
<content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute>
<content_attribute id="violence-fantasy">moderate</content_attribute>
Expand Down
22 changes: 11 additions & 11 deletions others/appdata/zetaglest_editor.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
<id>megaglest_editor.desktop</id>
<metadata_license>CC-BY-SA-4.0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>MegaGlest Map Editor</name>
<summary>Game tool from MegaGlest game</summary>
<name>ZetaGlest Map Editor</name>
<summary>Map editor and viewer for ZetaGlest</summary>
<description>
<p>MegaGlest Map Editor allows to create new and edit existing maps for MegaGlest / Glest game and for games based on MegaGlest too.</p>
<p>MegaGlest is a customizable 3D real-time strategy game (RTS).</p>
<p>ZetaGlest Map Editor is a user-friendly editor and viewer for maps used in ZetaGlest</p>
<p>ZetaGlest is a customizable 3D real-time strategy game (RTS).</p>
</description>
<screenshots>
<screenshot type="default">
<image>http://megaglest.org/uploads/images/appdata/mapeditor1.png</image>
</screenshot>
</screenshots>
<url type="homepage">http://megaglest.org</url>
<url type="bugtracker">http://bugs.megaglest.org</url>
<url type="homepage">https://zetaglest.github.io/docs/</url>
<url type="bugtracker">https://github.com/ZetaGlest/zetaglest-source/issues</url>
<url type="faq">http://faq.megaglest.org</url>
<url type="help">http://readme.megaglest.org</url>
<url type="donation">http://megaglest.org/donations</url>
<url type="translate">http://translate.megaglest.org</url>
<developer_name>The MegaGlest Team</developer_name>
<update_contact>contact_at_megaglest.org</update_contact>
<url type="help">https://zetaglest.github.io/docs/</url>
<!-- <url type="donation">http://megaglest.org/donations</url> -->
<!-- <url type="translate">http://translate.megaglest.org</url> -->
<developer_name>The ZetaGlest Team</developer_name>
<update_contact>https://github.com/ZetaGlest/zetaglest-source#contact</update_contact>
<content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute>
<content_attribute id="violence-fantasy">none</content_attribute>
Expand Down
Binary file added others/desktop/g3dviewer.ico
Binary file not shown.
Binary file added others/desktop/zetaglest.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion others/desktop/zetaglest_editor.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Categories=Game;StrategyGame;
Comment=Map Editor
Name=ZetaGlest Map Editor
Icon=zetaglest
Icon=zetaglest_editor
Exec=zetaglest_editor
Terminal=false
Type=Application
Expand Down
Binary file added others/desktop/zetaglest_editor.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion others/desktop/zetaglest_g3dviewer.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Categories=Game;StrategyGame;
Comment=G3d Model Viewer
Name=ZetaGlest Model Viewer
Icon=zetaglest
Icon=g3dviewer
Exec=zetaglest_g3dviewer
Terminal=false
Type=Application
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions others/menu/zetaglest.menu.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
?package(megaglest-data,megaglest): \
?package(zetaglest-data,zetaglest): \
needs="X11" \
hints="RTS,rts" \
section="Games/Strategy" \
title="ZetaGlest" \
longtitle="ZetaGlest, a 3D real time strategy game." \
command="@MEGAGLEST_FULL_BIN_INSTALL_PATH@megaglest" \
icon="@MEGAGLEST_FULL_ICON_INSTALL_PATH@megaglest.xpm"
command="@INSTALL_DIR_BIN@zetaglest" \
icon="@INSTALL_DIR_ICON@zetaglest.xpm"
File renamed without changes
File renamed without changes.
6 changes: 3 additions & 3 deletions others/menu/zetaglest_editor.menu.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
?package(megaglest-data,megaglest): \
?package(zetaglest-data,zetaglest): \
needs="X11" \
hints="editor,maps" \
section="Games/Tools" \
title="ZetaGlest Map Editor" \
longtitle="ZetaGlest Map Editor, a game tool for 3D real time strategy game: ZetaGlest." \
command="@MEGAGLEST_FULL_BIN_INSTALL_PATH@megaglest_editor" \
icon="@MEGAGLEST_FULL_ICON_INSTALL_PATH@megaglest.xpm"
command="@INSTALL_DIR_BIN@zetaglest_editor" \
icon="@INSTALL_DIR_ICON@zetaglest_editor.ico"

0 comments on commit 8fca3b1

Please sign in to comment.