set scriptsFolder=%cd%
set logFolder=%creatoolsGeneration%\installLog
+
rmdir %logFolder% /s /q
mkdir %logFolder%
echo call configure variables
call %scriptsFolder%\base\configureVariables.bat
+REM goto skypeEED
echo call Download Sources
start /B /wait %scriptsFolder%\base\downloadSources.bat
echo call compile creaMinitools
start /B /wait %scriptsFolder%\creaTools\creaMinitoolsInstall.bat
+
+
+REM :skypeEED
+
echo THIS HAS TO BE THE LAST STEP...
echo call compile creaTools
start /B /wait %scriptsFolder%\creaTools\creaToolsInstall.bat
# The project version
SET(PROJECT_MAJOR_VERSION 3)
SET(PROJECT_MINOR_VERSION 1)
-SET(PROJECT_BUILD_VERSION 0)
+SET(PROJECT_BUILD_VERSION 1)
#==================================
#==================================
#==================================
+
+
+MACRO (TODAY RESULT)
+ IF (WIN32)
+ EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
+ string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" ${RESULT} ${${RESULT}})
+ ELSEIF(UNIX)
+ EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
+ string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" ${RESULT} ${${RESULT}})
+ ELSE (WIN32)
+ MESSAGE(SEND_ERROR "date not implemented")
+ SET(${RESULT} 000000)
+ ENDIF (WIN32)
+ENDMACRO (TODAY)
+
+
+TODAY(CREATOOLS_COMPILATION_DATE)
+
+
+## Project: @CMAKE_PROJECT_NAME@
+## Version: @PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_BUILD_VERSION@
+## Platform: @CREATOOLS_PLATFORM@
+## Build Type: @CREATOOLS_BUILDTYPE@
+##Compilation date: @CREATOOLS_COMPILATION_DATE@
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Version.txt.in
+ ${${CMAKE_PROJECT_NAME}_BINARY_DIR}/Version.txt
+ @ONLY IMMEDIATE
+ )
+
+
+
+
+
+
#==================================
# Subdirs
#SUBDIRS(appli)
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} - CREATIS")
+SET(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}-${CREATOOLS_BUILDTYPE}")
SET(CPACK_PACKAGE_VENDOR "CREATIS")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
ENDFOREACH(iLST)
#DFCH -- INSTALL(DIRECTORY ${CREA_LIBRARY_SOURCE_PATH}\\\\${CREA_MIKATEX_LYBRARY} DESTINATION ${CREA_BIN_DESTINATION_PATH} )
+ INSTALL(FILES ${${CMAKE_PROJECT_NAME}_BINARY_DIR}/Version.txt DESTINATION . )
INSTALL(DIRECTORY ${CREA_LIBRARY_SOURCE_PATH}\\\\${CREA_BOOST_LYBRARY} DESTINATION ${CREA_LIBRARY_DESTINATION_PATH} )
INSTALL(DIRECTORY ${CREA_LIBRARY_SOURCE_PATH}\\\\${CREA_GDCM_LYBRARY} DESTINATION ${CREA_LIBRARY_DESTINATION_PATH} )
INSTALL(DIRECTORY ${CREA_LIBRARY_SOURCE_PATH}\\\\${CREA_ITK_LYBRARY} DESTINATION ${CREA_LIBRARY_DESTINATION_PATH} )
#DFCH -- SET(MIKTEX_INSTALL_DIR "$INSTDIR\\\\bin\\\\MiKTeX-2.9\\\\miktex\\\\bin")
#DFCH -- SET(CREATIS_THIRDPARTYLIBRARIES_DIRS ";${MIKTEX_INSTALL_DIR}")
+ SET(CREATPL_DIRBIN "$INSTDIR")
SET(CREATIS_THIRDPARTYLIBRARIES_DIRS ";") #DFCH
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
WriteRegStr HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment' 'XERCES_DIR' '$INSTDIR\\\\${CREA_LIBRARY_DESTINATION_PATH}\\\\${CREA_XERCES_LYBRARY}'
#WriteRegStr HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment' 'KWWidgets_dir' '$INSTDIR\\\\${CREA_LIBRARY_DESTINATION_PATH}\\\\${CREA_KWWIDGETS_LYBRARY}\\\\lib\\\\KWWidgets'
+ CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Version.txt.lnk' '${CREATPL_DIRBIN}\\\\Version.txt'
+
SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 'STR:Environment' /TIMEOUT=5000
")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
+
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
+ Delete '$SMPROGRAMS\\\\$MUI_TEMP\\\\Version.txt.lnk'
+
+ StrCpy $MUI_TEMP '$SMPROGRAMS\\\\$MUI_TEMP'
+ RMDir /r $MUI_TEMP
+
!define Uninstall_EnvStr_RegKey 'HKLM \\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\"'
WriteRegExpandStr \\\${Uninstall_EnvStr_RegKey} 'CREATIS_THIRDPARTYLIBRARIES_DIRS' ''
SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 'STR:Environment' /TIMEOUT=5000
-PROJECT(crea_ThirdParty_dlls)
+PROJECT(crea_TPdlls)
cmake_minimum_required(VERSION 2.6)
SET(PROJECT_MAJOR_VERSION 3)
SET(PROJECT_MINOR_VERSION 1)
-SET(PROJECT_BUILD_VERSION 0)
+SET(PROJECT_BUILD_VERSION 1)
SET(CREA_VERBOSE_CMAKE TRUE)
+
+MACRO (TODAY RESULT)
+ IF (WIN32)
+ EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT})
+ string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" ${RESULT} ${${RESULT}})
+ ELSEIF(UNIX)
+ EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
+ string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" ${RESULT} ${${RESULT}})
+ ELSE (WIN32)
+ MESSAGE(SEND_ERROR "date not implemented")
+ SET(${RESULT} 000000)
+ ENDIF (WIN32)
+ENDMACRO (TODAY)
+
+
+TODAY(CREATOOLS_COMPILATION_DATE)
+
+
+## Project: @CMAKE_PROJECT_NAME@
+## Version: @PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_BUILD_VERSION@
+## Platform: @CREATOOLS_PLATFORM@
+## Build Type: @CREATOOLS_BUILDTYPE@
+##Compilation date: @CREATOOLS_COMPILATION_DATE@
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Version.txt.in
+ ${${CMAKE_PROJECT_NAME}_BINARY_DIR}/Version.txt
+ @ONLY IMMEDIATE
+ )
+
SUBDIRS(install)
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} - CREATIS")
+SET(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}-${CREATOOLS_BUILDTYPE}")
SET(CPACK_PACKAGE_VENDOR "CREATIS")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
# INSTALL( FILES ${WINDIR}/system32/msvcr71d.dll DESTINATION bin/ )
+ INSTALL(FILES ${${CMAKE_PROJECT_NAME}_BINARY_DIR}/Version.txt DESTINATION . )
INSTALL(DIRECTORY ${CREA_LIBRARY_DLL_PATH}/ DESTINATION bin/ )
#EED 19-11-2009
# SET(MIKTEX_INSTALL_DIR "$INSTDIR\\\\bin\\\\MikTex-2.7\\\\miktex\\\\bin")
SET(CREA_DLLS_DIR "$INSTDIR\\\\bin")
+ SET(CREATPDLLS_DIRBIN "$INSTDIR")
+
#EED 19-11-2009
# SET(CREATIS_ENVIRONMENT_DIRS ";${CREA_DLLS_DIR};${MIKTEX_INSTALL_DIR}")
SET(CREATIS_THIRDPARTYDLLS_DIRS ";${CREA_DLLS_DIR}")
WriteRegExpandStr \\\${Install_ReadEnvStr_RegKey} 'PATH' $0
AddToPath_doneEED:
+ CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Version.txt.lnk' '${CREATPDLLS_DIRBIN}\\\\Version.txt'
SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 'STR:Environment' /TIMEOUT=5000
+
+
")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
+ Delete '$SMPROGRAMS\\\\$MUI_TEMP\\\\Version.txt.lnk'
+
+ StrCpy $MUI_TEMP '$SMPROGRAMS\\\\$MUI_TEMP'
+ RMDir /r $MUI_TEMP
+
!define Uninstall_EnvStr_RegKey 'HKLM \\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\"'
WriteRegExpandStr \\\${Uninstall_EnvStr_RegKey} 'CREATIS_THIRDPARTYDLLS_DIRS' ''
cd %binpath%
if %x86Comp%==ON (
+ set buildPlatform=win32
cmake -G"Visual Studio 10" -H%sourcepath% -B%binpath%
) else (
if %PROCESSOR_ARCHITECTURE%==x86 (
+ set buildPlatform=win32
cmake -G"Visual Studio 10" -H%sourcepath% -B%binpath%
) else (
+ set buildPlatform=win64
cmake -G"Visual Studio 10 Win64" -H%sourcepath% -B%binpath%
)
)
+cmake -D CREATOOLS_BUILDTYPE:STRING=%buildType% -D CREATOOLS_PLATFORM:STRING=%buildPlatform% CMakeCache.txt
cmake -D CMAKE_INSTALL_PREFIX:PATH=%installpath% CMakeCache.txt
cmake -D CREA_LIBRARY_DLL_PATH:PATH=%thirdpartydllspath% CMakeCache.txt
cmake CMakeCache.txt
cd %binpath%
if %x86Comp%==ON (
+ set buildPlatform=win32
cmake -G"Visual Studio 10" -H%sourcepath% -B%binpath%
) else (
if %PROCESSOR_ARCHITECTURE%==x86 (
+ set buildPlatform=win32
cmake -G"Visual Studio 10" -H%sourcepath% -B%binpath%
) else (
+ set buildPlatform=win64
cmake -G"Visual Studio 10 Win64" -H%sourcepath% -B%binpath%
)
)
+cmake -D CREATOOLS_BUILDTYPE:STRING=%buildType% -D CREATOOLS_PLATFORM:STRING=%buildPlatform% CMakeCache.txt
cmake -D CMAKE_INSTALL_PREFIX:PATH=%installpath% CMakeCache.txt
cmake -D CREA_LIBRARY_SOURCE_PATH:PATH=%thirdpartylibpath% CMakeCache.txt
cmake CMakeCache.txt
-# ---------------------------------------------------------------------
+# ---------------------------------------------------------------------
#
# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
# pour la Santé)
PROJECT_MAJOR_VERSION 1
PROJECT_MINOR_VERSION 0
-PROJECT_BUILD_VERSION 0
+PROJECT_BUILD_VERSION 1