Remove MEGAGLEST_VERSION for MG_VERSION_H_CONTENTS

I noticed that mk/macos/CMakeLists.txt has special code for extracting the
megaglest version , but its already done in CMakeLists.txt. This removes the
duplicate detection and changes the users of MEGAGLEST_VERSION to
MG_VERSION_H_CONTENTS.
This commit is contained in:
Karl Goetz 2014-12-17 19:47:50 +11:00
parent c945a5721d
commit 4c10c9c2b3
2 changed files with 5 additions and 17 deletions

View File

@ -29,19 +29,7 @@ ENDIF(NOT CONFIG_HAS_BEEN_RUN_BEFORE)
##install part
#extracting the current version...
EXECUTE_PROCESS(
COMMAND /usr/bin/sed
-n -e "s/.*glestVersionString = \"v\\\(.*\\\)\";.*/\\1/p"
game_util.cpp
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/source/glest_game/facilities"
OUTPUT_VARIABLE MEGAGLEST_VERSION )
#for some reason the MEGAGLEST_VERSION can containts return like thus remove it
STRING(REGEX REPLACE "\n" "" MEGAGLEST_VERSION "${MEGAGLEST_VERSION}")
set(CPACK_PACKAGE_FILE_NAME MegaGlest-${MEGAGLEST_VERSION})
set(CPACK_PACKAGE_FILE_NAME MegaGlest-${MG_VERSION_H_CONTENTS})
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/mk/macosx/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
@ -50,7 +38,7 @@ include (InstallRequiredSystemLibraries)
set (CPACK_RESOURCE_FILE_LICENSE
"${CMAKE_CURRENT_SOURCE_DIR}/docs/COPYRIGHT.source_code.txt")
set (CPACK_GENERATOR Bundle)
set (CPACK_GENERATOR "Bundle")
set (CPACK_BUNDLE_NAME "MegaGlest")
set (CPACK_BUNDLE_STARTUP_COMMAND "${PROJECT_SOURCE_DIR}/data/glest_game/megaglest")
set (CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/mk/macosx/MegaGlest.icns")

View File

@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>MegaGlest</string>
<key>CFBundleGetInfoString</key>
<string>${MEGAGLEST_VERSION}, © 2001-2010 The Glest Team All Rights Reserved.</string>
<string>${MG_VERSION_H_CONTENTS}, © 2001-2010 The Glest Team All Rights Reserved.</string>
<key>CFBundleIconFile</key>
<string>MegaGlest</string>
<key>CFBundleIdentifier</key>
@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MEGAGLEST_VERSION}</string>
<string>${MG_VERSION_H_CONTENTS}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MEGAGLEST_VERSION}</string>
<string>${MG_VERSION_H_CONTENTS}</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>