| 2551 |
dpurdie |
1 |
;*****************************************************************
|
|
|
2 |
; Author : Hugues DOILLON
|
|
|
3 |
; Date : 03/2007
|
|
|
4 |
; Modifié :
|
|
|
5 |
;*****************************************************************
|
|
|
6 |
; MUI GUI Version 2
|
|
|
7 |
; If problem during compilation -> You need to install the latest version of NSIS
|
|
|
8 |
!include MUI2.nsh
|
|
|
9 |
|
|
|
10 |
!include Library.nsh
|
|
|
11 |
|
|
|
12 |
; Utiliser les instructions conditionnel
|
|
|
13 |
!include LogicLib.nsh
|
|
|
14 |
|
|
|
15 |
!include Sections.nsh
|
|
|
16 |
|
|
|
17 |
!include WordFunc.nsh
|
|
|
18 |
|
|
|
19 |
!include TextReplace.nsh
|
|
|
20 |
|
|
|
21 |
;!include WinMessages.nsh
|
|
|
22 |
|
| 2561 |
dpurdie |
23 |
!include VixMacros.nsh
|
| 2551 |
dpurdie |
24 |
|
|
|
25 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
26 |
|
|
|
27 |
; Set the compression method
|
|
|
28 |
SetCompressor bzip2 ; zlib|bzip2|lzma
|
|
|
29 |
|
|
|
30 |
; Execution Setup section that generates the files and libraries to install
|
|
|
31 |
; Inclusion of sections containing the libraries to install (generated by the previous setup)
|
|
|
32 |
;
|
|
|
33 |
; Note: Paths within the installer are relative
|
|
|
34 |
; Becareful of the CWD when running to program
|
|
|
35 |
;
|
|
|
36 |
!system "${GBE_BINDIR}\SetupInstallationLibrairie.exe"
|
|
|
37 |
!include "${GBE_BINDIR}\InstallationLibrairie.nsh"
|
|
|
38 |
|
|
|
39 |
; Inclusion of information from the application (files change depending on application)
|
|
|
40 |
!include InformationApplication.nsh
|
|
|
41 |
|
|
|
42 |
!include IsUserAdmin.nsh
|
|
|
43 |
|
|
|
44 |
!include GestionRaccourci.nsh
|
|
|
45 |
|
|
|
46 |
; Adding macro to detect. NET framework
|
|
|
47 |
!ifdef FRAMEWORK_DOT_NET
|
|
|
48 |
!include GetDotNETVersion.nsh
|
|
|
49 |
!endif
|
|
|
50 |
|
|
|
51 |
; Added macro for a custom section
|
|
|
52 |
!ifdef SECTION_INSTALLATION_PERSONNALISE_INITIAL | SECTION_INSTALLATION_PERSONNALISE_PREMIER | SECTION_INSTALLATION_PERSONNALISE_DERNIER | SECTION_DESINSTALLATION_PERSONNALISE_PREMIER | SECTION_DESINSTALLATION_PERSONNALISE_DERNIER | UI_PAGE_PARAMETRAGE
|
|
|
53 |
!include "${A_INSTALLER}\SectionPersonnalise.nsh"
|
|
|
54 |
!endif
|
|
|
55 |
|
|
|
56 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
57 |
|
|
|
58 |
; Registry Key
|
|
|
59 |
|
|
|
60 |
!define REGISTRE_APPLICATION "Software\Microsoft\Windows\CurrentVersion\App Paths\${NOM_APPLICATION}.exe"
|
|
|
61 |
|
|
|
62 |
!define REGISTRE_DESINSTALLATION "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NOM_APPLICATION}"
|
|
|
63 |
|
|
|
64 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
65 |
|
|
|
66 |
; Display Settings MUI
|
|
|
67 |
|
|
|
68 |
; Warning message in case of cancellation
|
|
|
69 |
!define MUI_ABORTWARNING
|
|
|
70 |
|
|
|
71 |
; Added macro for a custom section
|
|
|
72 |
; Icon Installation
|
|
|
73 |
!define MUI_ICON "${GBE_NSISDATA}\inVix.ico"
|
|
|
74 |
; Icon Uninstall
|
|
|
75 |
!define MUI_UNICON "${GBE_NSISDATA}\unVix.ico"
|
|
|
76 |
|
|
|
77 |
; Image
|
|
|
78 |
!define MUI_HEADERIMAGE
|
|
|
79 |
!define MUI_HEADERIMAGE_RIGHT
|
|
|
80 |
; Image Host and closing
|
|
|
81 |
!define MUI_HEADERIMAGE_BITMAP "${GBE_NSISDATA}\VixHeader.bmp"
|
|
|
82 |
!define MUI_HEADERIMAGE_UNBITMAP "${GBE_NSISDATA}\VixHeader.bmp"
|
|
|
83 |
|
|
|
84 |
; Image top left
|
|
|
85 |
!define MUI_WELCOMEFINISHPAGE_BITMAP "${GBE_NSISDATA}\VixPanel.bmp"
|
|
|
86 |
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${GBE_NSISDATA}\VixPanel.bmp"
|
|
|
87 |
|
|
|
88 |
; Description of the page component selection
|
|
|
89 |
!define MUI_COMPONENTSPAGE_NODESC ; MUI_COMPONENTSPAGE_SMALLDESC
|
|
|
90 |
|
|
|
91 |
; Can choose to run the application
|
|
|
92 |
!ifndef SANS_LANCEMENT
|
|
|
93 |
!define MUI_FINISHPAGE_RUN "$INSTDIR\${EXE_APPLICATION}"
|
|
|
94 |
!endif
|
|
|
95 |
|
|
|
96 |
; Defined functions launched initialization installation and uninstallation
|
|
|
97 |
!define MUI_CUSTOMFUNCTION_GUIINIT initialisationGUI
|
|
|
98 |
!define MUI_CUSTOMFUNCTION_UNGUIINIT un.initialisationGUI
|
|
|
99 |
;!define MUI_CUSTOMFUNCTION_ABORT function
|
|
|
100 |
;!define MUI_CUSTOMFUNCTION_UNABORT function
|
|
|
101 |
|
|
|
102 |
;!define MUI_FINISHPAGE_LINK_LOCATION ${WEB_SITE_APPLICATION}
|
|
|
103 |
|
|
|
104 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
105 |
|
|
|
106 |
; Definition of pages visible MUI Installation
|
|
|
107 |
|
|
|
108 |
;!define MULTIUSER_EXECUTIONLEVEL Admin
|
|
|
109 |
;!define MULTIUSER_MUI
|
|
|
110 |
;!include MultiUser.nsh
|
|
|
111 |
|
|
|
112 |
;!insertmacro MULTIUSER_PAGE_INSTALLMODE
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
; Home Installation
|
|
|
116 |
; Uses 3 lines instead of 2 for the title display
|
|
|
117 |
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
|
|
118 |
!insertmacro MUI_PAGE_WELCOME
|
|
|
119 |
|
|
|
120 |
; Page License
|
|
|
121 |
;!insertmacro MUI_PAGE_LICENSE "..\..\dossier\vers\license\VotreLicenseLogicielle.txt"
|
|
|
122 |
|
|
|
123 |
; Page de choix des composants à installer
|
|
|
124 |
!insertmacro MUI_PAGE_COMPONENTS
|
|
|
125 |
|
|
|
126 |
|
|
|
127 |
; Page selection in the installation directory
|
|
|
128 |
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
129 |
|
|
|
130 |
; Page progress of the installation
|
|
|
131 |
!insertmacro MUI_PAGE_INSTFILES
|
|
|
132 |
|
|
|
133 |
!ifdef UI_PAGE_PARAMETRAGE
|
|
|
134 |
!insertmacro UI_Page_Parametrage
|
|
|
135 |
!endif
|
|
|
136 |
|
|
|
137 |
; Page Setup Complete
|
|
|
138 |
!define MUI_FINISHPAGE_TITLE_3LINES
|
|
|
139 |
!insertmacro MUI_PAGE_FINISH
|
|
|
140 |
|
|
|
141 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
142 |
|
|
|
143 |
; Definition of Uninstall pages visible MUI
|
|
|
144 |
|
|
|
145 |
; Home Installation
|
|
|
146 |
; Uses 3 lines instead of 2 for the title display
|
|
|
147 |
;!define MUI_WELCOMEPAGE_TITLE_3LINES
|
|
|
148 |
;!insertmacro MUI_UNPAGE_WELCOME
|
|
|
149 |
|
|
|
150 |
; Page uninstall confirmation
|
|
|
151 |
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
152 |
|
|
|
153 |
; Page unwinding uninstalling
|
|
|
154 |
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
155 |
|
|
|
156 |
; End Page Uninstall
|
|
|
157 |
!define MUI_FINISHPAGE_TITLE_3LINES
|
|
|
158 |
!insertmacro MUI_UNPAGE_FINISH
|
|
|
159 |
|
|
|
160 |
; End Pages MUI
|
|
|
161 |
|
|
|
162 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
163 |
|
|
|
164 |
; MUI language available
|
|
|
165 |
!insertmacro MUI_LANGUAGE "English"
|
|
|
166 |
!insertmacro MUI_LANGUAGE "French"
|
|
|
167 |
!insertmacro MUI_LANGUAGE "Spanish"
|
|
|
168 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
169 |
|
|
|
170 |
; Set the name of the installation.
|
|
|
171 |
;; Name "${NOM_APPLICATION} ${VERSION_APPLICATION}"
|
|
|
172 |
|
|
|
173 |
; Specifies the file to be used by makensis order to create the installation.
|
|
|
174 |
;ddp; OutFile "Setup\${NOM_SETUP}"
|
|
|
175 |
|
|
|
176 |
; Set the installation directory by default.
|
|
|
177 |
InstallDir "${CHEMIN_INSTALLATION}"
|
|
|
178 |
|
|
|
179 |
; Seeking the installation folder in the registry
|
|
|
180 |
;InstallDirRegKey HKLM "${REGISTRE_APPLICATION}" ""
|
|
|
181 |
|
|
|
182 |
; Defined if installation details are shown or not.
|
|
|
183 |
ShowInstDetails show
|
|
|
184 |
|
|
|
185 |
; Defined if the uninstallation details are shown or not.
|
|
|
186 |
ShowUnInstDetails show
|
|
|
187 |
|
|
|
188 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
189 |
|
|
|
190 |
; Variable
|
|
|
191 |
|
|
|
192 |
; Management of unique choice (All Users or Current user)
|
|
|
193 |
|
|
|
194 |
var menuTousUtilisateurs
|
|
|
195 |
var menuUtilisateurCourant
|
|
|
196 |
var raccourciTousUtilisateurs
|
|
|
197 |
var raccourciUtilisateurCourant
|
|
|
198 |
|
|
|
199 |
; Other Variables
|
|
|
200 |
|
|
|
201 |
var cheminAncienneDesinstallation
|
|
|
202 |
var cheminAncienneInstallation
|
|
|
203 |
|
|
|
204 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
205 |
|
|
|
206 |
; Definition of language strings used
|
|
|
207 |
|
|
|
208 |
LangString stringAncienneVersion ${LANG_FRENCH} "Une ancienne version de cette application est installée sur votre système. Avant de poursuivre le processus d'installation, la version existante de cette application sera supprimée. Souhaitez-vous supprimer cette application ainsi que tous les fichiers du dossier d'installation ?"
|
|
|
209 |
LangString stringAncienneVersion ${LANG_ENGLISH} "Another version of this software is already installed. Delete existing version ?"
|
|
|
210 |
LangString stringAncienneVersion ${LANG_SPANISH} "Otra versión del software ya está instalada .¿ Borrar la versión acual ?"
|
|
|
211 |
|
|
|
212 |
LangString stringFrameworkNET ${LANG_FRENCH} "Cette application requiert le Framework .NET ${FRAMEWORK_DOT_NET}. Pour installer cette application, installez d'abord le Framework .NET ${FRAMEWORK_DOT_NET}, ou contactez votre service de support pour obtenir de l'assistance."
|
|
|
213 |
LangString stringFrameworkNET ${LANG_ENGLISH} "Software needs Framework .NET ${FRAMEWORK_DOT_NET}."
|
|
|
214 |
LangString stringFrameworkNET ${LANG_SPANISH} "Este programa necesita el Framework .NET ${FRAMEWORK_DOT_NET}."
|
|
|
215 |
|
|
|
216 |
LangString stringInstallationApplication ${LANG_FRENCH} "L'installation de cette application requiert les droits d'administration. Pour installer cette application, ouvrez une session en tant qu'administrateur, ou contactez votre service de support pour obtenir de l'assistance."
|
|
|
217 |
LangString stringInstallationApplication ${LANG_ENGLISH} "Software Installer needs Administrator Rights."
|
|
|
218 |
LangString stringInstallationApplication ${LANG_SPANISH} "El programa de instalación necesita derechos de administrador."
|
|
|
219 |
|
|
|
220 |
LangString stringDesinstallationApplication ${LANG_FRENCH} "La désinstallation de cette application requiert les droits d'administration. Pour supprimer cette application, ouvrez une session en tant qu'administrateur, ou contactez votre service de support pour obtenir de l'assistance."
|
|
|
221 |
LangString stringDesinstallationApplication ${LANG_ENGLISH} "Software Uninstaller needs Administrator Rights."
|
|
|
222 |
LangString stringDesinstallationApplication ${LANG_SPANISH} "El programa de desinstalación necesita derechos de administrador."
|
|
|
223 |
|
|
|
224 |
LangString stringApplication ${LANG_FRENCH} "Application"
|
|
|
225 |
LangString stringApplication ${LANG_ENGLISH} "Application"
|
|
|
226 |
LangString stringApplication ${LANG_SPANISH} "Aplicación"
|
|
|
227 |
|
|
|
228 |
LangString stringSecAncienneVersion ${LANG_FRENCH} "Désinstaller ancienne version"
|
|
|
229 |
LangString stringSecAncienneVersion ${LANG_ENGLISH} "Uninstall old version"
|
|
|
230 |
LangString stringSecAncienneVersion ${LANG_SPANISH} "???"
|
|
|
231 |
|
|
|
232 |
LangString stringLibrairies ${LANG_FRENCH} "Librairies"
|
|
|
233 |
LangString stringLibrairies ${LANG_ENGLISH} "Library"
|
|
|
234 |
LangString stringLibrairies ${LANG_SPANISH} "Librería"
|
|
|
235 |
|
|
|
236 |
!ifdef SECTION_INSTALLATION_PERSONNALISE_EBRIO
|
|
|
237 |
!insertmacro LangStringInstalleSectionPersonnalisePremier
|
|
|
238 |
!endif
|
|
|
239 |
|
|
|
240 |
!ifdef SECTION_INSTALLATION_PERSONNALISE_INITIAL
|
|
|
241 |
!insertmacro LangStringInstalleSectionPersonnaliseInitial
|
|
|
242 |
!endif
|
|
|
243 |
|
|
|
244 |
!ifdef SECTION_INSTALLATION_PERSONNALISE_PREMIER
|
|
|
245 |
!insertmacro LangStringInstalleSectionPersonnalisePremier
|
|
|
246 |
!endif
|
|
|
247 |
|
|
|
248 |
!ifdef SECTION_INSTALLATION_PERSONNALISE_DERNIER
|
|
|
249 |
!insertmacro LangStringInstalleSectionPersonnaliseDernier
|
|
|
250 |
!endif
|
|
|
251 |
|
|
|
252 |
LangString stringRaccourciMenuDemarrer ${LANG_FRENCH} "Raccourci menu Démarrer"
|
|
|
253 |
LangString stringRaccourciMenuDemarrer ${LANG_ENGLISH} "Create Shortcut in Windows Start Menu"
|
|
|
254 |
LangString stringRaccourciMenuDemarrer ${LANG_SPANISH} "Creación acceso directo en el menú Windows Inicio"
|
|
|
255 |
|
|
|
256 |
LangString stringRaccourciBureau ${LANG_FRENCH} "Raccourci sur le bureau"
|
|
|
257 |
LangString stringRaccourciBureau ${LANG_ENGLISH} "Create Shortcut on Desktop"
|
|
|
258 |
LangString stringRaccourciBureau ${LANG_SPANISH} "Creación acceso directo en el escritorio"
|
|
|
259 |
|
|
|
260 |
LangString stringTousUtilisateurs ${LANG_FRENCH} "Tous les utilisateurs"
|
|
|
261 |
LangString stringTousUtilisateurs ${LANG_ENGLISH} "All user"
|
|
|
262 |
LangString stringTousUtilisateurs ${LANG_SPANISH} "Todos los utilizadores"
|
|
|
263 |
|
|
|
264 |
LangString stringUtilisateurCourant ${LANG_FRENCH} "Utilisateur courant"
|
|
|
265 |
LangString stringUtilisateurCourant ${LANG_ENGLISH} "Current user"
|
|
|
266 |
LangString stringUtilisateurCourant ${LANG_SPANISH} "Utilizador actual"
|
|
|
267 |
|
|
|
268 |
LangString stringRaccourciDesinstalle ${LANG_FRENCH} "Désinstallation"
|
|
|
269 |
LangString stringRaccourciDesinstalle ${LANG_ENGLISH} "Uninstall"
|
|
|
270 |
LangString stringRaccourciDesinstalle ${LANG_SPANISH} "Desinstalación"
|
|
|
271 |
|
|
|
272 |
LangString stringMessageAvertissement ${LANG_FRENCH} "${MESSAGE_AVERTISSEMENT_FRANCAIS}"
|
|
|
273 |
LangString stringMessageAvertissement ${LANG_ENGLISH} "${MESSAGE_AVERTISSEMENT_ANGLAIS}"
|
|
|
274 |
LangString stringMessageAvertissement ${LANG_SPANISH} "${MESSAGE_AVERTISSEMENT_SPANISH}"
|
|
|
275 |
|
|
|
276 |
|
|
|
277 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
278 |
|
|
|
279 |
; Macro
|
|
|
280 |
|
|
|
281 |
!ifdef FRAMEWORK_DOT_NET
|
|
|
282 |
!insertmacro VersionCompare
|
|
|
283 |
|
|
|
284 |
;!insertmacro IsDotNETInstalled
|
|
|
285 |
!insertmacro GetDotNETVersion
|
|
|
286 |
!endif
|
|
|
287 |
|
|
|
288 |
!insertmacro IsUserAdmin ""
|
|
|
289 |
|
|
|
290 |
!insertmacro IsUserAdmin "un."
|
|
|
291 |
|
|
|
292 |
|
|
|
293 |
/*============================================================================================================================*/
|
|
|
294 |
/*============================================================================================================================*/
|
|
|
295 |
|
|
|
296 |
; Section obligatory custom installation
|
|
|
297 |
!ifdef SECTION_INSTALLATION_PERSONNALISE_INITIAL
|
|
|
298 |
|
|
|
299 |
Section "$(stringInstalleSectionPersonnaliseInitial)" ID_SEC_PERSONNALISE_INITIAL
|
|
|
300 |
|
|
|
301 |
!if ${SECTION_INSTALLATION_PERSONNALISE_INITIAL} == "Obligatoire"
|
|
|
302 |
SectionIn RO ; indicates that the section is mandatory
|
|
|
303 |
!endif
|
|
|
304 |
|
|
|
305 |
!insertmacro InstalleSectionPersonnaliseInitial
|
|
|
306 |
|
|
|
307 |
SectionEnd
|
|
|
308 |
|
|
|
309 |
!endif
|
|
|
310 |
|
|
|
311 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
312 |
|
|
|
313 |
; Section invisible Uninstall
|
|
|
314 |
Section "-$(stringSecAncienneVersion)" ID_SEC_OLDVERSION
|
|
|
315 |
SectionIn RO
|
|
|
316 |
StrCmp $cheminAncienneDesinstallation "" pas_installe deja_installe
|
|
|
317 |
deja_installe:
|
|
|
318 |
ClearErrors
|
|
|
319 |
; Launch of Silent uninstallation process
|
|
|
320 |
ExecWait '"$cheminAncienneDesinstallation" /S _?=$cheminAncienneInstallation'
|
|
|
321 |
pas_installe:
|
|
|
322 |
SectionEnd
|
|
|
323 |
|
|
|
324 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
325 |
|
|
|
326 |
; Section obligatory custom installation
|
|
|
327 |
!ifdef SECTION_INSTALLATION_PERSONNALISE_PREMIER
|
|
|
328 |
|
|
|
329 |
Section "$(stringInstalleSectionPersonnalisePremier)" ID_SEC_PERSONNALISE_PREMIER
|
|
|
330 |
|
|
|
331 |
!if ${SECTION_INSTALLATION_PERSONNALISE_PREMIER} == "Obligatoire"
|
|
|
332 |
SectionIn RO ; indicates that the section is mandatory
|
|
|
333 |
!endif
|
|
|
334 |
|
|
|
335 |
!insertmacro InstalleSectionPersonnalisePremier
|
|
|
336 |
|
|
|
337 |
SectionEnd
|
|
|
338 |
|
|
|
339 |
!endif
|
|
|
340 |
|
|
|
341 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
342 |
|
|
|
343 |
; Section mandatory application installation
|
|
|
344 |
Section "$(stringApplication)" ID_SEC_APPLICATION
|
|
|
345 |
SectionIn RO ; indicates that the section is mandatory
|
|
|
346 |
SetOutPath "$INSTDIR"
|
|
|
347 |
SetOverwrite on
|
|
|
348 |
|
|
|
349 |
File /nonfatal /r /x .svn "${APPLICATION_PROGRAMFILES}\*"
|
|
|
350 |
|
|
|
351 |
SectionEnd
|
|
|
352 |
|
|
|
353 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
354 |
|
|
|
355 |
; Section mandatory installation libraries
|
|
|
356 |
Section "$(stringLibrairies)" ID_SEC_LIBRAIRIES
|
|
|
357 |
SectionIn RO ; indicates that the section is mandatory
|
|
|
358 |
|
|
|
359 |
!insertmacro SectionLibrairies
|
|
|
360 |
|
|
|
361 |
SectionEnd
|
|
|
362 |
|
|
|
363 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
364 |
|
|
|
365 |
; Section obligatory custom installation
|
|
|
366 |
!ifdef SECTION_INSTALLATION_PERSONNALISE_DERNIER
|
|
|
367 |
|
|
|
368 |
Section "$(stringInstalleSectionPersonnaliseDernier)" ID_SEC_PERSONNALISE_DERNIER
|
|
|
369 |
|
|
|
370 |
!if ${SECTION_INSTALLATION_PERSONNALISE_DERNIER} == "Obligatoire"
|
|
|
371 |
SectionIn RO ; indicates that the section is mandatory
|
|
|
372 |
!endif
|
|
|
373 |
|
|
|
374 |
!insertmacro InstalleSectionPersonnaliseDernier
|
|
|
375 |
|
|
|
376 |
SectionEnd
|
|
|
377 |
|
|
|
378 |
!endif
|
|
|
379 |
|
|
|
380 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
381 |
|
|
|
382 |
; Section facultative d'installation du menu
|
|
|
383 |
!ifndef SANS_RACCOURCI
|
|
|
384 |
|
|
|
385 |
; Group section unfolded / e
|
|
|
386 |
SectionGroup /e "$(stringRaccourciMenuDemarrer)" ID_SEC_RACCOURCI_MENU
|
|
|
387 |
|
|
|
388 |
Section "$(stringTousUtilisateurs)" ID_SEC_RACCOURCI_MENU_TS_UTILISATEURS
|
|
|
389 |
|
|
|
390 |
; Systems files common to all users ('all users') are used.
|
|
|
391 |
SetShellVarContext all
|
|
|
392 |
|
|
|
393 |
; Creating the Start menu shortcut
|
|
|
394 |
!insertmacro InstalleMenuDemarrer
|
|
|
395 |
SectionEnd
|
|
|
396 |
|
|
|
397 |
Section /o "$(stringUtilisateurCourant)" ID_SEC_RACCOURCI_MENU_UTILISATEUR_COURANT
|
|
|
398 |
; Systems files common to all users ('all users') are used.
|
|
|
399 |
SetShellVarContext current
|
|
|
400 |
|
|
|
401 |
; Creating the Start menu shortcut
|
|
|
402 |
!insertmacro InstalleMenuDemarrer
|
|
|
403 |
SectionEnd
|
|
|
404 |
|
|
|
405 |
SectionGroupEnd
|
|
|
406 |
|
|
|
407 |
!endif
|
|
|
408 |
|
|
|
409 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
410 |
|
|
|
411 |
; Section optional installation of shortcuts on the desktop
|
|
|
412 |
!ifndef SANS_RACCOURCI
|
|
|
413 |
|
|
|
414 |
SectionGroup /e "$(stringRaccourciBureau)" ID_SEC_RACCOURCI_BUREAU
|
|
|
415 |
|
|
|
416 |
Section "$(stringTousUtilisateurs)" ID_SEC_RACCOURCI_BUREAU_TS_UTILISATEURS
|
|
|
417 |
; Systems files common to all users will be used.
|
|
|
418 |
SetShellVarContext all
|
|
|
419 |
|
|
|
420 |
; Creating shortcut on the desktop
|
|
|
421 |
!insertmacro InstalleRaccourciBureau
|
|
|
422 |
SectionEnd
|
|
|
423 |
|
|
|
424 |
Section /o "$(stringUtilisateurCourant)" ID_SEC_RACCOURCI_BUREAU_UTILISATEUR_COURANT
|
|
|
425 |
; The system folders of the current user will be used.
|
|
|
426 |
SetShellVarContext current
|
|
|
427 |
|
|
|
428 |
; Creating shortcut on the desktop
|
|
|
429 |
!insertmacro InstalleRaccourciBureau
|
|
|
430 |
SectionEnd
|
|
|
431 |
|
|
|
432 |
SectionGroupEnd
|
|
|
433 |
|
|
|
434 |
!endif
|
|
|
435 |
|
|
|
436 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
437 |
|
|
|
438 |
Function .onInit
|
|
|
439 |
|
|
|
440 |
; Displays the choice of language
|
|
|
441 |
${if} ${CHOIX_LANGUE} == "Fenetre_choix"
|
|
|
442 |
!insertmacro MUI_LANGDLL_DISPLAY
|
|
|
443 |
${EndIf}
|
|
|
444 |
|
|
|
445 |
;!insertmacro MULTIUSER_INIT
|
| 2637 |
marundel |
446 |
|
|
|
447 |
; Use the previously installed directory if possible
|
|
|
448 |
ReadRegStr $0 HKLM "${REGISTRE_APPLICATION}" "Path"
|
|
|
449 |
IfErrors +2 0
|
|
|
450 |
; set default installdir to what was previously used
|
|
|
451 |
StrCpy $INSTDIR $0
|
|
|
452 |
|
| 2551 |
dpurdie |
453 |
; Variable mode to manage radio buttons
|
|
|
454 |
StrCpy $menuTousUtilisateurs 1
|
|
|
455 |
StrCpy $menuUtilisateurCourant 0
|
|
|
456 |
StrCpy $raccourciTousUtilisateurs 1
|
|
|
457 |
StrCpy $raccourciUtilisateurCourant 0
|
|
|
458 |
|
|
|
459 |
FunctionEnd
|
|
|
460 |
|
|
|
461 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
462 |
|
|
|
463 |
Function initialisationGUI
|
|
|
464 |
|
|
|
465 |
; Management of user rights
|
|
|
466 |
Call IsUserAdmin
|
|
|
467 |
Pop $R0
|
|
|
468 |
|
|
|
469 |
${if} $R0 == "false"
|
|
|
470 |
MessageBox MB_OK|MB_ICONEXCLAMATION "$(stringInstallationApplication)"
|
|
|
471 |
Abort
|
|
|
472 |
${EndIf}
|
|
|
473 |
|
|
|
474 |
; Management of pre-requisites. NET Framework
|
|
|
475 |
!ifdef FRAMEWORK_DOT_NET
|
|
|
476 |
|
|
|
477 |
; Old method
|
|
|
478 |
/*
|
|
|
479 |
Call IsDotNETInstalled
|
|
|
480 |
Pop $R1
|
|
|
481 |
StrCmp $R1 1 DotNET_installe DotNET_pas_installe
|
|
|
482 |
DotNET_pas_installe:
|
|
|
483 |
MessageBox MB_OK|MB_ICONEXCLAMATION "$(stringFrameworkNET)"
|
|
|
484 |
Abort
|
|
|
485 |
DotNET_installe:
|
|
|
486 |
*/
|
|
|
487 |
|
|
|
488 |
Call GetDotNETVersion
|
|
|
489 |
Pop $R1
|
|
|
490 |
|
|
|
491 |
${If} $R1 == "not found"
|
|
|
492 |
MessageBox MB_OK|MB_ICONEXCLAMATION "$(stringFrameworkNET)"
|
|
|
493 |
Abort
|
|
|
494 |
${EndIf}
|
|
|
495 |
|
|
|
496 |
StrCpy $R1 $R1 "" 1 ; supprime "v"
|
|
|
497 |
|
|
|
498 |
${VersionCompare} $R1 ${FRAMEWORK_DOT_NET} $1
|
|
|
499 |
; FRAMEWORK_DOT_NET requis est plus récent
|
|
|
500 |
${If} $1 == 2
|
|
|
501 |
MessageBox MB_OK|MB_ICONEXCLAMATION "$(stringFrameworkNET)"
|
|
|
502 |
Abort
|
|
|
503 |
${EndIf}
|
|
|
504 |
|
|
|
505 |
!endif
|
|
|
506 |
|
|
|
507 |
; Management of versions already installed
|
|
|
508 |
!ifndef SANS_DESINSTALLATION
|
|
|
509 |
; Retrieves the values ??of the old installation in the registry
|
|
|
510 |
ReadRegStr $cheminAncienneDesinstallation HKLM "${REGISTRE_DESINSTALLATION}" "UninstallString"
|
|
|
511 |
ReadRegStr $cheminAncienneInstallation HKLM "${REGISTRE_APPLICATION}" "Path"
|
|
|
512 |
|
|
|
513 |
StrCmp $cheminAncienneDesinstallation "" pas_installe deja_installe
|
|
|
514 |
deja_installe:
|
|
|
515 |
MessageBox MB_YESNO|MB_ICONQUESTION "$(stringAncienneVersion)" IDYES oui IDNO non
|
|
|
516 |
oui:
|
|
|
517 |
goto pas_installe
|
|
|
518 |
non:
|
|
|
519 |
Abort
|
|
|
520 |
pas_installe:
|
|
|
521 |
!endif
|
|
|
522 |
|
|
|
523 |
; Management Post parameterizable application
|
|
|
524 |
!ifdef MESSAGE_AVERTISSEMENT_FRANCAIS
|
|
|
525 |
MessageBox MB_YESNO|MB_ICONQUESTION "$(stringMessageAvertissement)" IDYES oui2 IDNO non2
|
|
|
526 |
non2:
|
|
|
527 |
Abort
|
|
|
528 |
oui2:
|
|
|
529 |
!endif
|
|
|
530 |
|
|
|
531 |
FunctionEnd
|
|
|
532 |
|
|
|
533 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
534 |
|
|
|
535 |
Function .onSelChange
|
|
|
536 |
|
|
|
537 |
!ifndef SANS_RACCOURCI
|
|
|
538 |
|
|
|
539 |
; Management Mode radio buttons
|
|
|
540 |
|
|
|
541 |
SectionGetFlags ${ID_SEC_RACCOURCI_MENU_TS_UTILISATEURS} $1
|
|
|
542 |
${if} $1 == 1
|
|
|
543 |
${AndIf} $menuTousUtilisateurs != 1
|
|
|
544 |
!insertmacro UnselectSection ${ID_SEC_RACCOURCI_MENU_UTILISATEUR_COURANT}
|
|
|
545 |
StrCpy $menuTousUtilisateurs 1
|
|
|
546 |
StrCpy $menuUtilisateurCourant 0
|
|
|
547 |
${endif}
|
|
|
548 |
|
|
|
549 |
SectionGetFlags ${ID_SEC_RACCOURCI_MENU_UTILISATEUR_COURANT} $2
|
|
|
550 |
${if} $2 == 1
|
|
|
551 |
${AndIf} $menuUtilisateurCourant != 1
|
|
|
552 |
!insertmacro UnselectSection ${ID_SEC_RACCOURCI_MENU_TS_UTILISATEURS}
|
|
|
553 |
StrCpy $menuTousUtilisateurs 0
|
|
|
554 |
StrCpy $menuUtilisateurCourant 1
|
|
|
555 |
${endif}
|
|
|
556 |
|
|
|
557 |
|
|
|
558 |
SectionGetFlags ${ID_SEC_RACCOURCI_BUREAU_TS_UTILISATEURS} $3
|
|
|
559 |
${if} $3 == 1
|
|
|
560 |
${AndIf} $raccourciTousUtilisateurs != 1
|
|
|
561 |
!insertmacro UnselectSection ${ID_SEC_RACCOURCI_BUREAU_UTILISATEUR_COURANT}
|
|
|
562 |
StrCpy $raccourciTousUtilisateurs 1
|
|
|
563 |
StrCpy $raccourciUtilisateurCourant 0
|
|
|
564 |
${endif}
|
|
|
565 |
|
|
|
566 |
SectionGetFlags ${ID_SEC_RACCOURCI_BUREAU_UTILISATEUR_COURANT} $4
|
|
|
567 |
${if} $4 == 1
|
|
|
568 |
${AndIf} $raccourciUtilisateurCourant != 1
|
|
|
569 |
!insertmacro UnselectSection ${ID_SEC_RACCOURCI_BUREAU_TS_UTILISATEURS}
|
|
|
570 |
StrCpy $raccourciTousUtilisateurs 0
|
|
|
571 |
StrCpy $raccourciUtilisateurCourant 1
|
|
|
572 |
${endif}
|
|
|
573 |
|
|
|
574 |
!endif
|
|
|
575 |
|
|
|
576 |
FunctionEnd
|
|
|
577 |
|
|
|
578 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
579 |
|
|
|
580 |
Section -Post
|
|
|
581 |
; Generation of executable uninstall
|
|
|
582 |
!ifndef SANS_DESINSTALLATION
|
|
|
583 |
WriteUninstaller "$INSTDIR\${EXE_DESINSTALLATION}"
|
|
|
584 |
!endif
|
|
|
585 |
|
|
|
586 |
; Ecriture des informations dans le registre
|
|
|
587 |
|
|
|
588 |
; Path to executable
|
|
|
589 |
WriteRegStr HKLM "${REGISTRE_APPLICATION}" "" "$INSTDIR\${EXE_APPLICATION}"
|
|
|
590 |
|
|
|
591 |
; The installation path
|
|
|
592 |
WriteRegStr HKLM "${REGISTRE_APPLICATION}" "Path" "$INSTDIR"
|
|
|
593 |
|
|
|
594 |
; Application version installed
|
|
|
595 |
WriteRegStr HKLM "${REGISTRE_APPLICATION}" "Version" "${VERSION_APPLICATION}"
|
|
|
596 |
|
|
|
597 |
; Project installed application
|
|
|
598 |
WriteRegStr HKLM "${REGISTRE_APPLICATION}" "Project" "${PROJET_APPLICATION}"
|
|
|
599 |
|
|
|
600 |
; Add uninstall information to Add / Remove Programs
|
|
|
601 |
!ifndef SANS_DESINSTALLATION
|
|
|
602 |
; Application Name
|
|
|
603 |
WriteRegStr HKLM "${REGISTRE_DESINSTALLATION}" "DisplayName" "${NOM_APPLICATION} ${VERSION_APPLICATION}"
|
|
|
604 |
|
|
|
605 |
; Path and filename of the uninstallation.
|
|
|
606 |
WriteRegStr HKLM "${REGISTRE_DESINSTALLATION}" "UninstallString" "$INSTDIR\${EXE_DESINSTALLATION}"
|
|
|
607 |
|
|
|
608 |
; Path, file and index of the icon to display next to the name of your application
|
|
|
609 |
WriteRegStr HKLM "${REGISTRE_DESINSTALLATION}" "DisplayIcon" "$INSTDIR\${EXE_APPLICATION}"
|
|
|
610 |
|
|
|
611 |
; The application displayed Version
|
|
|
612 |
WriteRegStr HKLM "${REGISTRE_DESINSTALLATION}" "DisplayVersion" "${VERSION_APPLICATION}"
|
|
|
613 |
|
|
|
614 |
;WriteRegStr HKLM "${REGISTRE_DESINSTALLATION}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
|
|
|
615 |
|
|
|
616 |
; Name of distributor
|
|
|
617 |
WriteRegStr HKLM "${REGISTRE_DESINSTALLATION}" "Publisher" "${EDITEUR_APPLICATION}"
|
|
|
618 |
!endif
|
| 2561 |
dpurdie |
619 |
|
|
|
620 |
; Creates registry entries required by PkgMnt and procmgr
|
|
|
621 |
ClearErrors
|
|
|
622 |
${VIX_CREATE_PACKAGING_REGISTRY}
|
|
|
623 |
IfErrors 0 +2
|
|
|
624 |
Abort "Error creating Package Management registry information"
|
| 2551 |
dpurdie |
625 |
|
|
|
626 |
SectionEnd
|
|
|
627 |
|
|
|
628 |
/*============================================================================================================================*/
|
|
|
629 |
/*============================================================================================================================*/
|
|
|
630 |
|
|
|
631 |
Function un.onInit
|
|
|
632 |
|
|
|
633 |
; Displays the choice of language
|
|
|
634 |
${if} ${CHOIX_LANGUE} == "Affiche_fenetre_choix"
|
|
|
635 |
!insertmacro MUI_UNGETLANGUAGE
|
|
|
636 |
${EndIf}
|
|
|
637 |
|
|
|
638 |
;!insertmacro MULTIUSER_UNINIT
|
|
|
639 |
|
|
|
640 |
FunctionEnd
|
|
|
641 |
|
|
|
642 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
643 |
|
|
|
644 |
Function un.initialisationGUI
|
|
|
645 |
|
|
|
646 |
; Management of user rights
|
|
|
647 |
Call un.IsUserAdmin
|
|
|
648 |
Pop $R0
|
|
|
649 |
|
|
|
650 |
${if} $R0 == "false"
|
|
|
651 |
MessageBox MB_OK|MB_ICONEXCLAMATION "$(stringDesinstallationApplication)"
|
|
|
652 |
Abort
|
|
|
653 |
${EndIf}
|
|
|
654 |
|
|
|
655 |
FunctionEnd
|
|
|
656 |
|
|
|
657 |
|
|
|
658 |
;-------------------------------------------------------------------------------------------------------------------------------
|
|
|
659 |
|
|
|
660 |
|
|
|
661 |
; Section A 'Uninstall' is created to generate an uninstaller either.
|
|
|
662 |
; This section deletes all files, key registry, not shared libraries that were installed by the installation of the system.
|
|
|
663 |
Section Uninstall
|
|
|
664 |
Delete "$INSTDIR\${EXE_DESINSTALLATION}"
|
|
|
665 |
|
|
|
666 |
; Section desinstalation personalized mandatory
|
|
|
667 |
!ifdef SECTION_DESINSTALLATION_PERSONNALISE_PREMIER
|
|
|
668 |
!insertmacro DesinstalleSectionPersonnalisePremier
|
|
|
669 |
!endif
|
|
|
670 |
|
|
|
671 |
; It uninstalls the application of the Program Files folder (if the user does not specify otherwise)
|
|
|
672 |
!insertmacro DesinstalleApplication
|
|
|
673 |
|
|
|
674 |
; Section desinstalation personalized mandatory
|
|
|
675 |
!ifdef SECTION_DESINSTALLATION_PERSONNALISE_DERNIER
|
|
|
676 |
!insertmacro DesinstalleSectionPersonnaliseDernier
|
|
|
677 |
!endif
|
|
|
678 |
|
|
|
679 |
; It uninstalls the start menu shortcut and office
|
|
|
680 |
!ifndef SANS_RACCOURCI
|
|
|
681 |
; Systems files common to all users will be used.
|
|
|
682 |
SetShellVarContext all
|
|
|
683 |
; Deleting Shortcuts
|
|
|
684 |
!insertmacro DesinstalleMenuDemarrerRaccourciBureau
|
|
|
685 |
|
|
|
686 |
; The system folders of the current user will be used.
|
|
|
687 |
SetShellVarContext current
|
|
|
688 |
; Deleting Shortcuts
|
|
|
689 |
!insertmacro DesinstalleMenuDemarrerRaccourciBureau
|
|
|
690 |
!endif
|
|
|
691 |
|
|
|
692 |
; Deleting records
|
|
|
693 |
DeleteRegKey HKLM "${REGISTRE_DESINSTALLATION}"
|
|
|
694 |
DeleteRegKey HKLM "${REGISTRE_APPLICATION}"
|
|
|
695 |
SetAutoClose true
|
| 2561 |
dpurdie |
696 |
|
|
|
697 |
; Delete the registry entries for pkgmnt and procmgr
|
|
|
698 |
${VIX_REMOVE_PACKAGING_REGISTRY}
|
|
|
699 |
|
| 2551 |
dpurdie |
700 |
SectionEnd
|
|
|
701 |
|
|
|
702 |
|
|
|
703 |
/*============================================================================================================================*/
|
|
|
704 |
/*============================================================================================================================*/
|
|
|
705 |
|
|
|
706 |
|
|
|
707 |
|
|
|
708 |
|