Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Search for the pcre licence.
[simgrid.git] / buildtools / Cmake / simgrid.nsi.in
index 838b810..e2f6151 100644 (file)
@@ -1,8 +1,5 @@
 !include "MUI2.nsh"\r
 \r
-Name "Simgrid"\r
-outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@CMAKE_SYSTEM_PROCESSOR@@BIN_EXE@"\r
-\r
 ;--------------------------------\r
 ;Interface Configuration\r
 \r
@@ -17,18 +14,24 @@ outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION
   !insertmacro MUI_PAGE_COMPONENTS\r
   !insertmacro MUI_PAGE_DIRECTORY\r
   !insertmacro MUI_PAGE_INSTFILES\r
+  !insertmacro MUI_PAGE_FINISH\r
   \r
   !insertmacro MUI_UNPAGE_CONFIRM\r
   !insertmacro MUI_UNPAGE_INSTFILES\r
-  \r
+  !insertmacro MUI_UNPAGE_FINISH\r
+\r
 ;--------------------------------\r
 ;Languages\r
   !insertmacro MUI_LANGUAGE "English"\r
   !insertmacro MUI_LANGUAGE "French"\r
 ;--------------------------------\r
 \r
+Name "Simgrid"\r
+outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@SIMGRID_SYSTEM_PROCESSOR@@BIN_EXE@"\r
+Icon "@CMAKE_HOME_DIRECTORY@\doc\webcruft\SimGrid.ico"\r
+\r
 # set the default installation directory\r
-InstallDir "c:\SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"\r
+InstallDir c:\SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\r
 \r
 Section "Libraries and Headers" LibSection\r
 \r
@@ -175,6 +178,22 @@ Section "Examples" ExamplesSection
        createShortCut  "$SMPROGRAMS\SimGrid\HelloWorld project.lnk"    "$INSTDIR\examples\HelloWorld"  \r
        \r
 SectionEnd\r
+Section "Pcre library" PCRESection     \r
+       # install pcre library\r
+       CreateDirectory $INSTDIR\GnuWin32\r
+       setOutPath $INSTDIR\GnuWin32\r
+       file "@PATH_PCRE_LICENCE@\LICENCE"\r
+\r
+       CreateDirectory $INSTDIR\GnuWin32\lib\r
+       setOutPath $INSTDIR\GnuWin32\lib\r
+       file @PATHLIBPCRE@\libpcre.a\r
+       file @PATHLIBPCRE@\libpcreposix.a\r
+       \r
+       CreateDirectory $INSTDIR\GnuWin32\include\r
+       setOutPath $INSTDIR\GnuWin32\include\r
+       file @PATH_PCRE_H@\pcre.h\r
+       file @PATH_PCRE_H@\pcreposix.h\r
+SectionEnd\r
 \r
 # default section start\r
 section        \r
@@ -194,6 +213,14 @@ section
        WriteRegExpandStr ${env_hklm} SIMGRID_ROOT $INSTDIR\r
        WriteRegExpandStr ${env_hklm} SIMGRID_VERSION @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\r
 \r
+       WriteRegExpandStr ${env_hklm} SIMGRID_PCRE_LIBRARY_PATH $INSTDIR\GnuWin32\r
+       WriteRegExpandStr ${env_hklm} SIMGRID_PCRE_LIBRARY_VERSION "8.12"\r
+\r
+       WriteRegStr HKCU "SOFTWARE\SimGrid" "Version" "@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"\r
+       WriteRegStr HKCU "SOFTWARE\SimGrid" "InstallPath" "$INSTDIR"\r
+       \r
+       SetRebootFlag true\r
+\r
 # default section end\r
 sectionEnd\r
 \r
@@ -201,17 +228,20 @@ LangString DESC_LibSection                ${LANG_ENGLISH} "Install Simgrid and gras libraries
 LangString DESC_BinSection             ${LANG_ENGLISH} "Install some useful tools for Simgrid."\r
 LangString DESC_DocSection             ${LANG_ENGLISH} "Generated (doxygen) documentation."\r
 LangString DESC_ExamplesSection ${LANG_ENGLISH} "Simgrid's HelloWorld example and some classical platforms."\r
+LangString DESC_PCRESection    ${LANG_ENGLISH} "Install the PCRE and PCREPOSIX libraries for SimGrid."\r
 \r
 LangString DESC_LibSection             ${LANG_FRENCH}  "Installer les librairies Simgrid et Gras et leurs EntĂȘtes."\r
 LangString DESC_BinSection             ${LANG_FRENCH}  "Installer les outils optionnels."\r
 LangString DESC_DocSection             ${LANG_FRENCH}  "Installer la documentation."\r
 LangString DESC_ExamplesSection ${LANG_FRENCH}         "Installer un exemple 'HelloWorld' et des fichiers de plate-formes types."\r
+LangString DESC_PCRESection    ${LANG_FRENCH}  "Installer les librairies PCRE et PCREPOSIX for SimGrid."\r
 \r
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
   !insertmacro MUI_DESCRIPTION_TEXT ${LibSection}              $(DESC_LibSection)\r
   !insertmacro MUI_DESCRIPTION_TEXT ${BinSection}              $(DESC_BinSection)\r
   !insertmacro MUI_DESCRIPTION_TEXT ${DocSection}              $(DESC_DocSection)\r
   !insertmacro MUI_DESCRIPTION_TEXT ${ExamplesSection}         $(DESC_ExamplesSection)\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${PCRESection}             $(DESC_PCRESection)\r
 !insertmacro MUI_FUNCTION_DESCRIPTION_END\r
 \r
 # create a section to define what the uninstaller does.\r
@@ -325,9 +355,15 @@ section "Uninstall"
        RMDir  /r "$INSTDIR\examples"\r
        RMDir  "$SMPROGRAMS\SimGrid"\r
        \r
+       # delete PCRE\r
+       RMDir   "$INSTDIR\GnuWin32"\r
+       \r
        # Delete variable\r
        DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
        DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
-\r
+       DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_PATH\r
+       DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_VERSION\r
+      DeleteRegKey HKCU "SOFTWARE\SimGrid"\r
+    \r
 # uninstall section end\r
 sectionEnd
\ No newline at end of file