Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / buildtools / Cmake / simgrid.nsi.in
index d627181..7407773 100644 (file)
@@ -4,7 +4,7 @@
 ;Interface Configuration\r
 \r
   !define MUI_HEADERIMAGE\r
-  !define MUI_HEADERIMAGE_BITMAP "@CMAKE_HOME_DIRECTORY@\doc\webcruft\simgrid_logo_win.bmp" ; optional\r
+  !define MUI_HEADERIMAGE_BITMAP "@CMAKE_HOME_DIRECTORY@\doc\webcruft\simgrid_logo_win_2011.bmp" ; optional\r
   !define MUI_ABORTWARNING\r
 \r
 ;--------------------------------\r
 ;--------------------------------\r
 \r
 Name "Simgrid"\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
+outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_SGjava_@NSIS_WIN_VERSION@@BIN_EXE@"\r
+Icon "@CMAKE_HOME_DIRECTORY@\doc\webcruft\SGicon.ico"\r
+\r
+RequestExecutionLevel admin\r
 \r
 # set the default installation directory\r
 InstallDir c:\SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\r
@@ -45,8 +47,9 @@ Section "Libraries and Headers" LibSection
        # install lib\r
        CreateDirectory $INSTDIR\lib\r
        setOutPath $INSTDIR\lib\r
-       file lib\libgras.@LIB_EXE@\r
-       file lib\libsimgrid.@LIB_EXE@\r
+       file lib\libgras.dll\r
+       file lib\libsimgrid.dll\r
+       file lib\libsimgrid.def\r
        \r
        #install headers\r
        CreateDirectory  $INSTDIR\include\r
@@ -91,11 +94,18 @@ Section "Libraries and Headers" LibSection
        file @CMAKE_HOME_DIRECTORY@\include\xbt\mmalloc.h\r
        file @CMAKE_HOME_DIRECTORY@\include\xbt\replay_trace_reader.h\r
        file @CMAKE_HOME_DIRECTORY@\include\xbt\parmap.h\r
-       \r
-       CreateDirectory  $INSTDIR\include\mc\r
-       setOutPath $INSTDIR\include\mc\r
-       file @CMAKE_HOME_DIRECTORY@\include\mc\modelchecker.h\r
-       \r
+       file @CMAKE_HOME_DIRECTORY@\include\xbt\automaton.h\r
+       file @CMAKE_HOME_DIRECTORY@\include\xbt\automatonparse_promela.h\r
+       file @CMAKE_HOME_DIRECTORY@\include\xbt\datadesc.h\r
+       file @CMAKE_HOME_DIRECTORY@\include\xbt\socket.h\r
+       file @CMAKE_HOME_DIRECTORY@\include\xbt\file_stat.h\r
+\r
+       CreateDirectory  $INSTDIR\include\simgrid\r
+       setOutPath $INSTDIR\include\simgrid\r
+       file @CMAKE_HOME_DIRECTORY@\include\simgrid\platf.h\r
+       file @CMAKE_HOME_DIRECTORY@\include\simgrid\modelchecker.h\r
+       file @CMAKE_HOME_DIRECTORY@\include\simgrid\simix.h\r
+\r
        CreateDirectory  $INSTDIR\include\msg\r
        setOutPath $INSTDIR\include\msg\r
        file @CMAKE_HOME_DIRECTORY@\include\msg\msg.h\r
@@ -122,7 +132,6 @@ Section "Libraries and Headers" LibSection
        \r
        CreateDirectory  $INSTDIR\include\gras\r
        setOutPath $INSTDIR\include\gras\r
-       file @CMAKE_HOME_DIRECTORY@\include\gras\datadesc.h\r
        file @CMAKE_HOME_DIRECTORY@\include\gras\transport.h\r
        file @CMAKE_HOME_DIRECTORY@\include\gras\virtu.h\r
        file @CMAKE_HOME_DIRECTORY@\include\gras\emul.h\r
@@ -140,12 +149,6 @@ Section "Libraries and Headers" LibSection
        setOutPath $INSTDIR\include\instr\r
        file @CMAKE_HOME_DIRECTORY@\include\instr\instr.h\r
        \r
