Commit 10ad320b authored by ykeraval's avatar ykeraval
Browse files

NSIS installer problem explanation;

InstallRequiredSystemLibraries to replace all dll insertions

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@22 ec899d31-69d1-42ba-9299-647d76f65fb3
parent dac94dbd
......@@ -23,6 +23,7 @@
# dpkg --vextract package.deb subdirectory
#
# To produce a window installer with NSIS from linux, you need to install the nsis package (on ubuntu, type "sudo apt-get install nsis")
# To install NSIS on Window you need to complete manually in the regedit : HKEY_LOCAL_MACHINE\SOFTWARE\NSIS ---->pathdir de NSIS
#
# To generate different components that can be opt out at install time, see
# http://www.itk.org/Wiki/CMake:Component_Install_With_CPack
......@@ -136,68 +137,87 @@ if(WIN32 AND NOT UNIX)
NAMES makensis
PATHS "/usr/bin"
)
if(MAKENSIS)
# NSIS Windows installer
message(STATUS "Packaging nsis using ${MAKENSIS}: OK")
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
# TODO use GetPrerequisites.cmake (i.e. find a better way to list dependencies)
# get_prerequisites() is not well enough documented to justify the time investement - EP May 2011
${QT_BINARY_DIR}/QtCore4.dll
${QT_BINARY_DIR}/QtGui4.dll
${QT_BINARY_DIR}/QtSvg4.dll
${QT_BINARY_DIR}/QtXml4.dll
${QT_BINARY_DIR}/QtNetwork4.dll
${QT_BINARY_DIR}/QtSql4.dll
${QT_BINARY_DIR}/QtWebKit4.dll
${VTK_LIBRARY_DIRS}/../../bin/QVTK.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkCommon.dll
${VTK_LIBRARY_DIRS}/../../bin/vtksys.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkFiltering.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkGraphics.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkHybrid.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkIO.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkImaging.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkRendering.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkVolumeRendering.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkverdict.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkDICOMParser.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkNetCDF.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkexpat.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkjpeg.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkmetaio.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkpng.dll
${VTK_LIBRARY_DIRS}/../../bin/vtktiff.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkzlib.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkInfovis.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkQtChart.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkfreetype.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkftgl.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkalglib.dll
${VTK_LIBRARY_DIRS}/../../bin/vtklibxml2.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkViews.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkexoIIc.dll
${VTK_LIBRARY_DIRS}/../../bin/vtkWidgets.dll
)
# ITK is required
FIND_PACKAGE(ITK)
IF (${ITK_FOUND})
message(pass)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${ITK_DIR}/bin/Release/ITKCommon.dll)
ENDIF (${ITK_FOUND})
set(CAMITK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/core/icons\\\\appIcon.ico")
set(CPACK_PACKAGE_ICON ${CAMITK_PACKAGE_ICON})
set(CPACK_NSIS_MUI_ICON ${CAMITK_PACKAGE_ICON})
set(CPACK_NSIS_MUI_UNIICON ${CAMITK_PACKAGE_ICON})
set(CPACK_NSIS_DISPLAY_NAME "CamiTK ${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}.${CAMITK_VER_PACKAGE_PAT}")
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_NSIS_INSTALLED_ICON_NAME ${CAMITK_PROJECT_NAME})
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CAMITK_PROJECT_NAME})
# NSIS Windows installer
if(WIN32 AND NOT UNIX)
message(STATUS "Packaging nsis using ${MAKENSIS}: OK")
# TODO update these information for nsis installer
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backslashes.
#set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share\\\\logo.png")
set(CPACK_NSIS_INSTALLED_ICON_NAME "\\\\imp.exe")
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} CAMITK")
set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\camitk.imag.fr")
set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\camitk.imag.fr")
set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
set(CPACK_NSIS_MODIFY_PATH ON)
include(InstallRequiredSystemLibraries)
endif()
else()
message(STATUS "Can not find makensis: nsis packaging is not possible")
endif()
# Temporary stay here just to assert InstallRequiredSystemLibraries cmake variable works well
# set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
# # TODO use GetPrerequisites.cmake (i.e. find a better way to list dependencies)
# # get_prerequisites() is not well enough documented to justify the time investement - EP May 2011
# ${QT_BINARY_DIR}/QtCore4.dll
# ${QT_BINARY_DIR}/QtGui4.dll
# ${QT_BINARY_DIR}/QtSvg4.dll
# ${QT_BINARY_DIR}/QtXml4.dll
# ${QT_BINARY_DIR}/QtNetwork4.dll
# ${QT_BINARY_DIR}/QtSql4.dll
# ${QT_BINARY_DIR}/QtWebKit4.dll
# ${VTK_LIBRARY_DIRS}/../../bin/QVTK.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkCommon.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtksys.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkFiltering.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkGraphics.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkHybrid.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkIO.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkImaging.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkRendering.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkVolumeRendering.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkverdict.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkDICOMParser.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkNetCDF.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkexpat.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkjpeg.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkmetaio.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkpng.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtktiff.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkzlib.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkInfovis.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkQtChart.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkfreetype.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkftgl.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkalglib.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtklibxml2.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkViews.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkexoIIc.dll
# ${VTK_LIBRARY_DIRS}/../../bin/vtkWidgets.dll
# )
# # ITK is required
# FIND_PACKAGE(ITK)
# IF (${ITK_FOUND})
# message(pass)
# set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${ITK_DIR}/bin/Release/ITKCommon.dll)
# ENDIF (${ITK_FOUND})
#
# set(CAMITK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/core/icons\\\\appIcon.ico")
# set(CPACK_PACKAGE_ICON ${CAMITK_PACKAGE_ICON})
# set(CPACK_NSIS_MUI_ICON ${CAMITK_PACKAGE_ICON})
# set(CPACK_NSIS_MUI_UNIICON ${CAMITK_PACKAGE_ICON})
# set(CPACK_NSIS_DISPLAY_NAME "CamiTK ${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}.${CAMITK_VER_PACKAGE_PAT}")
# set(CPACK_NSIS_MODIFY_PATH ON)
# set(CPACK_NSIS_INSTALLED_ICON_NAME ${CAMITK_PROJECT_NAME})
# set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CAMITK_PROJECT_NAME})
# set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\camitk.imag.fr")
# set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\camitk.imag.fr")
# set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
#
endif()
# ---------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment