From: Eduardo DAVILA Date: Wed, 27 Mar 2013 13:57:38 +0000 (+0100) Subject: Feature #1956 Add Version file in final install + link in menu windows X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=11c30fbd126b4a4c79ad39bb9ab2d5c22f6badbc;p=creaToolsTools.git Feature #1956 Add Version file in final install + link in menu windows Bug #1953 Missing xerces.lib in release version win32/win64 --- diff --git a/Install/scripts/All.bat b/Install/scripts/All.bat index 651ef5a..7288e24 100644 --- a/Install/scripts/All.bat +++ b/Install/scripts/All.bat @@ -32,12 +32,14 @@ set forcex86=%5 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 @@ -63,6 +65,10 @@ start /B /wait %scriptsFolder%\bbtkGEditor\bbtkGEditorInstall.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 diff --git a/Install_ThirdParty/cmake/crea_ThirdParty_Libraries/CMakeLists.txt b/Install_ThirdParty/cmake/crea_ThirdParty_Libraries/CMakeLists.txt index d4b1d64..0a7b339 100644 --- a/Install_ThirdParty/cmake/crea_ThirdParty_Libraries/CMakeLists.txt +++ b/Install_ThirdParty/cmake/crea_ThirdParty_Libraries/CMakeLists.txt @@ -8,7 +8,7 @@ PROJECT(creaTPL) # The project version SET(PROJECT_MAJOR_VERSION 3) SET(PROJECT_MINOR_VERSION 1) -SET(PROJECT_BUILD_VERSION 0) +SET(PROJECT_BUILD_VERSION 1) #================================== #================================== @@ -57,6 +57,41 @@ MARK_AS_ADVANCED( #================================== + + +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) diff --git a/Install_ThirdParty/cmake/crea_ThirdParty_Libraries/install/CMakeLists.txt b/Install_ThirdParty/cmake/crea_ThirdParty_Libraries/install/CMakeLists.txt index 30d79b9..b7dcf2e 100644 --- a/Install_ThirdParty/cmake/crea_ThirdParty_Libraries/install/CMakeLists.txt +++ b/Install_ThirdParty/cmake/crea_ThirdParty_Libraries/install/CMakeLists.txt @@ -16,6 +16,7 @@ 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") @@ -93,6 +94,7 @@ IF (WIN32) 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} ) @@ -104,6 +106,7 @@ IF (WIN32) #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 " @@ -131,11 +134,20 @@ IF (WIN32) 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 diff --git a/Install_ThirdParty/cmake/crea_ThirdParty_dlls/CMakeLists.txt b/Install_ThirdParty/cmake/crea_ThirdParty_dlls/CMakeLists.txt index 8e3f426..36de5d0 100644 --- a/Install_ThirdParty/cmake/crea_ThirdParty_dlls/CMakeLists.txt +++ b/Install_ThirdParty/cmake/crea_ThirdParty_dlls/CMakeLists.txt @@ -1,11 +1,40 @@ -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) diff --git a/Install_ThirdParty/cmake/crea_ThirdParty_dlls/install/CMakeLists.txt b/Install_ThirdParty/cmake/crea_ThirdParty_dlls/install/CMakeLists.txt index bcf229e..a6eda3d 100644 --- a/Install_ThirdParty/cmake/crea_ThirdParty_dlls/install/CMakeLists.txt +++ b/Install_ThirdParty/cmake/crea_ThirdParty_dlls/install/CMakeLists.txt @@ -12,6 +12,7 @@ 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") @@ -62,6 +63,7 @@ IF(WIN32) # 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 @@ -95,6 +97,8 @@ IF(WIN32) # 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}") @@ -120,10 +124,19 @@ IF(WIN32) 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' '' diff --git a/Install_ThirdParty/scripts/install_thirdparty_dlls_cmake.bat b/Install_ThirdParty/scripts/install_thirdparty_dlls_cmake.bat index 86c1451..d6b0855 100644 --- a/Install_ThirdParty/scripts/install_thirdparty_dlls_cmake.bat +++ b/Install_ThirdParty/scripts/install_thirdparty_dlls_cmake.bat @@ -55,15 +55,19 @@ mkdir %binpath% 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 diff --git a/Install_ThirdParty/scripts/install_thirdparty_libraries_cmake.bat b/Install_ThirdParty/scripts/install_thirdparty_libraries_cmake.bat index 6343600..2f5f5b4 100644 --- a/Install_ThirdParty/scripts/install_thirdparty_libraries_cmake.bat +++ b/Install_ThirdParty/scripts/install_thirdparty_libraries_cmake.bat @@ -53,15 +53,19 @@ mkdir %binpath% 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 diff --git a/Version.txt b/Version.txt index 2a711bf..4f8203a 100644 --- a/Version.txt +++ b/Version.txt @@ -1,4 +1,4 @@ -# --------------------------------------------------------------------- +# --------------------------------------------------------------------- # # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image # pour la Santé) @@ -24,4 +24,4 @@ PROJECT_MAJOR_VERSION 1 PROJECT_MINOR_VERSION 0 -PROJECT_BUILD_VERSION 0 +PROJECT_BUILD_VERSION 1