-       CreateDirectory  $INSTDIR\include\simix\r
-       setOutPath $INSTDIR\include\simix\r
-       file @CMAKE_HOME_DIRECTORY@\include\simix\simix.h\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
@@ -154,13 +157,7 @@ Section "Binaries" BinSection
        setOutPath $INSTDIR\bin\r
        file bin\colorize\r
        file bin\graphicator@BIN_EXE@\r
-       file bin\gras_stub_generator@BIN_EXE@\r
        file bin\simgrid_update_xml\r
-       file bin\smpicc\r
-       file bin\smpif2c\r
-       file bin\smpiff\r
-       file bin\smpirun\r
-       file bin\tesh\r
        \r
 SectionEnd\r
 Section "Documentation" DocSection     \r
@@ -170,9 +167,9 @@ Section "Documentation" DocSection
        setOutPath $INSTDIR\doc\r
        file /nonfatal /r @CMAKE_HOME_DIRECTORY@\doc\html\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
-       createShortCut  "$SMPROGRAMS\SimGrid\Website.lnk"       "http://simgrid.gforge.inria.fr/"\r
+       CreateDirectory "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"\r
+       createShortCut  "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Documentation.lnk" "$INSTDIR\doc\html\index.html"\r
+       createShortCut  "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Website.lnk"       "http://simgrid.gforge.inria.fr/"\r
        \r
 SectionEnd\r
 Section "Examples" ExamplesSection     \r
@@ -193,29 +190,38 @@ Section "Examples" ExamplesSection
        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
+       file @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\FindPcreWin.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
+       CreateDirectory "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Examples\"\r
+       createShortCut  "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Examples\HelloWorld project.lnk"   "$INSTDIR\examples\HelloWorld"\r
+       createShortCut  "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\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
+       file /r "@PCRE_LIBRARY_PATH@\lib"\r
+       file /r "@PCRE_LIBRARY_PATH@\include"\r
+       file /r "@PCRE_LIBRARY_PATH@\bin"\r
+       file /r "@PCRE_LIBRARY_PATH@\man"\r
+       file /r "@PCRE_LIBRARY_PATH@\share"\r
+SectionEnd\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
+Section "Java Bindings" JavaSection    \r
+       # install java library and examples\r
+       CreateDirectory $INSTDIR\examples\simgrid-java\r
+       setOutPath $INSTDIR\lib\r
+       file "$%SIMGRID_JAVA_SRC%\build\SG_java.dll"\r
+       file "$%SIMGRID_JAVA_SRC%\build\SG_java.def"\r
+       file "$%SIMGRID_JAVA_SRC%\simgrid.jar"\r
+       setOutPath $INSTDIR\examples\simgrid-java\r
+       file /r "$%SIMGRID_JAVA_SRC%\examples\"\r
+       # create shortcuts in the start menu programs directory\r
+       createShortCut  "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Examples\Java project.lnk" "$INSTDIR\examples\simgrid-java"\r
+       # create a popup box, with an OK button"\r
+       messageBox MB_OK "WARNING! Please add to your environment variable CLASSPATH value '$INSTDIR\lib\simgrid.jar;.' before executing Simgrid classes."\r
 SectionEnd\r
 \r
 # default section start\r
@@ -224,8 +230,8 @@ section
        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
+       CreateDirectory "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"\r
+       createShortCut  "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Uninstall simgrid.lnk" "$INSTDIR\uninstaller@BIN_EXE@"\r
 \r
        # Include for some of the windows message defines\r
        !include "winmessages.nsh"\r
@@ -233,15 +239,17 @@ section
        !define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'\r
        !define env_hkcu 'HKCU "Environment"'\r
        # Set Variables\r
-       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
+       WriteRegExpandStr ${env_hkcu} SIMGRID_ROOT $INSTDIR\r
+       WriteRegExpandStr ${env_hkcu} SIMGRID_VERSION @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\r
+       WriteRegExpandStr ${env_hkcu} SIMGRID_PCRE_LIBRARY_PATH $INSTDIR\GnuWin32\r
+       WriteRegExpandStr ${env_hkcu} 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
        \r
+       # create a popup box, with an OK button"\r
+       messageBox MB_OK "WARNING! Please add to your environment variable PATH value '$INSTDIR\lib;$INSTDIR\GnuWin32\bin' before executing Simgrid binaries."\r
+       \r
        SetRebootFlag true\r
 \r
 # default section end\r
