installer: bugfixes, code simplification and documentation

- dictionaries.nsh: code documentation and simplification
- lyx.nsi: comment out currently unused code
- init.nsh: some corrections and fix bug that info that JabRef and MiKTeX were installed together with LyX was deleted before the uninstaller was really run
- LaTeX.nsh: documentation and fix a bug (for an unknown reason SHCTX can be used to read and delte but not to write in the registry)
- gui.nsh: enable descriptions
- detection: move dictionary code to dictionaries
This commit is contained in:
Uwe Stöhr 2012-11-11 18:07:55 +01:00
parent ea7cf4f5eb
commit 290efe6190
13 changed files with 197 additions and 124 deletions

View File

@ -1,5 +1,28 @@
/*
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 Function LaTeXActions
# check if MiKTeX or TeXLive is installed # checks if MiKTeX or TeXLive is installed
# test if MiKTeX 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 # reads the PATH variable via the registry because NSIS' "$%Path%" variable is not updated when the PATH changes
@ -109,8 +132,8 @@ FunctionEnd
!if ${SETUPTYPE} == BUNDLE !if ${SETUPTYPE} == BUNDLE
Function InstallMiKTeX Function InstallMiKTeX
# installs MiKTeX if not already installed
# install MiKTeX if not already installed
${if} $PathLaTeX == "" ${if} $PathLaTeX == ""
# launch MiKTeX's installer # launch MiKTeX's installer
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)" MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)"
@ -130,7 +153,9 @@ FunctionEnd
${if} $PathLaTeX != "" ${if} $PathLaTeX != ""
# set package repository (MiKTeX's primary package repository) # set package repository (MiKTeX's primary package repository)
${if} $MiKTeXUser == "HKCU" ${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} ${else}
WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}" WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
${endif} ${endif}
@ -214,14 +239,14 @@ Function ConfigureMiKTeX
# enable package installation without asking (1 = Yes, 0 = No, 2 = Ask me first) # 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 WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" # if only for current user
${if} $MiKTeXUser != "HKCU" ${if} $MiKTeXUser != "HKCU"
WriteRegStr SHCTX "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1"
${endif} ${endif}
# set package repository (MiKTeX's primary package repository) # 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" "RemoteRepository" "${MiKTeXRepo}" # if only for current user
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote" # if only for current user WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote" # if only for current user
${if} $MiKTeXUser != "HKCU" ${if} $MiKTeXUser != "HKCU"
WriteRegStr SHCTX "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RemoteRepository" "${MiKTeXRepo}" WriteRegStr HKLM "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" "RepositoryType" "remote"
${endif} ${endif}
# enable MiKTeX's automatic package installation # enable MiKTeX's automatic package installation
@ -234,7 +259,7 @@ Function ConfigureMiKTeX
FunctionEnd FunctionEnd
Function UpdateMiKTeX Function UpdateMiKTeX
# ask to update MiKTeX # asks to update MiKTeX
${if} $LaTeXInstalled == "MiKTeX" ${if} $LaTeXInstalled == "MiKTeX"
MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater

View File

@ -30,7 +30,7 @@ Detection of external component locations
Function SearchExternal Function SearchExternal
Call LaTeXActions # function from LaTeX.nsh Call LaTeXActions # function from LaTeX.nsh
Call MissingPrograms Call MissingPrograms
Call FindDictionaries Call FindDictionaries # function from dictionaries.nsh
FunctionEnd FunctionEnd
# --------------------------------------- # ---------------------------------------
@ -179,49 +179,6 @@ 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 Function EditorCheck
# test if an editor with syntax-highlighting for LaTeX-files is installed # test if an editor with syntax-highlighting for LaTeX-files is installed

View File

@ -1,6 +1,66 @@
# download dictionaries /*
dictionaries.nsh
Function DownloadHunspellDictionary 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 # Downloads hunspell dictionaries from a location that is given in the file
# $INSTDIR\Resources\HunspellDictionaryNames.txt # $INSTDIR\Resources\HunspellDictionaryNames.txt
@ -46,7 +106,7 @@ FunctionEnd
#-------------------------------- #--------------------------------
Function DownloadThesaurusDictionary Function DownloadThesaurusDictionaries
# Downloads thesaurus dictionaries from a location that is given in the file # Downloads thesaurus dictionaries from a location that is given in the file
# $INSTDIR\Resources\ThesaurusDictionaryNames.txt # $INSTDIR\Resources\ThesaurusDictionaryNames.txt
@ -92,8 +152,8 @@ FunctionEnd
#-------------------------------- #--------------------------------
Function InstallHunspellDictionary Function InstallHunspellDictionaries
# install the selected hunspell dictionaries except of already existing ones # installs the selected hunspell dictionaries except of already existing ones
# download the dictionaries # download the dictionaries
${Do} ${Do}
@ -112,7 +172,7 @@ Function InstallHunspellDictionary
StrCpy $Search $DictCode StrCpy $Search $DictCode
Call StrPoint # function from LyXUtils.nsh Call StrPoint # function from LyXUtils.nsh
${if} $Pointer == "-1" ${if} $Pointer == "-1"
Call DownloadHunspellDictionary Call DownloadHunspellDictionaries
${endif} ${endif}
${LoopUntil} $DictCodes == "" ${LoopUntil} $DictCodes == ""
@ -120,8 +180,8 @@ FunctionEnd
#-------------------------------- #--------------------------------
Function InstallThesaurusDictionary Function InstallThesaurusDictionaries
# install the selected thesaurus dictionaries except of already existing ones # installs the selected thesaurus dictionaries except of already existing ones
# download the dictionaries # download the dictionaries
${Do} ${Do}
@ -133,7 +193,7 @@ Function InstallThesaurusDictionary
StrCpy $Search $ThesCode StrCpy $Search $ThesCode
Call StrPoint # function from LyXUtils.nsh Call StrPoint # function from LyXUtils.nsh
${if} $Pointer == "-1" ${if} $Pointer == "-1"
Call DownloadThesaurusDictionary Call DownloadThesaurusDictionaries
${endif} ${endif}
${LoopUntil} $ThesCodes == "" ${LoopUntil} $ThesCodes == ""
@ -155,3 +215,4 @@ Function InstallThesaurusDictionary
RMDir "$INSTDIR\Resources\backup" RMDir "$INSTDIR\Resources\backup"
FunctionEnd FunctionEnd

View File

@ -23,7 +23,6 @@ BrandingText " "
!define MUI_HEADERIMAGE_RIGHT !define MUI_HEADERIMAGE_RIGHT
!define MUI_WELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}" !define MUI_WELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}" !define MUI_UNWELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}"
!define MUI_COMPONENTSPAGE_NODESC
#-------------------------------- #--------------------------------
# Pages # Pages

View File

@ -1,9 +1,7 @@
/* /*
init.nsh init.nsh
Initialization function Initialization functions
*/ */
#-------------------------------- #--------------------------------
@ -58,7 +56,7 @@ SectionEnd
!if ${SETUPTYPE} == BUNDLE !if ${SETUPTYPE} == BUNDLE
Section /o "$(SecInstJabRefTitle)" SecInstJabRef Section /o "$(SecInstJabRefTitle)" SecInstJabRef
AddSize 5000 AddSize 12400
StrCpy $InstallJabRef "true" StrCpy $InstallJabRef "true"
SectionEnd SectionEnd
!endif !endif
@ -540,6 +538,8 @@ SectionGroupEnd
!if ${SETUPTYPE} == BUNDLE !if ${SETUPTYPE} == BUNDLE
!insertmacro MUI_DESCRIPTION_TEXT ${SecInstJabRef} "$(SecInstJabRefDescription)" !insertmacro MUI_DESCRIPTION_TEXT ${SecInstJabRef} "$(SecInstJabRefDescription)"
!endif !endif
!insertmacro MUI_DESCRIPTION_TEXT ${SecDictionaries} "$(SecDictionariesDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecThesaurus} "$(SecThesaurusDescription)"
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END
@ -1313,7 +1313,7 @@ Function un.onInit
MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)" MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)"
Abort Abort
${endif} ${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 ${if} $0 == "" # check in HKCU
ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion" ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion"
${if} $0 == "" ${if} $0 == ""
@ -1329,17 +1329,15 @@ Function un.onInit
${if} $0 == "Yes${APP_SERIES_KEY}" ${if} $0 == "Yes${APP_SERIES_KEY}"
SectionSetText 2 "MiKTeX" # names the corersponding uninstaller section SectionSetText 2 "MiKTeX" # names the corersponding uninstaller section
StrCpy $LaTeXInstalled "MiKTeX" StrCpy $LaTeXInstalled "MiKTeX"
DeleteRegValue SHCTX "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
${else} ${else}
SectionSetText 2 "" # hides the corresponding uninstaller section SectionSetText 2 "" # hides the corresponding uninstaller section
${endif} ${endif}
# test if JabRef was installed together with LyX # 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}" ${if} $0 == "Yes${APP_SERIES_KEY}"
SectionSetText 3 "JabRef" # names the corersponding uninstaller section SectionSetText 3 "JabRef" # names the corersponding uninstaller section
StrCpy $JabRefInstalled "Yes" StrCpy $JabRefInstalled "Yes"
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
${else} ${else}
SectionSetText 3 "" # hides the corresponding uninstaller section SectionSetText 3 "" # hides the corresponding uninstaller section
${endif} ${endif}

View File

@ -48,8 +48,8 @@ Configuration of standard NSIS header files
!include gui\LaTeXFolder.nsh !include gui\LaTeXFolder.nsh
!endif # end if != BUNDLE !endif # end if != BUNDLE
# Functions download dictionaries # Functions to download spell-checker and thesaurus dictionaries
!include include\Thesaurus.nsh !include include\dictionaries.nsh
#-------------------------------- #--------------------------------
# Include standard functions # Include standard functions

View File

@ -33,6 +33,8 @@ ${LangFileString} SecInstJabRefDescription "Bibliography reference manager and e
#${LangFileString} SecAllUsersDescription "Install LyX for all users or just the current user." #${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} SecFileAssocDescription "Files with a .lyx extension will automatically open in LyX."
${LangFileString} SecDesktopDescription "A LyX icon on the desktop." ${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} EnterLaTeXHeader1 'LaTeX-distribution'
${LangFileString} EnterLaTeXHeader2 'Set the LaTeX-distribution that LyX should use.' ${LangFileString} EnterLaTeXHeader2 'Set the LaTeX-distribution that LyX should use.'
@ -84,7 +86,7 @@ ${LangFileString} ModifyingConfigureFailed "Could not set 'path_prefix' in the c
${LangFileString} InstallRunning "The installer is already running!" ${LangFileString} InstallRunning "The installer is already running!"
${LangFileString} StillInstalled "LyX ${APP_SERIES_KEY2} is already installed! Deinstall LyX first." ${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\ ${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\ ${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." MiKTeX was installed with administrator privileges but you are installing LyX without them."
@ -106,7 +108,8 @@ ${LangFileString} UnLyXPreferencesTitle 'LyX$\'s user preferences'
${LangFileString} SecUnMiKTeXDescription "Uninstalls the LaTeX-distribution MiKTeX." ${LangFileString} SecUnMiKTeXDescription "Uninstalls the LaTeX-distribution MiKTeX."
${LangFileString} SecUnJabRefDescription "Uninstalls the bibliography manager JabRef." ${LangFileString} SecUnJabRefDescription "Uninstalls the bibliography manager JabRef."
${LangFileString} SecUnPreferencesDescription 'Deletes LyX$\'s configuration folder$\r$\n\ ${LangFileString} SecUnPreferencesDescription 'Deletes LyX$\'s configuration$\r$\n\
"$AppPre\username\$AppSuff\${APP_DIR_USERDATA}"$\r$\n\ (folder $\"$AppPre\username\$AppSuff\${APP_DIR_USERDATA}$\"$\r$\n\
for all users.' for you or for all users (if you are admin).'
${LangFileString} SecUnProgramFilesDescription "Uninstall LyX and all of its components." ${LangFileString} SecUnProgramFilesDescription "Uninstall LyX and all of its components."

View File

@ -14,39 +14,41 @@ ${LangFileString} TEXT_WELCOME "Dieser Assistent wird Sie durch die Installation
$\r$\n\ $\r$\n\
$_CLICK" $_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_LYX "Konfiguriere LyX (MiKTeX kann fehlende Pakte herunterladen, was etwas Zeit braucht) ..."
${LangFileString} TEXT_CONFIGURE_PYTHON "Kompiliere Python Skripte..." ${LangFileString} TEXT_CONFIGURE_PYTHON "Kompiliere Python Skripte..."
${LangFileString} TEXT_FINISH_DESKTOP "Ein Symbol auf der Arbeitsoberfläche erzeugen" ${LangFileString} TEXT_FINISH_DESKTOP "Ein Symbol auf der Arbeitsoberfläche erzeugen"
${LangFileString} TEXT_FINISH_WEBSITE "Besuchen Sie lyx.org für aktuelle Neuigkeiten" ${LangFileString} TEXT_FINISH_WEBSITE "Besuchen Sie lyx.org für aktuelle Neuigkeiten"
${LangFileString} FileTypeTitle "LyX-Dokument" #${LangFileString} FileTypeTitle "LyX-Dokument"
${LangFileString} SecInstJabRefTitle "JabRef" ${LangFileString} SecInstJabRefTitle "JabRef"
${LangFileString} SecAllUsersTitle "Für alle Nutzer installieren?" #${LangFileString} SecAllUsersTitle "Für alle Nutzer installieren?"
${LangFileString} SecFileAssocTitle "Dateizuordnungen" ${LangFileString} SecFileAssocTitle "Dateizuordnungen"
${LangFileString} SecDesktopTitle "Desktopsymbol" ${LangFileString} SecDesktopTitle "Desktopsymbol"
${LangFileString} SecCoreDescription "Das Programm LyX." ${LangFileString} SecCoreDescription "Das Programm LyX."
${LangFileString} SecInstJabRefDescription "Manager für bibliografische Referenzen und Editor für BibTeX-Dateien." ${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} SecFileAssocDescription "Vernüpfung zwischen LyX und der .lyx Dateiendung."
${LangFileString} SecDesktopDescription "Verknüpfung zu LyX auf dem Desktop." ${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} EnterLaTeXHeader1 'LaTeX-Distribution'
${LangFileString} EnterLaTeXHeader2 'Legen Sie die LaTeX-Distribution fest die LyX verwenden soll.' ${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 \ ${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\ LaTeX-Distribution festlegen die LyX verwenden soll.$\r$\n\
Wenn Sie kein LaTeX verwenden, kann LyX keine Dokumente ausgeben!$\r$\n\ Wenn Sie kein LaTeX verwenden, kann LyX keine Dokumente ausgeben!$\r$\n\
$\r$\n\ $\r$\n\
Der Installer hat auf Ihrem System die LaTeX-Distribution$\r$\n\ Der Installer hat auf Ihrem System die LaTeX-Distribution$\r$\n\
$\"$LaTeXName$\" erkannt. Unten angegeben ist ihr Pfad.' $\"$LaTeXName$\" erkannt. Unten angegeben ist ihr Pfad.'
${LangFileString} EnterLaTeXFolderNone 'Geben Sie unten den Pfad zur Datei $\"latex.exe$\" an. Damit legen Sie fest welche \ ${LangFileString} EnterLaTeXFolderNone 'Geben Sie unten den Pfad zur Datei $\"latex.exe$\" an. Damit legen Sie fest welche \
LaTeX-Distribution LyX verwenden soll.$\r$\n\ LaTeX-Distribution LyX verwenden soll.$\r$\n\
Wenn Sie kein LaTeX verwenden, kann LyX keine Dokumente ausgeben!$\r$\n\ Wenn Sie kein LaTeX verwenden, kann LyX keine Dokumente ausgeben!$\r$\n\
$\r$\n\ $\r$\n\
Der Installer konnte auf Ihrem System keine LaTeX-Distribution finden.' Der Installer konnte auf Ihrem System keine LaTeX-Distribution finden.'
${LangFileString} PathName 'Pfad zur Datei $\"latex.exe$\"' ${LangFileString} PathName 'Pfad zur Datei $\"latex.exe$\"'
${LangFileString} DontUseLaTeX "Kein LaTeX benutzen" ${LangFileString} DontUseLaTeX "Kein LaTeX benutzen"
${LangFileString} InvalidLaTeXFolder 'Kann die Datei $\"latex.exe$\" nicht finden.' ${LangFileString} InvalidLaTeXFolder 'Kann die Datei $\"latex.exe$\" nicht finden.'
@ -56,34 +58,36 @@ ${LangFileString} LatexInfo 'Als N
$\r$\n\ $\r$\n\
!!! Bitte verwenden Sie alle voreingestellten Optionen des MiKTeX-Installers !!!' !!! Bitte verwenden Sie alle voreingestellten Optionen des MiKTeX-Installers !!!'
${LangFileString} LatexError1 'Es konnte keine LaTeX-Distribution gefunden werden!$\r$\n\ ${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\ LyX kann ohne eine LaTeX-Distribution wie z.B. $\"MiKTeX$\" nicht benutzt werden!$\r$\n\
Die Installation wird daher abgebrochen.' Die Installation wird daher abgebrochen.'
${LangFileString} HunspellFailed 'Herunterladen des Wörterbuchs für Sprache $\"$R3$\" fehlgeschlagen.' ${LangFileString} HunspellFailed 'Herunterladen des Wörterbuchs für Sprache $\"$R3$\" fehlgeschlagen.'
${LangFileString} ThesaurusFailed 'Herunterladen des Thesaurus 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\ ${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\ ${LangFileString} JabRefError 'Das Programm $\"JabRef$\" konnte nicht erfolgreich installiert werden!$\r$\n\
Der Installer wird trotzdem fortgesetzt.$\r$\n\ Der Installer wird trotzdem fortgesetzt.$\r$\n\
Versuchen Sie JabRef später noch einmal zu installieren.' 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\ #${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\ # ist es erforderlich für MiKTeXs Installationsordner$\r$\n\
$MiKTeXPath $\r$\n\ # $MiKTeXPath $\r$\n\
und seine Unterordner Schreibrechte für alle Benutzer zu setzen." # und seine Unterordner Schreibrechte für alle Benutzer zu setzen."
${LangFileString} MiKTeXInfo 'Die LaTeX-Distribution $\"MiKTeX$\" wird zusammen mit LyX verwendet werden.$\r$\n\ ${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\ 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\ installieren, bevor sie LyX das erste Mal benutzen.$\r$\n\
Möchten Sie jetzt nach Updates für MiKTeX suchen?' 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} 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} NotAdmin "Sie benötigen Administratorrechte um LyX zu installieren!"
${LangFileString} InstallRunning "Der Installer läuft bereits!" ${LangFileString} InstallRunning "Der Installer läuft bereits!"
${LangFileString} StillInstalled "LyX ${APP_SERIES_KEY2} ist bereits installiert! Deinstallieren Sie LyX zuerst." ${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\ ${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." MiKTeX wurde mit Administratorrechten installiert aber Sie installieren LyX ohne diese."
@ -91,9 +95,9 @@ ${LangFileString} MetafileNotAvailable "Die LyX Unterst
sein, denn dafür müsste ein Software-Drucker für Windows installiert werden,$\r$\n\ sein, denn dafür müsste ein Software-Drucker für Windows installiert werden,$\r$\n\
was jedoch nur mit Administratorrechten möglich ist." was jedoch nur mit Administratorrechten möglich ist."
${LangFileString} FinishPageMessage "Glückwunsch! LyX wurde erfolgreich installiert.$\r$\n\ #${LangFileString} FinishPageMessage "Glückwunsch! LyX wurde erfolgreich installiert.$\r$\n\
$\r$\n\ # $\r$\n\
(Der erste Start von LyX kann etwas länger dauern.)" # (Der erste Start von LyX kann etwas länger dauern.)"
${LangFileString} FinishPageRun "LyX starten" ${LangFileString} FinishPageRun "LyX starten"
${LangFileString} UnNotInRegistryLabel "Kann LyX nicht in der Registry finden.$\r$\n\ ${LangFileString} UnNotInRegistryLabel "Kann LyX nicht in der Registry finden.$\r$\n\
@ -105,9 +109,8 @@ ${LangFileString} UnLyXPreferencesTitle 'LyXs Benutzereinstellungen'
${LangFileString} SecUnMiKTeXDescription "Deinstalliert die LaTeX-Distribution MiKTeX." ${LangFileString} SecUnMiKTeXDescription "Deinstalliert die LaTeX-Distribution MiKTeX."
${LangFileString} SecUnJabRefDescription "Deinstalliert den Bibliografiemanager JabRef." ${LangFileString} SecUnJabRefDescription "Deinstalliert den Bibliografiemanager JabRef."
${LangFileString} SecUnPreferencesDescription 'Löscht LyXs Benutzereinstellungen,$\r$\n\ ${LangFileString} SecUnPreferencesDescription 'Löscht LyXs Benutzereinstellungen$\r$\n\
(den Ornder:$\r$\n\ (Ordner $\"$AppPre\username\$AppSuff\${APP_DIR_USERDATA}$\")$\r$\n\
$\"$AppPre\username\$AppSuff\${APP_DIR_USERDATA}$\")$\r$\n\ für Sie oder für alle Benutzer (wenn Sie Admin sind).'
für alle Benutzer.'
${LangFileString} SecUnProgramFilesDescription "Deinstalliert LyX und all seine Komponenten." ${LangFileString} SecUnProgramFilesDescription "Deinstalliert LyX und all seine Komponenten."

View File

@ -1,2 +1,11 @@
!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 !include lyx.nsi

View File

@ -1,2 +1,11 @@
!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 !include lyx.nsi

View File

@ -34,7 +34,7 @@ SetCompressor /SOLID lzma
# set up the installer pages # set up the installer pages
!include include\gui.nsh !include include\gui.nsh
# # sets the install sections and checks the system on starting the un/installer
!include include\init.nsh !include include\init.nsh
# install LyX and needed third-party programs like Python etc. # install LyX and needed third-party programs like Python etc.
@ -46,8 +46,8 @@ SetCompressor /SOLID lzma
# configure LyX (set start menu and write registry entries) # configure LyX (set start menu and write registry entries)
!include setup\configure.nsh !include setup\configure.nsh
# # provides downloads of external programs
!include gui\external.nsh #!include gui\external.nsh
#-------------------------------- #--------------------------------
# Output file # Output file

View File

@ -108,12 +108,19 @@ Section -ProgramFiles SecProgramFiles
ExecWait "$INSTDIR\${JabRefInstall}" ExecWait "$INSTDIR\${JabRefInstall}"
# test if JabRef is now installed # test if JabRef is now installed
StrCpy $PathBibTeXEditor "" 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 == "" ${if} $PathBibTeXEditor == ""
MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)" MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
${else} ${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 # special entry that it was installed together with LyX
${endif} # 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} ${endif}
!endif # end if BUNDLE !endif # end if BUNDLE
@ -134,10 +141,10 @@ Section -ProgramFiles SecProgramFiles
# download dictionaries and thesaurus # download dictionaries and thesaurus
${if} $DictCodes != "" ${if} $DictCodes != ""
Call InstallHunspellDictionary # Function from Thesaurus.nsh Call InstallHunspellDictionaries # Function from dictionaries.nsh
${endif} ${endif}
${if} $ThesCodes != "" ${if} $ThesCodes != ""
Call InstallThesaurusDictionary # Function from Thesaurus.nsh Call InstallThesaurusDictionaries # Function from dictionaries.nsh
${endif} ${endif}
# finally delete the list of mirrors # finally delete the list of mirrors
Delete "$INSTDIR\Resources\DictionaryMirrors.txt" Delete "$INSTDIR\Resources\DictionaryMirrors.txt"

View File

@ -61,6 +61,8 @@ Section "un.LyX" un.SecUnProgramFiles
DeleteRegKey SHCTX "Software\Classes\${APP_EXT}14" DeleteRegKey SHCTX "Software\Classes\${APP_EXT}14"
DeleteRegKey SHCTX "Software\Classes\${APP_EXT}15" DeleteRegKey SHCTX "Software\Classes\${APP_EXT}15"
DeleteRegKey SHCTX "Software\Classes\${APP_EXT}16" 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_EXT}"
DeleteRegKey SHCTX "Software\Classes\${APP_REGNAME_DOC}" DeleteRegKey SHCTX "Software\Classes\${APP_REGNAME_DOC}"
${endif} ${endif}
@ -83,7 +85,6 @@ Section "un.LyX" un.SecUnProgramFiles
DeleteRegKey HKCR "Applications\lyx.exe" DeleteRegKey HKCR "Applications\lyx.exe"
# File associations # File associations
ReadRegStr $FileAssociation SHELL_CONTEXT "Software\Classes\${APP_EXT}" "" ReadRegStr $FileAssociation SHELL_CONTEXT "Software\Classes\${APP_EXT}" ""
${If} $FileAssociation == "${APP_REGNAME_DOC}" ${If} $FileAssociation == "${APP_REGNAME_DOC}"
@ -92,16 +93,17 @@ Section "un.LyX" un.SecUnProgramFiles
${If} $MultiUser.Privileges != "Admin" ${If} $MultiUser.Privileges != "Admin"
${OrIf} $MultiUser.Privileges != "Power" ${OrIf} $MultiUser.Privileges != "Power"
# Delete Postscript printer for metafile to EPS conversion # Delete Postscript printer for metafile to EPS conversion
ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"' ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
${EndIf} ${EndIf}
# clean other registry entries # clean other registry entries
DeleteRegKey SHCTX "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAME}.exe" DeleteRegKey SHCTX "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAME}.exe"
DeleteRegKey SHCTX "SOFTWARE\${APP_REGKEY}" 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 SectionEnd
@ -120,7 +122,7 @@ SectionEnd
Section /o "un.MiKTeX" un.SecUnMiKTeX Section /o "un.MiKTeX" un.SecUnMiKTeX
${if} $LaTeXInstalled == "MiKTeX" # only uninstall MiKTeX when it was installed together with LyX ${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 ExecWait $1 # run MiKTeX's uninstaller
${endif} ${endif}
@ -131,7 +133,7 @@ SectionEnd
Section "un.JabRef" un.SecUnJabRef Section "un.JabRef" un.SecUnJabRef
${if} $JabRefInstalled == "Yes" # only uninstall JabRef when it was installed together with LyX ${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 ExecWait "$1" # run JabRef's uninstaller
${endif} ${endif}