mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
installer: updates to dictionary handling
- settings.nsh: update to LyX 2.0.5 - thesaurus.nsh: - don't download already existing dictionaries when installing over an existing LyX installation - the list of available dictionaries is 120 - detection: - detect existing dictionaries - fix detection of Gimp and Photoshop - init.nsh: detect existing dictionaries and modify the list of available dictionaries accordingly in the installer sections
This commit is contained in:
parent
f6a0356a5f
commit
eac5840040
@ -11,11 +11,14 @@ Detection of external component locations
|
||||
# - SearchExternal, calls the functions:
|
||||
# LaTeXActions
|
||||
# MissingPrograms
|
||||
# FindDictionaries
|
||||
#
|
||||
# - MissingPrograms, (check if third-party programs are installed), uses:
|
||||
# SEARCH_MIKTEX
|
||||
# SEARCH_TEXLIVE
|
||||
#
|
||||
# - FindDictionaries (finds installed spellcheck and thesaurus dictionaries)
|
||||
#
|
||||
# - EditorCheck,
|
||||
# (test if an editor with syntax-highlighting for LaTeX-files is installed)
|
||||
#
|
||||
@ -27,6 +30,7 @@ Detection of external component locations
|
||||
Function SearchExternal
|
||||
Call LaTeXActions # function from LaTeX.nsh
|
||||
Call MissingPrograms
|
||||
Call FindDictionaries
|
||||
FunctionEnd
|
||||
|
||||
# ---------------------------------------
|
||||
@ -92,21 +96,23 @@ Function MissingPrograms
|
||||
|
||||
# test if an image editor is installed
|
||||
StrCpy $ImageEditorPath ""
|
||||
ReadRegStr $ImageEditorPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinGimp-2.0_is1" "DisplayIcon"
|
||||
ReadRegStr $ImageEditorPath HKLM "Software\Classes\GIMP-2.8-xcf\shell\open\command" ""
|
||||
${if} $ImageEditorPath != ""
|
||||
StrCpy $ImageEditorPath "$ImageEditorPath" -13 # delete "\gimp-2.x.exe"
|
||||
StrCpy $ImageEditorPath "$ImageEditorPath" -19 # delete '\gimp-2.x.exe" "%1"'
|
||||
StrCpy $ImageEditorPath $ImageEditorPath "" 1 # remove the leading quote
|
||||
${endif}
|
||||
# check for Photoshop
|
||||
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\Photoshop.exe" "Path"
|
||||
ReadRegStr $0 HKLM "Software\Classes\Applications\Photoshop.exe\shell\open\command" ""
|
||||
${if} $0 != ""
|
||||
StrCpy $0 "$0" -1 # delete the last "\"
|
||||
StrCpy $0 "$0" -20 # delete '\photoshop.exe" "%1"'
|
||||
StrCpy $0 $0 "" 1 # remove the leading quote
|
||||
${if} $ImageEditorPath != ""
|
||||
StrCpy $ImageEditorPath "$ImageEditorPath;$0"
|
||||
${else}
|
||||
StrCpy $ImageEditorPath $0
|
||||
${endif}
|
||||
${endif}
|
||||
|
||||
|
||||
# test if and where the BibTeX-editor JabRef is installed
|
||||
ReadRegStr $PathBibTeXEditor HKCU "Software\JabRef" "Path"
|
||||
${if} $PathBibTeXEditor == ""
|
||||
@ -129,9 +135,6 @@ Function MissingPrograms
|
||||
# test if Inkscape is installed
|
||||
ReadRegStr $SVGPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Inkscape" "InstallLocation"
|
||||
|
||||
# test if metafile2eps is installed
|
||||
ReadRegStr $WMFPath HKLM "Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\Metafile to EPS Converter" "Name"
|
||||
|
||||
# test if Gnumeric is installed
|
||||
ReadRegStr $0 HKLM "Software\Classes\Applications\gnumeric.exe\shell\Open\command" ""
|
||||
${if} $0 != ""
|
||||
@ -144,6 +147,56 @@ FunctionEnd
|
||||
|
||||
# ---------------------------------------
|
||||
|
||||
Function FindDictionaries
|
||||
# find the installed dictionaries
|
||||
|
||||
# start with empty strings
|
||||
StrCpy $FoundDict ""
|
||||
StrCpy $FoundThes ""
|
||||
|
||||
# read out the possible spell-checker filenames from the file
|
||||
FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r
|
||||
${for} $5 1 60
|
||||
# the file has 120 lines, but we only need to check for one of the 2 dictionary files per language
|
||||
# therefore check only for every second line
|
||||
FileRead $R5 $String # $String is now the dictionary name
|
||||
FileRead $R5 $String # $String is now the dictionary name
|
||||
StrCpy $String $String -2 # remove the linebreak characters
|
||||
StrCpy $R3 $String -4 # $R3 is now the dictionary language code
|
||||
# we have 2 cases where we renamed the file to a 3 letter code, see thesaurus.nsh
|
||||
${if} $String == "db_DE.dic"
|
||||
StrCpy $String "dsb_DE.dic"
|
||||
${endif}
|
||||
${if} $String == "hb_DE.dic"
|
||||
StrCpy $String "hsb_DE.dic"
|
||||
${endif}
|
||||
!insertmacro FileCheck $4 $String "$INSTDIR\Resources\dicts" # macro from LyXUtils.nsh
|
||||
${if} $4 == "True"
|
||||
StrCpy $FoundDict "$R3 $FoundDict"
|
||||
${endif}
|
||||
${next}
|
||||
FileClose $R5
|
||||
|
||||
# read out the possible thesaurus filenames from the file
|
||||
FileOpen $R5 "$INSTDIR\Resources\ThesaurusDictionaryNames.txt" r
|
||||
${for} $5 1 22
|
||||
# the file has 44 lines, but we only need to check for one of the 2 dictionary files per language
|
||||
# therefore check only for every second line
|
||||
FileRead $R5 $String # $String is now the dictionary name
|
||||
FileRead $R5 $String # $String is now the dictionary name
|
||||
StrCpy $String $String -2 # remove the linebreak characters
|
||||
StrCpy $R3 $String 5 3 # $R3 is now the dictionary language code
|
||||
!insertmacro FileCheck $4 $String "$INSTDIR\Resources\thes" # macro from LyXUtils.nsh
|
||||
${if} $4 == "True"
|
||||
StrCpy $FoundThes "$R3 $FoundThes"
|
||||
${endif}
|
||||
${next}
|
||||
FileClose $R5
|
||||
|
||||
FunctionEnd
|
||||
|
||||
# ---------------------------------------
|
||||
|
||||
Function EditorCheck
|
||||
# test if an editor with syntax-highlighting for LaTeX-files is installed
|
||||
|
||||
|
@ -6,152 +6,6 @@ Initialization function
|
||||
|
||||
*/
|
||||
|
||||
#--------------------------------
|
||||
# Installer initialization
|
||||
|
||||
!macro PRINTER_INIT
|
||||
|
||||
${If} ${AtLeastWinVista}
|
||||
StrCpy $PrinterConf "printui.exe"
|
||||
${Else}
|
||||
StrCpy $PrinterConf "rundll32.exe printui.dll,PrintUIEntry"
|
||||
${EndIf}
|
||||
|
||||
!macroend
|
||||
|
||||
Function .onInit
|
||||
|
||||
${IfNot} ${IsNT}
|
||||
${OrIfNot} ${AtLeastWinXP}
|
||||
MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows XP or later."
|
||||
Quit
|
||||
${EndIf}
|
||||
|
||||
# check that the installer is not currently running
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${BundleExeFile}.Instance") i .r1 ?e'
|
||||
Pop $R0
|
||||
${if} $R0 != "0"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
|
||||
Abort
|
||||
${endif}
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${ExeFile}.Instance") i .r1 ?e'
|
||||
Pop $R0
|
||||
${if} $R0 != "0"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
|
||||
Abort
|
||||
${endif}
|
||||
|
||||
# check if LyX is already installed
|
||||
${if} $MultiUser.Privileges == "Admin"
|
||||
${orif} $MultiUser.Privileges == "Power"
|
||||
ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "Publisher"
|
||||
${else}
|
||||
ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "Publisher"
|
||||
# handle also the case that LyX is already installed in HKLM
|
||||
${if} $0 == ""
|
||||
ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "Publisher"
|
||||
${endif}
|
||||
${endif}
|
||||
${if} $0 != ""
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
|
||||
Abort
|
||||
${endif}
|
||||
|
||||
!insertmacro PRINTER_INIT
|
||||
!insertmacro MULTIUSER_INIT
|
||||
|
||||
# this can be reset to "true" in section SecDesktop
|
||||
StrCpy $CreateDesktopIcon "false"
|
||||
StrCpy $CreateFileAssociations "false"
|
||||
|
||||
${IfNot} ${Silent}
|
||||
# Show banner while installer is intializating
|
||||
Banner::show /NOUNLOAD "Checking system"
|
||||
${EndIf}
|
||||
|
||||
Call SearchExternal
|
||||
#Call InitExternal
|
||||
|
||||
!if ${SETUPTYPE} == BUNDLE
|
||||
# don't let the installer sections appear when the programs are already installed
|
||||
${if} $PathBibTeXEditor != ""
|
||||
SectionSetText 3 "" # hides the corresponding uninstaller section, ${SecInstJabRef}
|
||||
${endif}
|
||||
!endif
|
||||
|
||||
${IfNot} ${Silent}
|
||||
Banner::destroy
|
||||
${EndIf}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
# this function is called at first after starting the uninstaller
|
||||
Function un.onInit
|
||||
|
||||
!insertmacro PRINTER_INIT
|
||||
!insertmacro MULTIUSER_UNINIT
|
||||
|
||||
# Check that LyX is not currently running
|
||||
FindProcDLL::FindProc "lyx.exe"
|
||||
${if} $R0 == "1"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)"
|
||||
Abort
|
||||
${endif}
|
||||
|
||||
# set registry root key
|
||||
${if} $MultiUser.Privileges == "Admin"
|
||||
${orif} $MultiUser.Privileges == "Power"
|
||||
SetShellVarContext all
|
||||
${else}
|
||||
SetShellVarContext current
|
||||
${endif}
|
||||
|
||||
# Ascertain whether the user has sufficient privileges to uninstall.
|
||||
# abort when LyX was installed with admin permissions but the user doesn't have administrator privileges
|
||||
ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "DisplayVersion"
|
||||
${if} $0 != ""
|
||||
${andif} $MultiUser.Privileges != "Admin"
|
||||
${andif} $MultiUser.Privileges != "Power"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)"
|
||||
Abort
|
||||
${endif}
|
||||
# abort when LyX couldn't be found in the registry
|
||||
${if} $0 == "" # check in HKCU
|
||||
ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion"
|
||||
${if} $0 == ""
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)"
|
||||
${endif}
|
||||
${endif}
|
||||
|
||||
# Macro to investigate name of LyX's preferences folders to be able remove them
|
||||
!insertmacro UnAppPreSuff $AppPre $AppSuff # macro from LyXUtils.nsh
|
||||
|
||||
# test if MiKTeX was installed together with LyX
|
||||
ReadRegStr $0 HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
|
||||
${if} $0 == "Yes${APP_SERIES_KEY}"
|
||||
SectionSetText 2 "MiKTeX" # names the corersponding uninstaller section
|
||||
StrCpy $LaTeXInstalled "MiKTeX"
|
||||
DeleteRegValue HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
|
||||
${else}
|
||||
SectionSetText 2 "" # hides the corresponding uninstaller section
|
||||
${endif}
|
||||
|
||||
# test if JabRef was installed together with LyX
|
||||
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
|
||||
${if} $0 == "Yes${APP_SERIES_KEY}"
|
||||
SectionSetText 3 "JabRef" # names the corersponding uninstaller section
|
||||
StrCpy $JabRefInstalled "Yes"
|
||||
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
|
||||
${else}
|
||||
SectionSetText 3 "" # hides the corresponding uninstaller section
|
||||
${endif}
|
||||
|
||||
# question message if the user really wants to uninstall LyX
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(UnReallyRemoveLabel)" IDYES +2 # continue if yes
|
||||
Abort
|
||||
|
||||
FunctionEnd
|
||||
|
||||
#--------------------------------
|
||||
# User initialization
|
||||
|
||||
@ -283,6 +137,7 @@ SectionEnd
|
||||
|
||||
Section "German (D)" SecDGermanD
|
||||
# already installed by default
|
||||
SectionIn RO
|
||||
#StrCpy $DictCodes "de_DE$DictCodes"
|
||||
AddSize 2650
|
||||
SectionEnd
|
||||
@ -310,6 +165,7 @@ SectionEnd
|
||||
|
||||
Section "English (GB)" SecDEnglishGB
|
||||
# already installed by default
|
||||
SectionIn RO
|
||||
#StrCpy $DictCodes "en_GB$DictCodes"
|
||||
AddSize 757
|
||||
SectionEnd
|
||||
@ -322,18 +178,21 @@ SectionEnd
|
||||
|
||||
Section "English (US)" SecDEnglishUS
|
||||
# already installed by default
|
||||
SectionIn RO
|
||||
#StrCpy $DictCodes "en_US$DictCodes"
|
||||
AddSize 688
|
||||
SectionEnd
|
||||
|
||||
Section "Español (ES)" SecDSpanishES
|
||||
# already installed by default
|
||||
SectionIn RO
|
||||
#StrCpy $DictCodes "es_ES$DictCodes"
|
||||
AddSize 974
|
||||
SectionEnd
|
||||
|
||||
Section "Español (MX)" SecDSpanishMX
|
||||
# already installed by default
|
||||
SectionIn RO
|
||||
#StrCpy $DictCodes "es_MX$DictCodes"
|
||||
AddSize 924
|
||||
SectionEnd
|
||||
@ -355,6 +214,7 @@ SectionEnd
|
||||
|
||||
Section "Français" SecDFrench
|
||||
# already installed by default
|
||||
SectionIn RO
|
||||
#StrCpy $DictCodes "fr_FR$DictCodes"
|
||||
AddSize 1200
|
||||
SectionEnd
|
||||
@ -464,9 +324,8 @@ Section /o "Rom
|
||||
AddSize 1930
|
||||
SectionEnd
|
||||
|
||||
Section "Russian" SecDRussian
|
||||
# already installed by default
|
||||
#StrCpy $DictCodes "ru_RU$DictCodes"
|
||||
Section /o "Russian" SecDRussian
|
||||
StrCpy $DictCodes "ru_RU$DictCodes"
|
||||
AddSize 1920
|
||||
SectionEnd
|
||||
|
||||
@ -646,3 +505,736 @@ SectionGroupEnd
|
||||
!endif
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
|
||||
#--------------------------------
|
||||
# Installer initialization
|
||||
|
||||
!macro PRINTER_INIT
|
||||
|
||||
${If} ${AtLeastWinVista}
|
||||
StrCpy $PrinterConf "printui.exe"
|
||||
${Else}
|
||||
StrCpy $PrinterConf "rundll32.exe printui.dll,PrintUIEntry"
|
||||
${EndIf}
|
||||
|
||||
!macroend
|
||||
|
||||
# .onInit must be here after the section definition because we have to set
|
||||
# the selection states of the dictionary sections
|
||||
Function .onInit
|
||||
|
||||
${IfNot} ${IsNT}
|
||||
${OrIfNot} ${AtLeastWinXP}
|
||||
MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows XP or later."
|
||||
Quit
|
||||
${EndIf}
|
||||
|
||||
# check that the installer is not currently running
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${BundleExeFile}.Instance") i .r1 ?e'
|
||||
Pop $R0
|
||||
${if} $R0 != "0"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
|
||||
Abort
|
||||
${endif}
|
||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${ExeFile}.Instance") i .r1 ?e'
|
||||
Pop $R0
|
||||
${if} $R0 != "0"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
|
||||
Abort
|
||||
${endif}
|
||||
|
||||
# check if this LyX version is already installed
|
||||
${if} $MultiUser.Privileges == "Admin"
|
||||
${orif} $MultiUser.Privileges == "Power"
|
||||
ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "Publisher"
|
||||
${else}
|
||||
ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "Publisher"
|
||||
# handle also the case that LyX is already installed in HKLM
|
||||
${if} $0 == ""
|
||||
ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "Publisher"
|
||||
${endif}
|
||||
${endif}
|
||||
${if} $0 != ""
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
|
||||
Abort
|
||||
${endif}
|
||||
|
||||
!insertmacro PRINTER_INIT
|
||||
!insertmacro MULTIUSER_INIT
|
||||
|
||||
# this can be reset to "true" in section SecDesktop
|
||||
StrCpy $CreateDesktopIcon "false"
|
||||
StrCpy $CreateFileAssociations "false"
|
||||
|
||||
${IfNot} ${Silent}
|
||||
# Show banner while installer is intializating
|
||||
Banner::show /NOUNLOAD "Checking system"
|
||||
${EndIf}
|
||||
|
||||
Call SearchExternal
|
||||
#Call InitExternal
|
||||
|
||||
!if ${SETUPTYPE} == BUNDLE
|
||||
# don't let the installer sections appear when the programs are already installed
|
||||
${if} $PathBibTeXEditor != ""
|
||||
SectionSetText 3 "" # hides the corresponding uninstaller section, ${SecInstJabRef}
|
||||
${endif}
|
||||
!endif
|
||||
|
||||
# select sections of already installed spell-checker dictionaries, make them read-only
|
||||
# and set the necessary size to 0 bytes
|
||||
StrCpy $String $FoundDict
|
||||
StrCpy $Search "af_ZA"
|
||||
Call StrPoint # function from LyXUtils.nsh
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDAfrikaans} $0
|
||||
SectionSetSize ${SecDAfrikaans} 0
|
||||
${endif}
|
||||
StrCpy $Search "ar_DZ"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDArabic} $0
|
||||
SectionSetSize ${SecDArabic} 0
|
||||
${endif}
|
||||
StrCpy $Search "hy_AM"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDArmenian} $0
|
||||
SectionSetSize ${SecDArmenian} 0
|
||||
${endif}
|
||||
StrCpy $Search "id_ID"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDIndonesian} $0
|
||||
SectionSetSize ${SecDIndonesian} 0
|
||||
${endif}
|
||||
StrCpy $Search "ms_MY"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDMalayan} $0
|
||||
SectionSetSize ${SecDMalayan} 0
|
||||
${endif}
|
||||
StrCpy $Search "be_BY"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDBelarusian} $0
|
||||
SectionSetSize ${SecDBelarusian} 0
|
||||
${endif}
|
||||
StrCpy $Search "br_FR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDBreton} $0
|
||||
SectionSetSize ${SecDBreton} 0
|
||||
${endif}
|
||||
StrCpy $Search "bg_BG"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDBulgarian} $0
|
||||
SectionSetSize ${SecDBulgarian} 0
|
||||
${endif}
|
||||
StrCpy $Search "ca_ES"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDCatalanian} $0
|
||||
SectionSetSize ${SecDCatalanian} 0
|
||||
${endif}
|
||||
StrCpy $Search "cs_CZ"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDCzech} $0
|
||||
SectionSetSize ${SecDCzech} 0
|
||||
${endif}
|
||||
StrCpy $Search "cy_GB"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDWelsh} $0
|
||||
SectionSetSize ${SecDWelsh} 0
|
||||
${endif}
|
||||
StrCpy $Search "da_DK"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDDanish} $0
|
||||
SectionSetSize ${SecDDanish} 0
|
||||
${endif}
|
||||
StrCpy $Search "de_AT"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDGermanAT} $0
|
||||
SectionSetSize ${SecDGermanAT} 0
|
||||
${endif}
|
||||
StrCpy $Search "de_CH"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDGermanCH} $0
|
||||
SectionSetSize ${SecDGermanCH} 0
|
||||
${endif}
|
||||
StrCpy $Search "de_DE"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDGermanD} $0
|
||||
SectionSetSize ${SecDGermanD} 0
|
||||
${endif}
|
||||
StrCpy $Search "el_GR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDGreek} $0
|
||||
SectionSetSize ${SecDGreek} 0
|
||||
${endif}
|
||||
StrCpy $Search "et_EE"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDEstonian} $0
|
||||
SectionSetSize ${SecDEstonian} 0
|
||||
${endif}
|
||||
StrCpy $Search "en_AU"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
# enable this for LyX 2.1!
|
||||
# SectionSetFlags ${SecDEnglishAU} $0
|
||||
# SectionSetSize ${SecDEnglishAU} 0
|
||||
${endif}
|
||||
StrCpy $Search "en_CA"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDEnglishCA} $0
|
||||
SectionSetSize ${SecDEnglishCA} 0
|
||||
${endif}
|
||||
StrCpy $Search "en_GB"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDEnglishGB} $0
|
||||
SectionSetSize ${SecDEnglishGB} 0
|
||||
${endif}
|
||||
StrCpy $Search "en_NZ"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
# enable this for LyX 2.1!
|
||||
# SectionSetFlags ${SecDEnglishNZ} $0
|
||||
# SectionSetSize ${SecDEnglishNZ} 0
|
||||
${endif}
|
||||
StrCpy $Search "en_US"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDEnglishUS} $0
|
||||
SectionSetSize ${SecDEnglishUS} 0
|
||||
${endif}
|
||||
StrCpy $Search "es_ES"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDSpanishES} $0
|
||||
SectionSetSize ${SecDSpanishES} 0
|
||||
${endif}
|
||||
StrCpy $Search "es_MX"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDSpanishMX} $0
|
||||
SectionSetSize ${SecDSpanishMX} 0
|
||||
${endif}
|
||||
StrCpy $Search "eo_EO"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDEsperanto} $0
|
||||
SectionSetSize ${SecDEsperanto} 0
|
||||
${endif}
|
||||
StrCpy $Search "eu_ES"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDBasque} $0
|
||||
SectionSetSize ${SecDBasque} 0
|
||||
${endif}
|
||||
StrCpy $Search "fa_IR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDFarsi} $0
|
||||
SectionSetSize ${SecDFarsi} 0
|
||||
${endif}
|
||||
StrCpy $Search "fr_FR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDFrench} $0
|
||||
SectionSetSize ${SecDFrench} 0
|
||||
${endif}
|
||||
StrCpy $Search "ga_IR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDGaelic} $0
|
||||
SectionSetSize ${SecDGaelic} 0
|
||||
${endif}
|
||||
StrCpy $Search "gd_GB"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDScottish} $0
|
||||
SectionSetSize ${SecDScottish} 0
|
||||
${endif}
|
||||
StrCpy $Search "gl_ES"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDGalician} $0
|
||||
SectionSetSize ${SecDGalician} 0
|
||||
${endif}
|
||||
StrCpy $Search "he_IL"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDHebrew} $0
|
||||
SectionSetSize ${SecDHebrew} 0
|
||||
${endif}
|
||||
StrCpy $Search "hr_HR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDCroatian} $0
|
||||
SectionSetSize ${SecDCroatian} 0
|
||||
${endif}
|
||||
StrCpy $Search "hu_HU"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDHungarian} $0
|
||||
SectionSetSize ${SecDHungarian} 0
|
||||
${endif}
|
||||
StrCpy $Search "ia_IA"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDInterlingua} $0
|
||||
SectionSetSize ${SecDInterlingua} 0
|
||||
${endif}
|
||||
StrCpy $Search "is_IS"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDIcelandic} $0
|
||||
SectionSetSize ${SecDIcelandic} 0
|
||||
${endif}
|
||||
StrCpy $Search "it_IT"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDItalian} $0
|
||||
SectionSetSize ${SecDItalian} 0
|
||||
${endif}
|
||||
StrCpy $Search "kk_KZ"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDKazakh} $0
|
||||
SectionSetSize ${SecDKazakh} 0
|
||||
${endif}
|
||||
StrCpy $Search "ko_KR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDKorean} $0
|
||||
SectionSetSize ${SecDKorean} 0
|
||||
${endif}
|
||||
StrCpy $Search "la_LA"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDLatin} $0
|
||||
SectionSetSize ${SecDLatin} 0
|
||||
${endif}
|
||||
StrCpy $Search "lt_LT"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDLithuanian} $0
|
||||
SectionSetSize ${SecDLithuanian} 0
|
||||
${endif}
|
||||
StrCpy $Search "lv_LV"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDLatvian} $0
|
||||
SectionSetSize ${SecDLatvian} 0
|
||||
${endif}
|
||||
StrCpy $Search "nl_NL"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDDutch} $0
|
||||
SectionSetSize ${SecDDutch} 0
|
||||
${endif}
|
||||
StrCpy $Search "nb_NO"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDNorwegianNB} $0
|
||||
SectionSetSize ${SecDNorwegianNB} 0
|
||||
${endif}
|
||||
StrCpy $Search "nn_NO"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDNorwegianNN} $0
|
||||
SectionSetSize ${SecDNorwegianNN} 0
|
||||
${endif}
|
||||
StrCpy $Search "pl_PL"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDPolish} $0
|
||||
SectionSetSize ${SecDPolish} 0
|
||||
${endif}
|
||||
StrCpy $Search "pt_BR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDPortugueseBR} $0
|
||||
SectionSetSize ${SecDPortugueseBR} 0
|
||||
${endif}
|
||||
StrCpy $Search "pt_PT"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDPortuguesePT} $0
|
||||
SectionSetSize ${SecDPortuguesePT} 0
|
||||
${endif}
|
||||
StrCpy $Search "ro_RO"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDRomanian} $0
|
||||
SectionSetSize ${SecDRomanian} 0
|
||||
${endif}
|
||||
StrCpy $Search "ru_RU"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDRussian} $0
|
||||
SectionSetSize ${SecDRussian} 0
|
||||
${endif}
|
||||
StrCpy $Search "db_DE"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDSorbianD} $0
|
||||
SectionSetSize ${SecDSorbianD} 0
|
||||
${endif}
|
||||
StrCpy $Search "hb_DE"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDSorbianH} $0
|
||||
SectionSetSize ${SecDSorbianH} 0
|
||||
${endif}
|
||||
StrCpy $Search "sq_AL"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDAlbanian} $0
|
||||
SectionSetSize ${SecDAlbanian} 0
|
||||
${endif}
|
||||
StrCpy $Search "sl_SI"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDSlowenian} $0
|
||||
SectionSetSize ${SecDSlowenian} 0
|
||||
${endif}
|
||||
StrCpy $Search "sk_SK"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDSlowakian} $0
|
||||
SectionSetSize ${SecDSlowakian} 0
|
||||
${endif}
|
||||
StrCpy $Search "sr_RS"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDSerbian} $0
|
||||
SectionSetSize ${SecDSerbian} 0
|
||||
${endif}
|
||||
StrCpy $Search "sv_SE"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDSwedish} $0
|
||||
SectionSetSize ${SecDSwedish} 0
|
||||
${endif}
|
||||
StrCpy $Search "th_TH"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDThai} $0
|
||||
SectionSetSize ${SecDThai} 0
|
||||
${endif}
|
||||
StrCpy $Search "uk_UA"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDUkrainian} $0
|
||||
SectionSetSize ${SecDUkrainian} 0
|
||||
${endif}
|
||||
StrCpy $Search "vi_VN"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecDVietnamese} $0
|
||||
SectionSetSize ${SecDVietnamese} 0
|
||||
${endif}
|
||||
|
||||
# select sections of already installed thesaurus dictionaries, make them read-only
|
||||
# and set the necessary size to 0 bytes
|
||||
StrCpy $String $FoundThes
|
||||
StrCpy $Search "bg_BG"
|
||||
Call StrPoint # function from LyXUtils.nsh
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTBulgarian} $0
|
||||
SectionSetSize ${SecTBulgarian} 0
|
||||
${endif}
|
||||
StrCpy $Search "ca_ES"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTCatalan} $0
|
||||
SectionSetSize ${SecTCatalan} 0
|
||||
${endif}
|
||||
StrCpy $Search "cs_CZ"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTCzech} $0
|
||||
SectionSetSize ${SecTCzech} 0
|
||||
${endif}
|
||||
StrCpy $Search "da_DK"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTDanish} $0
|
||||
SectionSetSize ${SecTDanish} 0
|
||||
${endif}
|
||||
StrCpy $Search "de_DE"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTGermanDA} $0
|
||||
SectionSetSize ${SecTGermanDA} 0
|
||||
${endif}
|
||||
StrCpy $Search "de_CH"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTGermanCH} $0
|
||||
SectionSetSize ${SecTGermanCH} 0
|
||||
${endif}
|
||||
StrCpy $Search "en_GB"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTEnglishGB} $0
|
||||
SectionSetSize ${SecTEnglishGB} 0
|
||||
${endif}
|
||||
StrCpy $Search "en_US"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTEnglishUSAU} $0
|
||||
SectionSetSize ${SecTEnglishUSAU} 0
|
||||
${endif}
|
||||
StrCpy $Search "es_ES"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTSpanish} $0
|
||||
SectionSetSize ${SecTSpanish} 0
|
||||
${endif}
|
||||
StrCpy $Search "fr_FR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTFrench} $0
|
||||
SectionSetSize ${SecTFrench} 0
|
||||
${endif}
|
||||
StrCpy $Search "ga_IR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTGaelic} $0
|
||||
SectionSetSize ${SecTGaelic} 0
|
||||
${endif}
|
||||
StrCpy $Search "el_GR"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTGreek} $0
|
||||
SectionSetSize ${SecTGreek} 0
|
||||
${endif}
|
||||
StrCpy $Search "it_IT"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTItalian} $0
|
||||
SectionSetSize ${SecTItalian} 0
|
||||
${endif}
|
||||
StrCpy $Search "hu_HU"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTHungarian} $0
|
||||
SectionSetSize ${SecTHungarian} 0
|
||||
${endif}
|
||||
StrCpy $Search "no_NO"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTNorwegian} $0
|
||||
SectionSetSize ${SecTNorwegian} 0
|
||||
${endif}
|
||||
StrCpy $Search "pl_PL"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTPolish} $0
|
||||
SectionSetSize ${SecTPolish} 0
|
||||
${endif}
|
||||
StrCpy $Search "pt_PT"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTPortuguese} $0
|
||||
SectionSetSize ${SecTPortuguese} 0
|
||||
${endif}
|
||||
StrCpy $Search "ro_RO"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTRomanian} $0
|
||||
SectionSetSize ${SecTRomanian} 0
|
||||
${endif}
|
||||
StrCpy $Search "ru_RU"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTRussian} $0
|
||||
SectionSetSize ${SecTRussian} 0
|
||||
${endif}
|
||||
StrCpy $Search "sl_SI"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTSlowenian} $0
|
||||
SectionSetSize ${SecTSlowenian} 0
|
||||
${endif}
|
||||
StrCpy $Search "sk_SK"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTSlowakian} $0
|
||||
SectionSetSize ${SecTSlowakian} 0
|
||||
${endif}
|
||||
StrCpy $Search "sv_SE"
|
||||
Call StrPoint
|
||||
${if} $Pointer != "-1"
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
SectionSetFlags ${SecTSwedish} $0
|
||||
SectionSetSize ${SecTSwedish} 0
|
||||
${endif}*/
|
||||
|
||||
${IfNot} ${Silent}
|
||||
Banner::destroy
|
||||
${EndIf}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
# this function is called at first after starting the uninstaller
|
||||
Function un.onInit
|
||||
|
||||
!insertmacro PRINTER_INIT
|
||||
!insertmacro MULTIUSER_UNINIT
|
||||
|
||||
# Check that LyX is not currently running
|
||||
FindProcDLL::FindProc "lyx.exe"
|
||||
${if} $R0 == "1"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)"
|
||||
Abort
|
||||
${endif}
|
||||
|
||||
# set registry root key
|
||||
${if} $MultiUser.Privileges == "Admin"
|
||||
${orif} $MultiUser.Privileges == "Power"
|
||||
SetShellVarContext all
|
||||
${else}
|
||||
SetShellVarContext current
|
||||
${endif}
|
||||
|
||||
# Ascertain whether the user has sufficient privileges to uninstall.
|
||||
# abort when LyX was installed with admin permissions but the user doesn't have administrator privileges
|
||||
ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "DisplayVersion"
|
||||
${if} $0 != ""
|
||||
${andif} $MultiUser.Privileges != "Admin"
|
||||
${andif} $MultiUser.Privileges != "Power"
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)"
|
||||
Abort
|
||||
${endif}
|
||||
# abort when LyX couldn't be found in the registry
|
||||
${if} $0 == "" # check in HKCU
|
||||
ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion"
|
||||
${if} $0 == ""
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)"
|
||||
${endif}
|
||||
${endif}
|
||||
|
||||
# Macro to investigate name of LyX's preferences folders to be able remove them
|
||||
!insertmacro UnAppPreSuff $AppPre $AppSuff # macro from LyXUtils.nsh
|
||||
|
||||
# test if MiKTeX was installed together with LyX
|
||||
ReadRegStr $0 HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
|
||||
${if} $0 == "Yes${APP_SERIES_KEY}"
|
||||
SectionSetText 2 "MiKTeX" # names the corersponding uninstaller section
|
||||
StrCpy $LaTeXInstalled "MiKTeX"
|
||||
DeleteRegValue HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
|
||||
${else}
|
||||
SectionSetText 2 "" # hides the corresponding uninstaller section
|
||||
${endif}
|
||||
|
||||
# test if JabRef was installed together with LyX
|
||||
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
|
||||
${if} $0 == "Yes${APP_SERIES_KEY}"
|
||||
SectionSetText 3 "JabRef" # names the corersponding uninstaller section
|
||||
StrCpy $JabRefInstalled "Yes"
|
||||
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
|
||||
${else}
|
||||
SectionSetText 3 "" # hides the corresponding uninstaller section
|
||||
${endif}
|
||||
|
||||
# question message if the user really wants to uninstall LyX
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(UnReallyRemoveLabel)" IDYES +2 # continue if yes
|
||||
Abort
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
@ -6,7 +6,8 @@ Function DownloadHunspellDictionary
|
||||
|
||||
# read out the locations from the file
|
||||
FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r
|
||||
${For} $5 1 114
|
||||
${For} $5 1 120 # the file has 120 lines
|
||||
|
||||
FileRead $R5 $String # $String is now the dictionary name
|
||||
StrCpy $R3 $String 5 # $R3 is now the dictionary language code
|
||||
|
||||
@ -51,8 +52,9 @@ Function DownloadThesaurusDictionary
|
||||
|
||||
# read out the locations from the file
|
||||
FileOpen $R5 "$INSTDIR\Resources\ThesaurusDictionaryNames.txt" r
|
||||
${For} $5 1 44
|
||||
FileRead $R5 $String # $String is now the dictionary name
|
||||
${For} $5 1 44 # the file has 44 lines
|
||||
|
||||
FileRead $R5 $String # $String is now the dictionary name
|
||||
StrCpy $R3 $String 5 3 # $R3 is now the dictionary language code
|
||||
|
||||
${if} $ThesCode == $R3
|
||||
@ -91,18 +93,22 @@ FunctionEnd
|
||||
#--------------------------------
|
||||
|
||||
Function InstallHunspellDictionary
|
||||
# install hunspell dictionaries
|
||||
# install the selected hunspell dictionaries except of already existing ones
|
||||
|
||||
# install the dictionary corresponding to the system and the chosen menu language
|
||||
# check if the system language and the chosen menu language are the same, if not install
|
||||
# both dictionaries
|
||||
# download the dictionaries
|
||||
${Do}
|
||||
StrCpy $DictCode $DictCodes 5
|
||||
StrCpy $DictCodes $DictCodes "" 5
|
||||
Call DownloadHunspellDictionary
|
||||
# don't dowload existing ones thus check if $DictCode is in $FoundDict
|
||||
StrCpy $String $FoundDict
|
||||
StrCpy $Search $DictCode
|
||||
Call StrPoint # function from LyXUtils.nsh
|
||||
${if} $Pointer == "-1"
|
||||
Call DownloadHunspellDictionary
|
||||
${endif}
|
||||
${LoopUntil} $DictCodes == ""
|
||||
|
||||
# some dictionaries need to be renamed
|
||||
# some dictionaries need to be renamed to have a 2 letter code
|
||||
${if} ${FileExists} "$INSTDIR\Resources\dicts\db_DE.aff"
|
||||
Rename "$INSTDIR\Resources\dicts\db_DE.aff" "$INSTDIR\Resources\dicts\dsb_DE.aff"
|
||||
Rename "$INSTDIR\Resources\dicts\db_DE.dic" "$INSTDIR\Resources\dicts\dsb_DE.dic"
|
||||
@ -117,15 +123,19 @@ FunctionEnd
|
||||
#--------------------------------
|
||||
|
||||
Function InstallThesaurusDictionary
|
||||
# install thesaurus dictionaries
|
||||
# install the selected thesaurus dictionaries except of already existing ones
|
||||
|
||||
# install the dictionary corresponding to the system and the chosen menu language
|
||||
# check if the system language and the chosen menu language are the same, if not install
|
||||
# both dictionaries
|
||||
# download the dictionaries
|
||||
${Do}
|
||||
StrCpy $ThesCode $ThesCodes 5
|
||||
StrCpy $ThesCodes $ThesCodes "" 5
|
||||
Call DownloadThesaurusDictionary
|
||||
# don't dowload existing ones thus check if $ThesCode is in $FoundThes
|
||||
StrCpy $String $FoundThes
|
||||
StrCpy $Search $ThesCode
|
||||
Call StrPoint # function from LyXUtils.nsh
|
||||
${if} $Pointer == "-1"
|
||||
Call DownloadThesaurusDictionary
|
||||
${endif}
|
||||
${LoopUntil} $ThesCodes == ""
|
||||
|
||||
# some dictionaries of language variants are identic
|
||||
|
@ -24,6 +24,8 @@ Var DictCode
|
||||
Var DictCodes
|
||||
Var DelPythonFiles
|
||||
Var EditorPath
|
||||
Var FoundDict
|
||||
Var FoundThes
|
||||
Var GhostscriptPath
|
||||
Var GnumericPath
|
||||
Var ImageEditorPath
|
||||
|
@ -11,8 +11,8 @@ These typically need to be modified for each LyX release
|
||||
|
||||
!define APP_VERSION_MAJOR 2
|
||||
!define APP_VERSION_MINOR 0
|
||||
!define APP_VERSION_REVISION 4
|
||||
!define APP_VERSION_BUILD 1 # Start with 1 for the installer releases of each version
|
||||
!define APP_VERSION_REVISION 5
|
||||
!define APP_VERSION_BUILD 2 # Start with 1 for the installer releases of each version
|
||||
|
||||
!define APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}" # Version to display
|
||||
|
||||
@ -38,7 +38,7 @@ These typically need to be modified for each LyX release
|
||||
!define FILES_LYX "C:\LyX\lyx-20-install"
|
||||
!define FILES_DEPS "C:\LyX\lyx-20-build\msvc2010-deps\deps20"
|
||||
!define FILES_BUNDLE "C:\LyX\depsbundle"
|
||||
!define FILES_QT "C:\Qt\qt-everywhere-opensource-src-4.8.2"
|
||||
!define FILES_QT "C:\Qt\qt-everywhere-opensource-src-4.8.3"
|
||||
!define ClassFileDir "${FILES_LYX}\Resources\tex"
|
||||
!define DVIPostFileDir "${FILES_DEPS}\tex"
|
||||
|
||||
@ -50,7 +50,7 @@ These typically need to be modified for each LyX release
|
||||
|
||||
!define JabRefVersion "2.8"
|
||||
!define MiKTeXDeliveredVersion "2.9"
|
||||
!define ImageMagickVersion "6.7.7"
|
||||
!define ImageMagickVersion "6.8.0"
|
||||
|
||||
# definitions for the Complete installer
|
||||
!if ${SETUPTYPE} == BUNDLE
|
||||
|
@ -139,10 +139,8 @@ Section -ProgramFiles SecProgramFiles
|
||||
${if} $ThesCodes != ""
|
||||
Call InstallThesaurusDictionary # Function from Thesaurus.nsh
|
||||
${endif}
|
||||
# finally delete the list of dictionaries and mirrors
|
||||
# finally delete the list of mirrors
|
||||
Delete "$INSTDIR\Resources\DictionaryMirrors.txt"
|
||||
Delete "$INSTDIR\Resources\ThesaurusDictionaryNames.txt"
|
||||
Delete "$INSTDIR\Resources\HunspellDictionaryNames.txt"
|
||||
|
||||
# Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\${SETUP_UNINSTALLER}"
|
||||
|
Loading…
Reference in New Issue
Block a user