3
;--------------------------------
4
;Interface Configuration
6
!define MUI_HEADERIMAGE
7
!define MUI_HEADERIMAGE_BITMAP "@CMAKE_HOME_DIRECTORY@\doc\webcruft\simgrid_logo_win_2011.bmp" ; optional
8
!define MUI_ABORTWARNING
10
;--------------------------------
13
!insertmacro MUI_PAGE_LICENSE "@CMAKE_HOME_DIRECTORY@\LICENSE-LGPL-2.1"
14
!insertmacro MUI_PAGE_COMPONENTS
15
!insertmacro MUI_PAGE_DIRECTORY
16
!insertmacro MUI_PAGE_INSTFILES
17
!insertmacro MUI_PAGE_FINISH
19
!insertmacro MUI_UNPAGE_CONFIRM
20
!insertmacro MUI_UNPAGE_INSTFILES
21
!insertmacro MUI_UNPAGE_FINISH
23
;--------------------------------
25
!insertmacro MUI_LANGUAGE "English"
26
!insertmacro MUI_LANGUAGE "French"
27
;--------------------------------
30
outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_SGjava_@NSIS_WIN_VERSION@@BIN_EXE@"
31
Icon "@CMAKE_HOME_DIRECTORY@\doc\webcruft\SGicon.ico"
33
RequestExecutionLevel admin
35
# set the default installation directory
36
InstallDir c:\SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@
38
Section "Libraries and Headers" LibSection
41
file @CMAKE_HOME_DIRECTORY@\AUTHORS
42
file @CMAKE_HOME_DIRECTORY@\Changelog
43
file @CMAKE_HOME_DIRECTORY@\COPYING
44
file @CMAKE_HOME_DIRECTORY@\LICENSE-LGPL-2.1
45
file @CMAKE_HOME_DIRECTORY@\NEWS
48
CreateDirectory $INSTDIR\lib
49
setOutPath $INSTDIR\lib
50
file lib\libsimgrid.dll
51
file lib\libsimgrid.def
54
CreateDirectory $INSTDIR\include
55
setOutPath $INSTDIR\include
56
file @CMAKE_HOME_DIRECTORY@\include\xbt.h
57
file include\simgrid_config.h
59
CreateDirectory $INSTDIR\include\xbt
60
setOutPath $INSTDIR\include\xbt
61
file @CMAKE_HOME_DIRECTORY@\include\xbt\misc.h
62
file @CMAKE_HOME_DIRECTORY@\include\xbt\sysdep.h
63
file @CMAKE_HOME_DIRECTORY@\include\xbt\virtu.h
64
file @CMAKE_HOME_DIRECTORY@\include\xbt\str.h
65
file @CMAKE_HOME_DIRECTORY@\include\xbt\strbuff.h
66
file @CMAKE_HOME_DIRECTORY@\include\xbt\hash.h
67
file @CMAKE_HOME_DIRECTORY@\include\xbt\function_types.h
68
file @CMAKE_HOME_DIRECTORY@\include\xbt\asserts.h
69
file @CMAKE_HOME_DIRECTORY@\include\xbt\ex.h
70
file @CMAKE_HOME_DIRECTORY@\include\xbt\log.h
71
file @CMAKE_HOME_DIRECTORY@\include\xbt\module.h
72
file @CMAKE_HOME_DIRECTORY@\include\xbt\mallocator.h
73
file @CMAKE_HOME_DIRECTORY@\include\xbt\dynar.h
74
file @CMAKE_HOME_DIRECTORY@\include\xbt\dict.h
75
file @CMAKE_HOME_DIRECTORY@\include\xbt\set.h
76
file @CMAKE_HOME_DIRECTORY@\include\xbt\heap.h
77
file @CMAKE_HOME_DIRECTORY@\include\xbt\graph.h
78
file @CMAKE_HOME_DIRECTORY@\include\xbt\fifo.h
79
file @CMAKE_HOME_DIRECTORY@\include\xbt\swag.h
80
file @CMAKE_HOME_DIRECTORY@\include\xbt\lib.h
81
file @CMAKE_HOME_DIRECTORY@\include\xbt\matrix.h
82
file @CMAKE_HOME_DIRECTORY@\include\xbt\peer.h
83
file @CMAKE_HOME_DIRECTORY@\include\xbt\config.h
84
file @CMAKE_HOME_DIRECTORY@\include\xbt\cunit.h
85
file @CMAKE_HOME_DIRECTORY@\include\xbt\graphxml_parse.h
86
file @CMAKE_HOME_DIRECTORY@\include\xbt\graphxml.h
87
file @CMAKE_HOME_DIRECTORY@\include\xbt\time.h
88
file @CMAKE_HOME_DIRECTORY@\include\xbt\synchro.h
89
file @CMAKE_HOME_DIRECTORY@\include\xbt\synchro_core.h
90
file @CMAKE_HOME_DIRECTORY@\include\xbt\queue.h
91
file @CMAKE_HOME_DIRECTORY@\include\xbt\setset.h
92
file @CMAKE_HOME_DIRECTORY@\include\xbt\mmalloc.h
93
file @CMAKE_HOME_DIRECTORY@\include\xbt\parmap.h
94
file @CMAKE_HOME_DIRECTORY@\include\xbt\automaton.h
95
file @CMAKE_HOME_DIRECTORY@\include\xbt\automatonparse_promela.h
96
file @CMAKE_HOME_DIRECTORY@\include\xbt\socket.h
97
file @CMAKE_HOME_DIRECTORY@\include\xbt\file_stat.h
98
file @CMAKE_HOME_DIRECTORY@\include\xbt\xbt_os_thread.h
99
file @CMAKE_HOME_DIRECTORY@\include\xbt\RngStream.h
101
CreateDirectory $INSTDIR\include\simgrid
102
setOutPath $INSTDIR\include\simgrid
103
file @CMAKE_HOME_DIRECTORY@\include\simgrid\platf.h
104
file @CMAKE_HOME_DIRECTORY@\include\simgrid\modelchecker.h
105
file @CMAKE_HOME_DIRECTORY@\include\simgrid\simix.h
107
CreateDirectory $INSTDIR\include\msg
108
setOutPath $INSTDIR\include\msg
109
file @CMAKE_HOME_DIRECTORY@\include\msg\msg.h
110
file @CMAKE_HOME_DIRECTORY@\include\msg\datatypes.h
112
CreateDirectory $INSTDIR\include\simdag
113
setOutPath $INSTDIR\include\simdag
114
file @CMAKE_HOME_DIRECTORY@\include\simdag\simdag.h
115
file @CMAKE_HOME_DIRECTORY@\include\simdag\datatypes.h
117
CreateDirectory $INSTDIR\include\smpi
118
setOutPath $INSTDIR\include\smpi
119
file @CMAKE_HOME_DIRECTORY@\include\smpi\smpi.h
120
file @CMAKE_HOME_DIRECTORY@\include\smpi\mpi.h
121
file @CMAKE_HOME_DIRECTORY@\include\smpi\mpif.h
122
file @CMAKE_HOME_DIRECTORY@\include\smpi\smpi_cocci.h
123
file include\smpi\smpif.h
125
CreateDirectory $INSTDIR\include\surf
126
setOutPath $INSTDIR\include\surf
127
file @CMAKE_HOME_DIRECTORY@\include\surf\surfxml_parse.h
128
file @CMAKE_HOME_DIRECTORY@\include\surf\simgrid_dtd.h
129
file @CMAKE_HOME_DIRECTORY@\include\surf\surf_routing.h
131
CreateDirectory $INSTDIR\include\instr
132
setOutPath $INSTDIR\include\instr
133
file @CMAKE_HOME_DIRECTORY@\include\instr\instr.h
136
Section "Binaries" BinSection
139
CreateDirectory $INSTDIR\bin
140
setOutPath $INSTDIR\bin
142
file bin\graphicator@BIN_EXE@
143
file bin\simgrid_update_xml
146
Section "Documentation" DocSection
149
CreateDirectory $INSTDIR\doc
150
setOutPath $INSTDIR\doc
151
file /nonfatal /r @CMAKE_HOME_DIRECTORY@\doc\html
152
# create a shortcut in the start menu programs directory
153
CreateDirectory "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"
154
createShortCut "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Documentation.lnk" "$INSTDIR\doc\html\index.html"
155
createShortCut "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Website.lnk" "http://simgrid.gforge.inria.fr/"
158
Section "Examples" ExamplesSection
160
CreateDirectory $INSTDIR\examples
161
setOutPath $INSTDIR\examples
163
#install examples for platforms
164
file /r @CMAKE_HOME_DIRECTORY@\examples\platforms
166
# install example HelloWorld
167
file /r @CMAKE_HOME_DIRECTORY@\doc\HelloWorld
169
# install example MasterSlave
170
CreateDirectory $INSTDIR\examples\MasterSlave
171
setOutPath $INSTDIR\examples\MasterSlave
172
file @CMAKE_HOME_DIRECTORY@\examples\msg\masterslave\masterslave_forwarder.c
173
file @CMAKE_HOME_DIRECTORY@\examples\msg\masterslave\deployment_masterslave_forwarder.xml
174
file @CMAKE_HOME_DIRECTORY@\examples\msg\msg_platform.xml
175
file @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\CMakeLists.txt
176
file @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\FindPcreWin.cmake
178
# create shortcuts in the start menu programs directory
179
CreateDirectory "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Examples\"
180
createShortCut "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Examples\HelloWorld project.lnk" "$INSTDIR\examples\HelloWorld"
181
createShortCut "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Examples\MasterSlave project.lnk" "$INSTDIR\examples\MasterSlave"
184
Section "Pcre library" PCRESection
185
# install pcre library
186
CreateDirectory $INSTDIR\GnuWin32
187
setOutPath $INSTDIR\GnuWin32
188
file /r "@PCRE_LIBRARY_PATH@\lib"
189
file /r "@PCRE_LIBRARY_PATH@\include"
190
file /r "@PCRE_LIBRARY_PATH@\bin"
191
file /r "@PCRE_LIBRARY_PATH@\man"
192
file /r "@PCRE_LIBRARY_PATH@\share"
195
Section "Java Bindings" JavaSection
196
# install java library and examples
197
CreateDirectory $INSTDIR\examples\simgrid-java
198
setOutPath $INSTDIR\lib
199
file /nonfatal "$%SIMGRID_JAVA_SRC%\build\SG_java.dll"
200
file /nonfatal "$%SIMGRID_JAVA_SRC%\build\SG_java.def"
201
file /nonfatal "$%SIMGRID_JAVA_SRC%\simgrid.jar"
202
setOutPath $INSTDIR\examples\simgrid-java
203
file /nonfatal /r "$%SIMGRID_JAVA_SRC%\examples\"
204
# create shortcuts in the start menu programs directory
205
createShortCut "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Examples\Java project.lnk" "$INSTDIR\examples\simgrid-java"
206
# create a popup box, with an OK button"
207
messageBox MB_OK "WARNING! Please add to your environment variable CLASSPATH value '$INSTDIR\lib\simgrid.jar;.' before executing Simgrid classes."
210
# default section start
212
# define uninstaller name
213
writeUninstaller $INSTDIR\uninstaller@BIN_EXE@
215
# create a shortcut in the start menu programs directory
216
CreateDirectory "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"
217
createShortCut "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\Uninstall simgrid.lnk" "$INSTDIR\uninstaller@BIN_EXE@"
219
# Include for some of the windows message defines
220
!include "winmessages.nsh"
221
# HKLM (all users) vs HKCU (current user) defines
222
!define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
223
!define env_hkcu 'HKCU "Environment"'
225
WriteRegExpandStr ${env_hkcu} SIMGRID_ROOT $INSTDIR
226
WriteRegExpandStr ${env_hkcu} SIMGRID_VERSION @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@
227
WriteRegExpandStr ${env_hkcu} SIMGRID_PCRE_LIBRARY_PATH $INSTDIR\GnuWin32
228
WriteRegExpandStr ${env_hkcu} SIMGRID_PCRE_LIBRARY_VERSION "8.21"
230
WriteRegStr HKCU "SOFTWARE\SimGrid" "Version" "@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"
231
WriteRegStr HKCU "SOFTWARE\SimGrid" "InstallPath" "$INSTDIR"
233
# create a popup box, with an OK button"
234
messageBox MB_OK "WARNING! Please add to your environment variable PATH value '$INSTDIR\lib;$INSTDIR\GnuWin32\bin' before executing Simgrid binaries."
238
# default section end
241
LangString DESC_LibSection ${LANG_ENGLISH} "Install Simgrid libraries with associated headers."
242
LangString DESC_BinSection ${LANG_ENGLISH} "Install some useful tools for Simgrid."
243
LangString DESC_DocSection ${LANG_ENGLISH} "Generated (doxygen) documentation."
244
LangString DESC_ExamplesSection ${LANG_ENGLISH} "Simgrid's HelloWorld example and some classical platforms."
245
LangString DESC_PCRESection ${LANG_ENGLISH} "Install the PCRE and PCREPOSIX libraries for SimGrid."
246
LangString DESC_JAVASection ${LANG_ENGLISH} "Install the Java binding and examples."
248
LangString DESC_LibSection ${LANG_FRENCH} "Installer les librairies Simgrid et leurs Ent�tes."
249
LangString DESC_BinSection ${LANG_FRENCH} "Installer les outils optionnels."
250
LangString DESC_DocSection ${LANG_FRENCH} "Installer la documentation."
251
LangString DESC_ExamplesSection ${LANG_FRENCH} "Installer un exemple 'HelloWorld' et des fichiers de plate-formes types."
252
LangString DESC_PCRESection ${LANG_FRENCH} "Installer les librairies PCRE et PCREPOSIX for SimGrid."
253
LangString DESC_JAVASection ${LANG_FRENCH} "Installer la librairie Simgrid-java and les examples."
255
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
256
!insertmacro MUI_DESCRIPTION_TEXT ${LibSection} $(DESC_LibSection)
257
!insertmacro MUI_DESCRIPTION_TEXT ${BinSection} $(DESC_BinSection)
258
!insertmacro MUI_DESCRIPTION_TEXT ${DocSection} $(DESC_DocSection)
259
!insertmacro MUI_DESCRIPTION_TEXT ${ExamplesSection} $(DESC_ExamplesSection)
260
!insertmacro MUI_DESCRIPTION_TEXT ${PCRESection} $(DESC_PCRESection)
261
!insertmacro MUI_DESCRIPTION_TEXT ${JAVASection} $(DESC_JAVASection)
262
!insertmacro MUI_FUNCTION_DESCRIPTION_END
264
# create a section to define what the uninstaller does.
265
# the section will always be named "Uninstall"
268
# always delete uninstaller first
269
delete $INSTDIR\uninstaller@BIN_EXE@
271
# delete installed libs
272
delete $INSTDIR\lib\libsimgrid.dll
273
delete $INSTDIR\lib\libsimgrid.def
275
# delete installed bin
276
delete $INSTDIR\bin\colorize
277
delete $INSTDIR\bin\graphicator@BIN_EXE@
278
delete $INSTDIR\bin\simgrid_update_xml
279
delete $INSTDIR\bin\smpicc
280
delete $INSTDIR\bin\smpif2c
281
delete $INSTDIR\bin\smpiff
282
delete $INSTDIR\bin\smpirun
283
delete $INSTDIR\bin\tesh
285
# delete installed headers
286
delete $INSTDIR\include\xbt.h
287
delete $INSTDIR\include\simgrid_config.h
288
delete $INSTDIR\include\xbt\misc.h
289
delete $INSTDIR\include\xbt\sysdep.h
290
delete $INSTDIR\include\xbt\virtu.h
291
delete $INSTDIR\include\xbt\str.h
292
delete $INSTDIR\include\xbt\strbuff.h
293
delete $INSTDIR\include\xbt\hash.h
294
delete $INSTDIR\include\xbt\function_types.h
295
delete $INSTDIR\include\xbt\asserts.h
296
delete $INSTDIR\include\xbt\ex.h
297
delete $INSTDIR\include\xbt\log.h
298
delete $INSTDIR\include\xbt\module.h
299
delete $INSTDIR\include\xbt\mallocator.h
300
delete $INSTDIR\include\xbt\dynar.h
301
delete $INSTDIR\include\xbt\dict.h
302
delete $INSTDIR\include\xbt\set.h
303
delete $INSTDIR\include\xbt\heap.h
304
delete $INSTDIR\include\xbt\graph.h
305
delete $INSTDIR\include\xbt\fifo.h
306
delete $INSTDIR\include\xbt\swag.h
307
delete $INSTDIR\include\xbt\lib.h
308
delete $INSTDIR\include\xbt\matrix.h
309
delete $INSTDIR\include\xbt\peer.h
310
delete $INSTDIR\include\xbt\config.h
311
delete $INSTDIR\include\xbt\cunit.h
312
delete $INSTDIR\include\xbt\graphxml_parse.h
313
delete $INSTDIR\include\xbt\graphxml.h
314
delete $INSTDIR\include\xbt\time.h
315
delete $INSTDIR\include\xbt\synchro.h
316
delete $INSTDIR\include\xbt\synchro_core.h
317
delete $INSTDIR\include\xbt\queue.h
318
delete $INSTDIR\include\xbt\setset.h
319
delete $INSTDIR\include\xbt\mmalloc.h
320
delete $INSTDIR\include\xbt\replay_trace_reader.h
321
delete $INSTDIR\include\xbt\parmap.h
322
delete $INSTDIR\include\xbt\socket.h
323
delete $INSTDIR\include\xbt\file_stat.h
325
delete $INSTDIR\include\simgrid\platf.h
326
delete $INSTDIR\include\simgrid\modelchecker.h
327
delete $INSTDIR\include\simgrid\simix.h
329
delete $INSTDIR\include\msg\msg.h
330
delete $INSTDIR\include\msg\datatypes.h
331
delete $INSTDIR\include\simdag\simdag.h
332
delete $INSTDIR\include\simdag\datatypes.h
333
delete $INSTDIR\include\smpi\smpi.h
334
delete $INSTDIR\include\smpi\mpi.h
335
delete $INSTDIR\include\smpi\mpif.h
336
delete $INSTDIR\include\smpi\smpi_cocci.h
337
delete $INSTDIR\include\smpi\smpif.h
338
delete $INSTDIR\include\surf\surfxml_parse.h
339
delete $INSTDIR\include\surf\simgrid_dtd.h
340
delete $INSTDIR\include\surf\surf_routing.h
341
delete $INSTDIR\include\instr\instr.h
344
delete $INSTDIR\AUTHORS
345
delete $INSTDIR\Changelog
346
delete $INSTDIR\COPYING
347
delete $INSTDIR\LICENSE-LGPL-2.1
350
# now delete directories
353
RMDir "$INSTDIR\include\simix"
354
RMDir "$INSTDIR\include\instr"
355
RMDir "$INSTDIR\include\surf"
356
RMDir "$INSTDIR\include\smpi"
357
RMDir "$INSTDIR\include\simdag"
358
RMDir "$INSTDIR\include\msg"
359
RMDir "$INSTDIR\include\mc"
360
RMDir "$INSTDIR\include\xbt"
361
RMDir "$INSTDIR\include"
362
RMDir /r "$INSTDIR\doc"
363
RMDir /r "$INSTDIR\examples"
364
RMDir /r "$SMPROGRAMS\SimGrid @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@"
367
RMDir /r "$INSTDIR\GnuWin32"
370
DeleteRegValue ${env_hkcu} SIMGRID_ROOT
371
DeleteRegValue ${env_hkcu} SIMGRID_VERSION
372
DeleteRegValue ${env_hkcu} SIMGRID_PCRE_LIBRARY_PATH
373
DeleteRegValue ${env_hkcu} SIMGRID_PCRE_LIBRARY_VERSION
374
DeleteRegKey HKCU "SOFTWARE\SimGrid"
376
# delete JAVA-bindings
377
RMDir /r "$INSTDIR\simgrid-java"
382
# uninstall section end
b'\\ No newline at end of file'