Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update nsis script.
[simgrid.git] / buildtools / Cmake / simgrid.nsi.in
index 2191dec..a519916 100644 (file)
@@ -27,7 +27,7 @@
 ;--------------------------------\r
 \r
 Name "Simgrid"\r
-outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@SIMGRID_SYSTEM_PROCESSOR@@BIN_EXE@"\r
+outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@NSIS_WIN_VERSION@@BIN_EXE@"\r
 Icon "@CMAKE_HOME_DIRECTORY@\doc\webcruft\SimGrid.ico"\r
 \r
 # set the default installation directory\r
@@ -35,6 +35,13 @@ InstallDir c:\SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VE
 \r
 Section "Libraries and Headers" LibSection\r
 \r
+       setOutPath $INSTDIR\r
+       file @CMAKE_HOME_DIRECTORY@\AUTHORS\r
+       file @CMAKE_HOME_DIRECTORY@\Changelog\r
+       file @CMAKE_HOME_DIRECTORY@\COPYING\r
+       file @CMAKE_HOME_DIRECTORY@\LICENSE-LGPL-2.1\r
+       file @CMAKE_HOME_DIRECTORY@\NEWS\r
+\r
        # install lib\r
        CreateDirectory $INSTDIR\lib\r
        setOutPath $INSTDIR\lib\r
@@ -165,34 +172,44 @@ Section "Documentation" DocSection
        # 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
+       createShortCut  "$SMPROGRAMS\SimGrid\Website.lnk"       "http://simgrid.gforge.inria.fr/"\r
        \r
 SectionEnd\r
 Section "Examples" ExamplesSection     \r
-       \r
-       # install examples\r
+\r
        CreateDirectory $INSTDIR\examples\r
        setOutPath $INSTDIR\examples\r
+       \r
+       #install examples for platforms\r
        file /r @CMAKE_HOME_DIRECTORY@\examples\platforms\r
+       \r
+       # install example HelloWorld\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
+       # install example MasterSlave\r
+       CreateDirectory $INSTDIR\examples\MasterSlave\r
+       setOutPath $INSTDIR\examples\MasterSlave\r
+       file @CMAKE_HOME_DIRECTORY@\examples\msg\masterslave\masterslave_forwarder.c\r
+       file @CMAKE_HOME_DIRECTORY@\examples\msg\masterslave\deployment_masterslave_forwarder.xml\r
+       file @CMAKE_HOME_DIRECTORY@\examples\msg\msg_platform.xml\r
+       file @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\CMakeLists.txt\r
+       file @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\FindPCRE.cmake\r
+       \r
+       # create shortcuts in the start menu programs directory\r
+       CreateDirectory "$SMPROGRAMS\SimGrid\Examples\"\r
+       createShortCut  "$SMPROGRAMS\SimGrid\Examples\HelloWorld project.lnk"   "$INSTDIR\examples\HelloWorld"\r
+       createShortCut  "$SMPROGRAMS\SimGrid\Examples\MasterSlave project.lnk"  "$INSTDIR\examples\MasterSlave"\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
+       file /r "@PCRE_LIBRARY_PATH@\lib"\r
+       file /r "@PCRE_LIBRARY_PATH@\include"\r
+       file /nonfatal /r "@PCRE_LIBRARY_PATH@\bin"\r
+       file /nonfatal /r "@PCRE_LIBRARY_PATH@\man"\r
+       file /nonfatal /r "@PCRE_LIBRARY_PATH@\share"\r
 SectionEnd\r
 \r
 # default section start\r
@@ -214,7 +231,7 @@ section
        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
+       WriteRegExpandStr ${env_hklm} SIMGRID_PCRE_LIBRARY_VERSION "8.21"\r
 \r
        WriteRegStr HKCU "SOFTWARE\SimGrid" "Version" "@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"\r
        WriteRegStr HKCU "SOFTWARE\SimGrid" "InstallPath" "$INSTDIR"\r
@@ -335,7 +352,16 @@ section "Uninstall"
        # delete link\r
        delete "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk"\r
        delete "$SMPROGRAMS\SimGrid\Documentation.lnk"\r
-       delete "$SMPROGRAMS\SimGrid\HelloWorld project.lnk"\r
+       delete "$SMPROGRAMS\SimGrid\Website.lnk"\r
+       delete "$SMPROGRAMS\SimGrid\Examples\HelloWorld project.lnk"\r
+       delete "$SMPROGRAMS\SimGrid\Examples\MasterSlave project.lnk"\r
+       \r
+       # delete EXTRA FILES\r
+       delete $INSTDIR\AUTHORS\r
+       delete $INSTDIR\Changelog\r
+       delete $INSTDIR\COPYING\r
+       delete $INSTDIR\LICENSE-LGPL-2.1\r
+       delete $INSTDIR\NEWS\r
        \r
        # now delete directories\r
        RMDir  "$INSTDIR\bin"\r
@@ -353,6 +379,7 @@ section "Uninstall"
        RMDir  "$INSTDIR\include"\r
        RMDir  /r "$INSTDIR\doc"\r
        RMDir  /r "$INSTDIR\examples"\r
+       RMDir  "$SMPROGRAMS\SimGrid\Examples"\r
        RMDir  "$SMPROGRAMS\SimGrid"\r
        \r
        # delete PCRE\r
@@ -363,7 +390,10 @@ section "Uninstall"
        DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
        DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_PATH\r
        DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_VERSION\r
-      DeleteRegKey HKCU "SOFTWARE\SimGrid"\r
+    DeleteRegKey HKCU "SOFTWARE\SimGrid"\r
+    \r
+    # delete INSTDIR\r
+    RMDir  /r "$INSTDIR"\r
     \r
 # uninstall section end\r
 sectionEnd
\ No newline at end of file