--- a/CMakeLists.txt Sat Nov 27 23:29:07 2010 +0100
+++ b/CMakeLists.txt Sun Nov 28 01:58:43 2010 +0100
@@ -18,13 +18,9 @@
ARGS identify -in ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE version_suffix
)
- STRING(REGEX REPLACE "(.*) +(.*)" "\\2:\\1" version_suffix ${version_suffix})
+ STRING(REGEX REPLACE "([0-9a-zA-Z]+)(.*) ([0-9]+)(.*)" "\\3:\\1" version_suffix ${version_suffix})
MESSAGE(STATUS "Building revision ${version_suffix}")
set(version_suffix ".${version_suffix}")
-# #truncate to numbers only - trying to fix a problem described in http://www.hedgewars.org/node/2019
-# STRING(REGEX REPLACE "^\\.(\\d+)" ".\\1" version_suffix ${version_suffix})
-# # screw whole suffix if there's no number
-# STRING(REGEX REPLACE "^\\.([a-z]+.*)" "-dev" version_suffix ${version_suffix})
ENDIF()
ENDIF()
ELSE()
--- a/hedgewars/SDLMain.m Sat Nov 27 23:29:07 2010 +0100
+++ b/hedgewars/SDLMain.m Sun Nov 28 01:58:43 2010 +0100
@@ -216,9 +216,11 @@
#endif /* SDL_USE_CPS */
/* Set up the menubar */
- [NSApp setMainMenu:[[NSMenu alloc] init]];
+ NSMenu *menu = [[NSMenu alloc] init];
+ [NSApp setMainMenu:menu];
setApplicationMenu();
setupWindowMenu();
+ [menu release];
/* Create SDLMain and make it the app delegate */
sdlMain = [[SDLMain alloc] init];
--- a/share/CMakeLists.txt Sat Nov 27 23:29:07 2010 +0100
+++ b/share/CMakeLists.txt Sun Nov 28 01:58:43 2010 +0100
@@ -1,6 +1,19 @@
add_subdirectory(hedgewars)
IF(APPLE)
+ #needed for CFBundleVersion and CFBundleShortVersionString
+ FIND_PROGRAM(HGCOMMAND hg)
+ IF (HGCOMMAND AND (EXISTS ${hedgewars_SOURCE_DIR}/.hg))
+ exec_program(${HGCOMMAND}
+ ARGS identify -n ${hedgewars_SOURCE_DIR}
+ OUTPUT_VARIABLE version_suffix
+ )
+ STRING(REGEX REPLACE "([0-9]+)(.*)" "\\1" version_suffix ${version_suffix})
+ set (HEDGEWARS_REVISION ${version_suffix})
+ ELSE ()
+ set (HEDGEWARS_REVISION ${HEDGEWARS_VERSION})
+ ENDIF ()
+
configure_file(${hedgewars_SOURCE_DIR}/share/Info.plist.in
${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/Info.plist"
--- a/share/Info.plist.in Sat Nov 27 23:29:07 2010 +0100
+++ b/share/Info.plist.in Sun Nov 28 01:58:43 2010 +0100
@@ -17,31 +17,35 @@
<key>CFBundleSignature</key>
<string>Hedge</string>
<key>CFBundleVersion</key>
+ <string>${HEDGEWARS_REVISION}</string>
+ <key>CFBundleShortVersionString</key>
<string>${HEDGEWARS_VERSION}</string>
<key>NSHumanReadableCopyright</key>
- <string>GPL</string>
+ <string>© 2004-2010 Hedgewars Project</string>
<key>NSAppleScriptEnabled</key>
<false/>
<key>LSRequiresNativeExecution</key>
- <true/>
+ <true/>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
- <key>x86_64</key>
- <string>10.6.0</string>
- <key>i386</key>
- <string>10.4.0</string>
- <key>ppc</key>
- <string>10.4.0</string>
+ <key>x86_64</key>
+ <string>10.6.0</string>
+ <key>i386</key>
+ <string>10.4.0</string>
+ <key>ppc</key>
+ <string>10.4.0</string>
</dict>
<key>LSArchitecturePriority</key>
<array>
- <string>x86_64</string>
- <string>i386</string>
- <string>ppc</string>
+ <string>x86_64</string>
+ <string>i386</string>
+ <string>ppc</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>${minimum_macosx}</string>
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
+ <key>LSApplicationCategoryType</key>
+ <string>public.app-category.strategy-games</string>
</dict>
</plist>