Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Insert modules to install.
authorunknown <pierre@.(none)>
Mon, 4 Jul 2011 12:00:41 +0000 (14:00 +0200)
committerunknown <pierre@.(none)>
Mon, 4 Jul 2011 12:00:41 +0000 (14:00 +0200)
buildtools/Cmake/simgrid.nsi.in

index 77fffb9..838b810 100644 (file)
@@ -14,7 +14,7 @@ outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION
 ;Pages\r
 \r
   !insertmacro MUI_PAGE_LICENSE "@CMAKE_HOME_DIRECTORY@\LICENSE-LGPL-2.1"\r
 ;Pages\r
 \r
   !insertmacro MUI_PAGE_LICENSE "@CMAKE_HOME_DIRECTORY@\LICENSE-LGPL-2.1"\r
-  #!insertmacro MUI_PAGE_COMPONENTS\r
+  !insertmacro MUI_PAGE_COMPONENTS\r
   !insertmacro MUI_PAGE_DIRECTORY\r
   !insertmacro MUI_PAGE_INSTFILES\r
   \r
   !insertmacro MUI_PAGE_DIRECTORY\r
   !insertmacro MUI_PAGE_INSTFILES\r
   \r
@@ -24,17 +24,13 @@ outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION
 ;--------------------------------\r
 ;Languages\r
   !insertmacro MUI_LANGUAGE "English"\r
 ;--------------------------------\r
 ;Languages\r
   !insertmacro MUI_LANGUAGE "English"\r
-\r
+  !insertmacro MUI_LANGUAGE "French"\r
 ;--------------------------------\r
 \r
 # set the default installation directory\r
 ;--------------------------------\r
 \r
 # set the default installation directory\r
-InstallDir $PROGRAMFILES\SimGrid\r
-\r
-# The text to prompt the user to enter a directory\r
-DirText "This will install Simgrid on your computer. Choose a directory"\r
+InstallDir "c:\SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"\r
 \r
 \r
-# default section start\r
-section\r
+Section "Libraries and Headers" LibSection\r
 \r
        # install lib\r
        CreateDirectory $INSTDIR\lib\r
 \r
        # install lib\r
        CreateDirectory $INSTDIR\lib\r
@@ -140,6 +136,9 @@ section
        file @CMAKE_HOME_DIRECTORY@\include\simix\datatypes.h\r
        file @CMAKE_HOME_DIRECTORY@\include\simix\context.h\r
        \r
        file @CMAKE_HOME_DIRECTORY@\include\simix\datatypes.h\r
        file @CMAKE_HOME_DIRECTORY@\include\simix\context.h\r
        \r
+SectionEnd\r
+Section "Binaries" BinSection  \r
+       \r
        # insatll bin\r
        CreateDirectory $INSTDIR\bin\r
        setOutPath $INSTDIR\bin\r
        # insatll bin\r
        CreateDirectory $INSTDIR\bin\r
        setOutPath $INSTDIR\bin\r
@@ -153,25 +152,39 @@ section
        file bin\smpirun\r
        file bin\tesh\r
        \r
        file bin\smpirun\r
        file bin\tesh\r
        \r
+SectionEnd\r
+Section "Documentation" DocSection     \r
+       \r
        # install doc\r
        CreateDirectory $INSTDIR\doc\r
        setOutPath $INSTDIR\doc\r
        file /nonfatal /r @CMAKE_HOME_DIRECTORY@\doc\html\r
        # install doc\r
        CreateDirectory $INSTDIR\doc\r
        setOutPath $INSTDIR\doc\r
        file /nonfatal /r @CMAKE_HOME_DIRECTORY@\doc\html\r
-       file /r @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\r
+       # create a shortcut in the start menu programs directory\r
+       CreateDirectory "$SMPROGRAMS\SimGrid"\r
+       createShortCut  "$SMPROGRAMS\SimGrid\Documentation.lnk" "$INSTDIR\doc\html\index.html"\r
+       \r
+SectionEnd\r
+Section "Examples" ExamplesSection     \r
        \r
        # install examples\r
        CreateDirectory $INSTDIR\examples\r
        setOutPath $INSTDIR\examples\r
        \r
        # install examples\r
        CreateDirectory $INSTDIR\examples\r
        setOutPath $INSTDIR\examples\r
