From 23a26994b5fb9599d02b4d9184c2b81d439ecbee Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 26 May 2011 14:36:43 +0000 Subject: [PATCH] - updates for better handling with debian --- CMakeLists.txt | 4 ++ mk/linux/makerelease.sh | 6 ++ mk/linux/megaglest.6 | 117 +++++++++++++++++++++++++++++++ source/glest_game/CMakeLists.txt | 20 ++++++ 4 files changed, 147 insertions(+) create mode 100644 mk/linux/megaglest.6 diff --git a/CMakeLists.txt b/CMakeLists.txt index ef27425a..085463fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,6 +118,10 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW) IF(NOT MEGAGLEST_ICON_INSTALL_PATH) SET(MEGAGLEST_ICON_INSTALL_PATH "share/pixmaps/" CACHE STRING "The installation path for icon files (this is appended to the CMAKE_INSTALL_PREFIX)") ENDIF() + IF(NOT MEGAGLEST_MANPAGE_INSTALL_PATH) + SET(MEGAGLEST_MANPAGE_INSTALL_PATH "share/man/man6/" CACHE STRING "The installation path for manpage files (this is appended to the CMAKE_INSTALL_PREFIX)") + ENDIF() + IF(NOT CUSTOM_DATA_INSTALL_PATH) SET(CUSTOM_DATA_INSTALL_PATH "'\\\"${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}\\\"'" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)") ENDIF() diff --git a/mk/linux/makerelease.sh b/mk/linux/makerelease.sh index 424720fc..1b543af9 100755 --- a/mk/linux/makerelease.sh +++ b/mk/linux/makerelease.sh @@ -30,8 +30,14 @@ svn export --force "$CURRENTDIR/../macosx/" "$RELEASEDIR/mk/macosx/" svn export --force "$CURRENTDIR/../../docs" $RELEASEDIR cp "$CURRENTDIR/"*.ini $RELEASEDIR cp "$CURRENTDIR/glest.ico" $RELEASEDIR +cp "$CURRENTDIR/megaglest.bmp" $RELEASEDIR cp "$CURRENTDIR/megaglest.png" $RELEASEDIR cp "$CURRENTDIR/megaglest.desktop" $RELEASEDIR +cp "$CURRENTDIR/megaglest.6" $RELEASEDIR +cp "$CURRENTDIR/../../data/glest_game/megaglest.ico" $RELEASEDIR +cp "$CURRENTDIR/../../data/glest_game/g3dviewer.ico" $RELEASEDIR +cp "$CURRENTDIR/../../data/glest_game/editor.ico" $RELEASEDIR + cp "$CURRENTDIR/start_megaglest"* $RELEASEDIR cp "$CURRENTDIR/../../CMake"* $RELEASEDIR diff --git a/mk/linux/megaglest.6 b/mk/linux/megaglest.6 new file mode 100644 index 00000000..8eddc967 --- /dev/null +++ b/mk/linux/megaglest.6 @@ -0,0 +1,117 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2. +.TH V3.5.2-GNUC: "1" "May 2011" "v3.5.2-GNUC: 40405 [64bit]-May 25 2011 16:34:43, SVN: [Rev: 2297:2299M], [STREFLOP]" "User Commands" +.SH NAME +v3.5.2-GNUC: \- manual page for v3.5.2-GNUC: 40405 [64bit]-May 25 2011 16:34:43, SVN: [Rev: 2297:2299M], [STREFLOP] +.SH DESCRIPTION +\&../mk/linux/megaglest, usage +.PP +Commandline Parameter: Description: +\fB\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\fR \fB\-\-\-\-\-\-\-\-\-\-\-\-\fR +\fB\-\-help\fR displays this help text. +\fB\-\-autostart\-lastgame\fR Automatically starts a game with the last game settings you played. +\fB\-\-connecthost\fR=\fIx\fR Auto connects to a network server at IP or hostname x +\fB\-\-starthost\fR Auto creates a network server. +\fB\-\-load\-scenario\fR=\fIx\fR Auto loads the specified scenario by scenario name. +\fB\-\-version\fR displays the version string of this program. +\fB\-\-opengl\-info\fR displays your video driver's OpenGL information. +\fB\-\-sdl\-info\fR displays your SDL version information. +\fB\-\-lua\-info\fR displays your LUA version information. +\fB\-\-curl\-info\fR displays your CURL version information. +\fB\-\-validate\-techtrees\fR=\fIx=purgeunused=purgeduplicates=svndelete\fR displays a report detailing any known problems related +.IP +to your selected techtrees game data. +Where x is a comma\-delimited list of techtrees to validate. +Where purgeunused is an optional parameter telling the validation to delete extra files in the techtree that are not used. +Where purgeduplicates is an optional parameter telling the validation to merge duplicate files in the techtree. +Where svndelete is an optional parameter telling the validation to call svn delete on duplicate / unused files in the techtree. +*NOTE: This only applies when files are purged due to the above flags being set. +example: ../mk/linux/megaglest \fB\-\-validate\-techtrees\fR=\fImegapack\fR,vbros_pack_5 +.PP +\fB\-\-validate\-factions\fR=\fIx=purgeunused=purgeduplicates\fR displays a report detailing any known problems related +.IP +to your selected factions game data. +Where x is a comma\-delimited list of factions to validate. +Where purgeunused is an optional parameter telling the validation to delete extra files in the faction that are not used. +Where purgeduplicates is an optional parameter telling the validation to merge duplicate files in the faction. +*NOTE: leaving the list empty is the same as running +\fB\-\-validate\-techtrees\fR +example: ../mk/linux/megaglest \fB\-\-validate\-factions\fR=\fItech\fR,egypt +.PP +\fB\-\-validate\-scenario\fR=\fIx=purgeunused=svndelete\fR displays a report detailing any known problems related +.IP +to your selected scenario game data. +Where x is a single scenario to validate. +Where purgeunused is an optional parameter telling the validation to delete extra files in the scenario that are not used. +example: ../mk/linux/megaglest \fB\-\-validate\-scenario\fR=\fIstranded\fR +.PP +\fB\-\-data\-path\fR=\fIx\fR Sets the game data path to x +.IP +example: ../mk/linux/megaglest \fB\-\-data\-path=\fR/usr/local/game_data/ +.PP +\fB\-\-ini\-path\fR=\fIx\fR Sets the game ini path to x +.IP +example: ../mk/linux/megaglest \fB\-\-ini\-path=\fR~/game_config/ +.PP +\fB\-\-log\-path\fR=\fIx\fR Sets the game logs path to x +.IP +example: ../mk/linux/megaglest \fB\-\-log\-path=\fR~/game_logs/ +.PP +\fB\-\-show\-ini\-settings\fR=\fIx\fR displays merged ini settings information. +.IP +Where x is an optional property name to filter (default shows all). +example: ../mk/linux/megaglest \fB\-\-show\-ini\-settings\fR=\fIDebugMode\fR +.PP +\fB\-\-convert\-models\fR=\fIx=textureformat=keepsmallest\fR convert a model file or folder to the current g3d version format. +.IP +Where x is a filename or folder containing the g3d model(s). +Where textureformat is an optional supported texture format to convert to (tga,bmp,jpg,png). +Where keepsmallest is an optional flag indicating to keep original texture if its filesize is smaller than the converted format. +example: ../mk/linux/megaglest \fB\-\-convert\-models\fR=\fItechs\fR/megapack/factions/tech/units/castle/models/castle.g3d=png=keepsmallest +.PP +\fB\-\-use\-language\fR=\fIx\fR force the language to be the language specified by x. +.IP +Where x is a supported language (such as english). +example: ../mk/linux/megaglest \fB\-\-use\-language\fR=\fIenglish\fR +.PP +\fB\-\-show\-map\-crc\fR=\fIx\fR show the calculated CRC for the map named x. +.IP +Where x is a map name. +example: ../mk/linux/megaglest \fB\-\-show\-map\-crc\fR=\fIfour_rivers\fR +.PP +\fB\-\-show\-tileset\-crc\fR=\fIx\fR show the calculated CRC for the tileset named x. +.IP +Where x is a tileset name. +example: ../mk/linux/megaglest \fB\-\-show\-tileset\-crc\fR=\fIforest\fR +.PP +\fB\-\-show\-techtree\-crc\fR=\fIx\fR show the calculated CRC for the techtree named x. +.IP +Where x is a techtree name. +example: ../mk/linux/megaglest \fB\-\-show\-techtree\-crc\fR=\fImegapack\fR +.PP +\fB\-\-show\-scenario\-crc\fR=\fIx\fR show the calculated CRC for the scenario named x. +.IP +Where x is a scenario name. +example: ../mk/linux/megaglest \fB\-\-show\-scenario\-crc\fR=\fIstorming\fR +.PP +\fB\-\-show\-path\-crc\fR=\fIx=y\fR show the calculated CRC for files in the path located in x using file filter y. +.IP +Where x is a path name. +and y is file(s) filter. +example: ../mk/linux/megaglest \fB\-\-show\-path\-crc\fR=\fItechs\fR/=megapack.7z +.PP +\fB\-\-disable\-backtrace\fR disables stack backtrace on errors. +\fB\-\-disable\-vbo\fR disables trying to use Vertex Buffer Objects. +\fB\-\-disable\-sound\fR disables the sound system. +\fB\-\-verbose\fR displays verbose information in the console. +.SH "SEE ALSO" +The full documentation for +.B v3.5.2-GNUC: +is maintained as a Texinfo manual. If the +.B info +and +.B v3.5.2-GNUC: +programs are properly installed at your site, the command +.IP +.B info v3.5.2-GNUC: +.PP +should give you access to the complete manual. diff --git a/source/glest_game/CMakeLists.txt b/source/glest_game/CMakeLists.txt index 999490aa..2bb056eb 100644 --- a/source/glest_game/CMakeLists.txt +++ b/source/glest_game/CMakeLists.txt @@ -211,5 +211,25 @@ IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "") INSTALL(TARGETS ${TARGET_NAME} DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH}) + + # Installation of the program desktop file + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/megaglest.desktop" + DESTINATION ${MEGAGLEST_DESKTOP_INSTALL_PATH}) + + # Installation of the program desktop icon file + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/megaglest.png" + "${PROJECT_SOURCE_DIR}/megaglest.bmp" + "${PROJECT_SOURCE_DIR}/editor.ico" + "${PROJECT_SOURCE_DIR}/glest.ico" + "${PROJECT_SOURCE_DIR}/g3dviewer.ico" + DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) + + # Installation of the program manpage file + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/megaglest.6" + DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH}) + #ENDIF() ENDIF()