Debian Codegraph @

aio/grampsaio64.nsi.template

raw
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ; Gramps - a GTK+/GNOME based genealogy program
3 ;
4 ; This program is free software; you can redistribute it and/or modify
5 ; it under the terms of the GNU General Public License as published by
6 ; the Free Software Foundation; either version 2 of the License, or
7 ; (at your option) any later version.
8 ;
9 ; This program is distributed in the hope that it will be useful,
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ; GNU General Public License for more details.
13 ;
14 ; You should have received a copy of the GNU General Public License
15 ; along with this program; if not, write to the Free Software
16 ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 ;
18 ;Copyright (C) 2013-2021 Josip (pisoj), Paul Culley
19 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
20
21 !define APPNAME "GrampsAIO64"
22 !define APPVERSION "yourVersion"
23 !define APPBUILD "yourBuild"
24 !define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"
25 !define APP_PUBLISHER "The Gramps project"
26 !define APP_WEB_SITE "https://gramps-project.org"
27 BrandingText "Version ${APPVERSION}-${APPBUILD}"
28
29 ; Main Install settings
30 Name "${APPNAME}-${APPVERSION}-${APPBUILD}"
31 OutFile "GrampsAIO-${APPVERSION}-${APPBUILD}_win64.exe"
32
33 CRCCheck on
34 SetCompressor /SOLID /FINAL LZMA
35 SetCompressorDictSize 32
36 SetDatablockOptimize on
37 SetOverwrite try
38 XPStyle on
39 ;RequestExecutionLevel admin
40 ;AllowRootDirInstall false
41
42 !define MULTIUSER_EXECUTIONLEVEL Highest
43 !define MULTIUSER_MUI
44 !define MULTIUSER_INSTALLMODE_COMMANDLINE
45 !define MULTIUSER_USE_PROGRAMFILES64
46 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\${APPNAME}\${APPVERSION}"
47 !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME ""
48 !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "Software\${APPNAME}\${APPVERSION}"
49 !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME ""
50 !define MULTIUSER_INSTALLMODE_INSTDIR "${APPNAME}-${APPVERSION}"
51 !define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAMEANDVERSION}"
52
53 !include MultiUser.nsh
54 !include MUI2.nsh
55 !include x64.nsh
56 !include WinVer.nsh
57 !include 'LogicLib.nsh'
58 !include StrFunc.nsh
59
60 !define MUI_ICON ".\gramps.ico"
61 !define MUI_HEADERIMAGE
62 ;!define MUI_HEADERIMAGE_BITMAP ".\grampshd.bmp"
63 ;!define MUI_WELCOMEFINISHPAGE_BITMAP ".\grampsbg.bmp"
64 ;!define MUI_BGCOLOR
65 ;!define MUI_LICENSEPAGE_BGCOLOR
66 ;!define MUI_DIRECTORYPAGE_BGCOLOR
67 !define MUI_ABORTWARNING
68 !define MUI_FINISHPAGE_NOAUTOCLOSE
69 !define MUI_FINISHPAGE_RUN "$INSTDIR\gramps.exe"
70 ;!define MUI_FINISHPAGE_RUN_PARAMETERS "-EO gramps"
71
72
73 ;--------- Pages---------------------------------------------------------------
74 !insertmacro MUI_PAGE_WELCOME
75 !insertmacro MUI_PAGE_LICENSE "..\share\doc\gramps\COPYING"
76 !insertmacro MULTIUSER_PAGE_INSTALLMODE
77 !insertmacro MUI_PAGE_COMPONENTS
78 !insertmacro MUI_PAGE_DIRECTORY
79 ;!insertmacro MUI_PAGE_STARTMENU
80 !insertmacro MUI_PAGE_INSTFILES
81 !insertmacro MUI_PAGE_FINISH
82
83 !insertmacro MUI_UNPAGE_CONFIRM
84 !insertmacro MUI_UNPAGE_INSTFILES
85
86 ;--------- Languages ----------------------------------------------------------
87 !insertmacro MUI_LANGUAGE English
88 !insertmacro MUI_LANGUAGE Albanian
89 !insertmacro MUI_LANGUAGE Arabic
90 !insertmacro MUI_LANGUAGE Bulgarian
91 !insertmacro MUI_LANGUAGE Catalan
92 !insertmacro MUI_LANGUAGE Croatian
93 !insertmacro MUI_LANGUAGE Czech
94 !insertmacro MUI_LANGUAGE Danish
95 !insertmacro MUI_LANGUAGE Dutch
96 !insertmacro MUI_LANGUAGE Esperanto
97 !insertmacro MUI_LANGUAGE Finnish
98 !insertmacro MUI_LANGUAGE French
99 !insertmacro MUI_LANGUAGE German
100 !insertmacro MUI_LANGUAGE Greek
101 !insertmacro MUI_LANGUAGE Hebrew
102 !insertmacro MUI_LANGUAGE Hungarian
103 !insertmacro MUI_LANGUAGE Icelandic
104 !insertmacro MUI_LANGUAGE Italian
105 !insertmacro MUI_LANGUAGE Japanese
106 !insertmacro MUI_LANGUAGE Lithuanian
107 !insertmacro MUI_LANGUAGE Norwegian
108 !insertmacro MUI_LANGUAGE NorwegianNynorsk
109 !insertmacro MUI_LANGUAGE Polish
110 !insertmacro MUI_LANGUAGE Portuguese
111 !insertmacro MUI_LANGUAGE PortugueseBR
112 !insertmacro MUI_LANGUAGE Russian
113 !insertmacro MUI_LANGUAGE Serbian
114 !insertmacro MUI_LANGUAGE SerbianLatin
115 !insertmacro MUI_LANGUAGE SimpChinese
116 !insertmacro MUI_LANGUAGE Slovak
117 !insertmacro MUI_LANGUAGE Slovenian
118 !insertmacro MUI_LANGUAGE Spanish
119 !insertmacro MUI_LANGUAGE SpanishInternational
120 !insertmacro MUI_LANGUAGE Swedish
121 !insertmacro MUI_LANGUAGE TradChinese
122 !insertmacro MUI_LANGUAGE Turkish
123 !insertmacro MUI_LANGUAGE Ukrainian
124 !insertmacro MUI_LANGUAGE Vietnamese
125
126 ;--------- Reserve Files ------------------------------------------------------
127 !insertmacro MUI_RESERVEFILE_LANGDLL
128 ;ReserveFile "${NSISDIR}\Plugins\x86-ansi\*.dll"
129 ReserveFile "${NSISDIR}\Plugins\unicode\*.dll"
130
131 ShowInstDetails show
132
133 Section "Gramps" Section1
134 SectionIn RO
135 SetOverwrite on
136
137 ;;; Set Section Files and Shortcuts
138 SetOutPath "$INSTDIR\"
139 File "..\"
140
141 SetOutPath "$INSTDIR\lib\"
142 File /r "..\lib\"
143
144 SetOutPath "$INSTDIR\etc\"
145 File /r "..\etc\"
146
147 SetOutPath "$INSTDIR\share\"
148 File /r "..\share\doc"
149 File /r "..\share\glib-2.0"
150 File /r "..\share\gramps"
151 File /r "..\share\icons"
152 File /r "..\share\xml"
153
154 SetOutPath "$INSTDIR\gramps\"
155 File /r "..\gramps\"
156
157 SetOutPath "$INSTDIR\ssl\"
158 File /r "..\etc\ssl\"
159
160 SetOutPath "$INSTDIR\src\"
161 File /r ".\"
162
163 CreateDirectory "$INSTDIR\var\cache\fontconfig"
164
165 SetOutPath "$INSTDIR\"
166 CreateShortCut "$DESKTOP\${APPNAMEANDVERSION}.lnk" "$INSTDIR\grampsw.exe" "" "" "" "" "" "Gramps"
167 CreateDirectory "$SMPROGRAMS\${APPNAMEANDVERSION}"
168 CreateShortCut "$SMPROGRAMS\${APPNAMEANDVERSION}\${APPNAMEANDVERSION}.lnk" "$INSTDIR\grampsw.exe" "" "" "" "" "" "Gramps"
169 CreateShortCut "$SMPROGRAMS\${APPNAMEANDVERSION}\${APPNAMEANDVERSION}-console.lnk" "$INSTDIR\gramps.exe" "" "" "" "" "" "Gramps (console)"
170
171 DetailPrint "Writing resource-path ..."
172 FileOpen $4 "$INSTDIR\gramps\gen\utils\resource-path" w
173 FileWrite $4 "share"
174 FileClose $4
175
176 DetailPrint "Writing branding ..."
177 FileOpen $4 "$INSTDIR\gramps\version.py" a
178 FileSeek $4 0 END
179 FileWrite $4 "$\r$\n" ; we write a new line
180 FileWrite $4 "VERSION = 'AIO64-${APPVERSION}-${APPBUILD}'"
181 FileWrite $4 "$\r$\n" ; we write an extra line
182 FileClose $4 ; and close the file
183
184 DetailPrint "Compiling GLib schemas ..."
185 nsExec::ExecToStack '"$INSTDIR\glib-compile-schemas.exe" $INSTDIR\share\glib-2.0\schemas'
186
187 DetailPrint "Caching gdk-pixbuf-query-loaders ..."
188 nsExec::ExecToStack '"$INSTDIR\gdk-pixbuf-query-loaders.exe" --update-cache'
189 SectionEnd
190
191 SectionGroup "Dictionaries" sec_d
192 Section /o "bg" d_bg
193 SetOutPath "$INSTDIR\share\enchant\hunspell\"
194 File "..\share\enchant\hunspell\bg_BG.*"
195 SectionEnd
196 Section /o "ca" d_ca
197 SetOutPath "$INSTDIR\share\enchant\hunspell\"
198 File "..\share\enchant\hunspell\ca_ES.*"
199 SectionEnd
200 Section /o "cs" d_cs
201 SetOutPath "$INSTDIR\share\enchant\hunspell\"
202 File "..\share\enchant\hunspell\cs_CZ.*"
203 SectionEnd
204 Section /o "da" d_da
205 SetOutPath "$INSTDIR\share\enchant\hunspell\"
206 File "..\share\enchant\hunspell\da_DK.*"
207 SectionEnd
208 Section /o "de" d_de
209 SetOutPath "$INSTDIR\share\enchant\hunspell\"
210 File "..\share\enchant\hunspell\de_DE.*"
211 SectionEnd
212 Section /o "el" d_el
213 SetOutPath "$INSTDIR\share\enchant\hunspell\"
214 File "..\share\enchant\hunspell\el_GR.*"
215 SectionEnd
216 Section /o "en_AU" d_enau
217 SetOutPath "$INSTDIR\share\enchant\hunspell\"
218 File "..\share\enchant\hunspell\en_AU.*"
219 SectionEnd
220 Section "en_GB" d_engb
221 SectionIn RO
222 SetOutPath "$INSTDIR\share\enchant\hunspell\"
223 File "..\share\enchant\hunspell\en_GB.*"
224 SectionEnd
225 Section /o "en_US" d_enus
226 SetOutPath "$INSTDIR\share\enchant\hunspell\"
227 File "..\share\enchant\hunspell\en_US.*"
228 SectionEnd
229 Section /o "eo" d_eo
230 SetOutPath "$INSTDIR\share\enchant\hunspell\"
231 File "..\share\enchant\hunspell\eo.*"
232 SectionEnd
233 Section /o "es_ES" d_es
234 SetOutPath "$INSTDIR\share\enchant\hunspell\"
235 File "..\share\enchant\hunspell\es_ES.*"
236 SectionEnd
237 Section /o "fi_FI" d_fi
238 SetOutPath "$LocalAppdata\voikko\"
239 File /r "..\share\enchant\voikko"
240 SectionEnd
241 Section /o "fr_FR" d_fr
242 SetOutPath "$INSTDIR\share\enchant\hunspell\"
243 File "..\share\enchant\hunspell\fr_FR.*"
244 SectionEnd
245 Section /o "he_IL" d_he
246 SetOutPath "$INSTDIR\share\enchant\hunspell\"
247 File "..\share\enchant\hunspell\he_IL.*"
248 SectionEnd
249 Section /o "hr_HR" d_hr
250 SetOutPath "$INSTDIR\share\enchant\hunspell\"
251 File "..\share\enchant\hunspell\hr_HR.*"
252 SectionEnd
253 Section /o "hu_HU" d_hu
254 SetOutPath "$INSTDIR\share\enchant\hunspell\"
255 File "..\share\enchant\hunspell\hu_HU.*"
256 SectionEnd
257 Section /o "is_IS" d_is
258 SetOutPath "$INSTDIR\share\enchant\hunspell\"
259 File "..\share\enchant\hunspell\is_IS.*"
260 SectionEnd
261 Section /o "it_IT" d_it
262 SetOutPath "$INSTDIR\share\enchant\hunspell\"
263 File "..\share\enchant\hunspell\it_IT.*"
264 SectionEnd
265 Section /o "lt_LT" d_lt
266 SetOutPath "$INSTDIR\share\enchant\hunspell\"
267 File "..\share\enchant\hunspell\lt_LT.*"
268 SectionEnd
269 Section /o "nb_NO" d_nb
270 SetOutPath "$INSTDIR\share\enchant\hunspell\"
271 File "..\share\enchant\hunspell\nb_no.*"
272 SectionEnd
273 Section /o "nl_NL" d_nl
274 SetOutPath "$INSTDIR\share\enchant\hunspell\"
275 File "..\share\enchant\hunspell\nl_NL.*"
276 SectionEnd
277 Section /o "nn_NO" d_nn
278 SetOutPath "$INSTDIR\share\enchant\hunspell\"
279 File "..\share\enchant\hunspell\nn_NO.*"
280 SectionEnd
281 Section /o "pl_PL" d_pl
282 SetOutPath "$INSTDIR\share\enchant\hunspell\"
283 File "..\share\enchant\hunspell\pl_PL.*"
284 SectionEnd
285 Section /o "pt_BR" d_ptbr
286 SetOutPath "$INSTDIR\share\enchant\hunspell\"
287 File "..\share\enchant\hunspell\pt_BR.*"
288 SectionEnd
289 Section /o "pt_PT" d_ptpt
290 SetOutPath "$INSTDIR\share\enchant\hunspell\"
291 File "..\share\enchant\hunspell\pt_PT.*"
292 SectionEnd
293 Section /o "ru_RU" d_ru
294 SetOutPath "$INSTDIR\share\enchant\hunspell\"
295 File "..\share\enchant\hunspell\ru_RU.*"
296 SectionEnd
297 Section /o "sk_SK" d_sk
298 SetOutPath "$INSTDIR\share\enchant\hunspell\"
299 File "..\share\enchant\hunspell\sk_SK.*"
300 SectionEnd
301 Section /o "sl_SI" d_sl
302 SetOutPath "$INSTDIR\share\enchant\hunspell\"
303 File "..\share\enchant\hunspell\sl_SI.*"
304 SectionEnd
305 Section /o "sr_RS" d_sr
306 SetOutPath "$INSTDIR\share\enchant\hunspell\"
307 File "..\share\enchant\hunspell\sr_RS.*"
308 SectionEnd
309 Section /o "sv_SE" d_sv
310 SetOutPath "$INSTDIR\share\enchant\hunspell\"
311 File "..\share\enchant\hunspell\sv_SE.*"
312 SectionEnd
313 Section /o "tr_TR" d_tr
314 SetOutPath "$INSTDIR\share\enchant\hunspell\"
315 File "..\share\enchant\hunspell\tr_TR.*"
316 SectionEnd
317 Section /o "uk_UA" d_uk
318 SetOutPath "$INSTDIR\share\enchant\hunspell\"
319 File "..\share\enchant\hunspell\uk_UA.*"
320 SectionEnd
321 Section /o "vi_VN" d_vi
322 SetOutPath "$INSTDIR\share\enchant\hunspell\"
323 File "..\share\enchant\hunspell\vi_VN.*"
324 SectionEnd
325 SectionGroupEnd
326
327 SectionGroup "Translations" sec_t
328 Section /o "ar" ar
329 SetOutPath "$INSTDIR\share\locale\"
330 File /r "..\share\locale\ar"
331 SectionEnd
332 Section /o "bg" bg
333 SetOutPath "$INSTDIR\share\locale\"
334 File /r "..\share\locale\bg"
335 SectionEnd
336 Section /o "ca" ca
337 SetOutPath "$INSTDIR\share\locale\"
338 File /r "..\share\locale\ca"
339 SectionEnd
340 Section /o "cs" cs
341 SetOutPath "$INSTDIR\share\locale\"
342 File /r "..\share\locale\cs"
343 SectionEnd
344 Section /o "da" da
345 SetOutPath "$INSTDIR\share\locale\"
346 File /r "..\share\locale\da"
347 SectionEnd
348 Section /o "de" de
349 SetOutPath "$INSTDIR\share\locale\"
350 File /r "..\share\locale\de"
351 SectionEnd
352 Section /o "el" el
353 SetOutPath "$INSTDIR\share\locale\"
354 File /r "..\share\locale\el"
355 SectionEnd
356 Section "en_GB" en_GB
357 SectionIn RO
358 SetOutPath "$INSTDIR\share\locale\"
359 File /r "..\share\locale\en_GB"
360 SectionEnd
361 Section /o "eo" eo
362 SetOutPath "$INSTDIR\share\locale\"
363 File /r "..\share\locale\eo"
364 SectionEnd
365 Section /o "es" es
366 SetOutPath "$INSTDIR\share\locale\"
367 File /r "..\share\locale\es"
368 SectionEnd
369 Section /o "fi" fi
370 SetOutPath "$INSTDIR\share\locale\"
371 File /r "..\share\locale\fi"
372 SectionEnd
373 Section /o "fr" fr
374 SetOutPath "$INSTDIR\share\locale\"
375 File /r "..\share\locale\fr"
376 SectionEnd
377 Section /o "he" he
378 SetOutPath "$INSTDIR\share\locale\"
379 File /r "..\share\locale\he"
380 SectionEnd
381 Section /o "hr" hr
382 SetOutPath "$INSTDIR\share\locale\"
383 File /r "..\share\locale\hr"
384 SectionEnd
385 Section /o "hu" hu
386 SetOutPath "$INSTDIR\share\locale\"
387 File /r "..\share\locale\hu"
388 SectionEnd
389 Section /o "is" is
390 SetOutPath "$INSTDIR\share\locale\"
391 File /r "..\share\locale\is"
392 SectionEnd
393 Section /o "it" it
394 SetOutPath "$INSTDIR\share\locale\"
395 File /r "..\share\locale\it"
396 SectionEnd
397 Section /o "ja" ja
398 SetOutPath "$INSTDIR\share\locale\"
399 File /r "..\share\locale\ja"
400 SectionEnd
401 Section /o "lt" lt
402 SetOutPath "$INSTDIR\share\locale\"
403 File /r "..\share\locale\lt"
404 SectionEnd
405 Section /o "nb" nb
406 SetOutPath "$INSTDIR\share\locale\"
407 File /r "..\share\locale\nb"
408 SectionEnd
409 Section /o "nl" nl
410 SetOutPath "$INSTDIR\share\locale\"
411 File /r "..\share\locale\nl"
412 SectionEnd
413 Section /o "nn" nn
414 SetOutPath "$INSTDIR\share\locale\"
415 File /r "..\share\locale\nn"
416 SectionEnd
417 Section /o "pl" pl
418 SetOutPath "$INSTDIR\share\locale\"
419 File /r "..\share\locale\pl"
420 SectionEnd
421 Section /o "pt_BR" pt_BR
422 SetOutPath "$INSTDIR\share\locale\"
423 File /r "..\share\locale\pt_BR"
424 SectionEnd
425 Section /o "pt_PT" pt_PT
426 SetOutPath "$INSTDIR\share\locale\"
427 File /r "..\share\locale\pt_PT"
428 SectionEnd
429 Section /o "ru" ru
430 SetOutPath "$INSTDIR\share\locale\"
431 File /r "..\share\locale\ru"
432 SectionEnd
433 Section /o "sk" sk
434 SetOutPath "$INSTDIR\share\locale\"
435 File /r "..\share\locale\sk"
436 SectionEnd
437 Section /o "sl" sl
438 SetOutPath "$INSTDIR\share\locale\"
439 File /r "..\share\locale\sl"
440 SectionEnd
441 Section /o "sq" sq
442 SetOutPath "$INSTDIR\share\locale\"
443 File /r "..\share\locale\sq"
444 SectionEnd
445 Section /o "sr" sr
446 SetOutPath "$INSTDIR\share\locale\"
447 File /r "..\share\locale\sr"
448 SectionEnd
449 Section /o "sv" sv
450 SetOutPath "$INSTDIR\share\locale\"
451 File /r "..\share\locale\sv"
452 SectionEnd
453 Section /o "tr" tr
454 SetOutPath "$INSTDIR\share\locale\"
455 File /r "..\share\locale\tr"
456 SectionEnd
457 Section /o "uk" uk
458 SetOutPath "$INSTDIR\share\locale\"
459 File /r "..\share\locale\uk"
460 SectionEnd
461 Section /o "vi" vi
462 SetOutPath "$INSTDIR\share\locale\"
463 File /r "..\share\locale\vi"
464 SectionEnd
465 Section /o "zh_CN" zh_CN
466 SetOutPath "$INSTDIR\share\locale\"
467 File /r "..\share\locale\zh_CN"
468 SectionEnd
469 Section /o "zh_HK" zh_HK
470 SetOutPath "$INSTDIR\share\locale\"
471 File /r "..\share\locale\zh_HK"
472 SectionEnd
473 Section /o "zh_TW" zh_TW
474 SetOutPath "$INSTDIR\share\locale\"
475 File /r "..\share\locale\zh_TW"
476 SectionEnd
477 SectionGroupEnd
478
479 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
480 !insertmacro MUI_DESCRIPTION_TEXT ${Section1} "Gramps application with all dependencies"
481
482 ;; Description of dictionaries
483 !insertmacro MUI_DESCRIPTION_TEXT ${sec_d} "Dictionaries for various languages"
484 !insertmacro MUI_DESCRIPTION_TEXT ${d_bg} "Bulgarian"
485 !insertmacro MUI_DESCRIPTION_TEXT ${d_ca} "Catalan"
486 !insertmacro MUI_DESCRIPTION_TEXT ${d_cs} "Czech"
487 !insertmacro MUI_DESCRIPTION_TEXT ${d_da} "Danish"
488 !insertmacro MUI_DESCRIPTION_TEXT ${d_de} "German"
489 !insertmacro MUI_DESCRIPTION_TEXT ${d_el} "Greek"
490 !insertmacro MUI_DESCRIPTION_TEXT ${d_enau} "English (Australia)"
491 !insertmacro MUI_DESCRIPTION_TEXT ${d_engb} "English (United Kingdom)"
492 !insertmacro MUI_DESCRIPTION_TEXT ${d_enus} "English (USA)"
493 !insertmacro MUI_DESCRIPTION_TEXT ${d_eo} "Esperanto"
494 !insertmacro MUI_DESCRIPTION_TEXT ${d_es} "Spanish"
495 !insertmacro MUI_DESCRIPTION_TEXT ${d_fi} "Finnish"
496 !insertmacro MUI_DESCRIPTION_TEXT ${d_fr} "French"
497 !insertmacro MUI_DESCRIPTION_TEXT ${d_he} "Hebrew"
498 !insertmacro MUI_DESCRIPTION_TEXT ${d_hr} "Croatian"
499 !insertmacro MUI_DESCRIPTION_TEXT ${d_hu} "Hungarian"
500 !insertmacro MUI_DESCRIPTION_TEXT ${d_is} "Icelandic"
501 !insertmacro MUI_DESCRIPTION_TEXT ${d_it} "Italian"
502 !insertmacro MUI_DESCRIPTION_TEXT ${d_lt} "Lithuanian"
503 !insertmacro MUI_DESCRIPTION_TEXT ${d_nb} "Norwegian Bokmal"
504 !insertmacro MUI_DESCRIPTION_TEXT ${d_nl} "Dutch"
505 !insertmacro MUI_DESCRIPTION_TEXT ${d_nn} "Norwegian Nynorsk"
506 !insertmacro MUI_DESCRIPTION_TEXT ${d_pl} "Polish"
507 !insertmacro MUI_DESCRIPTION_TEXT ${d_ptbr} "Portuguese (Brazil)"
508 !insertmacro MUI_DESCRIPTION_TEXT ${d_ptpt} "Portuguese (Portugal)"
509 !insertmacro MUI_DESCRIPTION_TEXT ${d_ru} "Russian"
510 !insertmacro MUI_DESCRIPTION_TEXT ${d_sk} "Slovak"
511 !insertmacro MUI_DESCRIPTION_TEXT ${d_sl} "Slovenian"
512 !insertmacro MUI_DESCRIPTION_TEXT ${d_sr} "Serbian"
513 !insertmacro MUI_DESCRIPTION_TEXT ${d_sv} "Swedish"
514 !insertmacro MUI_DESCRIPTION_TEXT ${d_tr} "Turkish"
515 !insertmacro MUI_DESCRIPTION_TEXT ${d_uk} "Ukrainian"
516 !insertmacro MUI_DESCRIPTION_TEXT ${d_vi} "Vietnamese"
517
518 ;; Description of translations
519 !insertmacro MUI_DESCRIPTION_TEXT ${sec_t} "Translation of Gramps in various languages"
520 !insertmacro MUI_DESCRIPTION_TEXT ${ar} "Arabic"
521 !insertmacro MUI_DESCRIPTION_TEXT ${bg} "Bulgarian"
522 !insertmacro MUI_DESCRIPTION_TEXT ${ca} "Catalan"
523 !insertmacro MUI_DESCRIPTION_TEXT ${cs} "Czech"
524 !insertmacro MUI_DESCRIPTION_TEXT ${da} "Danish"
525 !insertmacro MUI_DESCRIPTION_TEXT ${de} "German"
526 !insertmacro MUI_DESCRIPTION_TEXT ${el} "Greek"
527 !insertmacro MUI_DESCRIPTION_TEXT ${en_GB} "English (United Kingdom)"
528 !insertmacro MUI_DESCRIPTION_TEXT ${eo} "Esperanto"
529 !insertmacro MUI_DESCRIPTION_TEXT ${es} "Spanish"
530 !insertmacro MUI_DESCRIPTION_TEXT ${fi} "Finnish"
531 !insertmacro MUI_DESCRIPTION_TEXT ${fr} "French"
532 !insertmacro MUI_DESCRIPTION_TEXT ${he} "Hebrew"
533 !insertmacro MUI_DESCRIPTION_TEXT ${hr} "Croatian"
534 !insertmacro MUI_DESCRIPTION_TEXT ${hu} "Hungarian"
535 !insertmacro MUI_DESCRIPTION_TEXT ${is} "Icelandic"
536 !insertmacro MUI_DESCRIPTION_TEXT ${it} "Italian"
537 !insertmacro MUI_DESCRIPTION_TEXT ${ja} "Japanese"
538 !insertmacro MUI_DESCRIPTION_TEXT ${lt} "Lithuanian"
539 ;!insertmacro MUI_DESCRIPTION_TEXT ${mk} "Macedonian"
540 !insertmacro MUI_DESCRIPTION_TEXT ${nb} "Norwegian Bokmal"
541 !insertmacro MUI_DESCRIPTION_TEXT ${nl} "Dutch"
542 !insertmacro MUI_DESCRIPTION_TEXT ${nn} "Norwegian Nynorsk"
543 !insertmacro MUI_DESCRIPTION_TEXT ${pl} "Polish"
544 !insertmacro MUI_DESCRIPTION_TEXT ${pt_BR} "Portuguese (Brazil)"
545 !insertmacro MUI_DESCRIPTION_TEXT ${pt_PT} "Portuguese (Portugal)"
546 !insertmacro MUI_DESCRIPTION_TEXT ${ru} "Russian"
547 !insertmacro MUI_DESCRIPTION_TEXT ${sk} "Slovak"
548 !insertmacro MUI_DESCRIPTION_TEXT ${sl} "Slovenian"
549 !insertmacro MUI_DESCRIPTION_TEXT ${sq} "Albanian"
550 !insertmacro MUI_DESCRIPTION_TEXT ${sr} "Serbian"
551 !insertmacro MUI_DESCRIPTION_TEXT ${sv} "Swedish"
552 !insertmacro MUI_DESCRIPTION_TEXT ${tr} "Turkish"
553 !insertmacro MUI_DESCRIPTION_TEXT ${uk} "Ukrainian"
554 !insertmacro MUI_DESCRIPTION_TEXT ${vi} "Vietnamese"
555 !insertmacro MUI_DESCRIPTION_TEXT ${zh_CN} "Chinese (Simplified)"
556 !insertmacro MUI_DESCRIPTION_TEXT ${zh_HK} "Chinese (Hong Kong)"
557 !insertmacro MUI_DESCRIPTION_TEXT ${zh_TW} "Chinese (Traditional)"
558 !insertmacro MUI_FUNCTION_DESCRIPTION_END
559
560 Function sel_langs
561 StrCmp $LANGUAGE ${LANG_ARABIC} 0 +2
562 SectionSetFlags ${ar} 1
563 StrCmp $LANGUAGE ${LANG_BULGARIAN} 0 +3
564 SectionSetFlags ${bg} 1
565 SectionSetFlags ${d_bg} 1
566 StrCmp $LANGUAGE ${LANG_CATALAN} 0 +3
567 SectionSetFlags ${ca} 1
568 SectionSetFlags ${d_ca} 1
569 StrCmp $LANGUAGE ${LANG_CZECH} 0 +3
570 SectionSetFlags ${cs} 1
571 SectionSetFlags ${d_cs} 1
572 StrCmp $LANGUAGE ${LANG_DANISH} 0 +3
573 SectionSetFlags ${da} 1
574 SectionSetFlags ${d_da} 1
575 StrCmp $LANGUAGE ${LANG_GERMAN} 0 +3
576 SectionSetFlags ${de} 1
577 SectionSetFlags ${d_de} 1
578 StrCmp $LANGUAGE ${LANG_GREEK} 0 +3
579 SectionSetFlags ${el} 1
580 SectionSetFlags ${d_el} 1
581 StrCmp $LANGUAGE ${LANG_ESPERANTO} 0 +3
582 SectionSetFlags ${eo} 1
583 SectionSetFlags ${d_eo} 1
584 StrCmp $LANGUAGE ${LANG_SPANISH} 0 +3
585 SectionSetFlags ${es} 1
586 SectionSetFlags ${d_es} 1
587 StrCmp $LANGUAGE ${LANG_FINNISH} 0 +3
588 SectionSetFlags ${fi} 1
589 SectionSetFlags ${d_fi} 1
590 StrCmp $LANGUAGE ${LANG_FRENCH} 0 +3
591 SectionSetFlags ${fr} 1
592 SectionSetFlags ${d_fr} 1
593 StrCmp $LANGUAGE ${LANG_HEBREW} 0 +3
594 SectionSetFlags ${he} 1
595 SectionSetFlags ${d_he} 1
596 StrCmp $LANGUAGE ${LANG_CROATIAN} 0 +3
597 SectionSetFlags ${hr} 1
598 SectionSetFlags ${d_hr} 1
599 StrCmp $LANGUAGE ${LANG_HUNGARIAN} 0 +3
600 SectionSetFlags ${hu} 1
601 SectionSetFlags ${d_hu} 1
602 StrCmp $LANGUAGE ${LANG_ICELANDIC} 0 +3
603 SectionSetFlags ${is} 1
604 SectionSetFlags ${d_is} 1
605 StrCmp $LANGUAGE ${LANG_ITALIAN} 0 +3
606 SectionSetFlags ${it} 1
607 SectionSetFlags ${d_it} 1
608 StrCmp $LANGUAGE ${LANG_JAPANESE} 0 +2
609 SectionSetFlags ${ja} 1
610 StrCmp $LANGUAGE ${LANG_LITHUANIAN} 0 +3
611 SectionSetFlags ${lt} 1
612 SectionSetFlags ${d_lt} 1
613 StrCmp $LANGUAGE ${LANG_NORWEGIAN} 0 +5
614 SectionSetFlags ${nb} 1
615 SectionSetFlags ${d_nb} 1
616 SectionSetFlags ${nn} 1
617 SectionSetFlags ${d_nn} 1
618 StrCmp $LANGUAGE ${LANG_DUTCH} 0 +3
619 SectionSetFlags ${nl} 1
620 SectionSetFlags ${d_nl} 1
621 StrCmp $LANGUAGE ${LANG_POLISH} 0 +3
622 SectionSetFlags ${pl} 1
623 SectionSetFlags ${d_pl} 1
624 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} 0 +3
625 SectionSetFlags ${pt_BR} 1
626 SectionSetFlags ${d_ptbr} 1
627 StrCmp $LANGUAGE ${LANG_PORTUGUESE} 0 +3
628 SectionSetFlags ${pt_PT} 1
629 SectionSetFlags ${d_ptpt} 1
630 StrCmp $LANGUAGE ${LANG_RUSSIAN} 0 +3
631 SectionSetFlags ${ru} 1
632 SectionSetFlags ${d_ru} 1
633 StrCmp $LANGUAGE ${LANG_SLOVAK} 0 +3
634 SectionSetFlags ${sk} 1
635 SectionSetFlags ${d_sk} 1
636 StrCmp $LANGUAGE ${LANG_SLOVENIAN} 0 +3
637 SectionSetFlags ${sl} 1
638 SectionSetFlags ${d_sl} 1
639 StrCmp $LANGUAGE ${LANG_ALBANIAN} 0 +2
640 SectionSetFlags ${sq} 1
641 StrCmp $LANGUAGE ${LANG_SERBIAN} 0 +3
642 SectionSetFlags ${sr} 1
643 SectionSetFlags ${d_sr} 1
644 StrCmp $LANGUAGE ${LANG_SWEDISH} 0 +3
645 SectionSetFlags ${sv} 1
646 SectionSetFlags ${d_sv} 1
647 StrCmp $LANGUAGE ${LANG_TURKISH} 0 +3
648 SectionSetFlags ${tr} 1
649 SectionSetFlags ${d_tr} 1
650 StrCmp $LANGUAGE ${LANG_UKRAINIAN} 0 +3
651 SectionSetFlags ${uk} 1
652 SectionSetFlags ${d_uk} 1
653 StrCmp $LANGUAGE ${LANG_VIETNAMESE} 0 +3
654 SectionSetFlags ${vi} 1
655 SectionSetFlags ${d_vi} 1
656 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} 0 +3
657 SectionSetFlags ${zh_CN} 1
658 SectionSetFlags ${zh_HK} 1
659 StrCmp $LANGUAGE ${LANG_TRADCHINESE} 0 +3
660 SectionSetFlags ${zh_TW} 1
661 SectionSetFlags ${zh_HK} 1
662
663 FunctionEnd
664
665 Section -FinishSection
666 DetailPrint "Configuring GraphViz Dot..."
667 ReadEnvStr $R0 "PATH"
668 StrCpy $R0 "$R0;$INSTDIR\lib"
669 System::Call 'Kernel32::SetEnvironmentVariable(t, t) i("PATH", R0).r0'
670 SetOutPath $INSTDIR
671 nsExec::ExecToLog '"$INSTDIR\lib\dot.exe" -c'
672 System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("FC_DEBUG", "128").r0'
673 DetailPrint "Creating fontconfig cache (might take a while)..."
674 nsExec::ExecToLog '"$INSTDIR\lib\fc-cache.exe" -fv'
675 System::Call 'Kernel32::SetEnvironmentVariable(t, n)i ("FC_DEBUG", "").r0'
676
677 WriteRegStr SHCTX "${UNINST_KEY}" "DisplayName" "${APPNAME}"
678 WriteRegStr SHCTX "${UNINST_KEY}" "DisplayVersion" "${APPVERSION}"
679 WriteRegStr SHCTX "${UNINST_KEY}" "Publisher" "${APP_PUBLISHER}"
680 WriteRegStr SHCTX "${UNINST_KEY}" "URLInfoAbout" "${APP_WEB_SITE}"
681 WriteRegStr SHCTX "${UNINST_KEY}" "UninstallString" \
682 "$\"$INSTDIR\uninstall.exe$\" /$MultiUser.InstallMode"
683 WriteRegStr SHCTX "${UNINST_KEY}" "QuietUninstallString" \
684 "$\"$INSTDIR\uninstall.exe$\" /$MultiUser.InstallMode /S"
685 WriteUninstaller "$INSTDIR\uninstall.exe"
686 SectionEnd
687
688 Section Uninstall
689 DeleteRegKey SHCTX "${UNINST_KEY}"
690 Delete "$DESKTOP\${APPNAMEANDVERSION}.lnk"
691 Delete "$SMPROGRAMS\${APPNAMEANDVERSION}\${APPNAMEANDVERSION}.lnk"
692 Delete "$SMPROGRAMS\${APPNAMEANDVERSION}\${APPNAMEANDVERSION}-console.lnk"
693 RMDir "$SMPROGRAMS\${APPNAMEANDVERSION}\"
694 Delete "$INSTDIR\uninstall.exe"
695 Delete "$INSTDIR\uninstall.exe"
696 RMDir /r "$INSTDIR\etc"
697 RMDir /r "$INSTDIR\lib"
698 RMDir /r "$INSTDIR\share"
699 RMDir /r "$INSTDIR\src"
700 RMDir /r "$INSTDIR\ssl"
701 RMDir /r "$INSTDIR\gramps"
702 RMDir /r "$INSTDIR\var"
703 RMDir /r "$INSTDIR"
704 SectionEnd
705
706 Function .onInit
707 !insertmacro MULTIUSER_INIT
708
709 ;; Prevent multiple instances.
710 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "GrampsInstaller") i .r1 ?e'
711 Pop $R0
712 StrCmp $R0 0 +3
713 MessageBox MB_OK|MB_ICONEXCLAMATION "The GrampsAIO installer is already running."
714 Abort
715
716 ${IfNot} ${RunningX64}
717 MessageBox MB_OK "64bit Windows version required"
718 Quit
719 ${EndIf}
720
721 ${If} ${AtMostWin8}
722 MessageBox MB_OK "Windows 8.1 and above required"
723 Quit
724 ${EndIf}
725 ;StrCpy $LANGUAGE ${LANG_FRENCH}
726 Call sel_langs
727 FunctionEnd
728
729 Function un.onInit
730 !insertmacro MULTIUSER_UNINIT
731 ;; MessageBox MB_OK|MB_ICONEXCLAMATION "Gramps will uninstall now"
732 ;; Prevent uninstallation if Gramps is running.
733 System::Call 'kernel32::CreateMutex(i 0, b 0, t "org.gramps-project.gramps") i .R0 ?e'
734 Pop $0
735 ;; MessageBox MB_OK|MB_ICONEXCLAMATION "Gramps Mutex Error $0, return $R0"
736 IntCmpU $0 183 0 notRunning notRunning
737 System::Call 'kernel32::CloseHandle(i $R0)'
738 MessageBox MB_OK|MB_ICONEXCLAMATION "Gramps is running. Please close it first"
739 Abort
740 notRunning:
741 FunctionEnd