1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

add NSIS generator settings

This commit is contained in:
Michael Pavlyshko 2014-07-14 01:23:57 +03:00
parent 6a23960642
commit 88316f93d1
2 changed files with 42 additions and 1 deletions

View File

@ -283,7 +283,22 @@ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSIO
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
if(WIN32)
set(CPACK_GENERATOR ZIP) # just use zip? CPack has some GUI install as well
set(CPACK_STRIP_FILES "VCMI_launcher.exe;VCMI_client.exe;VCMI_server.exe;VCMI_lib.exe;AI/BattleAI.dll;AI/EmptyAI.dll;AI/StupidAI.dll;AI/VCAI.dll")
set(CPACK_MONOLITHIC_INSTALL 1)
set(CPACK_PACKAGE_NAME "VCMI")
set(CPACK_PACKAGE_VENDOR "VCMI team")
set(CPACK_PACKAGE_FILE_NAME "vcmi-${CPACK_PACKAGE_VERSION}-win32")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt")
set(CPACK_PACKAGE_EXECUTABLES "VCMI_launcher;VCMI")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
set(CPACK_NSIS_PACKAGE_NAME "VCMI ${CPACK_PACKAGE_VERSION}")
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " CreateShortCut \\\"$DESKTOP\\\\VCMI.lnk\\\" \\\"$INSTDIR\\\\VCMI_launcher.exe\\\"")
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " Delete \\\"$DESKTOP\\\\VCMI.lnk\\\" ")
configure_file("${CMAKE_SOURCE_DIR}/cmake_modules/CMakeCPackOptions.cmake.in" "${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake")
elseif(APPLE)
set(CPACK_GENERATOR DragNDrop)
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/osx/dmg_background.png")

View File

@ -0,0 +1,26 @@
# This file is configured at cmake time, and loaded at cpack time.
# To pass variables to cpack from cmake, they must be configured
# in this file.
if(CPACK_GENERATOR MATCHES "NSIS")
set(CPACK_NSIS_INSTALL_ROOT "@CPACK_NSIS_INSTALL_ROOT@")
# set the install/unistall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
set(CPACK_NSIS_MUI_ICON "@CMAKE_SOURCE_DIR@/client\\vcmi.ico")
set(CPACK_NSIS_MUI_UNIICON "@CMAKE_SOURCE_DIR@/client\\vcmi.ico")
# set the package header icon for MUI
set(CPACK_PACKAGE_ICON "@CMAKE_SOURCE_DIR@/client\\vcmi.ico")
set(CPACK_NSIS_MENU_LINKS
"http://vcmi.eu/" "VCMI Web Site")
set(CPACK_NSIS_INSTALLED_ICON_NAME "VCMI_client.exe")
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
set(CPACK_NSIS_PACKAGE_NAME "@CPACK_NSIS_PACKAGE_NAME@")
set(CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, open-source engine for Heroes of Might and Magic III ")
set(CPACK_NSIS_HELP_LINK "http://vcmi.eu/")
set(CPACK_NSIS_URL_INFO_ABOUT "http://vcmi.eu/")
set(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
endif()