Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add logo and license page.
[simgrid.git] / buildtools / Cmake / simgrid.nsi.in
1 !include "MUI2.nsh"\r
2 \r
3 Name "Simgrid"\r
4 outFile "SimGrid@SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@_@CMAKE_SYSTEM_PROCESSOR@@BIN_EXE@"\r
5 \r
6 ;--------------------------------\r
7 ;Interface Configuration\r
8 \r
9   !define MUI_HEADERIMAGE\r
10   !define MUI_HEADERIMAGE_BITMAP "@CMAKE_HOME_DIRECTORY@\doc\webcruft\simgrid_logo_win.bmp" ; optional\r
11   !define MUI_ABORTWARNING\r
12 \r
13 ;--------------------------------\r
14 ;Pages\r
15 \r
16   !insertmacro MUI_PAGE_LICENSE "@CMAKE_HOME_DIRECTORY@\LICENSE-LGPL-2.1"\r
17   #!insertmacro MUI_PAGE_COMPONENTS\r
18   !insertmacro MUI_PAGE_DIRECTORY\r
19   !insertmacro MUI_PAGE_INSTFILES\r
20   \r
21   !insertmacro MUI_UNPAGE_CONFIRM\r
22   !insertmacro MUI_UNPAGE_INSTFILES\r
23   \r
24 ;--------------------------------\r
25 ;Languages\r
26   !insertmacro MUI_LANGUAGE "English"\r
27 \r
28 ;--------------------------------\r
29 \r
30 # set the default installation directory\r
31 InstallDir $PROGRAMFILES\SimGrid\r
32 \r
33 # The text to prompt the user to enter a directory\r
34 DirText "This will install Simgrid on your computer. Choose a directory"\r
35 \r
36 # default section start\r
37 section\r
38 \r
39         # install lib\r
40         CreateDirectory $INSTDIR\lib\r
41         setOutPath $INSTDIR\lib\r
42         file lib\libgras.@LIB_EXE@\r
43         file lib\libsimgrid.@LIB_EXE@\r
44         \r
45         #install headers\r
46         CreateDirectory  $INSTDIR\include\r
47         setOutPath $INSTDIR\include\r
48         file @CMAKE_HOME_DIRECTORY@\include\gras.h \r
49         file @CMAKE_HOME_DIRECTORY@\include\xbt.h\r
50         file include\simgrid_config.h\r
51         \r
52         CreateDirectory  $INSTDIR\include\xbt\r
53         setOutPath $INSTDIR\include\xbt\r
54         file @CMAKE_HOME_DIRECTORY@\include\xbt\misc.h\r
55         file @CMAKE_HOME_DIRECTORY@\include\xbt\sysdep.h\r
56         file @CMAKE_HOME_DIRECTORY@\include\xbt\virtu.h\r
57         file @CMAKE_HOME_DIRECTORY@\include\xbt\str.h\r
58         file @CMAKE_HOME_DIRECTORY@\include\xbt\strbuff.h\r
59         file @CMAKE_HOME_DIRECTORY@\include\xbt\hash.h\r
60         file @CMAKE_HOME_DIRECTORY@\include\xbt\function_types.h\r
61         file @CMAKE_HOME_DIRECTORY@\include\xbt\asserts.h \r
62         file @CMAKE_HOME_DIRECTORY@\include\xbt\ex.h\r
63         file @CMAKE_HOME_DIRECTORY@\include\xbt\log.h\r
64         file @CMAKE_HOME_DIRECTORY@\include\xbt\module.h\r
65         file @CMAKE_HOME_DIRECTORY@\include\xbt\mallocator.h\r
66         file @CMAKE_HOME_DIRECTORY@\include\xbt\dynar.h\r
67         file @CMAKE_HOME_DIRECTORY@\include\xbt\dict.h\r
68         file @CMAKE_HOME_DIRECTORY@\include\xbt\set.h\r
69         file @CMAKE_HOME_DIRECTORY@\include\xbt\heap.h\r
70         file @CMAKE_HOME_DIRECTORY@\include\xbt\graph.h\r
71         file @CMAKE_HOME_DIRECTORY@\include\xbt\fifo.h\r
72         file @CMAKE_HOME_DIRECTORY@\include\xbt\swag.h\r
73         file @CMAKE_HOME_DIRECTORY@\include\xbt\lib.h\r
74         file @CMAKE_HOME_DIRECTORY@\include\xbt\matrix.h\r
75         file @CMAKE_HOME_DIRECTORY@\include\xbt\peer.h\r
76         file @CMAKE_HOME_DIRECTORY@\include\xbt\config.h\r
77         file @CMAKE_HOME_DIRECTORY@\include\xbt\cunit.h\r
78         file @CMAKE_HOME_DIRECTORY@\include\xbt\graphxml_parse.h\r
79         file @CMAKE_HOME_DIRECTORY@\include\xbt\graphxml.h\r
80         file @CMAKE_HOME_DIRECTORY@\include\xbt\time.h\r
81         file @CMAKE_HOME_DIRECTORY@\include\xbt\synchro.h\r
82         file @CMAKE_HOME_DIRECTORY@\include\xbt\synchro_core.h\r
83         file @CMAKE_HOME_DIRECTORY@\include\xbt\queue.h\r
84         file @CMAKE_HOME_DIRECTORY@\include\xbt\setset.h\r
85         file @CMAKE_HOME_DIRECTORY@\include\xbt\mmalloc.h\r
86         file @CMAKE_HOME_DIRECTORY@\include\xbt\replay_trace_reader.h\r
87         file @CMAKE_HOME_DIRECTORY@\include\xbt\parmap.h\r
88         \r
89         CreateDirectory  $INSTDIR\include\mc\r
90         setOutPath $INSTDIR\include\mc\r
91         file @CMAKE_HOME_DIRECTORY@\include\mc\modelchecker.h\r
92         \r
93         CreateDirectory  $INSTDIR\include\msg\r
94         setOutPath $INSTDIR\include\msg\r
95         file @CMAKE_HOME_DIRECTORY@\include\msg\msg.h\r
96         file @CMAKE_HOME_DIRECTORY@\include\msg\datatypes.h\r
97         \r
98         CreateDirectory  $INSTDIR\include\simdag\r
99         setOutPath $INSTDIR\include\simdag\r
100         file @CMAKE_HOME_DIRECTORY@\include\simdag\simdag.h\r
101         file @CMAKE_HOME_DIRECTORY@\include\simdag\datatypes.h\r
102         \r
103         CreateDirectory  $INSTDIR\include\smpi\r
104         setOutPath $INSTDIR\include\smpi\r
105         file @CMAKE_HOME_DIRECTORY@\include\smpi\smpi.h\r
106         file @CMAKE_HOME_DIRECTORY@\include\smpi\mpi.h\r
107         file @CMAKE_HOME_DIRECTORY@\include\smpi\mpif.h\r
108         file @CMAKE_HOME_DIRECTORY@\include\smpi\smpi_cocci.h\r
109         file include\smpi\smpif.h\r
110         \r
111         CreateDirectory  $INSTDIR\include\surf\r
112         setOutPath $INSTDIR\include\surf\r
113         file @CMAKE_HOME_DIRECTORY@\include\surf\surfxml_parse.h\r
114         file @CMAKE_HOME_DIRECTORY@\include\surf\simgrid_dtd.h\r
115         file @CMAKE_HOME_DIRECTORY@\include\surf\surf_routing.h\r
116         \r
117         CreateDirectory  $INSTDIR\include\gras\r
118         setOutPath $INSTDIR\include\gras\r
119         file @CMAKE_HOME_DIRECTORY@\include\gras\datadesc.h\r
120         file @CMAKE_HOME_DIRECTORY@\include\gras\transport.h\r
121         file @CMAKE_HOME_DIRECTORY@\include\gras\virtu.h\r
122         file @CMAKE_HOME_DIRECTORY@\include\gras\emul.h\r
123         file @CMAKE_HOME_DIRECTORY@\include\gras\process.h\r
124         file @CMAKE_HOME_DIRECTORY@\include\gras\module.h\r
125         file @CMAKE_HOME_DIRECTORY@\include\gras\messages.h\r
126         file @CMAKE_HOME_DIRECTORY@\include\gras\timer.h\r
127         \r
128         CreateDirectory  $INSTDIR\include\amok\r
129         setOutPath $INSTDIR\include\amok\r
130         file @CMAKE_HOME_DIRECTORY@\include\amok\peermanagement.h\r
131         file @CMAKE_HOME_DIRECTORY@\include\amok\bandwidth.h\r
132         \r
133         CreateDirectory  $INSTDIR\include\instr\r
134         setOutPath $INSTDIR\include\instr\r
135         file @CMAKE_HOME_DIRECTORY@\include\instr\instr.h\r
136         \r
137         CreateDirectory  $INSTDIR\include\simix\r
138         setOutPath $INSTDIR\include\simix\r
139         file @CMAKE_HOME_DIRECTORY@\include\simix\simix.h\r
140         file @CMAKE_HOME_DIRECTORY@\include\simix\datatypes.h\r
141         file @CMAKE_HOME_DIRECTORY@\include\simix\context.h\r
142         \r
143         # insatll bin\r
144         CreateDirectory $INSTDIR\bin\r
145         setOutPath $INSTDIR\bin\r
146         file bin\colorize\r
147         file bin\graphicator@BIN_EXE@\r
148         file bin\gras_stub_generator@BIN_EXE@\r
149         file bin\simgrid_update_xml\r
150         file bin\smpicc\r
151         file bin\smpif2c\r
152         file bin\smpiff\r
153         file bin\smpirun\r
154         file bin\tesh\r
155         \r
156         # install doc\r
157         CreateDirectory $INSTDIR\doc\r
158         setOutPath $INSTDIR\doc\r
159         file /nonfatal /r @CMAKE_HOME_DIRECTORY@\doc\html\r
160         file /r @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\r
161         \r
162         # install examples\r
163         CreateDirectory $INSTDIR\examples\r
164         setOutPath $INSTDIR\examples\r
165         file /r @CMAKE_HOME_DIRECTORY@\examples\platforms       \r
166         \r
167         # define uninstaller name\r
168         writeUninstaller $INSTDIR\uninstaller@BIN_EXE@\r
169 \r
170         # create a shortcut in the start menu programs directory\r
171         CreateDirectory "$SMPROGRAMS\SimGrid"\r
172         createShortCut  "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk" "$INSTDIR\uninstaller@BIN_EXE@"\r
173         createShortCut  "$SMPROGRAMS\SimGrid\Documentation.lnk" "$INSTDIR\doc\html\index.html"\r
174         \r
175         # Include for some of the windows message defines\r
176         !include "winmessages.nsh"\r
177         # HKLM (all users) vs HKCU (current user) defines\r
178         !define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'\r
179         !define env_hkcu 'HKCU "Environment"'\r
180         # Set Variables\r
181         WriteRegExpandStr ${env_hklm} SIMGRID_ROOT $INSTDIR\r
182         WriteRegExpandStr ${env_hklm} GRAS_ROOT $INSTDIR\r
183         WriteRegExpandStr ${env_hklm} SIMGRID_VERSION @SIMGRID_VERSION_MAJOR@.@SIMGRID_VERSION_MINOR@.@SIMGRID_VERSION_PATCH@\r
184 \r
185 # default section end\r
186 sectionEnd\r
187 \r
188 # create a section to define what the uninstaller does.\r
189 # the section will always be named "Uninstall"\r
190 section "Uninstall"\r
191 \r
192         # always delete uninstaller first\r
193         delete $INSTDIR\uninstaller@BIN_EXE@\r
194 \r
195         # delete installed libs\r
196         delete $INSTDIR\lib\libgras.@LIB_EXE@\r
197         delete $INSTDIR\lib\libsimgrid.@LIB_EXE@\r
198 \r
199         # delete installed bin\r
200         delete $INSTDIR\bin\colorize\r
201         delete $INSTDIR\bin\graphicator@BIN_EXE@\r
202         delete $INSTDIR\bin\gras_stub_generator@BIN_EXE@\r
203         delete $INSTDIR\bin\simgrid_update_xml\r
204         delete $INSTDIR\bin\smpicc\r
205         delete $INSTDIR\bin\smpif2c\r
206         delete $INSTDIR\bin\smpiff\r
207         delete $INSTDIR\bin\smpirun\r
208         delete $INSTDIR\bin\tesh\r
209         \r
210         # delete installed headers\r
211         delete $INSTDIR\include\gras.h \r
212         delete $INSTDIR\include\xbt.h\r
213         delete $INSTDIR\include\simgrid_config.h\r
214         delete $INSTDIR\include\xbt\misc.h\r
215         delete $INSTDIR\include\xbt\sysdep.h\r
216         delete $INSTDIR\include\xbt\virtu.h\r
217         delete $INSTDIR\include\xbt\str.h\r
218         delete $INSTDIR\include\xbt\strbuff.h\r
219         delete $INSTDIR\include\xbt\hash.h\r
220         delete $INSTDIR\include\xbt\function_types.h\r
221         delete $INSTDIR\include\xbt\asserts.h \r
222         delete $INSTDIR\include\xbt\ex.h\r
223         delete $INSTDIR\include\xbt\log.h\r
224         delete $INSTDIR\include\xbt\module.h\r
225         delete $INSTDIR\include\xbt\mallocator.h\r
226         delete $INSTDIR\include\xbt\dynar.h\r
227         delete $INSTDIR\include\xbt\dict.h\r
228         delete $INSTDIR\include\xbt\set.h\r
229         delete $INSTDIR\include\xbt\heap.h\r
230         delete $INSTDIR\include\xbt\graph.h\r
231         delete $INSTDIR\include\xbt\fifo.h\r
232         delete $INSTDIR\include\xbt\swag.h\r
233         delete $INSTDIR\include\xbt\lib.h\r
234         delete $INSTDIR\include\xbt\matrix.h\r
235         delete $INSTDIR\include\xbt\peer.h\r
236         delete $INSTDIR\include\xbt\config.h\r
237         delete $INSTDIR\include\xbt\cunit.h\r
238         delete $INSTDIR\include\xbt\graphxml_parse.h\r
239         delete $INSTDIR\include\xbt\graphxml.h\r
240         delete $INSTDIR\include\xbt\time.h\r
241         delete $INSTDIR\include\xbt\synchro.h\r
242         delete $INSTDIR\include\xbt\synchro_core.h\r
243         delete $INSTDIR\include\xbt\queue.h\r
244         delete $INSTDIR\include\xbt\setset.h\r
245         delete $INSTDIR\include\xbt\mmalloc.h\r
246         delete $INSTDIR\include\xbt\replay_trace_reader.h\r
247         delete $INSTDIR\include\xbt\parmap.h\r
248         delete $INSTDIR\include\mc\modelchecker.h\r
249         delete $INSTDIR\include\msg\msg.h\r
250         delete $INSTDIR\include\msg\datatypes.h \r
251         delete $INSTDIR\include\simdag\simdag.h\r
252         delete $INSTDIR\include\simdag\datatypes.h\r
253         delete $INSTDIR\include\smpi\smpi.h\r
254         delete $INSTDIR\include\smpi\mpi.h\r
255         delete $INSTDIR\include\smpi\mpif.h\r
256         delete $INSTDIR\include\smpi\smpi_cocci.h\r
257         delete $INSTDIR\include\smpi\smpif.h\r
258         delete $INSTDIR\include\surf\surfxml_parse.h\r
259         delete $INSTDIR\include\surf\simgrid_dtd.h\r
260         delete $INSTDIR\include\surf\surf_routing.h\r
261         delete $INSTDIR\include\gras\datadesc.h\r
262         delete $INSTDIR\include\gras\transport.h\r
263         delete $INSTDIR\include\gras\virtu.h\r
264         delete $INSTDIR\include\gras\emul.h\r
265         delete $INSTDIR\include\gras\process.h\r
266         delete $INSTDIR\include\gras\module.h\r
267         delete $INSTDIR\include\gras\messages.h\r
268         delete $INSTDIR\include\gras\timer.h\r
269         delete $INSTDIR\include\amok\peermanagement.h\r
270         delete $INSTDIR\include\amok\bandwidth.h\r
271         delete $INSTDIR\include\instr\instr.h\r
272         delete $INSTDIR\include\simix\simix.h\r
273         delete $INSTDIR\include\simix\datatypes.h\r
274         delete $INSTDIR\include\simix\context.h\r
275                 \r
276         # delete link\r
277         delete "$SMPROGRAMS\SimGrid\Uninstall simgrid.lnk"\r
278         delete "$SMPROGRAMS\SimGrid\Documentation.lnk"\r
279         \r
280         # now delete directories\r
281         RMDir  "$INSTDIR\bin"\r
282         RMDir  "$INSTDIR\lib"\r
283         RMDir  "$INSTDIR\include\simix"\r
284         RMDir  "$INSTDIR\include\instr"\r
285         RMDir  "$INSTDIR\include\amok"\r
286         RMDir  "$INSTDIR\include\gras"\r
287         RMDir  "$INSTDIR\include\surf"\r
288         RMDir  "$INSTDIR\include\smpi"\r
289         RMDir  "$INSTDIR\include\simdag"\r
290         RMDir  "$INSTDIR\include\msg"\r
291         RMDir  "$INSTDIR\include\mc"\r
292         RMDir  "$INSTDIR\include\xbt"\r
293         RMDir  "$INSTDIR\include"\r
294         RMDir  /r "$INSTDIR\doc"\r
295         RMDir  /r "$INSTDIR\examples"\r
296         RMDir  "$SMPROGRAMS\SimGrid"\r
297         \r
298         # Delete variable\r
299         DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
300         DeleteRegValue ${env_hklm} GRAS_ROOT\r
301         DeleteRegValue ${env_hklm} SIMGRID_VERSION\r
302 \r
303 # uninstall section end\r
304 sectionEnd