Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add an icon to installer.
[simgrid.git] / buildtools / Cmake / simgrid.nsi.in
index 838b810..c6b2f4d 100644 (file)
@@ -1,8 +1,5 @@
 !include "MUI2.nsh"\r
 \r
 !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
 ;--------------------------------\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_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_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
 ;--------------------------------\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@_@CMAKE_SYSTEM_PROCESSOR@@BIN_EXE@"\r
+Icon "@CMAKE_HOME_DIRECTORY@\doc\webcruft\SimGrid.ico"\r
+\r
 # set the default installation directory\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
 \r
 Section "Libraries and Headers" LibSection\r
 \r
@@ -194,6 +197,11 @@ 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_ROOT $INSTDIR\r
        WriteRegExpandStr ${env_hklm} SIMGRID_VERSION @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\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
 # default section end\r
 sectionEnd\r
 \r
@@ -328,6 +336,7 @@ section "Uninstall"
        # Delete variable\r
        DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
        DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
        # Delete variable\r
        DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
        DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
-\r
+      DeleteRegKey HKCU "SOFTWARE\SimGrid"\r
+    \r
 # uninstall section end\r
 sectionEnd
\ No newline at end of file
 # uninstall section end\r
 sectionEnd
\ No newline at end of file