+/*
+LaTeX.nsh
+
+Handling of LaTeX distributions
+*/
+
+# This script contains the following functions:
+#
+# - LaTeXActions (checks if MiKTeX or TeXLive is installed)
+#
+# - InstallMiKTeX (installs MiKTeX if not already installed),
+# only for bunlde installer, uses:
+# LaTeXCheck # function from LyXUtils.nsh
+#
+# - ConfigureMiKTeX
+# (installs the LaTeX class files that are delivered with LyX,
+# a Perl interpreter for splitindex
+# and enable MiKTeX's automatic package installation)
+#
+# - UpdateMiKTeX (asks to update MiKTeX)
+
+# ---------------------------------------
+
Function LaTeXActions
- # check if MiKTeX or TeXLive is installed
+ # checks if MiKTeX or TeXLive is installed
# test if MiKTeX is installed
# reads the PATH variable via the registry because NSIS' "$%Path%" variable is not updated when the PATH changes
!if ${SETUPTYPE} == BUNDLE
Function InstallMiKTeX
+ # installs MiKTeX if not already installed
- # install MiKTeX if not already installed
${if} $PathLaTeX == ""
# launch MiKTeX's installer
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)"
${if} $PathLaTeX != ""
# set package repository (MiKTeX's primary package repository)
${if} $MiKTeXUser == "HKCU"
- WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}" # special entry to tell the uninstaller that it was installed with LyX
+ # special entry that it was installed together with LyX
+ # so that we can later uninstall it together with LyX
+ WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
${else}
WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
${endif}
# enable package installation without asking (1 = Yes, 0 = No, 2 = Ask me first)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" # if only for current user
${if} $MiKTeXUser != "HKCU"
- WriteRegStr SHCTX "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1"
+ WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1"
${endif}
# set package repository (MiKTeX's primary package repository)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RemoteRepository" "${MiKTeXRepo}" # if only for current user
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote" # if only for current user
${if} $MiKTeXUser != "HKCU"
- WriteRegStr SHCTX "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RemoteRepository" "${MiKTeXRepo}"
- WriteRegStr SHCTX "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote"
+ WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RemoteRepository" "${MiKTeXRepo}"
+ WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote"
${endif}
# enable MiKTeX's automatic package installation
FunctionEnd
Function UpdateMiKTeX
- # ask to update MiKTeX
+ # asks to update MiKTeX
${if} $LaTeXInstalled == "MiKTeX"
MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
Function SearchExternal
Call LaTeXActions # function from LaTeX.nsh
Call MissingPrograms
- Call FindDictionaries
+ Call FindDictionaries # function from dictionaries.nsh
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 66
- # the file has 132 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 # skip the .aff file
- FileRead $R5 $String # $String is now the .dic filename
- StrCpy $String $String -2 # remove the linebreak characters
- StrCpy $R3 $String -4 # $R3 is now the dictionary language code
- !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
--- /dev/null
+/*
+dictionaries.nsh
+
+Handling of hunspell / MyThes dictionaries
+*/
+
+# This script contains the following functions:
+#
+# - FindDictionaries (finds already installed dictionaries)
+#
+# - DownloadHunspellDictionaries and DownloadThesaurusDictionaries
+# (Downloads hunspell / MyThes dictionaries from a location that is
+# given in the file $INSTDIR\Resources\HunspellDictionaryNames.txt)
+#
+# - InstallHunspellDictionaries and InstallThesaurusDictionaries
+# (installs the selected hunspell / MyThes dictionaries except of
+# already existing ones), uses:
+# DownloadHunspellDictionaries or DownloadThesaurusDictionaries
+
+# ---------------------------------------
+
+Function FindDictionaries
+ # finds already 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 66
+ # the file has 132 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 # skip the .aff file
+ FileRead $R5 $String # $String is now the .dic filename
+ StrCpy $String $String -2 # remove the linebreak characters
+ StrCpy $R3 $String -4 # $R3 is now the dictionary language code
+ ${if} ${FileExists} "$INSTDIR\Resources\dicts\$String"
+ 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
+ ${if} ${FileExists} "$INSTDIR\Resources\thes\$String"
+ StrCpy $FoundThes "$R3 $FoundThes"
+ ${endif}
+ ${next}
+ FileClose $R5
+
+FunctionEnd
+
+# ---------------------------------------
+
+Function DownloadHunspellDictionaries
+ # Downloads hunspell dictionaries from a location that is given in the file
+ # $INSTDIR\Resources\HunspellDictionaryNames.txt
+
+ # read out the locations from the file
+ FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r
+ ${For} $5 1 132 # the file has 132 lines
+
+ FileRead $R5 $String # $String is now the dictionary name
+ StrCpy $R3 $String -6 # $R3 is now the dictionary language code
+
+ ${if} $DictCode == $R3
+ StrCpy $String $String -2 # delete the linebreak characters at the end
+ # Download hunspell dictionaries,
+ # if first download repository is not available try the other ones listed in "DictionaryMirrors.txt"
+ FileOpen $R4 "$INSTDIR\Resources\DictionaryMirrors.txt" r
+
+ ${For} $4 1 8
+ FileRead $R4 $Search # $Search is now the mirror
+ StrCpy $Search $Search -2 # delete the linebreak characters at the end
+ Push $R0
+ InetLoad::load /TIMEOUT=5000 "http://$Search.dl.sourceforge.net/project/lyxwininstaller/hunspell/$String" "$INSTDIR\Resources\dicts\$String" /END
+ Pop $R0
+ ${if} $R0 == "OK"
+ ${ExitFor}
+ ${endif}
+ ${Next}
+
+ FileClose $R4
+ # if download failed
+ ${if} $R0 != "OK"
+ MessageBox MB_OK|MB_ICONEXCLAMATION "$(HunspellFailed)"
+ Goto abortinstall
+ ${endif}
+ ${endif} # end if $DictCode == $R3
+
+ ${Next}
+ FileClose $R5
+
+ abortinstall:
+ Delete "$INSTDIR\$String"
+
+FunctionEnd
+
+#--------------------------------
+
+Function DownloadThesaurusDictionaries
+ # Downloads thesaurus dictionaries from a location that is given in the file
+ # $INSTDIR\Resources\ThesaurusDictionaryNames.txt
+
+ # read out the locations from the file
+ FileOpen $R5 "$INSTDIR\Resources\ThesaurusDictionaryNames.txt" r
+ ${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
+ StrCpy $String $String -2 # delete the linebreak characters at the end
+ # Download thesaurus dictionaries,
+ # if first download repository is not available try the other ones listed in "DictionaryMirrors.txt"
+ FileOpen $R4 "$INSTDIR\Resources\DictionaryMirrors.txt" r
+
+ ${For} $4 1 8
+ FileRead $R4 $Search # $Search is now the mirror
+ StrCpy $Search $Search -2 # delete the linebreak characters at the end
+ Push $R0
+ InetLoad::load /TIMEOUT=5000 "http://$Search.dl.sourceforge.net/project/lyxwininstaller/thesaurus/$String" "$INSTDIR\Resources\thes\$String" /END
+ Pop $R0
+ ${if} $R0 == "OK"
+ ${ExitFor}
+ ${endif}
+ ${Next}
+
+ FileClose $R4
+ # if download failed
+ ${if} $R0 != "OK"
+ MessageBox MB_OK|MB_ICONEXCLAMATION "$(ThesaurusFailed)"
+ Goto abortinstall
+ ${endif}
+ ${endif} # end if $ThesCode == $R3
+
+ ${Next}
+ FileClose $R5
+
+ abortinstall:
+ Delete "$INSTDIR\$String"
+
+FunctionEnd
+
+#--------------------------------
+
+Function InstallHunspellDictionaries
+ # installs the selected hunspell dictionaries except of already existing ones
+
+ # download the dictionaries
+ ${Do}
+ # take the first code
+ StrCpy $Search ","
+ StrCpy $String $DictCodes
+ Call StrPoint
+ ${if} $Pointer != "-1"
+ StrCpy $DictCode $DictCodes $Pointer
+ # remove the taken code from the list
+ IntOp $Pointer $Pointer + 1
+ StrCpy $DictCodes $DictCodes "" $Pointer
+ ${endif}
+ # 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 DownloadHunspellDictionaries
+ ${endif}
+ ${LoopUntil} $DictCodes == ""
+
+FunctionEnd
+
+#--------------------------------
+
+Function InstallThesaurusDictionaries
+ # installs the selected thesaurus dictionaries except of already existing ones
+
+ # download the dictionaries
+ ${Do}
+ # all codes have 5 characters
+ StrCpy $ThesCode $ThesCodes 5 # take the first code
+ StrCpy $ThesCodes $ThesCodes "" 5 # remove the taken code from the list
+ # 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 DownloadThesaurusDictionaries
+ ${endif}
+ ${LoopUntil} $ThesCodes == ""
+
+ # some dictionaries of language variants are identic
+ # therefore copy and rename an existing dictionary
+ CreateDirectory "$INSTDIR\Resources\backup"
+ ${if} ${FileExists} "$INSTDIR\Resources\thes\th_de_DE_v2.dat"
+ CopyFiles "$INSTDIR\Resources\thes\th_de_DE_v2.*" "$INSTDIR\Resources\backup"
+ Rename "$INSTDIR\Resources\backup\th_de_DE_v2.dat" "$INSTDIR\Resources\backup\th_de_AT_v2.dat"
+ Rename "$INSTDIR\Resources\backup\th_de_DE_v2.idx" "$INSTDIR\Resources\backup\th_de_AT_v2.idx"
+ CopyFiles "$INSTDIR\Resources\backup\th_de_AT_v2.*" "$INSTDIR\Resources\thes"
+ ${endif}
+ ${if} ${FileExists} "$INSTDIR\Resources\thes\th_en_US_v2.dat"
+ CopyFiles "$INSTDIR\Resources\thes\th_en_US_v2.*" "$INSTDIR\Resources\backup"
+ Rename "$INSTDIR\Resources\backup\th_en_US_v2.dat" "$INSTDIR\Resources\backup\th_en_AU_v2.dat"
+ Rename "$INSTDIR\Resources\backup\th_en_US_v2.idx" "$INSTDIR\Resources\backup\th_en_AU_v2.idx"
+ CopyFiles "$INSTDIR\Resources\backup\th_en_AU_v2.*" "$INSTDIR\Resources\thes"
+ ${endif}
+ RMDir "$INSTDIR\Resources\backup"
+
+FunctionEnd
+
!define MUI_HEADERIMAGE_RIGHT
!define MUI_WELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}"
-!define MUI_COMPONENTSPAGE_NODESC
#--------------------------------
# Pages
/*
-
init.nsh
-Initialization function
-
+Initialization functions
*/
#--------------------------------
!if ${SETUPTYPE} == BUNDLE
Section /o "$(SecInstJabRefTitle)" SecInstJabRef
- AddSize 5000
+ AddSize 12400
StrCpy $InstallJabRef "true"
SectionEnd
!endif
!if ${SETUPTYPE} == BUNDLE
!insertmacro MUI_DESCRIPTION_TEXT ${SecInstJabRef} "$(SecInstJabRefDescription)"
!endif
+!insertmacro MUI_DESCRIPTION_TEXT ${SecDictionaries} "$(SecDictionariesDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecThesaurus} "$(SecThesaurusDescription)"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)"
Abort
${endif}
- # abort when LyX couldn't be found in the registry
+ # warning when LyX couldn't be found in the registry
${if} $0 == "" # check in HKCU
ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion"
${if} $0 == ""
${if} $0 == "Yes${APP_SERIES_KEY}"
SectionSetText 2 "MiKTeX" # names the corersponding uninstaller section
StrCpy $LaTeXInstalled "MiKTeX"
- DeleteRegValue SHCTX "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"
+ ReadRegStr $0 SHCTX "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}
!include gui\LaTeXFolder.nsh
!endif # end if != BUNDLE
-# Functions download dictionaries
-!include include\Thesaurus.nsh
+# Functions to download spell-checker and thesaurus dictionaries
+!include include\dictionaries.nsh
#--------------------------------
# Include standard functions
+++ /dev/null
-# download dictionaries
-
-Function DownloadHunspellDictionary
- # Downloads hunspell dictionaries from a location that is given in the file
- # $INSTDIR\Resources\HunspellDictionaryNames.txt
-
- # read out the locations from the file
- FileOpen $R5 "$INSTDIR\Resources\HunspellDictionaryNames.txt" r
- ${For} $5 1 132 # the file has 132 lines
-
- FileRead $R5 $String # $String is now the dictionary name
- StrCpy $R3 $String -6 # $R3 is now the dictionary language code
-
- ${if} $DictCode == $R3
- StrCpy $String $String -2 # delete the linebreak characters at the end
- # Download hunspell dictionaries,
- # if first download repository is not available try the other ones listed in "DictionaryMirrors.txt"
- FileOpen $R4 "$INSTDIR\Resources\DictionaryMirrors.txt" r
-
- ${For} $4 1 8
- FileRead $R4 $Search # $Search is now the mirror
- StrCpy $Search $Search -2 # delete the linebreak characters at the end
- Push $R0
- InetLoad::load /TIMEOUT=5000 "http://$Search.dl.sourceforge.net/project/lyxwininstaller/hunspell/$String" "$INSTDIR\Resources\dicts\$String" /END
- Pop $R0
- ${if} $R0 == "OK"
- ${ExitFor}
- ${endif}
- ${Next}
-
- FileClose $R4
- # if download failed
- ${if} $R0 != "OK"
- MessageBox MB_OK|MB_ICONEXCLAMATION "$(HunspellFailed)"
- Goto abortinstall
- ${endif}
- ${endif} # end if $DictCode == $R3
-
- ${Next}
- FileClose $R5
-
- abortinstall:
- Delete "$INSTDIR\$String"
-
-FunctionEnd
-
-#--------------------------------
-
-Function DownloadThesaurusDictionary
- # Downloads thesaurus dictionaries from a location that is given in the file
- # $INSTDIR\Resources\ThesaurusDictionaryNames.txt
-
- # read out the locations from the file
- FileOpen $R5 "$INSTDIR\Resources\ThesaurusDictionaryNames.txt" r
- ${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
- StrCpy $String $String -2 # delete the linebreak characters at the end
- # Download thesaurus dictionaries,
- # if first download repository is not available try the other ones listed in "DictionaryMirrors.txt"
- FileOpen $R4 "$INSTDIR\Resources\DictionaryMirrors.txt" r
-
- ${For} $4 1 8
- FileRead $R4 $Search # $Search is now the mirror
- StrCpy $Search $Search -2 # delete the linebreak characters at the end
- Push $R0
- InetLoad::load /TIMEOUT=5000 "http://$Search.dl.sourceforge.net/project/lyxwininstaller/thesaurus/$String" "$INSTDIR\Resources\thes\$String" /END
- Pop $R0
- ${if} $R0 == "OK"
- ${ExitFor}
- ${endif}
- ${Next}
-
- FileClose $R4
- # if download failed
- ${if} $R0 != "OK"
- MessageBox MB_OK|MB_ICONEXCLAMATION "$(ThesaurusFailed)"
- Goto abortinstall
- ${endif}
- ${endif} # end if $ThesCode == $R3
-
- ${Next}
- FileClose $R5
-
- abortinstall:
- Delete "$INSTDIR\$String"
-
-FunctionEnd
-
-#--------------------------------
-
-Function InstallHunspellDictionary
- # install the selected hunspell dictionaries except of already existing ones
-
- # download the dictionaries
- ${Do}
- # take the first code
- StrCpy $Search ","
- StrCpy $String $DictCodes
- Call StrPoint
- ${if} $Pointer != "-1"
- StrCpy $DictCode $DictCodes $Pointer
- # remove the taken code from the list
- IntOp $Pointer $Pointer + 1
- StrCpy $DictCodes $DictCodes "" $Pointer
- ${endif}
- # 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 == ""
-
-FunctionEnd
-
-#--------------------------------
-
-Function InstallThesaurusDictionary
- # install the selected thesaurus dictionaries except of already existing ones
-
- # download the dictionaries
- ${Do}
- # all codes have 5 characters
- StrCpy $ThesCode $ThesCodes 5 # take the first code
- StrCpy $ThesCodes $ThesCodes "" 5 # remove the taken code from the list
- # 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
- # therefore copy and rename an existing dictionary
- CreateDirectory "$INSTDIR\Resources\backup"
- ${if} ${FileExists} "$INSTDIR\Resources\thes\th_de_DE_v2.dat"
- CopyFiles "$INSTDIR\Resources\thes\th_de_DE_v2.*" "$INSTDIR\Resources\backup"
- Rename "$INSTDIR\Resources\backup\th_de_DE_v2.dat" "$INSTDIR\Resources\backup\th_de_AT_v2.dat"
- Rename "$INSTDIR\Resources\backup\th_de_DE_v2.idx" "$INSTDIR\Resources\backup\th_de_AT_v2.idx"
- CopyFiles "$INSTDIR\Resources\backup\th_de_AT_v2.*" "$INSTDIR\Resources\thes"
- ${endif}
- ${if} ${FileExists} "$INSTDIR\Resources\thes\th_en_US_v2.dat"
- CopyFiles "$INSTDIR\Resources\thes\th_en_US_v2.*" "$INSTDIR\Resources\backup"
- Rename "$INSTDIR\Resources\backup\th_en_US_v2.dat" "$INSTDIR\Resources\backup\th_en_AU_v2.dat"
- Rename "$INSTDIR\Resources\backup\th_en_US_v2.idx" "$INSTDIR\Resources\backup\th_en_AU_v2.idx"
- CopyFiles "$INSTDIR\Resources\backup\th_en_AU_v2.*" "$INSTDIR\Resources\thes"
- ${endif}
- RMDir "$INSTDIR\Resources\backup"
-
-FunctionEnd
#${LangFileString} SecAllUsersDescription "Install LyX for all users or just the current user."
${LangFileString} SecFileAssocDescription "Files with a .lyx extension will automatically open in LyX."
${LangFileString} SecDesktopDescription "A LyX icon on the desktop."
+${LangFileString} SecDictionariesDescription "Spell-checker dictionaries that can be downloaded and installed."
+${LangFileString} SecThesaurusDescription "Thesaurus dictionaries that can be downloaded and installed."
${LangFileString} EnterLaTeXHeader1 'LaTeX-distribution'
${LangFileString} EnterLaTeXHeader2 'Set the LaTeX-distribution that LyX should use.'
${LangFileString} InstallRunning "The installer is already running!"
${LangFileString} StillInstalled "LyX ${APP_SERIES_KEY2} is already installed! Deinstall LyX first."
${LangFileString} NewerInstalled "You are trying to install an older version of LyX than what you have installed.$\r$\n\
- If you really need this, you must uninstall the existing LyX $OldVersionNumber before."
+ If you really want this, you must uninstall the existing LyX $OldVersionNumber before."
${LangFileString} MultipleIndexesNotAvailable "The support for using several indexes in a document will not be available because$\r$\n\
MiKTeX was installed with administrator privileges but you are installing LyX without them."
${LangFileString} SecUnMiKTeXDescription "Uninstalls the LaTeX-distribution MiKTeX."
${LangFileString} SecUnJabRefDescription "Uninstalls the bibliography manager JabRef."
-${LangFileString} SecUnPreferencesDescription 'Deletes LyX$\'s configuration folder$\r$\n\
- "$AppPre\username\$AppSuff\${APP_DIR_USERDATA}"$\r$\n\
- for all users.'
+${LangFileString} SecUnPreferencesDescription 'Deletes LyX$\'s configuration$\r$\n\
+ (folder $\"$AppPre\username\$AppSuff\${APP_DIR_USERDATA}$\"$\r$\n\
+ for you or for all users (if you are admin).'
${LangFileString} SecUnProgramFilesDescription "Uninstall LyX and all of its components."
+
$\r$\n\
$_CLICK"
-${LangFileString} TEXT_CONFIGURE_MIKTEXFNDB "Aktualisiere MiKTeXs Dateinamen Datenbank..."
+#${LangFileString} TEXT_CONFIGURE_MIKTEXFNDB "Aktualisiere MiKTeXs Dateinamen Datenbank..."
${LangFileString} TEXT_CONFIGURE_LYX "Konfiguriere LyX (MiKTeX kann fehlende Pakte herunterladen, was etwas Zeit braucht) ..."
${LangFileString} TEXT_CONFIGURE_PYTHON "Kompiliere Python Skripte..."
${LangFileString} TEXT_FINISH_DESKTOP "Ein Symbol auf der Arbeitsoberfläche erzeugen"
${LangFileString} TEXT_FINISH_WEBSITE "Besuchen Sie lyx.org für aktuelle Neuigkeiten"
-${LangFileString} FileTypeTitle "LyX-Dokument"
+#${LangFileString} FileTypeTitle "LyX-Dokument"
${LangFileString} SecInstJabRefTitle "JabRef"
-${LangFileString} SecAllUsersTitle "Für alle Nutzer installieren?"
+#${LangFileString} SecAllUsersTitle "Für alle Nutzer installieren?"
${LangFileString} SecFileAssocTitle "Dateizuordnungen"
${LangFileString} SecDesktopTitle "Desktopsymbol"
${LangFileString} SecCoreDescription "Das Programm LyX."
${LangFileString} SecInstJabRefDescription "Manager für bibliografische Referenzen und Editor für BibTeX-Dateien."
-${LangFileString} SecAllUsersDescription "LyX für alle Nutzer oder nur für den aktuellen Nutzer installieren."
+#${LangFileString} SecAllUsersDescription "LyX für alle Nutzer oder nur für den aktuellen Nutzer installieren."
${LangFileString} SecFileAssocDescription "Vernüpfung zwischen LyX und der .lyx Dateiendung."
${LangFileString} SecDesktopDescription "Verknüpfung zu LyX auf dem Desktop."
+${LangFileString} SecDictionariesDescription "Rechtschreibprüfung- Wörterbucher die heruntergeladen und installiert werden können."
+${LangFileString} SecThesaurusDescription "Thesaurus- Wörterbucher die heruntergeladen und installiert werden können."
${LangFileString} EnterLaTeXHeader1 'LaTeX-Distribution'
${LangFileString} EnterLaTeXHeader2 'Legen Sie die LaTeX-Distribution fest die LyX verwenden soll.'
${LangFileString} EnterLaTeXFolder 'Optional können Sie hier den Pfad zur Datei $\"latex.exe$\" angeben und damit die \
- LaTeX-Distribution festlegen die LyX verwenden soll.$\r$\n\
- Wenn Sie kein LaTeX verwenden, kann LyX keine Dokumente ausgeben!$\r$\n\
- $\r$\n\
- Der Installer hat auf Ihrem System die LaTeX-Distribution$\r$\n\
- $\"$LaTeXName$\" erkannt. Unten angegeben ist ihr Pfad.'
+ LaTeX-Distribution festlegen die LyX verwenden soll.$\r$\n\
+ Wenn Sie kein LaTeX verwenden, kann LyX keine Dokumente ausgeben!$\r$\n\
+ $\r$\n\
+ Der Installer hat auf Ihrem System die LaTeX-Distribution$\r$\n\
+ $\"$LaTeXName$\" erkannt. Unten angegeben ist ihr Pfad.'
${LangFileString} EnterLaTeXFolderNone 'Geben Sie unten den Pfad zur Datei $\"latex.exe$\" an. Damit legen Sie fest welche \
- LaTeX-Distribution LyX verwenden soll.$\r$\n\
- Wenn Sie kein LaTeX verwenden, kann LyX keine Dokumente ausgeben!$\r$\n\
- $\r$\n\
- Der Installer konnte auf Ihrem System keine LaTeX-Distribution finden.'
+ LaTeX-Distribution LyX verwenden soll.$\r$\n\
+ Wenn Sie kein LaTeX verwenden, kann LyX keine Dokumente ausgeben!$\r$\n\
+ $\r$\n\
+ Der Installer konnte auf Ihrem System keine LaTeX-Distribution finden.'
${LangFileString} PathName 'Pfad zur Datei $\"latex.exe$\"'
${LangFileString} DontUseLaTeX "Kein LaTeX benutzen"
${LangFileString} InvalidLaTeXFolder 'Kann die Datei $\"latex.exe$\" nicht finden.'
$\r$\n\
!!! Bitte verwenden Sie alle voreingestellten Optionen des MiKTeX-Installers !!!'
${LangFileString} LatexError1 'Es konnte keine LaTeX-Distribution gefunden werden!$\r$\n\
- LyX kann ohne eine LaTeX-Distribution wie z.B. $\"MiKTeX$\" nicht benutzt werden!$\r$\n\
- Die Installation wird daher abgebrochen.'
+ LyX kann ohne eine LaTeX-Distribution wie z.B. $\"MiKTeX$\" nicht benutzt werden!$\r$\n\
+ Die Installation wird daher abgebrochen.'
${LangFileString} HunspellFailed 'Herunterladen des Wörterbuchs für Sprache $\"$R3$\" fehlgeschlagen.'
${LangFileString} ThesaurusFailed 'Herunterladen des Thesaurus für Sprache $\"$R3$\" fehlgeschlagen.'
${LangFileString} JabRefInfo 'Als Nächstes wird der Installer des Programms $\"JabRef$\" gestartet.$\r$\n\
- Sie können alle voreingestellten Optionen des JabRef-Installers verwenden.'
+ Sie können alle voreingestellten Optionen des JabRef-Installers verwenden.'
${LangFileString} JabRefError 'Das Programm $\"JabRef$\" konnte nicht erfolgreich installiert werden!$\r$\n\
- Der Installer wird trotzdem fortgesetzt.$\r$\n\
- Versuchen Sie JabRef später noch einmal zu installieren.'
+ Der Installer wird trotzdem fortgesetzt.$\r$\n\
+ Versuchen Sie JabRef später noch einmal zu installieren.'
-${LangFileString} LatexConfigInfo "Die folgende Konfiguration von LyX wird eine Weile dauern."
+#${LangFileString} LatexConfigInfo "Die folgende Konfiguration von LyX wird eine Weile dauern."
-${LangFileString} MiKTeXPathInfo "Damit jeder Benutzer später MiKTeX für seine Bedürfnisse anpassen kann,$\r$\n\
- ist es erforderlich für MiKTeXs Installationsordner$\r$\n\
- $MiKTeXPath $\r$\n\
- und seine Unterordner Schreibrechte für alle Benutzer zu setzen."
+#${LangFileString} MiKTeXPathInfo "Damit jeder Benutzer später MiKTeX für seine Bedürfnisse anpassen kann,$\r$\n\
+# ist es erforderlich für MiKTeXs Installationsordner$\r$\n\
+# $MiKTeXPath $\r$\n\
+# und seine Unterordner Schreibrechte für alle Benutzer zu setzen."
${LangFileString} MiKTeXInfo 'Die LaTeX-Distribution $\"MiKTeX$\" wird zusammen mit LyX verwendet werden.$\r$\n\
- Es wird empfohlen dass Sie verfügbare MiKTeX-Updates mit Hilfe des Programms $\"MiKTeX Update Wizard$\"$\r$\n\
- installieren, bevor sie LyX das erste Mal benutzen.$\r$\n\
- Möchten Sie jetzt nach Updates für MiKTeX suchen?'
+ Es wird empfohlen dass Sie verfügbare MiKTeX-Updates mit Hilfe des Programms $\"MiKTeX Update Wizard$\"$\r$\n\
+ installieren, bevor sie LyX das erste Mal benutzen.$\r$\n\
+ Möchten Sie jetzt nach Updates für MiKTeX suchen?'
${LangFileString} ModifyingConfigureFailed 'Der $\"PATH_präfix$\" (Liste mit Programmpfaden) konnte nicht im Konfigurationsskript gesetzt werden.'
-${LangFileString} RunConfigureFailed "Konnte das Konfigurationsskript nicht ausführen."
+#${LangFileString} RunConfigureFailed "Konnte das Konfigurationsskript nicht ausführen."
${LangFileString} NotAdmin "Sie benötigen Administratorrechte um LyX zu installieren!"
${LangFileString} InstallRunning "Der Installer läuft bereits!"
${LangFileString} StillInstalled "LyX ${APP_SERIES_KEY2} ist bereits installiert! Deinstallieren Sie LyX zuerst."
+${LangFileString} NewerInstalled "Sie versuchen eine Vesion von LyX zu installieren, die älter als die derzeit installierte ist.$\r$\n\
+ Wenn Sie das wirklich wollen, müssen Sie erst das existierende LyX $OldVersionNumber deinstallieren."
${LangFileString} MultipleIndexesNotAvailable "Die Unterstützung für mehrere Indexe in einem Dokument wird nicht verfügbar sein, denn$\r$\n\
MiKTeX wurde mit Administratorrechten installiert aber Sie installieren LyX ohne diese."
sein, denn dafür müsste ein Software-Drucker für Windows installiert werden,$\r$\n\
was jedoch nur mit Administratorrechten möglich ist."
-${LangFileString} FinishPageMessage "Glückwunsch! LyX wurde erfolgreich installiert.$\r$\n\
- $\r$\n\
- (Der erste Start von LyX kann etwas länger dauern.)"
+#${LangFileString} FinishPageMessage "Glückwunsch! LyX wurde erfolgreich installiert.$\r$\n\
+# $\r$\n\
+# (Der erste Start von LyX kann etwas länger dauern.)"
${LangFileString} FinishPageRun "LyX starten"
${LangFileString} UnNotInRegistryLabel "Kann LyX nicht in der Registry finden.$\r$\n\
${LangFileString} SecUnMiKTeXDescription "Deinstalliert die LaTeX-Distribution MiKTeX."
${LangFileString} SecUnJabRefDescription "Deinstalliert den Bibliografiemanager JabRef."
-${LangFileString} SecUnPreferencesDescription 'Löscht LyXs Benutzereinstellungen,$\r$\n\
- (den Ornder:$\r$\n\
- $\"$AppPre\username\$AppSuff\${APP_DIR_USERDATA}$\")$\r$\n\
- für alle Benutzer.'
+${LangFileString} SecUnPreferencesDescription 'Löscht LyXs Benutzereinstellungen$\r$\n\
+ (Ordner $\"$AppPre\username\$AppSuff\${APP_DIR_USERDATA}$\")$\r$\n\
+ für Sie oder für alle Benutzer (wenn Sie Admin sind).'
${LangFileString} SecUnProgramFilesDescription "Deinstalliert LyX und all seine Komponenten."
-!define SETUPTYPE BUNDLE
+/*
+LyX 2.0 Installer for Windows
+Authors: Joost Verburg, Angus Leeming, Uwe Stöhr
+Compatible with NSIS 2.46
+*/
+
+!ifndef SETUPTYPE
+ !define SETUPTYPE BUNDLE
+!endif
+
!include lyx.nsi
\ No newline at end of file
-!define SETUPTYPE STANDARD
+/*
+LyX 2.0 Installer for Windows
+Authors: Joost Verburg, Angus Leeming, Uwe Stöhr
+Compatible with NSIS 2.46
+*/
+
+!ifndef SETUPTYPE
+ !define SETUPTYPE STANDARD
+!endif
+
!include lyx.nsi
\ No newline at end of file
# set up the installer pages
!include include\gui.nsh
-#
+# sets the install sections and checks the system on starting the un/installer
!include include\init.nsh
# install LyX and needed third-party programs like Python etc.
# configure LyX (set start menu and write registry entries)
!include setup\configure.nsh
-#
-!include gui\external.nsh
+# provides downloads of external programs
+#!include gui\external.nsh
#--------------------------------
# Output file
ExecWait "$INSTDIR\${JabRefInstall}"
# test if JabRef is now installed
StrCpy $PathBibTeXEditor ""
- ReadRegStr $PathBibTeXEditor HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
+ ReadRegStr $PathBibTeXEditor SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
${if} $PathBibTeXEditor == ""
MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
${else}
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}" # special entry to tell the uninstaller that it was installed with LyX
- ${endif}
+ # special entry that it was installed together with LyX
+ # so that we can later uninstall it together with LyX
+ ${if} $MultiUser.Privileges == "Admin"
+ ${orif} $MultiUser.Privileges == "Power"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
+ ${else}
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
+ ${endif}
+ ${endif} # end if PathBibTeXEditor
${endif}
${endif}
!endif # end if BUNDLE
# download dictionaries and thesaurus
${if} $DictCodes != ""
- Call InstallHunspellDictionary # Function from Thesaurus.nsh
+ Call InstallHunspellDictionaries # Function from dictionaries.nsh
${endif}
${if} $ThesCodes != ""
- Call InstallThesaurusDictionary # Function from Thesaurus.nsh
+ Call InstallThesaurusDictionaries # Function from dictionaries.nsh
${endif}
# finally delete the list of mirrors
Delete "$INSTDIR\Resources\DictionaryMirrors.txt"
DeleteRegKey SHCTX "Software\Classes\${APP_EXT}14"
DeleteRegKey SHCTX "Software\Classes\${APP_EXT}15"
DeleteRegKey SHCTX "Software\Classes\${APP_EXT}16"
+ # enable this for LyX 2.1!
+ # DeleteRegKey SHCTX "Software\Classes\${APP_EXT}20"
DeleteRegKey SHCTX "Software\Classes\${APP_EXT}"
DeleteRegKey SHCTX "Software\Classes\${APP_REGNAME_DOC}"
${endif}
DeleteRegKey HKCR "Applications\lyx.exe"
# File associations
-
ReadRegStr $FileAssociation SHELL_CONTEXT "Software\Classes\${APP_EXT}" ""
${If} $FileAssociation == "${APP_REGNAME_DOC}"
${If} $MultiUser.Privileges != "Admin"
${OrIf} $MultiUser.Privileges != "Power"
-
# Delete Postscript printer for metafile to EPS conversion
ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
-
${EndIf}
# clean other registry entries
DeleteRegKey SHCTX "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAME}.exe"
DeleteRegKey SHCTX "SOFTWARE\${APP_REGKEY}"
+ # delete info that programs were installed together with LyX
+ DeleteRegValue SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
+ DeleteRegValue SHCTX "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
SectionEnd
Section /o "un.MiKTeX" un.SecUnMiKTeX
${if} $LaTeXInstalled == "MiKTeX" # only uninstall MiKTeX when it was installed together with LyX
- ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MiKTeX ${MiKTeXDeliveredVersion}" "UninstallString"
+ ReadRegStr $1 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\MiKTeX ${MiKTeXDeliveredVersion}" "UninstallString"
ExecWait $1 # run MiKTeX's uninstaller
${endif}
Section "un.JabRef" un.SecUnJabRef
${if} $JabRefInstalled == "Yes" # only uninstall JabRef when it was installed together with LyX
- ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
+ ReadRegStr $1 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
ExecWait "$1" # run JabRef's uninstaller
${endif}