# HG changeset patch
# User koda
# Date 1290905923 -3600
# Node ID 6cdb427ef82cd6e23e6c9da7652dc20e271116fe
# Parent 0445d807193ee47deebe4bd3ab538cbfbfd7fb0e
update build files for compliance with Mac AppStore
diff -r 0445d807193e -r 6cdb427ef82c CMakeLists.txt
--- 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()
diff -r 0445d807193e -r 6cdb427ef82c hedgewars/SDLMain.m
--- 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];
diff -r 0445d807193e -r 6cdb427ef82c share/CMakeLists.txt
--- 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"
diff -r 0445d807193e -r 6cdb427ef82c share/Info.plist.in
--- 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 @@
CFBundleSignature
Hedge
CFBundleVersion
+ ${HEDGEWARS_REVISION}
+ CFBundleShortVersionString
${HEDGEWARS_VERSION}
NSHumanReadableCopyright
- GPL
+ © 2004-2010 Hedgewars Project
NSAppleScriptEnabled
LSRequiresNativeExecution
-
+
LSMinimumSystemVersionByArchitecture
- x86_64
- 10.6.0
- i386
- 10.4.0
- ppc
- 10.4.0
+ x86_64
+ 10.6.0
+ i386
+ 10.4.0
+ ppc
+ 10.4.0
LSArchitecturePriority
- x86_64
- i386
- ppc
+ x86_64
+ i386
+ ppc
LSMinimumSystemVersion
${minimum_macosx}
SUPublicDSAKeyFile
dsa_pub.pem
+ LSApplicationCategoryType
+ public.app-category.strategy-games