This repository has been archived by the owner on Jul 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* appdata.xml * CMakeLists.txt * icon location changes Don't try to use cmake yet. @linux-player9 we are making progress ;)
- Loading branch information
Showing
13 changed files
with
85 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |