The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 290efe6190c6c5ff6065af202acd476060c29861
Author: Uwe Stöhr <uwesto...@lyx.org>
Date:   Sun Nov 11 18:07:55 2012 +0100

    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

diff --git a/development/Win32/packaging/installer/include/LaTeX.nsh 
b/development/Win32/packaging/installer/include/LaTeX.nsh
index d1b0168..d47dabc 100644
--- a/development/Win32/packaging/installer/include/LaTeX.nsh
+++ b/development/Win32/packaging/installer/include/LaTeX.nsh
@@ -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
- # 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
@@ -109,8 +132,8 @@ FunctionEnd
 !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)"
@@ -130,7 +153,9 @@ FunctionEnd
    ${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}
@@ -214,14 +239,14 @@ Function ConfigureMiKTeX
   # 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
@@ -234,7 +259,7 @@ Function ConfigureMiKTeX
 FunctionEnd
 
 Function UpdateMiKTeX
- # ask to update MiKTeX
+ # asks to update MiKTeX
 
   ${if} $LaTeXInstalled == "MiKTeX"
    MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO 
UpdateLater
diff --git a/development/Win32/packaging/installer/include/detection.nsh 
b/development/Win32/packaging/installer/include/detection.nsh
index d076302..a27e5bb 100644
--- a/development/Win32/packaging/installer/include/detection.nsh
+++ b/development/Win32/packaging/installer/include/detection.nsh
@@ -30,7 +30,7 @@ Detection of external component locations
 Function SearchExternal
   Call LaTeXActions # function from LaTeX.nsh
   Call MissingPrograms
-  Call FindDictionaries
+  Call FindDictionaries # function from dictionaries.nsh
 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
   # test if an editor with syntax-highlighting for LaTeX-files is installed
 
diff --git a/development/Win32/packaging/installer/include/thesaurus.nsh 
b/development/Win32/packaging/installer/include/dictionaries.nsh
similarity index 65%
rename from development/Win32/packaging/installer/include/thesaurus.nsh
rename to development/Win32/packaging/installer/include/dictionaries.nsh
index 9f9a464..14ee692 100644
--- a/development/Win32/packaging/installer/include/thesaurus.nsh
+++ b/development/Win32/packaging/installer/include/dictionaries.nsh
@@ -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
  # $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
  # $INSTDIR\Resources\ThesaurusDictionaryNames.txt
  
@@ -92,8 +152,8 @@ FunctionEnd
 
 #--------------------------------
 
-Function InstallHunspellDictionary
- # install the selected hunspell dictionaries except of already existing ones
+Function InstallHunspellDictionaries
+ # installs the selected hunspell dictionaries except of already existing ones
 
  # download the dictionaries
  ${Do}
@@ -112,7 +172,7 @@ Function InstallHunspellDictionary
   StrCpy $Search $DictCode
   Call StrPoint # function from LyXUtils.nsh
   ${if} $Pointer == "-1"
-   Call DownloadHunspellDictionary
+   Call DownloadHunspellDictionaries
   ${endif}
  ${LoopUntil} $DictCodes == ""
  
@@ -120,8 +180,8 @@ FunctionEnd
 
 #--------------------------------
 
-Function InstallThesaurusDictionary
- # install the selected thesaurus dictionaries except of already existing ones
+Function InstallThesaurusDictionaries
+ # installs the selected thesaurus dictionaries except of already existing ones
 
  # download the dictionaries
  ${Do}
@@ -133,7 +193,7 @@ Function InstallThesaurusDictionary
   StrCpy $Search $ThesCode
   Call StrPoint # function from LyXUtils.nsh
   ${if} $Pointer == "-1"
-   Call DownloadThesaurusDictionary
+   Call DownloadThesaurusDictionaries
   ${endif}
  ${LoopUntil} $ThesCodes == ""
  
@@ -155,3 +215,4 @@ Function InstallThesaurusDictionary
  RMDir "$INSTDIR\Resources\backup"
  
 FunctionEnd
+
diff --git a/development/Win32/packaging/installer/include/gui.nsh 
b/development/Win32/packaging/installer/include/gui.nsh
index aaf9d4f..5a4015c 100644
--- a/development/Win32/packaging/installer/include/gui.nsh
+++ b/development/Win32/packaging/installer/include/gui.nsh
@@ -23,7 +23,6 @@ BrandingText " "
 !define MUI_HEADERIMAGE_RIGHT
 !define MUI_WELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}"
 !define MUI_UNWELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}"
-!define MUI_COMPONENTSPAGE_NODESC
 
 #--------------------------------
 # Pages
diff --git a/development/Win32/packaging/installer/include/init.nsh 
b/development/Win32/packaging/installer/include/init.nsh
index 7d296ff..058971d 100644
--- a/development/Win32/packaging/installer/include/init.nsh
+++ b/development/Win32/packaging/installer/include/init.nsh
@@ -1,9 +1,7 @@
 /*
-
 init.nsh
 
-Initialization function
-
+Initialization functions
 */
 
 #--------------------------------
@@ -58,7 +56,7 @@ SectionEnd
 
 !if ${SETUPTYPE} == BUNDLE
  Section /o "$(SecInstJabRefTitle)" SecInstJabRef
-  AddSize 5000
+  AddSize 12400
   StrCpy $InstallJabRef "true"
  SectionEnd
 !endif
@@ -540,6 +538,8 @@ SectionGroupEnd
 !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
 
 
@@ -1313,7 +1313,7 @@ Function un.onInit
    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 == ""
@@ -1329,17 +1329,15 @@ Function un.onInit
   ${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}
diff --git a/development/Win32/packaging/installer/include/nsis.nsh 
b/development/Win32/packaging/installer/include/nsis.nsh
index 108ae0c..0a6585d 100644
--- a/development/Win32/packaging/installer/include/nsis.nsh
+++ b/development/Win32/packaging/installer/include/nsis.nsh
@@ -48,8 +48,8 @@ Configuration of standard NSIS header files
  !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
diff --git a/development/Win32/packaging/installer/lang/english.nsh 
b/development/Win32/packaging/installer/lang/english.nsh
index b9eea46..e3e70d4 100644
--- a/development/Win32/packaging/installer/lang/english.nsh
+++ b/development/Win32/packaging/installer/lang/english.nsh
@@ -33,6 +33,8 @@ ${LangFileString} SecInstJabRefDescription "Bibliography 
reference manager and e
 #${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.'
@@ -84,7 +86,7 @@ ${LangFileString} ModifyingConfigureFailed "Could not set 
'path_prefix' in the c
 ${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."
@@ -106,7 +108,8 @@ ${LangFileString} UnLyXPreferencesTitle 'LyX$\'s user 
preferences'
 
 ${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."
+
diff --git a/development/Win32/packaging/installer/lang/german.nsh 
b/development/Win32/packaging/installer/lang/german.nsh
index beb96c0..1433651 100644
--- a/development/Win32/packaging/installer/lang/german.nsh
+++ b/development/Win32/packaging/installer/lang/german.nsh
@@ -14,39 +14,41 @@ ${LangFileString} TEXT_WELCOME "Dieser Assistent wird Sie 
durch die Installation
                                $\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.'
@@ -56,34 +58,36 @@ ${LangFileString} LatexInfo 'Als N
                                    $\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."
@@ -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\
                                        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\
@@ -105,9 +109,8 @@ ${LangFileString} UnLyXPreferencesTitle 'LyXs 
Benutzereinstellungen'
 
 ${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."
 
diff --git a/development/Win32/packaging/installer/lyx-bundle.nsi 
b/development/Win32/packaging/installer/lyx-bundle.nsi
index cdd71f8..2f33623 100644
--- a/development/Win32/packaging/installer/lyx-bundle.nsi
+++ b/development/Win32/packaging/installer/lyx-bundle.nsi
@@ -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
\ No newline at end of file
diff --git a/development/Win32/packaging/installer/lyx-standard.nsi 
b/development/Win32/packaging/installer/lyx-standard.nsi
index 410cc64..f18a0f9 100644
--- a/development/Win32/packaging/installer/lyx-standard.nsi
+++ b/development/Win32/packaging/installer/lyx-standard.nsi
@@ -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
\ No newline at end of file
diff --git a/development/Win32/packaging/installer/lyx.nsi 
b/development/Win32/packaging/installer/lyx.nsi
index 4c7e520..bd4b983 100644
--- a/development/Win32/packaging/installer/lyx.nsi
+++ b/development/Win32/packaging/installer/lyx.nsi
@@ -34,7 +34,7 @@ SetCompressor /SOLID lzma
 # 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.
@@ -46,8 +46,8 @@ SetCompressor /SOLID lzma
 # 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
diff --git a/development/Win32/packaging/installer/setup/install.nsh 
b/development/Win32/packaging/installer/setup/install.nsh
index 27291be..8586aa7 100644
--- a/development/Win32/packaging/installer/setup/install.nsh
+++ b/development/Win32/packaging/installer/setup/install.nsh
@@ -108,12 +108,19 @@ Section -ProgramFiles SecProgramFiles
      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
@@ -134,10 +141,10 @@ Section -ProgramFiles SecProgramFiles
   
   # 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"
diff --git a/development/Win32/packaging/installer/setup/uninstall.nsh 
b/development/Win32/packaging/installer/setup/uninstall.nsh
index 2eeaa07..e47e197 100644
--- a/development/Win32/packaging/installer/setup/uninstall.nsh
+++ b/development/Win32/packaging/installer/setup/uninstall.nsh
@@ -61,6 +61,8 @@ Section "un.LyX" un.SecUnProgramFiles
     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}
@@ -83,7 +85,6 @@ Section "un.LyX" un.SecUnProgramFiles
   DeleteRegKey HKCR "Applications\lyx.exe"
   
   # File associations
-  
   ReadRegStr $FileAssociation SHELL_CONTEXT "Software\Classes\${APP_EXT}" ""
   
   ${If} $FileAssociation == "${APP_REGNAME_DOC}"
@@ -92,16 +93,17 @@ Section "un.LyX" un.SecUnProgramFiles
   
   ${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
 
@@ -120,7 +122,7 @@ 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}
 
@@ -131,7 +133,7 @@ SectionEnd
 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}
 

-----------------------------------------------------------------------

Summary of changes:
 .../Win32/packaging/installer/include/LaTeX.nsh    |   39 ++++++++--
 .../packaging/installer/include/detection.nsh      |   45 +-----------
 .../include/{thesaurus.nsh => dictionaries.nsh}    |   79 +++++++++++++++++--
 .../Win32/packaging/installer/include/gui.nsh      |    1 -
 .../Win32/packaging/installer/include/init.nsh     |   14 ++--
 .../Win32/packaging/installer/include/nsis.nsh     |    4 +-
 .../Win32/packaging/installer/lang/english.nsh     |   11 ++-
 .../Win32/packaging/installer/lang/german.nsh      |   71 +++++++++---------
 .../Win32/packaging/installer/lyx-bundle.nsi       |   11 +++-
 .../Win32/packaging/installer/lyx-standard.nsi     |   11 +++-
 development/Win32/packaging/installer/lyx.nsi      |    6 +-
 .../Win32/packaging/installer/setup/install.nsh    |   17 +++-
 .../Win32/packaging/installer/setup/uninstall.nsh  |   12 ++-
 13 files changed, 197 insertions(+), 124 deletions(-)
 rename development/Win32/packaging/installer/include/{thesaurus.nsh => 
dictionaries.nsh} (65%)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to