X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/713d98febcd81b98a1050e53afcd36e19f0df9ab..e1094f9e0a18fb54aa02cb93190d3b93567550ed:/buildtools/Cmake/simgrid.nsi.in diff --git a/buildtools/Cmake/simgrid.nsi.in b/buildtools/Cmake/simgrid.nsi.in index 281da0a79a..54bb19f304 100644 --- a/buildtools/Cmake/simgrid.nsi.in +++ b/buildtools/Cmake/simgrid.nsi.in @@ -1,5 +1,5 @@ # define installer name -outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_win@WIN_ARCH@@BIN_EXE@" +outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@CMAKE_SYSTEM_PROCESSOR@@BIN_EXE@" # set the default installation directory InstallDir $PROGRAMFILES\SimGrid @@ -127,11 +127,17 @@ section file bin\smpirun file bin\tesh - #install doc + # install doc CreateDirectory $INSTDIR\doc setOutPath $INSTDIR\doc - file /r @CMAKE_HOME_DIRECTORY@\doc\html - + file /nonfatal /r @CMAKE_HOME_DIRECTORY@\doc\html + file /r @CMAKE_HOME_DIRECTORY@\doc\HelloWorld + + # install examples + CreateDirectory $INSTDIR\examples + setOutPath $INSTDIR\examples + file /r @CMAKE_HOME_DIRECTORY@\examples\platforms + # define uninstaller name writeUninstaller $INSTDIR\uninstaller@BIN_EXE@ @@ -140,6 +146,16 @@ section createShortCut "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk" "$INSTDIR\uninstaller@BIN_EXE@" createShortCut "$SMPROGRAMS\SimGrid\Documentation.lnk" "$INSTDIR\doc\index.html" + # Include for some of the windows message defines + !include "winmessages.nsh" + # HKLM (all users) vs HKCU (current user) defines + !define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' + !define env_hkcu 'HKCU "Environment"' + # Set Variables + WriteRegExpandStr ${env_hklm} SIMGRID_ROOT $INSTDIR + WriteRegExpandStr ${env_hklm} GRAS_ROOT $INSTDIR + WriteRegExpandStr ${env_hklm} SIMGRID_VERSION @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@ + MessageBox MB_OK "Installation was successful." # default section end @@ -251,9 +267,14 @@ section "Uninstall" RMDir "$INSTDIR\include\mc" RMDir "$INSTDIR\include\xbt" RMDir "$INSTDIR\include" - RMDir "$INSTDIR\doc" + RMDir /r "$INSTDIR\doc" + RMDir /r "$INSTDIR\examples" RMDir "$SMPROGRAMS\SimGrid" - RMDir "$PROGRAMFILES\SimGrid" + + # Delete variable + DeleteRegValue ${env_hklm} SIMGRID_ROOT + DeleteRegValue ${env_hklm} GRAS_ROOT + DeleteRegValue ${env_hklm} SIMGRID_VERSION # uninstall section end sectionEnd \ No newline at end of file