4 Initialization functions
7 #--------------------------------
13 # COMPONENT can be LaTeX, ImageMagick and Ghostscript
14 !macro EXTERNAL_INIT COMPONENT
16 # APP_REGKEY_SETUP = "Software\${APP_NAME}${APP_SERIES_KEY}\Setup"
17 # where ${APP_NAME}${APP_SERIES_KEY} is something like LyX22
18 ReadRegStr $ComponentPath SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
20 # BIN_LATEX etc are defined in settings.nsh
21 ${If} ${FileExists} "$ComponentPath\${BIN_${COMPONENT}}"
22 # set variables like PathLaTeX
23 StrCpy $Path${COMPONENT} $ComponentPath
30 # Get directories of components from registry
32 !insertmacro EXTERNAL_INIT LaTeX
36 ReadRegStr $LyXLangName SHELL_CONTEXT "${APP_REGKEY_SETUP}" "LyX Language"
38 ${If} $LyXLangName != ""
39 StrCpy $LangName $LyXLangName
44 #--------------------------------
45 # visible installer sections
47 Section "!${APP_NAME}" SecCore
49 !if ${SETUPTYPE} == BUNDLE
50 # if no TeX was found MiKTeX will be installed which requires space
52 AddSize 1020000 # size in KB
57 Section "$(SecFileAssocTitle)" SecFileAssoc
58 StrCpy $CreateFileAssociations "true"
61 Section "$(SecDesktopTitle)" SecDesktop
62 StrCpy $CreateDesktopIcon "true"
65 # Expand the list of dictionaries by default as this was requested by several
66 # users. For the thesaurus this is was not requested because this section
67 # is by default empty.
68 SectionGroup /e "$(SecDictionaries)" SecDictionaries
70 Section /o "Afrikaans" SecDAfrikaans
71 StrCpy $DictCodes "af_ZA,$DictCodes"
75 Section /o "العربية" SecDArabic
76 StrCpy $DictCodes "ar_DZ,$DictCodes"
80 Section /o "հայերեն" SecDArmenian
81 StrCpy $DictCodes "hy_AM,$DictCodes"
85 Section /o "Bahasa Indonesia" SecDIndonesian
86 StrCpy $DictCodes "id_ID,$DictCodes"
90 Section /o "Bahasa Melayu" SecDMalayan
91 StrCpy $DictCodes "ms_MY,$DictCodes"
95 Section /o "беларускі" SecDBelarusian
96 StrCpy $DictCodes "be_BY,$DictCodes"
100 Section /o "Brezhoneg" SecDBreton
101 StrCpy $DictCodes "br_FR,$DictCodes"
105 Section /o "български" SecDBulgarian
106 StrCpy $DictCodes "bg_BG,$DictCodes"
110 Section /o "Català" SecDCatalanian
111 StrCpy $DictCodes "ca_ES,$DictCodes"
115 Section /o "Ceština" SecDCzech
116 StrCpy $DictCodes "cs_CZ,$DictCodes"
120 Section /o "Coptic" SecDCoptic
121 StrCpy $DictCodes "cop_EG,$DictCodes"
125 Section /o "Cymraeg" SecDWelsh
126 StrCpy $DictCodes "cy_GB,$DictCodes"
130 Section /o "Dansk" SecDDanish
131 StrCpy $DictCodes "da_DK,$DictCodes"
135 Section /o "Deutsch (A)" SecDGermanAT
136 StrCpy $DictCodes "de_AT,$DictCodes"
140 Section /o "Deutsch (CH)" SecDGermanCH
141 StrCpy $DictCodes "de_CH,$DictCodes"
145 Section "Deutsch (D)" SecDGermanD
146 # already installed by default
148 #StrCpy $DictCodes "de_DE,$DictCodes"
152 Section /o "Ελληνικά" SecDGreek
153 StrCpy $DictCodes "el_GR,$DictCodes"
157 Section /o "Eesti" SecDEstonian
158 StrCpy $DictCodes "et_EE,$DictCodes"
162 Section /o "English (AU)" SecDEnglishAU
163 StrCpy $DictCodes "en_AU,$DictCodes"
167 Section /o "English (CA)" SecDEnglishCA
168 StrCpy $DictCodes "en_CA,$DictCodes"
172 Section "English (GB)" SecDEnglishGB
173 # already installed by default
175 #StrCpy $DictCodes "en_GB,$DictCodes"
179 Section /o "English (NZ)" SecDEnglishNZ
180 StrCpy $DictCodes "en_NZ,$DictCodes"
184 Section "English (US)" SecDEnglishUS
185 # already installed by default
187 #StrCpy $DictCodes "en_US,$DictCodes"
191 Section "Español (ES)" SecDSpanishES
192 # already installed by default
194 #StrCpy $DictCodes "es_ES,$DictCodes"
198 Section "Español (MX)" SecDSpanishMX
199 # already installed by default
201 #StrCpy $DictCodes "es_MX,$DictCodes"
205 Section /o "Esperanto" SecDEsperanto
206 StrCpy $DictCodes "eo_EO,$DictCodes"
210 Section /o "Euskara" SecDBasque
211 StrCpy $DictCodes "eu_ES,$DictCodes"
215 Section /o "Farsi" SecDFarsi
216 StrCpy $DictCodes "fa_IR,$DictCodes"
220 Section "Français" SecDFrench
221 # already installed by default
223 #StrCpy $DictCodes "fr_FR,$DictCodes"
227 Section /o "Français (Canada)" SecDFrenchCanada
228 StrCpy $DictCodes "fr_CA,$DictCodes"
232 Section /o "Gaeilge" SecDGaelic
233 StrCpy $DictCodes "ga_IR,$DictCodes"
237 Section /o "Gàidhlig" SecDScottish
238 StrCpy $DictCodes "gd_GB,$DictCodes"
242 Section /o "Galego" SecDGalician
243 StrCpy $DictCodes "gl_ES,$DictCodes"
247 Section /o "עִברִית" SecDHebrew
248 StrCpy $DictCodes "he_IL,$DictCodes"
252 Section /o "Hrvatski" SecDCroatian
253 StrCpy $DictCodes "hr_HR,$DictCodes"
257 Section /o "Magyar" SecDHungarian
258 StrCpy $DictCodes "hu_HU,$DictCodes"
262 Section /o "हिंदी" SecDHindi
263 StrCpy $DictCodes "hi_IN,$DictCodes"
267 Section /o "Interlingua" SecDInterlingua
268 StrCpy $DictCodes "ia_IA,$DictCodes"
272 Section /o "Íslenska" SecDIcelandic
273 StrCpy $DictCodes "is_IS,$DictCodes"
277 Section /o "Italiano" SecDItalian
278 StrCpy $DictCodes "it_IT,$DictCodes"
282 Section /o "Қазақша" SecDKazakh
283 StrCpy $DictCodes "kk_KZ,$DictCodes"
287 Section /o "한국어" SecDKorean
288 StrCpy $DictCodes "ko_KR,$DictCodes"
292 Section /o "Latina" SecDLatin
293 StrCpy $DictCodes "la_LA,$DictCodes"
297 Section /o "Lietuviu" SecDLithuanian
298 StrCpy $DictCodes "lt_LT,$DictCodes"
302 Section /o "Latviešu" SecDLatvian
303 StrCpy $DictCodes "lv_LV,$DictCodes"
307 Section /o "मराठी" SecDMarathi
308 StrCpy $DictCodes "mr_IN,$DictCodes"
312 Section /o "Nederlands" SecDDutch
313 StrCpy $DictCodes "nl_NL,$DictCodes"
317 Section /o "Norsk (Bokmål)" SecDNorwegianNB
318 StrCpy $DictCodes "nb_NO,$DictCodes"
322 Section /o "Norsk (Nynorsk)" SecDNorwegianNN
323 StrCpy $DictCodes "nn_NO,$DictCodes"
327 Section /o "Occitan" SecDOccitan
328 StrCpy $DictCodes "oc_FR,$DictCodes"
332 Section /o "Polski" SecDPolish
333 StrCpy $DictCodes "pl_PL,$DictCodes"
337 Section /o "Português (BR)" SecDPortugueseBR
338 StrCpy $DictCodes "pt_BR,$DictCodes"
342 Section /o "Português (PT)" SecDPortuguesePT
343 StrCpy $DictCodes "pt_PT,$DictCodes"
347 Section /o "Româna" SecDRomanian
348 StrCpy $DictCodes "ro_RO,$DictCodes"
352 Section /o "Русский" SecDRussian
353 StrCpy $DictCodes "ru_RU,$DictCodes"
357 Section /o "Serbšcina (Dolno)" SecDSorbianD
358 StrCpy $DictCodes "dsb_DE,$DictCodes"
362 Section /o "Serbšcina (Horno)" SecDSorbianH
363 StrCpy $DictCodes "hsb_DE,$DictCodes"
367 Section /o "Shqipe" SecDAlbanian
368 StrCpy $DictCodes "sq_AL,$DictCodes"
372 Section /o "Slovenšcina" SecDSlovenian
373 StrCpy $DictCodes "sl_SI,$DictCodes"
377 Section /o "Slovenský" SecDSlovakian
378 StrCpy $DictCodes "sk_SK,$DictCodes"
382 Section /o "Српски (Ћирилица)" SecDSerbianC
383 StrCpy $DictCodes "sr_RS,$DictCodes"
387 Section /o "Srpski (Latinica)" SecDSerbianL
388 StrCpy $DictCodes "sr_RS-Latin,$DictCodes"
392 Section /o "Svenska" SecDSwedish
393 StrCpy $DictCodes "sv_SE,$DictCodes"
397 Section /o "தமிழ்" SecDTamil
398 StrCpy $DictCodes "ta_IN,$DictCodes"
402 Section /o "తెలుగు" SecDTelugu
403 StrCpy $DictCodes "te_IN,$DictCodes"
407 Section /o "ไทย" SecDThai
408 StrCpy $DictCodes "th_TH,$DictCodes"
412 Section /o "Tibetan" SecDTibetan
413 StrCpy $DictCodes "bo_CN,$DictCodes"
417 Section /o "Türkmençe" SecDTurkmen
418 StrCpy $DictCodes "tk_TM,$DictCodes"
422 Section /o "Türkçe" SecDTurkish
423 StrCpy $DictCodes "tr_TR,$DictCodes"
427 Section /o "Українська" SecDUkrainian
428 StrCpy $DictCodes "uk_UA,$DictCodes"
432 Section /o "اردو" SecDUrdu
433 StrCpy $DictCodes "ur_PK,$DictCodes"
437 Section /o "Tiếng Việt" SecDVietnamese
438 StrCpy $DictCodes "vi_VN,$DictCodes"
445 SectionGroup "$(SecThesaurus)" SecThesaurus
447 Section /o "български" SecTBulgarian
448 StrCpy $ThesCodes "bg_BG,$ThesCodes"
452 Section /o "Català" SecTCatalan
453 StrCpy $ThesCodes "ca_ES,$ThesCodes"
457 Section /o "Ceština" SecTCzech
458 StrCpy $ThesCodes "cs_CZ,$ThesCodes"
462 Section /o "Dansk" SecTDanish
463 StrCpy $ThesCodes "da_DK,$ThesCodes"
467 Section /o "Deutsch (D/A)" SecTGermanDA
468 StrCpy $ThesCodes "de_DE,$ThesCodes"
472 Section /o "Deutsch (CH)" SecTGermanCH
473 StrCpy $ThesCodes "de_CH,$ThesCodes"
477 Section /o "English (AU)" SecTEnglishAU
478 StrCpy $ThesCodes "en_AU,$ThesCodes"
482 Section /o "English (GB)" SecTEnglishGB
483 StrCpy $ThesCodes "en_GB,$ThesCodes"
487 Section /o "English (US)" SecTEnglishUS
488 StrCpy $ThesCodes "en_US,$ThesCodes"
492 Section /o "Español" SecTSpanish
493 StrCpy $ThesCodes "es_ES,$ThesCodes"
497 Section /o "Français" SecTFrench
498 StrCpy $ThesCodes "fr_FR,$ThesCodes"
502 Section /o "Gaeilge" SecTGaelic
503 StrCpy $ThesCodes "ga_IR,$ThesCodes"
507 Section /o "Galego" SecTGalician
508 StrCpy $ThesCodes "gl_ES,$ThesCodes"
512 Section /o "Ελληνικά" SecTGreek
513 StrCpy $ThesCodes "el_GR,$ThesCodes"
517 Section /o "Íslenska" SecTIcelandic
518 StrCpy $ThesCodes "is_IS,$ThesCodes"
522 Section /o "Italiano" SecTItalian
523 StrCpy $ThesCodes "it_IT,$ThesCodes"
527 Section /o "Magyar" SecTHungarian
528 StrCpy $ThesCodes "hu_HU,$ThesCodes"
532 Section /o "Norsk (Bokmål)" SecTNorwegianNB
533 StrCpy $ThesCodes "nb_NO,$ThesCodes"
537 Section /o "Norsk (Nynorsk)" SecTNorwegianNN
538 StrCpy $ThesCodes "nn_NO,$ThesCodes"
542 Section /o "Polski" SecTPolish
543 StrCpy $ThesCodes "pl_PL,$ThesCodes"
547 Section /o "Português" SecTPortuguese
548 StrCpy $ThesCodes "pt_PT,$ThesCodes"
552 Section /o "Româna" SecTRomanian
553 StrCpy $ThesCodes "ro_RO,$ThesCodes"
557 Section /o "Русский" SecTRussian
558 StrCpy $ThesCodes "ru_RU,$ThesCodes"
562 Section /o "Slovenšcina" SecTSlovenian
563 StrCpy $ThesCodes "sl_SI,$ThesCodes"
567 Section /o "Slovenský" SecTSlovakian
568 StrCpy $ThesCodes "sk_SK,$ThesCodes"
572 Section /o "Svenska" SecTSwedish
573 StrCpy $ThesCodes "sv_SE,$ThesCodes"
577 Section /o "Українська" SecTUkrainian
578 StrCpy $ThesCodes "uk_UA,$ThesCodes"
584 # Section descriptions
585 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
586 !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
587 !insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssoc} "$(SecFileAssocDescription)"
588 !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
589 !insertmacro MUI_DESCRIPTION_TEXT ${SecDictionaries} "$(SecDictionariesDescription)"
590 !insertmacro MUI_DESCRIPTION_TEXT ${SecThesaurus} "$(SecThesaurusDescription)"
591 !insertmacro MUI_FUNCTION_DESCRIPTION_END
594 # .onInit must be here after the section definition because we have to set
595 # the selection states of the dictionary sections
598 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
599 ${if} $R0 == "5.0" # 2000
600 ${orif} $R0 == "5.1" # XP
601 ${orif} $R0 == "5.2" # 2003
602 MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows Vista or newer." /SD IDOK
606 # Fixme: the Unicode version of FindProcDLL::FindProc
607 # reports always that it is already running
608 # check that the installer is not currently running
609 #FindProcDLL::FindProc "${BundleExeFile}"
611 # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
614 #FindProcDLL::FindProc "${ExeFile}"
616 # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
619 #System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${BundleExeFile}.Instance") i .r1 ?e'
622 # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
625 #System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${ExeFile}.Instance") i .r1 ?e'
628 # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
632 # Check that LyX is not currently running
633 FindProcDLL::FindProc "lyx.exe"
635 MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK
639 # read the user and computer name
640 ReadRegStr $ComputerName HKLM "System\CurrentControlSet\Control\ComputerName\ActiveComputerName" "ComputerName"
641 System::Call "advapi32::GetUserName(t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2"
644 !insertmacro MULTIUSER_INIT
646 # check if this LyX version is already installed
647 ${if} $MultiUser.Privileges == "Admin"
648 ${orif} $MultiUser.Privileges == "Power"
649 ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "DisplayIcon"
651 ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayIcon"
652 # handle also the case that LyX is already installed in HKLM
654 ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "DisplayIcon"
658 # check if the uninstaller was acidentally deleted
659 # if so don't bother the user if he realy wants to install a new LyX over an existing one
660 # because he won't have a chance to deny this
661 StrCpy $4 $0 -10 # remove '\bin\lyx,0'
662 # (for FileCheck the variables $0 and $1 cannot be used)
663 !insertmacro FileCheck $5 "Uninstall-LyX.exe" "$4" # macro from LyXUtils.nsh
665 Goto ForceInstallation
667 # installing over an existing installation of the same LyX release is not necessary
668 # if the users does this he most probably has a problem with LyX that can better be solved
669 # by reinstalling LyX
670 # for beta and other test releases over-installing can even cause errors
671 MessageBox MB_YESNO|MB_DEFBUTTON2|MB_ICONEXCLAMATION "$(AlreadyInstalled)" /SD IDNO IDYES ForceInstallation
676 # check if there is an existing LyX installation of the same LyX series
677 # we usually don't release more than 10 versions so with 20 we are safe to check if a newer version is installed
678 IntOp $4 ${APP_VERSION_REVISION} + 20
680 ${if} $MultiUser.Privileges == "Admin"
681 ${orif} $MultiUser.Privileges == "Power"
682 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
683 # also check for an emergency release
685 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion"
688 ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
689 # also check for an emergency release
691 ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion"
695 StrCpy $R5 $0 # store the read version number
696 StrCpy $OldVersionNumber "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5"
697 # we don't stop here because we want the latest installed version
701 ${if} $OldVersionNumber > ${APP_SERIES_KEY}
702 # store the version number and reformat it temporarily for the error message
703 StrCpy $R0 $OldVersionNumber
704 StrCpy $OldVersionNumber $R5
705 MessageBox MB_OK|MB_ICONSTOP "$(NewerInstalled)" /SD IDOK
706 StrCpy $OldVersionNumber $R0
710 # this can be reset to "true" in section SecDesktop
711 StrCpy $CreateDesktopIcon "false"
712 StrCpy $CreateFileAssociations "false"
715 # Show banner while installer is intializating
716 Banner::show /NOUNLOAD "Checking system"
721 #!if ${SETUPTYPE} == BUNDLE
722 # # don't let the installer sections appear when the programs are already installed
723 # ${if} $PathBibTeXEditor != ""
724 # SectionSetText 3 "" # hides the corresponding uninstaller section, ${SecInstJabRef}
728 # select sections of already installed spell-checker dictionaries, make them read-only
729 # and set the necessary size to 0 bytes
730 StrCpy $String $FoundDict
731 StrCpy $Search "af_ZA"
732 Call StrPoint # function from LyXUtils.nsh
733 ${if} $Pointer != "-1"
734 IntOp $0 ${SF_SELECTED} | ${SF_RO}
735 SectionSetFlags ${SecDAfrikaans} $0
736 SectionSetSize ${SecDAfrikaans} 0
738 StrCpy $Search "ar_DZ"
740 ${if} $Pointer != "-1"
741 IntOp $0 ${SF_SELECTED} | ${SF_RO}
742 SectionSetFlags ${SecDArabic} $0
743 SectionSetSize ${SecDArabic} 0
745 StrCpy $Search "hy_AM"
747 ${if} $Pointer != "-1"
748 IntOp $0 ${SF_SELECTED} | ${SF_RO}
749 SectionSetFlags ${SecDArmenian} $0
750 SectionSetSize ${SecDArmenian} 0
752 StrCpy $Search "id_ID"
754 ${if} $Pointer != "-1"
755 IntOp $0 ${SF_SELECTED} | ${SF_RO}
756 SectionSetFlags ${SecDIndonesian} $0
757 SectionSetSize ${SecDIndonesian} 0
759 StrCpy $Search "ms_MY"
761 ${if} $Pointer != "-1"
762 IntOp $0 ${SF_SELECTED} | ${SF_RO}
763 SectionSetFlags ${SecDMalayan} $0
764 SectionSetSize ${SecDMalayan} 0
766 StrCpy $Search "be_BY"
768 ${if} $Pointer != "-1"
769 IntOp $0 ${SF_SELECTED} | ${SF_RO}
770 SectionSetFlags ${SecDBelarusian} $0
771 SectionSetSize ${SecDBelarusian} 0
773 StrCpy $Search "br_FR"
775 ${if} $Pointer != "-1"
776 IntOp $0 ${SF_SELECTED} | ${SF_RO}
777 SectionSetFlags ${SecDBreton} $0
778 SectionSetSize ${SecDBreton} 0
780 StrCpy $Search "bg_BG"
782 ${if} $Pointer != "-1"
783 IntOp $0 ${SF_SELECTED} | ${SF_RO}
784 SectionSetFlags ${SecDBulgarian} $0
785 SectionSetSize ${SecDBulgarian} 0
787 StrCpy $Search "ca_ES"
789 ${if} $Pointer != "-1"
790 IntOp $0 ${SF_SELECTED} | ${SF_RO}
791 SectionSetFlags ${SecDCatalanian} $0
792 SectionSetSize ${SecDCatalanian} 0
794 StrCpy $Search "cs_CZ"
796 ${if} $Pointer != "-1"
797 IntOp $0 ${SF_SELECTED} | ${SF_RO}
798 SectionSetFlags ${SecDCzech} $0
799 SectionSetSize ${SecDCzech} 0
802 StrCpy $Search "cop_EG"
804 ${if} $Pointer != "-1"
805 IntOp $0 ${SF_SELECTED} | ${SF_RO}
806 SectionSetFlags ${SecDCoptic} $0
807 SectionSetSize ${SecDCoptic} 0
809 StrCpy $Search "cy_GB"
811 ${if} $Pointer != "-1"
812 IntOp $0 ${SF_SELECTED} | ${SF_RO}
813 SectionSetFlags ${SecDWelsh} $0
814 SectionSetSize ${SecDWelsh} 0
816 StrCpy $Search "da_DK"
818 ${if} $Pointer != "-1"
819 IntOp $0 ${SF_SELECTED} | ${SF_RO}
820 SectionSetFlags ${SecDDanish} $0
821 SectionSetSize ${SecDDanish} 0
823 StrCpy $Search "de_AT"
825 ${if} $Pointer != "-1"
826 IntOp $0 ${SF_SELECTED} | ${SF_RO}
827 SectionSetFlags ${SecDGermanAT} $0
828 SectionSetSize ${SecDGermanAT} 0
830 StrCpy $Search "de_CH"
832 ${if} $Pointer != "-1"
833 IntOp $0 ${SF_SELECTED} | ${SF_RO}
834 SectionSetFlags ${SecDGermanCH} $0
835 SectionSetSize ${SecDGermanCH} 0
837 StrCpy $Search "de_DE"
839 ${if} $Pointer != "-1"
840 IntOp $0 ${SF_SELECTED} | ${SF_RO}
841 SectionSetFlags ${SecDGermanD} $0
842 SectionSetSize ${SecDGermanD} 0
844 StrCpy $Search "el_GR"
846 ${if} $Pointer != "-1"
847 IntOp $0 ${SF_SELECTED} | ${SF_RO}
848 SectionSetFlags ${SecDGreek} $0
849 SectionSetSize ${SecDGreek} 0
851 StrCpy $Search "et_EE"
853 ${if} $Pointer != "-1"
854 IntOp $0 ${SF_SELECTED} | ${SF_RO}
855 SectionSetFlags ${SecDEstonian} $0
856 SectionSetSize ${SecDEstonian} 0
858 StrCpy $Search "en_AU"
860 ${if} $Pointer != "-1"
861 IntOp $0 ${SF_SELECTED} | ${SF_RO}
862 SectionSetFlags ${SecDEnglishAU} $0
863 SectionSetSize ${SecDEnglishAU} 0
865 StrCpy $Search "en_CA"
867 ${if} $Pointer != "-1"
868 IntOp $0 ${SF_SELECTED} | ${SF_RO}
869 SectionSetFlags ${SecDEnglishCA} $0
870 SectionSetSize ${SecDEnglishCA} 0
872 StrCpy $Search "en_GB"
874 ${if} $Pointer != "-1"
875 IntOp $0 ${SF_SELECTED} | ${SF_RO}
876 SectionSetFlags ${SecDEnglishGB} $0
877 SectionSetSize ${SecDEnglishGB} 0
879 StrCpy $Search "en_NZ"
881 ${if} $Pointer != "-1"
882 IntOp $0 ${SF_SELECTED} | ${SF_RO}
883 SectionSetFlags ${SecDEnglishNZ} $0
884 SectionSetSize ${SecDEnglishNZ} 0
886 StrCpy $Search "en_US"
888 ${if} $Pointer != "-1"
889 IntOp $0 ${SF_SELECTED} | ${SF_RO}
890 SectionSetFlags ${SecDEnglishUS} $0
891 SectionSetSize ${SecDEnglishUS} 0
893 StrCpy $Search "es_ES"
895 ${if} $Pointer != "-1"
896 IntOp $0 ${SF_SELECTED} | ${SF_RO}
897 SectionSetFlags ${SecDSpanishES} $0
898 SectionSetSize ${SecDSpanishES} 0
900 StrCpy $Search "es_MX"
902 ${if} $Pointer != "-1"
903 IntOp $0 ${SF_SELECTED} | ${SF_RO}
904 SectionSetFlags ${SecDSpanishMX} $0
905 SectionSetSize ${SecDSpanishMX} 0
907 StrCpy $Search "eo_EO"
909 ${if} $Pointer != "-1"
910 IntOp $0 ${SF_SELECTED} | ${SF_RO}
911 SectionSetFlags ${SecDEsperanto} $0
912 SectionSetSize ${SecDEsperanto} 0
914 StrCpy $Search "eu_ES"
916 ${if} $Pointer != "-1"
917 IntOp $0 ${SF_SELECTED} | ${SF_RO}
918 SectionSetFlags ${SecDBasque} $0
919 SectionSetSize ${SecDBasque} 0
921 StrCpy $Search "fa_IR"
923 ${if} $Pointer != "-1"
924 IntOp $0 ${SF_SELECTED} | ${SF_RO}
925 SectionSetFlags ${SecDFarsi} $0
926 SectionSetSize ${SecDFarsi} 0
928 StrCpy $Search "fr_CA"
930 ${if} $Pointer != "-1"
931 IntOp $0 ${SF_SELECTED} | ${SF_RO}
932 SectionSetFlags ${SecDFrenchCanada} $0
933 SectionSetSize ${SecDFrenchCanada} 0
935 StrCpy $Search "fr_FR"
937 ${if} $Pointer != "-1"
938 IntOp $0 ${SF_SELECTED} | ${SF_RO}
939 SectionSetFlags ${SecDFrench} $0
940 SectionSetSize ${SecDFrench} 0
942 StrCpy $Search "ga_IR"
944 ${if} $Pointer != "-1"
945 IntOp $0 ${SF_SELECTED} | ${SF_RO}
946 SectionSetFlags ${SecDGaelic} $0
947 SectionSetSize ${SecDGaelic} 0
949 StrCpy $Search "gd_GB"
951 ${if} $Pointer != "-1"
952 IntOp $0 ${SF_SELECTED} | ${SF_RO}
953 SectionSetFlags ${SecDScottish} $0
954 SectionSetSize ${SecDScottish} 0
956 StrCpy $Search "gl_ES"
958 ${if} $Pointer != "-1"
959 IntOp $0 ${SF_SELECTED} | ${SF_RO}
960 SectionSetFlags ${SecDGalician} $0
961 SectionSetSize ${SecDGalician} 0
963 StrCpy $Search "he_IL"
965 ${if} $Pointer != "-1"
966 IntOp $0 ${SF_SELECTED} | ${SF_RO}
967 SectionSetFlags ${SecDHebrew} $0
968 SectionSetSize ${SecDHebrew} 0
970 StrCpy $Search "hi_IN"
972 ${if} $Pointer != "-1"
973 IntOp $0 ${SF_SELECTED} | ${SF_RO}
974 SectionSetFlags ${SecDHindi} $0
975 SectionSetSize ${SecDHindi} 0
977 StrCpy $Search "hr_HR"
979 ${if} $Pointer != "-1"
980 IntOp $0 ${SF_SELECTED} | ${SF_RO}
981 SectionSetFlags ${SecDCroatian} $0
982 SectionSetSize ${SecDCroatian} 0
984 StrCpy $Search "hu_HU"
986 ${if} $Pointer != "-1"
987 IntOp $0 ${SF_SELECTED} | ${SF_RO}
988 SectionSetFlags ${SecDHungarian} $0
989 SectionSetSize ${SecDHungarian} 0
991 StrCpy $Search "ia_IA"
993 ${if} $Pointer != "-1"
994 IntOp $0 ${SF_SELECTED} | ${SF_RO}
995 SectionSetFlags ${SecDInterlingua} $0
996 SectionSetSize ${SecDInterlingua} 0
998 StrCpy $Search "is_IS"
1000 ${if} $Pointer != "-1"
1001 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1002 SectionSetFlags ${SecDIcelandic} $0
1003 SectionSetSize ${SecDIcelandic} 0
1005 StrCpy $Search "it_IT"
1007 ${if} $Pointer != "-1"
1008 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1009 SectionSetFlags ${SecDItalian} $0
1010 SectionSetSize ${SecDItalian} 0
1012 StrCpy $Search "kk_KZ"
1014 ${if} $Pointer != "-1"
1015 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1016 SectionSetFlags ${SecDKazakh} $0
1017 SectionSetSize ${SecDKazakh} 0
1019 StrCpy $Search "ko_KR"
1021 ${if} $Pointer != "-1"
1022 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1023 SectionSetFlags ${SecDKorean} $0
1024 SectionSetSize ${SecDKorean} 0
1026 StrCpy $Search "la_LA"
1028 ${if} $Pointer != "-1"
1029 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1030 SectionSetFlags ${SecDLatin} $0
1031 SectionSetSize ${SecDLatin} 0
1033 StrCpy $Search "lt_LT"
1035 ${if} $Pointer != "-1"
1036 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1037 SectionSetFlags ${SecDLithuanian} $0
1038 SectionSetSize ${SecDLithuanian} 0
1040 StrCpy $Search "lv_LV"
1042 ${if} $Pointer != "-1"
1043 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1044 SectionSetFlags ${SecDLatvian} $0
1045 SectionSetSize ${SecDLatvian} 0
1047 StrCpy $Search "mr_IN"
1049 ${if} $Pointer != "-1"
1050 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1051 SectionSetFlags ${SecDMarathi} $0
1052 SectionSetSize ${SecDMarathi} 0
1054 StrCpy $Search "nl_NL"
1056 ${if} $Pointer != "-1"
1057 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1058 SectionSetFlags ${SecDDutch} $0
1059 SectionSetSize ${SecDDutch} 0
1061 StrCpy $Search "nb_NO"
1063 ${if} $Pointer != "-1"
1064 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1065 SectionSetFlags ${SecDNorwegianNB} $0
1066 SectionSetSize ${SecDNorwegianNB} 0
1068 StrCpy $Search "nn_NO"
1070 ${if} $Pointer != "-1"
1071 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1072 SectionSetFlags ${SecDNorwegianNN} $0
1073 SectionSetSize ${SecDNorwegianNN} 0
1075 StrCpy $Search "oc_FR"
1077 ${if} $Pointer != "-1"
1078 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1079 SectionSetFlags ${SecDOccitan} $0
1080 SectionSetSize ${SecDOccitan} 0
1082 StrCpy $Search "pl_PL"
1084 ${if} $Pointer != "-1"
1085 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1086 SectionSetFlags ${SecDPolish} $0
1087 SectionSetSize ${SecDPolish} 0
1089 StrCpy $Search "pt_BR"
1091 ${if} $Pointer != "-1"
1092 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1093 SectionSetFlags ${SecDPortugueseBR} $0
1094 SectionSetSize ${SecDPortugueseBR} 0
1096 StrCpy $Search "pt_PT"
1098 ${if} $Pointer != "-1"
1099 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1100 SectionSetFlags ${SecDPortuguesePT} $0
1101 SectionSetSize ${SecDPortuguesePT} 0
1103 StrCpy $Search "ro_RO"
1105 ${if} $Pointer != "-1"
1106 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1107 SectionSetFlags ${SecDRomanian} $0
1108 SectionSetSize ${SecDRomanian} 0
1110 StrCpy $Search "ru_RU"
1112 ${if} $Pointer != "-1"
1113 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1114 SectionSetFlags ${SecDRussian} $0
1115 SectionSetSize ${SecDRussian} 0
1117 StrCpy $Search "dsb_DE"
1119 ${if} $Pointer != "-1"
1120 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1121 SectionSetFlags ${SecDSorbianD} $0
1122 SectionSetSize ${SecDSorbianD} 0
1124 StrCpy $Search "hsb_DE"
1126 ${if} $Pointer != "-1"
1127 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1128 SectionSetFlags ${SecDSorbianH} $0
1129 SectionSetSize ${SecDSorbianH} 0
1131 StrCpy $Search "sq_AL"
1133 ${if} $Pointer != "-1"
1134 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1135 SectionSetFlags ${SecDAlbanian} $0
1136 SectionSetSize ${SecDAlbanian} 0
1138 StrCpy $Search "sl_SI"
1140 ${if} $Pointer != "-1"
1141 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1142 SectionSetFlags ${SecDSlovenian} $0
1143 SectionSetSize ${SecDSlovenian} 0
1145 StrCpy $Search "sk_SK"
1147 ${if} $Pointer != "-1"
1148 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1149 SectionSetFlags ${SecDSlovakian} $0
1150 SectionSetSize ${SecDSlovakian} 0
1152 StrCpy $Search "sr_RS"
1154 ${if} $Pointer != "-1"
1155 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1156 SectionSetFlags ${SecDSerbianC} $0
1157 SectionSetSize ${SecDSerbianC} 0
1159 StrCpy $Search "sr_RS-Latin"
1161 ${if} $Pointer != "-1"
1162 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1163 SectionSetFlags ${SecDSerbianL} $0
1164 SectionSetSize ${SecDSerbianL} 0
1166 StrCpy $Search "sv_SE"
1168 ${if} $Pointer != "-1"
1169 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1170 SectionSetFlags ${SecDSwedish} $0
1171 SectionSetSize ${SecDSwedish} 0
1173 StrCpy $Search "ta_IN"
1175 ${if} $Pointer != "-1"
1176 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1177 SectionSetFlags ${SecDTamil} $0
1178 SectionSetSize ${SecDTamil} 0
1180 StrCpy $Search "te_IN"
1182 ${if} $Pointer != "-1"
1183 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1184 SectionSetFlags ${SecDTelugu} $0
1185 SectionSetSize ${SecDTelugu} 0
1187 StrCpy $Search "th_TH"
1189 ${if} $Pointer != "-1"
1190 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1191 SectionSetFlags ${SecDThai} $0
1192 SectionSetSize ${SecDThai} 0
1194 StrCpy $Search "bo_CN"
1196 ${if} $Pointer != "-1"
1197 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1198 SectionSetFlags ${SecDTibetan} $0
1199 SectionSetSize ${SecDTibetan} 0
1201 StrCpy $Search "tk_TM"
1203 ${if} $Pointer != "-1"
1204 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1205 SectionSetFlags ${SecDTurkmen} $0
1206 SectionSetSize ${SecDTurkmen} 0
1208 StrCpy $Search "tr_TR"
1210 ${if} $Pointer != "-1"
1211 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1212 SectionSetFlags ${SecDTurkish} $0
1213 SectionSetSize ${SecDTurkish} 0
1215 StrCpy $Search "uk_UA"
1217 ${if} $Pointer != "-1"
1218 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1219 SectionSetFlags ${SecDUkrainian} $0
1220 SectionSetSize ${SecDUkrainian} 0
1222 StrCpy $Search "ur_PK"
1224 ${if} $Pointer != "-1"
1225 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1226 SectionSetFlags ${SecDUrdu} $0
1227 SectionSetSize ${SecDUrdu} 0
1229 StrCpy $Search "vi_VN"
1231 ${if} $Pointer != "-1"
1232 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1233 SectionSetFlags ${SecDVietnamese} $0
1234 SectionSetSize ${SecDVietnamese} 0
1237 # select sections of already installed thesaurus dictionaries, make them read-only
1238 # and set the necessary size to 0 bytes
1239 StrCpy $String $FoundThes
1240 StrCpy $Search "bg_BG"
1241 Call StrPoint # function from LyXUtils.nsh
1242 ${if} $Pointer != "-1"
1243 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1244 SectionSetFlags ${SecTBulgarian} $0
1245 SectionSetSize ${SecTBulgarian} 0
1247 StrCpy $Search "ca_ES"
1249 ${if} $Pointer != "-1"
1250 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1251 SectionSetFlags ${SecTCatalan} $0
1252 SectionSetSize ${SecTCatalan} 0
1254 StrCpy $Search "cs_CZ"
1256 ${if} $Pointer != "-1"
1257 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1258 SectionSetFlags ${SecTCzech} $0
1259 SectionSetSize ${SecTCzech} 0
1261 StrCpy $Search "da_DK"
1263 ${if} $Pointer != "-1"
1264 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1265 SectionSetFlags ${SecTDanish} $0
1266 SectionSetSize ${SecTDanish} 0
1268 StrCpy $Search "de_DE"
1270 ${if} $Pointer != "-1"
1271 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1272 SectionSetFlags ${SecTGermanDA} $0
1273 SectionSetSize ${SecTGermanDA} 0
1275 StrCpy $Search "de_CH"
1277 ${if} $Pointer != "-1"
1278 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1279 SectionSetFlags ${SecTGermanCH} $0
1280 SectionSetSize ${SecTGermanCH} 0
1282 StrCpy $Search "en_AU"
1284 ${if} $Pointer != "-1"
1285 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1286 SectionSetFlags ${SecTEnglishAU} $0
1287 SectionSetSize ${SecTEnglishAU} 0
1289 StrCpy $Search "en_GB"
1291 ${if} $Pointer != "-1"
1292 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1293 SectionSetFlags ${SecTEnglishGB} $0
1294 SectionSetSize ${SecTEnglishGB} 0
1296 StrCpy $Search "en_US"
1298 ${if} $Pointer != "-1"
1299 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1300 SectionSetFlags ${SecTEnglishUS} $0
1301 SectionSetSize ${SecTEnglishUS} 0
1303 StrCpy $Search "es_ES"
1305 ${if} $Pointer != "-1"
1306 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1307 SectionSetFlags ${SecTSpanish} $0
1308 SectionSetSize ${SecTSpanish} 0
1310 StrCpy $Search "fr_FR"
1312 ${if} $Pointer != "-1"
1313 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1314 SectionSetFlags ${SecTFrench} $0
1315 SectionSetSize ${SecTFrench} 0
1317 StrCpy $Search "ga_IR"
1319 ${if} $Pointer != "-1"
1320 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1321 SectionSetFlags ${SecTGaelic} $0
1322 SectionSetSize ${SecTGaelic} 0
1324 StrCpy $Search "gl_ES"
1326 ${if} $Pointer != "-1"
1327 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1328 SectionSetFlags ${SecTGalician} $0
1329 SectionSetSize ${SecTGalician} 0
1331 StrCpy $Search "el_GR"
1333 ${if} $Pointer != "-1"
1334 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1335 SectionSetFlags ${SecTGreek} $0
1336 SectionSetSize ${SecTGreek} 0
1338 StrCpy $Search "is_IS"
1340 ${if} $Pointer != "-1"
1341 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1342 SectionSetFlags ${SecTIcelandic} $0
1343 SectionSetSize ${SecTIcelandic} 0
1345 StrCpy $Search "it_IT"
1347 ${if} $Pointer != "-1"
1348 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1349 SectionSetFlags ${SecTItalian} $0
1350 SectionSetSize ${SecTItalian} 0
1352 StrCpy $Search "hu_HU"
1354 ${if} $Pointer != "-1"
1355 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1356 SectionSetFlags ${SecTHungarian} $0
1357 SectionSetSize ${SecTHungarian} 0
1359 StrCpy $Search "nb_NO"
1361 ${if} $Pointer != "-1"
1362 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1363 SectionSetFlags ${SecTNorwegianNB} $0
1364 SectionSetSize ${SecTNorwegianNB} 0
1366 StrCpy $Search "nn_NO"
1368 ${if} $Pointer != "-1"
1369 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1370 SectionSetFlags ${SecTNorwegianNN} $0
1371 SectionSetSize ${SecTNorwegianNN} 0
1373 StrCpy $Search "pl_PL"
1375 ${if} $Pointer != "-1"
1376 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1377 SectionSetFlags ${SecTPolish} $0
1378 SectionSetSize ${SecTPolish} 0
1380 StrCpy $Search "pt_PT"
1382 ${if} $Pointer != "-1"
1383 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1384 SectionSetFlags ${SecTPortuguese} $0
1385 SectionSetSize ${SecTPortuguese} 0
1387 StrCpy $Search "ro_RO"
1389 ${if} $Pointer != "-1"
1390 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1391 SectionSetFlags ${SecTRomanian} $0
1392 SectionSetSize ${SecTRomanian} 0
1394 StrCpy $Search "ru_RU"
1396 ${if} $Pointer != "-1"
1397 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1398 SectionSetFlags ${SecTRussian} $0
1399 SectionSetSize ${SecTRussian} 0
1401 StrCpy $Search "sl_SI"
1403 ${if} $Pointer != "-1"
1404 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1405 SectionSetFlags ${SecTSlovenian} $0
1406 SectionSetSize ${SecTSlovenian} 0
1408 StrCpy $Search "sk_SK"
1410 ${if} $Pointer != "-1"
1411 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1412 SectionSetFlags ${SecTSlovakian} $0
1413 SectionSetSize ${SecTSlovakian} 0
1415 StrCpy $Search "sv_SE"
1417 ${if} $Pointer != "-1"
1418 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1419 SectionSetFlags ${SecTSwedish} $0
1420 SectionSetSize ${SecTSwedish} 0
1422 StrCpy $Search "uk_UA"
1424 ${if} $Pointer != "-1"
1425 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1426 SectionSetFlags ${SecTUkrainian} $0
1427 SectionSetSize ${SecTUkrainian} 0
1436 # this function is called at first after starting the uninstaller
1439 !insertmacro MULTIUSER_UNINIT
1441 # Check that LyX is not currently running
1442 FindProcDLL::FindProc "lyx.exe"
1444 MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK
1448 # set registry root key
1449 ${if} $MultiUser.Privileges == "Admin"
1450 ${orif} $MultiUser.Privileges == "Power"
1451 SetShellVarContext all
1453 SetShellVarContext current
1456 # Ascertain whether the user has sufficient privileges to uninstall.
1457 # abort when LyX was installed with admin permissions but the user doesn't have administrator privileges
1458 ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "DisplayVersion"
1460 ${andif} $MultiUser.Privileges != "Admin"
1461 ${andif} $MultiUser.Privileges != "Power"
1462 MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)" /SD IDOK
1465 # warning when LyX couldn't be found in the registry
1466 ${if} $0 == "" # check in HKCU
1467 ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion"
1469 MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)" /SD IDOK
1473 # Macro to investigate name of LyX's preferences folders to be able remove them
1474 !insertmacro UnAppPreSuff $AppPre $AppSuff # macro from LyXUtils.nsh
1476 # test if MiKTeX was installed together with LyX
1477 ReadRegStr $0 SHCTX "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
1478 ${if} $0 == "Yes${APP_SERIES_KEY}"
1479 SectionSetText 2 "MiKTeX" # names the corersponding uninstaller section
1480 StrCpy $LaTeXInstalled "MiKTeX"
1482 SectionSetText 2 "" # hides the corresponding uninstaller section
1485 # question message if the user really wants to uninstall LyX
1486 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(UnReallyRemoveLabel)" /SD IDYES IDYES +2 # continue if yes