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
607 # check that the installer is not currently running
608 FindProcDLL::FindProc "${BundleExeFile}"
610 MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
613 FindProcDLL::FindProc "${ExeFile}"
615 # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
618 #System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${BundleExeFile}.Instance") i .r1 ?e'
621 # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
624 #System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${ExeFile}.Instance") i .r1 ?e'
627 # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
631 # Check that LyX is not currently running
632 FindProcDLL::FindProc "lyx.exe"
634 MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK
638 # read the user and computer name
639 ReadRegStr $ComputerName HKLM "System\CurrentControlSet\Control\ComputerName\ActiveComputerName" "ComputerName"
640 System::Call "advapi32::GetUserName(t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2"
643 !insertmacro MULTIUSER_INIT
645 # check if this LyX version is already installed
646 ${if} $MultiUser.Privileges == "Admin"
647 ${orif} $MultiUser.Privileges == "Power"
648 ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "DisplayIcon"
650 ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayIcon"
651 # handle also the case that LyX is already installed in HKLM
653 ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "DisplayIcon"
657 # check if the uninstaller was acidentally deleted
658 # if so don't bother the user if he realy wants to install a new LyX over an existing one
659 # because he won't have a chance to deny this
660 StrCpy $4 $0 -10 # remove '\bin\lyx,0'
661 # (for FileCheck the variables $0 and $1 cannot be used)
662 !insertmacro FileCheck $5 "Uninstall-LyX.exe" "$4" # macro from LyXUtils.nsh
664 Goto ForceInstallation
666 # installing over an existing installation of the same LyX release is not necessary
667 # if the users does this he most probably has a problem with LyX that can better be solved
668 # by reinstalling LyX
669 # for beta and other test releases over-installing can even cause errors
670 MessageBox MB_YESNO|MB_DEFBUTTON2|MB_ICONEXCLAMATION "$(AlreadyInstalled)" /SD IDNO IDYES ForceInstallation
675 # check if there is an existing LyX installation of the same LyX series
676 # we usually don't release more than 10 versions so with 20 we are safe to check if a newer version is installed
677 IntOp $4 ${APP_VERSION_REVISION} + 20
679 ${if} $MultiUser.Privileges == "Admin"
680 ${orif} $MultiUser.Privileges == "Power"
681 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
682 # also check for an emergency release
684 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion"
687 ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
688 # also check for an emergency release
690 ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion"
694 StrCpy $R5 $0 # store the read version number
695 StrCpy $OldVersionNumber "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5"
696 # we don't stop here because we want the latest installed version
700 ${if} $OldVersionNumber > ${APP_SERIES_KEY}
701 # store the version number and reformat it temporarily for the error message
702 StrCpy $R0 $OldVersionNumber
703 StrCpy $OldVersionNumber $R5
704 MessageBox MB_OK|MB_ICONSTOP "$(NewerInstalled)" /SD IDOK
705 StrCpy $OldVersionNumber $R0
709 # this can be reset to "true" in section SecDesktop
710 StrCpy $CreateDesktopIcon "false"
711 StrCpy $CreateFileAssociations "false"
714 # Show banner while installer is intializating
715 Banner::show /NOUNLOAD "Checking system"
720 #!if ${SETUPTYPE} == BUNDLE
721 # # don't let the installer sections appear when the programs are already installed
722 # ${if} $PathBibTeXEditor != ""
723 # SectionSetText 3 "" # hides the corresponding uninstaller section, ${SecInstJabRef}
727 # select sections of already installed spell-checker dictionaries, make them read-only
728 # and set the necessary size to 0 bytes
729 StrCpy $String $FoundDict
730 StrCpy $Search "af_ZA"
731 Call StrPoint # function from LyXUtils.nsh
732 ${if} $Pointer != "-1"
733 IntOp $0 ${SF_SELECTED} | ${SF_RO}
734 SectionSetFlags ${SecDAfrikaans} $0
735 SectionSetSize ${SecDAfrikaans} 0
737 StrCpy $Search "ar_DZ"
739 ${if} $Pointer != "-1"
740 IntOp $0 ${SF_SELECTED} | ${SF_RO}
741 SectionSetFlags ${SecDArabic} $0
742 SectionSetSize ${SecDArabic} 0
744 StrCpy $Search "hy_AM"
746 ${if} $Pointer != "-1"
747 IntOp $0 ${SF_SELECTED} | ${SF_RO}
748 SectionSetFlags ${SecDArmenian} $0
749 SectionSetSize ${SecDArmenian} 0
751 StrCpy $Search "id_ID"
753 ${if} $Pointer != "-1"
754 IntOp $0 ${SF_SELECTED} | ${SF_RO}
755 SectionSetFlags ${SecDIndonesian} $0
756 SectionSetSize ${SecDIndonesian} 0
758 StrCpy $Search "ms_MY"
760 ${if} $Pointer != "-1"
761 IntOp $0 ${SF_SELECTED} | ${SF_RO}
762 SectionSetFlags ${SecDMalayan} $0
763 SectionSetSize ${SecDMalayan} 0
765 StrCpy $Search "be_BY"
767 ${if} $Pointer != "-1"
768 IntOp $0 ${SF_SELECTED} | ${SF_RO}
769 SectionSetFlags ${SecDBelarusian} $0
770 SectionSetSize ${SecDBelarusian} 0
772 StrCpy $Search "br_FR"
774 ${if} $Pointer != "-1"
775 IntOp $0 ${SF_SELECTED} | ${SF_RO}
776 SectionSetFlags ${SecDBreton} $0
777 SectionSetSize ${SecDBreton} 0
779 StrCpy $Search "bg_BG"
781 ${if} $Pointer != "-1"
782 IntOp $0 ${SF_SELECTED} | ${SF_RO}
783 SectionSetFlags ${SecDBulgarian} $0
784 SectionSetSize ${SecDBulgarian} 0
786 StrCpy $Search "ca_ES"
788 ${if} $Pointer != "-1"
789 IntOp $0 ${SF_SELECTED} | ${SF_RO}
790 SectionSetFlags ${SecDCatalanian} $0
791 SectionSetSize ${SecDCatalanian} 0
793 StrCpy $Search "cs_CZ"
795 ${if} $Pointer != "-1"
796 IntOp $0 ${SF_SELECTED} | ${SF_RO}
797 SectionSetFlags ${SecDCzech} $0
798 SectionSetSize ${SecDCzech} 0
801 StrCpy $Search "cop_EG"
803 ${if} $Pointer != "-1"
804 IntOp $0 ${SF_SELECTED} | ${SF_RO}
805 SectionSetFlags ${SecDCoptic} $0
806 SectionSetSize ${SecDCoptic} 0
808 StrCpy $Search "cy_GB"
810 ${if} $Pointer != "-1"
811 IntOp $0 ${SF_SELECTED} | ${SF_RO}
812 SectionSetFlags ${SecDWelsh} $0
813 SectionSetSize ${SecDWelsh} 0
815 StrCpy $Search "da_DK"
817 ${if} $Pointer != "-1"
818 IntOp $0 ${SF_SELECTED} | ${SF_RO}
819 SectionSetFlags ${SecDDanish} $0
820 SectionSetSize ${SecDDanish} 0
822 StrCpy $Search "de_AT"
824 ${if} $Pointer != "-1"
825 IntOp $0 ${SF_SELECTED} | ${SF_RO}
826 SectionSetFlags ${SecDGermanAT} $0
827 SectionSetSize ${SecDGermanAT} 0
829 StrCpy $Search "de_CH"
831 ${if} $Pointer != "-1"
832 IntOp $0 ${SF_SELECTED} | ${SF_RO}
833 SectionSetFlags ${SecDGermanCH} $0
834 SectionSetSize ${SecDGermanCH} 0
836 StrCpy $Search "de_DE"
838 ${if} $Pointer != "-1"
839 IntOp $0 ${SF_SELECTED} | ${SF_RO}
840 SectionSetFlags ${SecDGermanD} $0
841 SectionSetSize ${SecDGermanD} 0
843 StrCpy $Search "el_GR"
845 ${if} $Pointer != "-1"
846 IntOp $0 ${SF_SELECTED} | ${SF_RO}
847 SectionSetFlags ${SecDGreek} $0
848 SectionSetSize ${SecDGreek} 0
850 StrCpy $Search "et_EE"
852 ${if} $Pointer != "-1"
853 IntOp $0 ${SF_SELECTED} | ${SF_RO}
854 SectionSetFlags ${SecDEstonian} $0
855 SectionSetSize ${SecDEstonian} 0
857 StrCpy $Search "en_AU"
859 ${if} $Pointer != "-1"
860 IntOp $0 ${SF_SELECTED} | ${SF_RO}
861 SectionSetFlags ${SecDEnglishAU} $0
862 SectionSetSize ${SecDEnglishAU} 0
864 StrCpy $Search "en_CA"
866 ${if} $Pointer != "-1"
867 IntOp $0 ${SF_SELECTED} | ${SF_RO}
868 SectionSetFlags ${SecDEnglishCA} $0
869 SectionSetSize ${SecDEnglishCA} 0
871 StrCpy $Search "en_GB"
873 ${if} $Pointer != "-1"
874 IntOp $0 ${SF_SELECTED} | ${SF_RO}
875 SectionSetFlags ${SecDEnglishGB} $0
876 SectionSetSize ${SecDEnglishGB} 0
878 StrCpy $Search "en_NZ"
880 ${if} $Pointer != "-1"
881 IntOp $0 ${SF_SELECTED} | ${SF_RO}
882 SectionSetFlags ${SecDEnglishNZ} $0
883 SectionSetSize ${SecDEnglishNZ} 0
885 StrCpy $Search "en_US"
887 ${if} $Pointer != "-1"
888 IntOp $0 ${SF_SELECTED} | ${SF_RO}
889 SectionSetFlags ${SecDEnglishUS} $0
890 SectionSetSize ${SecDEnglishUS} 0
892 StrCpy $Search "es_ES"
894 ${if} $Pointer != "-1"
895 IntOp $0 ${SF_SELECTED} | ${SF_RO}
896 SectionSetFlags ${SecDSpanishES} $0
897 SectionSetSize ${SecDSpanishES} 0
899 StrCpy $Search "es_MX"
901 ${if} $Pointer != "-1"
902 IntOp $0 ${SF_SELECTED} | ${SF_RO}
903 SectionSetFlags ${SecDSpanishMX} $0
904 SectionSetSize ${SecDSpanishMX} 0
906 StrCpy $Search "eo_EO"
908 ${if} $Pointer != "-1"
909 IntOp $0 ${SF_SELECTED} | ${SF_RO}
910 SectionSetFlags ${SecDEsperanto} $0
911 SectionSetSize ${SecDEsperanto} 0
913 StrCpy $Search "eu_ES"
915 ${if} $Pointer != "-1"
916 IntOp $0 ${SF_SELECTED} | ${SF_RO}
917 SectionSetFlags ${SecDBasque} $0
918 SectionSetSize ${SecDBasque} 0
920 StrCpy $Search "fa_IR"
922 ${if} $Pointer != "-1"
923 IntOp $0 ${SF_SELECTED} | ${SF_RO}
924 SectionSetFlags ${SecDFarsi} $0
925 SectionSetSize ${SecDFarsi} 0
927 StrCpy $Search "fr_CA"
929 ${if} $Pointer != "-1"
930 IntOp $0 ${SF_SELECTED} | ${SF_RO}
931 SectionSetFlags ${SecDFrenchCanada} $0
932 SectionSetSize ${SecDFrenchCanada} 0
934 StrCpy $Search "fr_FR"
936 ${if} $Pointer != "-1"
937 IntOp $0 ${SF_SELECTED} | ${SF_RO}
938 SectionSetFlags ${SecDFrench} $0
939 SectionSetSize ${SecDFrench} 0
941 StrCpy $Search "ga_IR"
943 ${if} $Pointer != "-1"
944 IntOp $0 ${SF_SELECTED} | ${SF_RO}
945 SectionSetFlags ${SecDGaelic} $0
946 SectionSetSize ${SecDGaelic} 0
948 StrCpy $Search "gd_GB"
950 ${if} $Pointer != "-1"
951 IntOp $0 ${SF_SELECTED} | ${SF_RO}
952 SectionSetFlags ${SecDScottish} $0
953 SectionSetSize ${SecDScottish} 0
955 StrCpy $Search "gl_ES"
957 ${if} $Pointer != "-1"
958 IntOp $0 ${SF_SELECTED} | ${SF_RO}
959 SectionSetFlags ${SecDGalician} $0
960 SectionSetSize ${SecDGalician} 0
962 StrCpy $Search "he_IL"
964 ${if} $Pointer != "-1"
965 IntOp $0 ${SF_SELECTED} | ${SF_RO}
966 SectionSetFlags ${SecDHebrew} $0
967 SectionSetSize ${SecDHebrew} 0
969 StrCpy $Search "hi_IN"
971 ${if} $Pointer != "-1"
972 IntOp $0 ${SF_SELECTED} | ${SF_RO}
973 SectionSetFlags ${SecDHindi} $0
974 SectionSetSize ${SecDHindi} 0
976 StrCpy $Search "hr_HR"
978 ${if} $Pointer != "-1"
979 IntOp $0 ${SF_SELECTED} | ${SF_RO}
980 SectionSetFlags ${SecDCroatian} $0
981 SectionSetSize ${SecDCroatian} 0
983 StrCpy $Search "hu_HU"
985 ${if} $Pointer != "-1"
986 IntOp $0 ${SF_SELECTED} | ${SF_RO}
987 SectionSetFlags ${SecDHungarian} $0
988 SectionSetSize ${SecDHungarian} 0
990 StrCpy $Search "ia_IA"
992 ${if} $Pointer != "-1"
993 IntOp $0 ${SF_SELECTED} | ${SF_RO}
994 SectionSetFlags ${SecDInterlingua} $0
995 SectionSetSize ${SecDInterlingua} 0
997 StrCpy $Search "is_IS"
999 ${if} $Pointer != "-1"
1000 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1001 SectionSetFlags ${SecDIcelandic} $0
1002 SectionSetSize ${SecDIcelandic} 0
1004 StrCpy $Search "it_IT"
1006 ${if} $Pointer != "-1"
1007 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1008 SectionSetFlags ${SecDItalian} $0
1009 SectionSetSize ${SecDItalian} 0
1011 StrCpy $Search "kk_KZ"
1013 ${if} $Pointer != "-1"
1014 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1015 SectionSetFlags ${SecDKazakh} $0
1016 SectionSetSize ${SecDKazakh} 0
1018 StrCpy $Search "ko_KR"
1020 ${if} $Pointer != "-1"
1021 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1022 SectionSetFlags ${SecDKorean} $0
1023 SectionSetSize ${SecDKorean} 0
1025 StrCpy $Search "la_LA"
1027 ${if} $Pointer != "-1"
1028 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1029 SectionSetFlags ${SecDLatin} $0
1030 SectionSetSize ${SecDLatin} 0
1032 StrCpy $Search "lt_LT"
1034 ${if} $Pointer != "-1"
1035 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1036 SectionSetFlags ${SecDLithuanian} $0
1037 SectionSetSize ${SecDLithuanian} 0
1039 StrCpy $Search "lv_LV"
1041 ${if} $Pointer != "-1"
1042 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1043 SectionSetFlags ${SecDLatvian} $0
1044 SectionSetSize ${SecDLatvian} 0
1046 StrCpy $Search "mr_IN"
1048 ${if} $Pointer != "-1"
1049 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1050 SectionSetFlags ${SecDMarathi} $0
1051 SectionSetSize ${SecDMarathi} 0
1053 StrCpy $Search "nl_NL"
1055 ${if} $Pointer != "-1"
1056 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1057 SectionSetFlags ${SecDDutch} $0
1058 SectionSetSize ${SecDDutch} 0
1060 StrCpy $Search "nb_NO"
1062 ${if} $Pointer != "-1"
1063 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1064 SectionSetFlags ${SecDNorwegianNB} $0
1065 SectionSetSize ${SecDNorwegianNB} 0
1067 StrCpy $Search "nn_NO"
1069 ${if} $Pointer != "-1"
1070 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1071 SectionSetFlags ${SecDNorwegianNN} $0
1072 SectionSetSize ${SecDNorwegianNN} 0
1074 StrCpy $Search "oc_FR"
1076 ${if} $Pointer != "-1"
1077 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1078 SectionSetFlags ${SecDOccitan} $0
1079 SectionSetSize ${SecDOccitan} 0
1081 StrCpy $Search "pl_PL"
1083 ${if} $Pointer != "-1"
1084 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1085 SectionSetFlags ${SecDPolish} $0
1086 SectionSetSize ${SecDPolish} 0
1088 StrCpy $Search "pt_BR"
1090 ${if} $Pointer != "-1"
1091 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1092 SectionSetFlags ${SecDPortugueseBR} $0
1093 SectionSetSize ${SecDPortugueseBR} 0
1095 StrCpy $Search "pt_PT"
1097 ${if} $Pointer != "-1"
1098 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1099 SectionSetFlags ${SecDPortuguesePT} $0
1100 SectionSetSize ${SecDPortuguesePT} 0
1102 StrCpy $Search "ro_RO"
1104 ${if} $Pointer != "-1"
1105 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1106 SectionSetFlags ${SecDRomanian} $0
1107 SectionSetSize ${SecDRomanian} 0
1109 StrCpy $Search "ru_RU"
1111 ${if} $Pointer != "-1"
1112 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1113 SectionSetFlags ${SecDRussian} $0
1114 SectionSetSize ${SecDRussian} 0
1116 StrCpy $Search "dsb_DE"
1118 ${if} $Pointer != "-1"
1119 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1120 SectionSetFlags ${SecDSorbianD} $0
1121 SectionSetSize ${SecDSorbianD} 0
1123 StrCpy $Search "hsb_DE"
1125 ${if} $Pointer != "-1"
1126 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1127 SectionSetFlags ${SecDSorbianH} $0
1128 SectionSetSize ${SecDSorbianH} 0
1130 StrCpy $Search "sq_AL"
1132 ${if} $Pointer != "-1"
1133 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1134 SectionSetFlags ${SecDAlbanian} $0
1135 SectionSetSize ${SecDAlbanian} 0
1137 StrCpy $Search "sl_SI"
1139 ${if} $Pointer != "-1"
1140 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1141 SectionSetFlags ${SecDSlovenian} $0
1142 SectionSetSize ${SecDSlovenian} 0
1144 StrCpy $Search "sk_SK"
1146 ${if} $Pointer != "-1"
1147 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1148 SectionSetFlags ${SecDSlovakian} $0
1149 SectionSetSize ${SecDSlovakian} 0
1151 StrCpy $Search "sr_RS"
1153 ${if} $Pointer != "-1"
1154 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1155 SectionSetFlags ${SecDSerbianC} $0
1156 SectionSetSize ${SecDSerbianC} 0
1158 StrCpy $Search "sr_RS-Latin"
1160 ${if} $Pointer != "-1"
1161 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1162 SectionSetFlags ${SecDSerbianL} $0
1163 SectionSetSize ${SecDSerbianL} 0
1165 StrCpy $Search "sv_SE"
1167 ${if} $Pointer != "-1"
1168 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1169 SectionSetFlags ${SecDSwedish} $0
1170 SectionSetSize ${SecDSwedish} 0
1172 StrCpy $Search "ta_IN"
1174 ${if} $Pointer != "-1"
1175 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1176 SectionSetFlags ${SecDTamil} $0
1177 SectionSetSize ${SecDTamil} 0
1179 StrCpy $Search "te_IN"
1181 ${if} $Pointer != "-1"
1182 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1183 SectionSetFlags ${SecDTelugu} $0
1184 SectionSetSize ${SecDTelugu} 0
1186 StrCpy $Search "th_TH"
1188 ${if} $Pointer != "-1"
1189 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1190 SectionSetFlags ${SecDThai} $0
1191 SectionSetSize ${SecDThai} 0
1193 StrCpy $Search "bo_CN"
1195 ${if} $Pointer != "-1"
1196 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1197 SectionSetFlags ${SecDTibetan} $0
1198 SectionSetSize ${SecDTibetan} 0
1200 StrCpy $Search "tk_TM"
1202 ${if} $Pointer != "-1"
1203 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1204 SectionSetFlags ${SecDTurkmen} $0
1205 SectionSetSize ${SecDTurkmen} 0
1207 StrCpy $Search "tr_TR"
1209 ${if} $Pointer != "-1"
1210 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1211 SectionSetFlags ${SecDTurkish} $0
1212 SectionSetSize ${SecDTurkish} 0
1214 StrCpy $Search "uk_UA"
1216 ${if} $Pointer != "-1"
1217 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1218 SectionSetFlags ${SecDUkrainian} $0
1219 SectionSetSize ${SecDUkrainian} 0
1221 StrCpy $Search "ur_PK"
1223 ${if} $Pointer != "-1"
1224 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1225 SectionSetFlags ${SecDUrdu} $0
1226 SectionSetSize ${SecDUrdu} 0
1228 StrCpy $Search "vi_VN"
1230 ${if} $Pointer != "-1"
1231 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1232 SectionSetFlags ${SecDVietnamese} $0
1233 SectionSetSize ${SecDVietnamese} 0
1236 # select sections of already installed thesaurus dictionaries, make them read-only
1237 # and set the necessary size to 0 bytes
1238 StrCpy $String $FoundThes
1239 StrCpy $Search "bg_BG"
1240 Call StrPoint # function from LyXUtils.nsh
1241 ${if} $Pointer != "-1"
1242 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1243 SectionSetFlags ${SecTBulgarian} $0
1244 SectionSetSize ${SecTBulgarian} 0
1246 StrCpy $Search "ca_ES"
1248 ${if} $Pointer != "-1"
1249 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1250 SectionSetFlags ${SecTCatalan} $0
1251 SectionSetSize ${SecTCatalan} 0
1253 StrCpy $Search "cs_CZ"
1255 ${if} $Pointer != "-1"
1256 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1257 SectionSetFlags ${SecTCzech} $0
1258 SectionSetSize ${SecTCzech} 0
1260 StrCpy $Search "da_DK"
1262 ${if} $Pointer != "-1"
1263 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1264 SectionSetFlags ${SecTDanish} $0
1265 SectionSetSize ${SecTDanish} 0
1267 StrCpy $Search "de_DE"
1269 ${if} $Pointer != "-1"
1270 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1271 SectionSetFlags ${SecTGermanDA} $0
1272 SectionSetSize ${SecTGermanDA} 0
1274 StrCpy $Search "de_CH"
1276 ${if} $Pointer != "-1"
1277 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1278 SectionSetFlags ${SecTGermanCH} $0
1279 SectionSetSize ${SecTGermanCH} 0
1281 StrCpy $Search "en_AU"
1283 ${if} $Pointer != "-1"
1284 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1285 SectionSetFlags ${SecTEnglishAU} $0
1286 SectionSetSize ${SecTEnglishAU} 0
1288 StrCpy $Search "en_GB"
1290 ${if} $Pointer != "-1"
1291 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1292 SectionSetFlags ${SecTEnglishGB} $0
1293 SectionSetSize ${SecTEnglishGB} 0
1295 StrCpy $Search "en_US"
1297 ${if} $Pointer != "-1"
1298 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1299 SectionSetFlags ${SecTEnglishUS} $0
1300 SectionSetSize ${SecTEnglishUS} 0
1302 StrCpy $Search "es_ES"
1304 ${if} $Pointer != "-1"
1305 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1306 SectionSetFlags ${SecTSpanish} $0
1307 SectionSetSize ${SecTSpanish} 0
1309 StrCpy $Search "fr_FR"
1311 ${if} $Pointer != "-1"
1312 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1313 SectionSetFlags ${SecTFrench} $0
1314 SectionSetSize ${SecTFrench} 0
1316 StrCpy $Search "ga_IR"
1318 ${if} $Pointer != "-1"
1319 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1320 SectionSetFlags ${SecTGaelic} $0
1321 SectionSetSize ${SecTGaelic} 0
1323 StrCpy $Search "gl_ES"
1325 ${if} $Pointer != "-1"
1326 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1327 SectionSetFlags ${SecTGalician} $0
1328 SectionSetSize ${SecTGalician} 0
1330 StrCpy $Search "el_GR"
1332 ${if} $Pointer != "-1"
1333 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1334 SectionSetFlags ${SecTGreek} $0
1335 SectionSetSize ${SecTGreek} 0
1337 StrCpy $Search "is_IS"
1339 ${if} $Pointer != "-1"
1340 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1341 SectionSetFlags ${SecTIcelandic} $0
1342 SectionSetSize ${SecTIcelandic} 0
1344 StrCpy $Search "it_IT"
1346 ${if} $Pointer != "-1"
1347 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1348 SectionSetFlags ${SecTItalian} $0
1349 SectionSetSize ${SecTItalian} 0
1351 StrCpy $Search "hu_HU"
1353 ${if} $Pointer != "-1"
1354 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1355 SectionSetFlags ${SecTHungarian} $0
1356 SectionSetSize ${SecTHungarian} 0
1358 StrCpy $Search "nb_NO"
1360 ${if} $Pointer != "-1"
1361 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1362 SectionSetFlags ${SecTNorwegianNB} $0
1363 SectionSetSize ${SecTNorwegianNB} 0
1365 StrCpy $Search "nn_NO"
1367 ${if} $Pointer != "-1"
1368 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1369 SectionSetFlags ${SecTNorwegianNN} $0
1370 SectionSetSize ${SecTNorwegianNN} 0
1372 StrCpy $Search "pl_PL"
1374 ${if} $Pointer != "-1"
1375 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1376 SectionSetFlags ${SecTPolish} $0
1377 SectionSetSize ${SecTPolish} 0
1379 StrCpy $Search "pt_PT"
1381 ${if} $Pointer != "-1"
1382 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1383 SectionSetFlags ${SecTPortuguese} $0
1384 SectionSetSize ${SecTPortuguese} 0
1386 StrCpy $Search "ro_RO"
1388 ${if} $Pointer != "-1"
1389 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1390 SectionSetFlags ${SecTRomanian} $0
1391 SectionSetSize ${SecTRomanian} 0
1393 StrCpy $Search "ru_RU"
1395 ${if} $Pointer != "-1"
1396 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1397 SectionSetFlags ${SecTRussian} $0
1398 SectionSetSize ${SecTRussian} 0
1400 StrCpy $Search "sl_SI"
1402 ${if} $Pointer != "-1"
1403 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1404 SectionSetFlags ${SecTSlovenian} $0
1405 SectionSetSize ${SecTSlovenian} 0
1407 StrCpy $Search "sk_SK"
1409 ${if} $Pointer != "-1"
1410 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1411 SectionSetFlags ${SecTSlovakian} $0
1412 SectionSetSize ${SecTSlovakian} 0
1414 StrCpy $Search "sv_SE"
1416 ${if} $Pointer != "-1"
1417 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1418 SectionSetFlags ${SecTSwedish} $0
1419 SectionSetSize ${SecTSwedish} 0
1421 StrCpy $Search "uk_UA"
1423 ${if} $Pointer != "-1"
1424 IntOp $0 ${SF_SELECTED} | ${SF_RO}
1425 SectionSetFlags ${SecTUkrainian} $0
1426 SectionSetSize ${SecTUkrainian} 0
1435 # this function is called at first after starting the uninstaller
1438 !insertmacro MULTIUSER_UNINIT
1440 # Check that LyX is not currently running
1441 FindProcDLL::FindProc "lyx.exe"
1443 MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK
1447 # set registry root key
1448 ${if} $MultiUser.Privileges == "Admin"
1449 ${orif} $MultiUser.Privileges == "Power"
1450 SetShellVarContext all
1452 SetShellVarContext current
1455 # Ascertain whether the user has sufficient privileges to uninstall.
1456 # abort when LyX was installed with admin permissions but the user doesn't have administrator privileges
1457 ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "DisplayVersion"
1459 ${andif} $MultiUser.Privileges != "Admin"
1460 ${andif} $MultiUser.Privileges != "Power"
1461 MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)" /SD IDOK
1464 # warning when LyX couldn't be found in the registry
1465 ${if} $0 == "" # check in HKCU
1466 ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion"
1468 MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)" /SD IDOK
1472 # Macro to investigate name of LyX's preferences folders to be able remove them
1473 !insertmacro UnAppPreSuff $AppPre $AppSuff # macro from LyXUtils.nsh
1475 # test if MiKTeX was installed together with LyX
1476 ReadRegStr $0 SHCTX "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
1477 ${if} $0 == "Yes${APP_SERIES_KEY}"
1478 SectionSetText 2 "MiKTeX" # names the corersponding uninstaller section
1479 StrCpy $LaTeXInstalled "MiKTeX"
1481 SectionSetText 2 "" # hides the corresponding uninstaller section
1484 # question message if the user really wants to uninstall LyX
1485 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(UnReallyRemoveLabel)" /SD IDYES IDYES +2 # continue if yes