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@1846 ff5d1e40-2be0-497f-93bd-dc18237bd3c7
  • Loading branch information
FreddieAkeroyd authored and Freddie Akeroyd committed Sep 20, 2012
1 parent b9eb817 commit a11e529
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 20 deletions.
8 changes: 5 additions & 3 deletions CPackOptions.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@ if (${CPACK_GENERATOR} STREQUAL "NSIS")
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")
if (ARCH64)
set(CPACK_NSIS_DEFINES "!define NEXUSENVSUFFIX 64")
if (@ARCH64@)
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
set(CPACK_NSIS_DEFINES "!define NEXUSDIRENVSUFFIX 64")
else()
set(CPACK_NSIS_DEFINES "!define NEXUSENVSUFFIX 32")
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES32")
set(CPACK_NSIS_DEFINES "!define NEXUSDIRENVSUFFIX 32")
endif()
endif()

Expand Down
6 changes: 4 additions & 2 deletions cmake_modules/NSIS.template.in
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ Function ${UN}EnvVarUpdate
${EndIf}

;; From http://nsis.sourceforge.net/Environmental_Variables:_append,_prepend,_and_remove_entries
;; faa - remove check for empty original
;; khc - here check if length is going to be greater then max string length
;; and abort if so - also abort if original path empty - may mean
;; it was too long as well- write message to say set it by hand
Expand All @@ -157,8 +158,9 @@ Function ${UN}EnvVarUpdate
StrLen $7 $4
StrLen $6 $5
IntOp $8 $6 + $7
${If} $5 == ""
${OrIf} $8 >= ${NSIS_MAX_STRLEN}
;; ${If} $5 == "" ;; faa
;; ${OrIf} $8 >= ${NSIS_MAX_STRLEN} ;; faa
${If} $8 >= ${NSIS_MAX_STRLEN}
SetErrors
DetailPrint "Current $1 length ($6) too long to modify in NSIS; set manually if needed"
Pop $8
Expand Down
15 changes: 8 additions & 7 deletions nsis_install.nsh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
;;;;;;;;; !include "EnvVarUpdate.nsh"
${EnvVarUpdate} $0 "NEXUSDIR" "P" "HKCU" "$INSTDIR"
${EnvVarUpdate} $0 "NEXUSDIR${NEXUSENVSUFFIX}" "P" "HKCU" "$INSTDIR"
${EnvVarUpdate} $0 "PATH" "P" "HKCU" "$INSTDIR\bin"
${EnvVarUpdate} $0 "LIB" "P" "HKCU" "$INSTDIR\lib"
${EnvVarUpdate} $0 "INCLUDE" "P" "HKCU" "$INSTDIR\include"
${EnvVarUpdate} $0 "PYTHONPATH" "P" "HKCU" "$INSTDIR\python;$INSTDIR\bin"
${EnvVarUpdate} $0 "CLASSPATH" "P" "HKCU" "$INSTDIR\java\jnexus.jar"
${EnvVarUpdate} $0 "NEXUSDIR" "A" "HKLM" "$INSTDIR"
${EnvVarUpdate} $0 "NEXUSDIR${NEXUSDIRENVSUFFIX}" "A" "HKLM" "$INSTDIR"
${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\bin"
${EnvVarUpdate} $0 "LIB" "A" "HKLM" "$INSTDIR\lib"
${EnvVarUpdate} $0 "INCLUDE" "A" "HKLM" "$INSTDIR\include"
${EnvVarUpdate} $0 "PYTHONPATH" "A" "HKLM" "$INSTDIR\python"
${EnvVarUpdate} $0 "PYTHONPATH" "A" "HKLM" "$INSTDIR\bin"
${EnvVarUpdate} $0 "CLASSPATH" "A" "HKLM" "$INSTDIR\java\jnexus.jar"
15 changes: 8 additions & 7 deletions nsis_uninstall.nsh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
;;;;;;;; !include "EnvVarUpdate.nsh"
${un.EnvVarUpdate} $0 "NEXUSDIR" "R" "HKCU" "$INSTDIR"
${un.EnvVarUpdate} $0 "NEXUSDIR${NEXUSENVSUFFIX}" "R" "HKCU" "$INSTDIR"
${un.EnvVarUpdate} $0 "PATH" "R" "HKCU" "$INSTDIR\bin"
${un.EnvVarUpdate} $0 "LIB" "R" "HKCU" "$INSTDIR\lib"
${un.EnvVarUpdate} $0 "INCLUDE" "R" "HKCU" "$INSTDIR\include"
${un.EnvVarUpdate} $0 "PYTHONPATH" "R" "HKCU" "$INSTDIR\python;$INSTDIR\bin"
${un.EnvVarUpdate} $0 "CLASSPATH" "R" "HKCU" "$INSTDIR\java\jnexus.jar"
${un.EnvVarUpdate} $0 "NEXUSDIR" "R" "HKLM" "$INSTDIR"
${un.EnvVarUpdate} $0 "NEXUSDIR${NEXUSDIRENVSUFFIX}" "R" "HKLM" "$INSTDIR"
${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\bin"
${un.EnvVarUpdate} $0 "LIB" "R" "HKLM" "$INSTDIR\lib"
${un.EnvVarUpdate} $0 "INCLUDE" "R" "HKLM" "$INSTDIR\include"
${un.EnvVarUpdate} $0 "PYTHONPATH" "R" "HKLM" "$INSTDIR\python"
${un.EnvVarUpdate} $0 "PYTHONPATH" "R" "HKLM" "$INSTDIR\bin"
${un.EnvVarUpdate} $0 "CLASSPATH" "R" "HKLM" "$INSTDIR\java\jnexus.jar"
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ if (HAVE_HDF4)
set (NAPISRC ${NAPISRC} napi4.c)
add_definitions(-DHDF4 ${HDF4_DEFINITIONS} ${HDF4_CPP})
include_directories(${HDF4_INCLUDE_DIRS})
file(GLOB HDF4DLLS "${HDF4_ROOT_DIR}/bin/*.dll")
install (FILES ${HDF4DLLS} DESTINATION bin COMPONENT Runtime)
endif (HAVE_HDF4)

if (HAVE_HDF5)
set (NAPISRC ${NAPISRC} napi5.c)
add_definitions(-DHDF5 ${HDF5_DEFINITIONS} ${HDF5_CPP})
include_directories(${HDF5_INCLUDE_DIRS})
file(GLOB HDF5DLLS "${HDF5_ROOT_DIR}/bin/*.dll")
install (FILES ${HDF5DLLS} DESTINATION bin COMPONENT Runtime)
endif (HAVE_HDF5)

if(HAVE_MXML)
Expand Down Expand Up @@ -127,7 +131,6 @@ install (TARGETS NeXus_Static_Library NeXus_Shared_Library
RUNTIME DESTINATION bin COMPONENT Runtime
LIBRARY DESTINATION lib COMPONENT Runtime
ARCHIVE DESTINATION lib/nexus COMPONENT Development)

if(WIN32)
install_pdb (NeXus_Shared_Library)
endif()

0 comments on commit a11e529

Please sign in to comment.