-       file /r @CMAKE_HOME_DIRECTORY@\examples\platforms       \r
+       file /r @CMAKE_HOME_DIRECTORY@\examples\platforms\r
+       file /r @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\r
+       # create a shortcut in the start menu programs directory\r
+       createShortCut  "$SMPROGRAMS\SimGrid\HelloWorld project.lnk"    "$INSTDIR\examples\HelloWorld"  \r
        \r
        \r
+SectionEnd\r
+\r
+# default section start\r
+section        \r
        # define uninstaller name\r
        writeUninstaller $INSTDIR\uninstaller@BIN_EXE@\r
 \r
        # create a shortcut in the start menu programs directory\r
        CreateDirectory "$SMPROGRAMS\SimGrid"\r
        createShortCut  "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk" "$INSTDIR\uninstaller@BIN_EXE@"\r
        # define uninstaller name\r
        writeUninstaller $INSTDIR\uninstaller@BIN_EXE@\r
 \r
        # create a shortcut in the start menu programs directory\r
        CreateDirectory "$SMPROGRAMS\SimGrid"\r
        createShortCut  "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk" "$INSTDIR\uninstaller@BIN_EXE@"\r
-       createShortCut  "$SMPROGRAMS\SimGrid\Documentation.lnk" "$INSTDIR\doc\html\index.html"\r
-       \r
+\r
        # Include for some of the windows message defines\r
        !include "winmessages.nsh"\r
        # HKLM (all users) vs HKCU (current user) defines\r
        # Include for some of the windows message defines\r
        !include "winmessages.nsh"\r
        # HKLM (all users) vs HKCU (current user) defines\r
@@ -179,12 +192,28 @@ section
        !define env_hkcu 'HKCU "Environment"'\r
        # Set Variables\r
        WriteRegExpandStr ${env_hklm} SIMGRID_ROOT $INSTDIR\r
        !define env_hkcu 'HKCU "Environment"'\r
        # Set Variables\r
        WriteRegExpandStr ${env_hklm} SIMGRID_ROOT $INSTDIR\r
-       WriteRegExpandStr ${env_hklm} GRAS_ROOT $INSTDIR\r
        WriteRegExpandStr ${env_hklm} SIMGRID_VERSION @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\r
 \r
 # default section end\r
 sectionEnd\r
 \r
        WriteRegExpandStr ${env_hklm} SIMGRID_VERSION @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\r
 \r
 # default section end\r
 sectionEnd\r
 \r
+LangString DESC_LibSection             ${LANG_ENGLISH} "Install Simgrid and gras libraries with associated headers."\r
+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
+\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
+\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_FUNCTION_DESCRIPTION_END\r
+\r
 # create a section to define what the uninstaller does.\r
 # the section will always be named "Uninstall"\r
 section "Uninstall"\r
 # create a section to define what the uninstaller does.\r
 # the section will always be named "Uninstall"\r
 section "Uninstall"\r
@@ -276,6 +305,7 @@ section "Uninstall"
        # delete link\r
        delete "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk"\r
        delete "$SMPROGRAMS\SimGrid\Documentation.lnk"\r
        # delete link\r
        delete "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk"\r
        delete "$SMPROGRAMS\SimGrid\Documentation.lnk"\r
+       delete "$SMPROGRAMS\SimGrid\HelloWorld project.lnk"\r
        \r
        # now delete directories\r
        RMDir  "$INSTDIR\bin"\r
        \r
        # now delete directories\r
        RMDir  "$INSTDIR\bin"\r
@@ -297,7 +327,6 @@ section "Uninstall"
        \r
        # Delete variable\r
        DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
        \r
        # Delete variable\r
        DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
-       DeleteRegValue ${env_hklm} GRAS_ROOT\r
        DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
 \r
 # uninstall section end\r
        DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
 \r
 # uninstall section end\r