mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 04:02:30 +01:00
Merge pull request #42 from goetzk/fix-mac-packaging-using-bundle-generator
Fix mac packaging using bundle generator
This commit is contained in:
commit
67cc640807
@ -78,7 +78,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## Compiler flags
|
## Compiler flags, CPACK configuration and other Apple specific code.
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
|
||||||
include(${PROJECT_SOURCE_DIR}/mk/macosx/CMakeLists.txt)
|
include(${PROJECT_SOURCE_DIR}/mk/macosx/CMakeLists.txt)
|
||||||
@ -381,6 +381,19 @@ IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|||||||
MESSAGE(WARNING ">> CLANG is NOT currently compatible as it does not support the following essential GCC compiler settings: -frounding-math -fsignaling-nans")
|
MESSAGE(WARNING ">> CLANG is NOT currently compatible as it does not support the following essential GCC compiler settings: -frounding-math -fsignaling-nans")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
# CPack configuration shared accross platforms
|
||||||
|
SET(CPACK_PACKAGE_NAME ${PKG_NAME})
|
||||||
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MegaGlest")
|
||||||
|
SET(CPACK_PACKAGE_VENDOR "megaglest.org")
|
||||||
|
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
|
||||||
|
#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
|
||||||
|
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "megaglest")
|
||||||
|
SET(CPACK_PACKAGE_VERSION_MAJOR ${VER_MAJOR})
|
||||||
|
SET(CPACK_PACKAGE_VERSION_MINOR ${VER_MINOR})
|
||||||
|
SET(CPACK_PACKAGE_VERSION_PATCH ${VER_RELEASE})
|
||||||
|
|
||||||
|
|
||||||
|
# Debian specific generator options
|
||||||
IF(NOT DEFINED CPACK_GENERATOR)
|
IF(NOT DEFINED CPACK_GENERATOR)
|
||||||
SET(CPACK_GENERATOR "DEB")
|
SET(CPACK_GENERATOR "DEB")
|
||||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Mark Vejvoda") #required
|
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Mark Vejvoda") #required
|
||||||
@ -413,23 +426,15 @@ IF(NOT DEFINED CPACK_GENERATOR)
|
|||||||
# OUTPUT_STRIP_TRAILING_WHITESPACE
|
# OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
# )
|
# )
|
||||||
#endif(DPKG_PROGRAM)
|
#endif(DPKG_PROGRAM)
|
||||||
|
|
||||||
SET(CPACK_PACKAGE_NAME ${PKG_NAME})
|
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MegaGlest")
|
|
||||||
SET(CPACK_PACKAGE_VENDOR "megaglest.org")
|
|
||||||
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
|
|
||||||
#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
|
|
||||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "megaglest")
|
|
||||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${VER_MAJOR})
|
|
||||||
SET(CPACK_PACKAGE_VERSION_MINOR ${VER_MINOR})
|
|
||||||
SET(CPACK_PACKAGE_VERSION_PATCH ${VER_RELEASE})
|
|
||||||
IF(WIN32)
|
|
||||||
SET(CPACK_NSIS_DISPLAY_NAME "MegaGlest")
|
|
||||||
SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/mk/windoze/glest.ico")
|
|
||||||
SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/mk/windoze/megaglest.ico")
|
|
||||||
SET(CPACK_NSIS_URL_INFO_ABOUT "http://megaglest.org")
|
|
||||||
ENDIF()
|
|
||||||
ENDIF(NOT DEFINED CPACK_GENERATOR)
|
ENDIF(NOT DEFINED CPACK_GENERATOR)
|
||||||
|
|
||||||
|
IF(CPACK_GENERATOR STREQUAL "NSIS")
|
||||||
|
SET(CPACK_NSIS_DISPLAY_NAME "MegaGlest")
|
||||||
|
SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/mk/windoze/glest.ico")
|
||||||
|
SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/mk/windoze/megaglest.ico")
|
||||||
|
SET(CPACK_NSIS_URL_INFO_ABOUT "http://megaglest.org")
|
||||||
|
ENDIF(CPACK_GENERATOR STREQUAL "NSIS")
|
||||||
|
|
||||||
INCLUDE(CPack)
|
INCLUDE(CPack)
|
||||||
|
|
||||||
get_directory_property( DirDefs DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
|
get_directory_property( DirDefs DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
|
||||||
|
@ -31,22 +31,28 @@ LINK_DIRECTORIES(/opt/local/lib)
|
|||||||
|
|
||||||
##install part
|
##install part
|
||||||
|
|
||||||
set(CPACK_PACKAGE_FILE_NAME MegaGlest-${MG_VERSION_H_CONTENTS})
|
# This changes Info.plist from something with variables and CMakeisms to
|
||||||
|
# something that can be installed on disk.
|
||||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/mk/macosx/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/mk/macosx/Info.plist"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
|
||||||
|
|
||||||
include (InstallRequiredSystemLibraries)
|
include (InstallRequiredSystemLibraries)
|
||||||
|
|
||||||
|
# Use bundle generator (OSX has 3 other options if you feel adventurous)
|
||||||
|
set (CPACK_GENERATOR "Bundle")
|
||||||
|
|
||||||
|
# The following CPACK_* options are all required
|
||||||
|
set (CPACK_PACKAGE_FILE_NAME MegaGlest-${VER_MAJOR}.${VER_MINOR}.${VER_RELEASE})
|
||||||
|
set (CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/mk/macosx/MegaGlest.icns")
|
||||||
|
|
||||||
set (CPACK_RESOURCE_FILE_LICENSE
|
set (CPACK_RESOURCE_FILE_LICENSE
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/docs/COPYRIGHT.source_code.txt")
|
"${CMAKE_CURRENT_SOURCE_DIR}/docs/COPYRIGHT.source_code.txt")
|
||||||
set (CPACK_GENERATOR Bundle)
|
|
||||||
set (CPACK_BUNDLE_NAME "MegaGlest")
|
set (CPACK_BUNDLE_NAME "MegaGlest")
|
||||||
set (CPACK_BUNDLE_STARTUP_COMMAND "${PROJECT_SOURCE_DIR}/data/glest_game/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")
|
set (CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/mk/macosx/MegaGlest.icns")
|
||||||
set (CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/mk/macosx/MegaGlest.icns")
|
|
||||||
set (CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
|
set (CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
|
||||||
#set (CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/mk/macosx/Info.plist.template")
|
|
||||||
|
# Install files in to the package (FIXME: how? we sure?)
|
||||||
INSTALL(FILES
|
INSTALL(FILES
|
||||||
${LUA_LIBRARIES}
|
${LUA_LIBRARIES}
|
||||||
DESTINATION ../Frameworks
|
DESTINATION ../Frameworks
|
||||||
@ -63,6 +69,4 @@ STRING(REGEX REPLACE ";.*" "" SDL_LIBRARY_DIR "${SDL_LIBRARY}")
|
|||||||
# ${PNG_LIBRARY}
|
# ${PNG_LIBRARY}
|
||||||
# DESTINATION ../Frameworks
|
# DESTINATION ../Frameworks
|
||||||
# )
|
# )
|
||||||
|
|
||||||
include (CPack)
|
|
||||||
|
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>English</string>
|
<string>English</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>MegaGlest</string>
|
<string>megaglest</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>${MG_VERSION_H_CONTENTS}, © 2001-2010 The Glest Team All Rights Reserved.</string>
|
<string>${VER_MAJOR}.${VER_MINOR}.${VER_RELEASE}, © 2001-2015 The Glest Team All Rights Reserved.</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>MegaGlest</string>
|
<string>MegaGlest</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>geovah.MegaGlest</string>
|
<string>org.megaglest.v${VER_MAJOR}-${VER_MINOR}-${VER_RELEASE}</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
@ -19,11 +19,11 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>${MG_VERSION_H_CONTENTS}</string>
|
<string>${VER_MAJOR}.${VER_MINOR}.${VER_RELEASE}</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>MGGL</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>${MG_VERSION_H_CONTENTS}</string>
|
<string>${VER_MAJOR}.${VER_MINOR}.${VER_RELEASE}</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user