Skip to content

Commit

Permalink
Installer updates
Browse files Browse the repository at this point in the history
Refs #330

git-svn-id: https://svn.nexusformat.org/code/trunk@1845 ff5d1e40-2be0-497f-93bd-dc18237bd3c7
  • Loading branch information
FreddieAkeroyd authored and Freddie Akeroyd committed Sep 20, 2012
1 parent 02ba4fd commit b9eb817
Show file tree
Hide file tree
Showing 6 changed files with 1,261 additions and 1,232 deletions.
24 changes: 17 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ else()
endif()
endif()

# if we do this, need to do it before project()
if(WIN32)
set(CMAKE_INSTALL_PREFIX "c:/nxinstall" CACHE PATH "")
endif()

#
# convert a native windows path to its equivalent cygwin path
#
Expand All @@ -50,6 +45,14 @@ function(to_cygwin_path PATH RESULT)
set(${RESULT} "/cygdrive${CP2}" PARENT_SCOPE) # /c/ -> /cygdrive/c/
endfunction()

# set a default install prefix for windows - we will adjust for 64bit later if this is unchanged
set(DEFAULT_WIN_INSTALL_PREFIX "c:/nxinstall")
if(WIN32)
set(CMAKE_INSTALL_PREFIX ${DEFAULT_WIN_INSTALL_PREFIX} CACHE PATH "")
endif()

set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")

#The name of our project
project (NeXus)

Expand Down Expand Up @@ -81,8 +84,8 @@ set(ZLIB_SEARCH "" CACHE PATH "Where to search for ZLIB")

include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include(CheckTypeSize)
include(CheckFunctionExists)
include(CheckTypeSize)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckLibraryExists)
Expand Down Expand Up @@ -292,8 +295,15 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NX_CFLAGS}")

if (CMAKE_SIZEOF_VOID_P MATCHES "8")
set(ARCH64 1)
set(ARCHSUFFIX "64")
else()
set(ARCH64 0)
set(ARCHSUFFIX "")
endif()

# if we haven't changed the default windows install prefix, adjust for 64 bit
if(${CMAKE_INSTALL_PREFIX} STREQUAL ${DEFAULT_WIN_INSTALL_PREFIX})
set(CMAKE_INSTALL_PREFIX "${DEFAULT_WIN_INSTALL_PREFIX}${ARCHSUFFIX}" CACHE PATH "" FORCE)
endif()

# Recurse into the subdirectories.
Expand Down Expand Up @@ -323,7 +333,7 @@ set(CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CPackOptions.cmake")
set (CPACK_GENERATOR TGZ) # not use ZIP on UNIX as problem with symlinks
set (CPACK_SOURCE_GENERATOR TGZ) # not use ZIP on UNIX as problem with symlinks
if(WIN32)
set (CPACK_GENERATOR ${CPACK_GENERATOR};NSIS)
set (CPACK_GENERATOR ${CPACK_GENERATOR};ZIP;NSIS)
set (CPACK_SOURCE_GENERATOR ${CPACK_SOURCE_GENERATOR};ZIP)
elseif(APPLE)
set (CPACK_GENERATOR ${CPACK_GENERATOR};PackageMaker)
Expand Down
13 changes: 9 additions & 4 deletions CPackOptions.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,19 @@ if (${CPACK_GENERATOR} STREQUAL "NSIS")
set(CPACK_NSIS_HELP_LINK "http://www.nexusformat.org/")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.nexusformat.org/")
set(CPACK_NSIS_CONTACT "${CPACK_PACKAGE_CONTACT}")
set(CPACK_NSIS_MODIFY_PATH ON)
# set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "!include \"@CMAKE_SOURCE_DIR@/nsis_install.nsh\"")
# set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "!include \"@CMAKE_SOURCE_DIR@/nsis_uninstall.nsh\"")
set(CPACK_NSIS_MODIFY_PATH OFF)
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "!include '@CMAKE_SOURCE_DIR_NATIVE@\nsis_install.nsh'")
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "!include '@CMAKE_SOURCE_DIR_NATIVE@\nsis_uninstall.nsh'")
# set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
set(CPACK_PACKAGE_ICON "@CMAKE_SOURCE_DIR_NATIVE_D@\\InstallerBits\\nexus.ico")
set(CPACK_NSIS_MUI_ICON "@CMAKE_SOURCE_DIR_NATIVE_D@\\InstallerBits\\nexus.ico")
set(CPACK_NSIS_MUI_UNIICON "@CMAKE_SOURCE_DIR_NATIVE_D@\\InstallerBits\\nexus.ico")
set(CPACK_NSIS_MENU_LINKS "http://www.nexusformat.org/" "NeXus Web Site")
set(CPACK_NSIS_MENU_LINKS "http://www.nexusformat.org/" "NeXus Web Site")
if (ARCH64)
set(CPACK_NSIS_DEFINES "!define NEXUSENVSUFFIX 64")
else()
set(CPACK_NSIS_DEFINES "!define NEXUSENVSUFFIX 32")
endif()
endif()

#set (CPACK_OUTPUT_CONFIG_FILE)
Expand Down
Loading

0 comments on commit b9eb817

Please sign in to comment.