]> Creatis software - creaToolsTools.git/commitdiff
Feature #1956 Add Version file in final install + link in menu windows
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 27 Mar 2013 13:57:38 +0000 (14:57 +0100)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 27 Mar 2013 13:57:38 +0000 (14:57 +0100)
Bug #1953   Missing xerces.lib in release version win32/win64

Install/scripts/All.bat
Install_ThirdParty/cmake/crea_ThirdParty_Libraries/CMakeLists.txt
Install_ThirdParty/cmake/crea_ThirdParty_Libraries/install/CMakeLists.txt
Install_ThirdParty/cmake/crea_ThirdParty_dlls/CMakeLists.txt
Install_ThirdParty/cmake/crea_ThirdParty_dlls/install/CMakeLists.txt
Install_ThirdParty/scripts/install_thirdparty_dlls_cmake.bat
Install_ThirdParty/scripts/install_thirdparty_libraries_cmake.bat
Version.txt

index 651ef5aec7b192a8711e97f23629fc2c59478f1c..7288e242ee1fd3d6b34a4b6f783e46127cbe5399 100644 (file)
@@ -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
index d4b1d6487c2accb1c08500562c33c91e2dbfde7a..0a7b339eedffc3af5fe6f82b401478cda098794e 100644 (file)
@@ -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)
index 30d79b953ff3358b1a40a8e5d3a91b92f1e2d5da..b7dcf2e1f00151433003e61e3ea9bf2fd8d8550a 100644 (file)
@@ -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 
index 8e3f426e566997df70c7a64a0dc87099420c84dd..36de5d031256f68389081bddff3a617a74103491 100644 (file)
@@ -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)
index bcf229eecf329c6b6b5ef48f4bb8729fa171403e..a6eda3d578353fe069f7a38c75a1cbd12e1dbf79 100644 (file)
@@ -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' ''
                
index 86c14514daf84c0cf1f5b8226a78ec843dfcc44c..d6b08558371833abab72657cb3825bd6ae16f08b 100644 (file)
@@ -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
index 63436005600c5a686f4feb8823fe587447d1875f..2f5f5b45ef590814bb44e5a5ad5cea1aeee925c1 100644 (file)
@@ -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
index 2a711bf95423817773dee621412e85152b68c342..4f8203afd2ce9751ca9e8b5f57cabfd8f515e4fe 100644 (file)
@@ -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