@@ -252,12 +260,14 @@ LangString DESC_BinSection                ${LANG_ENGLISH} "Install some useful tools for Simg
 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
+LangString DESC_JAVASection    ${LANG_ENGLISH} "Install the Java binding and examples."\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
+LangString DESC_JAVASection    ${LANG_FRENCH}  "Installer la librairie Simgrid-java and les examples."\r
 \r
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
   !insertmacro MUI_DESCRIPTION_TEXT ${LibSection}              $(DESC_LibSection)\r
@@ -265,6 +275,7 @@ LangString DESC_PCRESection         ${LANG_FRENCH}  "Installer les librairies PCRE et P
   !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_DESCRIPTION_TEXT ${JAVASection}             $(DESC_JAVASection)\r
 !insertmacro MUI_FUNCTION_DESCRIPTION_END\r
 \r
 # create a section to define what the uninstaller does.\r
@@ -275,13 +286,13 @@ section "Uninstall"
        delete $INSTDIR\uninstaller@BIN_EXE@\r
 \r
        # delete installed libs\r
-       delete $INSTDIR\lib\libgras.@LIB_EXE@\r
-       delete $INSTDIR\lib\libsimgrid.@LIB_EXE@\r
+       delete $INSTDIR\lib\libgras.dll\r
+       delete $INSTDIR\lib\libsimgrid.dll\r
+       delete $INSTDIR\lib\libsimgrid.def\r
 \r
        # delete installed bin\r
        delete $INSTDIR\bin\colorize\r
        delete $INSTDIR\bin\graphicator@BIN_EXE@\r
-       delete $INSTDIR\bin\gras_stub_generator@BIN_EXE@\r
        delete $INSTDIR\bin\simgrid_update_xml\r
        delete $INSTDIR\bin\smpicc\r
        delete $INSTDIR\bin\smpif2c\r
@@ -327,7 +338,13 @@ section "Uninstall"
        delete $INSTDIR\include\xbt\mmalloc.h\r
        delete $INSTDIR\include\xbt\replay_trace_reader.h\r
        delete $INSTDIR\include\xbt\parmap.h\r
-       delete $INSTDIR\include\mc\modelchecker.h\r
+       delete $INSTDIR\include\xbt\socket.h\r
+       delete $INSTDIR\include\xbt\file_stat.h\r
+\r
+       delete $INSTDIR\include\simgrid\platf.h\r
+       delete $INSTDIR\include\simgrid\modelchecker.h\r
+       delete $INSTDIR\include\simgrid\simix.h\r
+\r
        delete $INSTDIR\include\msg\msg.h\r
        delete $INSTDIR\include\msg\datatypes.h \r
        delete $INSTDIR\include\simdag\simdag.h\r
@@ -351,17 +368,7 @@ section "Uninstall"
        delete $INSTDIR\include\amok\peermanagement.h\r
        delete $INSTDIR\include\amok\bandwidth.h\r
        delete $INSTDIR\include\instr\instr.h\r
-       delete $INSTDIR\include\simix\simix.h\r
-       delete $INSTDIR\include\simix\datatypes.h\r
-       delete $INSTDIR\include\simix\context.h\r
                \r
-       # delete link\r
-       delete "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk"\r
-       delete "$SMPROGRAMS\SimGrid\Documentation.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
@@ -385,19 +392,21 @@ 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
+       RMDir  /r "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"\r
        \r
        # delete PCRE\r
        RMDir   /r "$INSTDIR\GnuWin32"\r
        \r
        # Delete variable\r
-       DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
-       DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
-       DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_PATH\r
-       DeleteRegValue ${env_hklm} SIMGRID_PCRE_LIBRARY_VERSION\r
+       DeleteRegValue ${env_hkcu} SIMGRID_ROOT\r
+       DeleteRegValue ${env_hkcu} SIMGRID_VERSION\r
+       DeleteRegValue ${env_hkcu} SIMGRID_PCRE_LIBRARY_PATH\r
+       DeleteRegValue ${env_hkcu} SIMGRID_PCRE_LIBRARY_VERSION\r
     DeleteRegKey HKCU "SOFTWARE\SimGrid"\r
     \r
+    # delete JAVA-bindings\r
+    RMDir /r "$INSTDIR\simgrid-java"\r
+    \r
     # delete INSTDIR\r
     RMDir  /r "$INSTDIR"\r
     \r