]> git.lyx.org Git - features.git/commitdiff
More installer infrastructure changes according to Christian's suggestions.
authorUwe Stöhr <uwestoehr@web.de>
Tue, 24 Apr 2007 22:08:27 +0000 (22:08 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Tue, 24 Apr 2007 22:08:27 +0000 (22:08 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17958 a592a061-630c-0410-9148-cb99ea01b6c8

13 files changed:
development/Win32/packaging/installer/LyXWinInstaller/Editors.nsh [deleted file]
development/Win32/packaging/installer/LyXWinInstaller/InstallActions-complete.nsh
development/Win32/packaging/installer/LyXWinInstaller/InstallActions-small.nsh
development/Win32/packaging/installer/LyXWinInstaller/InstallerStructure.odg
development/Win32/packaging/installer/LyXWinInstaller/InstallerStructure.pdf
development/Win32/packaging/installer/LyXWinInstaller/LyX-Installer-Complete.nsi [deleted file]
development/Win32/packaging/installer/LyXWinInstaller/LyX-Installer-Small.nsi [deleted file]
development/Win32/packaging/installer/LyXWinInstaller/LyX-Installer-Update.nsi [deleted file]
development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi [new file with mode: 0644]
development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi [new file with mode: 0644]
development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi [new file with mode: 0644]
development/Win32/packaging/installer/LyXWinInstaller/MissingPrograms.nsh
development/Win32/packaging/installer/LyXWinInstaller/Settings.nsh [new file with mode: 0644]

diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Editors.nsh b/development/Win32/packaging/installer/LyXWinInstaller/Editors.nsh
deleted file mode 100644 (file)
index 031f745..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-Function EditorCheck
-
-  ; test if an editor with syntax-highlighting for LaTeX-files is installed
-  ; (check for jEdit, PSPad, WinShell, ConTEXT, Crimson Editor, Vim, TeXnicCenter, LaTeXEditor, WinEdt, LEd, WinTeX)
-  StrCpy $EditorPath ""
-  StrCpy $0 ""
-  ; check for jEdit
-  ReadRegStr $EditorPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\jEdit_is1" "InstallLocation"
-  ${if} $EditorPath != ""
-   StrCpy $EditorPath $EditorPath -1 ; remove "\" from the end of the string
-  ${endif}
-  ; check for PSPad
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PSPad editor_is1" "InstallLocation"
-  ${if} $0 != ""
-   StrCpy $0 $0 -1
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for WinShell
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinShell_is1" "InstallLocation"
-  ${if} $0 != ""
-   StrCpy $0 $0 -1
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for ConTEXT
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ConTEXTEditor_is1" "InstallLocation"
-  ${if} $0 != ""
-   StrCpy $0 $0 -1
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for Crimson Editor
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Crimson Editor" "UninstallString"
-  ${if} $0 != ""
-   StrCpy $0 $0 -14 ; remove "\uninstall.exe"
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for Vim 6.x
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Classes\Applications\gvim.exe\shell\edit\command" ""
-  ${if} $0 != ""
-   StrCpy $0 $0 -13 ; remove "gvim.exe "%1""
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for Vim 7.0
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 7.0" "UninstallString"
-  ${if} $0 != ""
-   StrCpy $0 $0 -18 ; remove "\uninstall-gui.exe"
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for TeXnicCenter
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TeXnicCenter_is1" "Inno Setup: App Path"
-  ${if} $0 != ""
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for LaTeXEditor
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LaTeX Editor" "InstallLocation"
-  ${if} $0 != ""
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for WinEdt
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinEdt_is1" "InstallLocation"
-  ${if} $0 != ""
-   StrCpy $0 $0 -1
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for LEd
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LEd_is1" "InstallLocation"
-  ${if} $0 != ""
-   StrCpy $0 $0 -1
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-  ; check for WinTeX
-  StrCpy $0 ""
-  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinTeX XP" "DisplayIcon"
-  ${if} $0 != ""
-   StrCpy $0 $0 -11 ; remove "\wintex.exe"
-   StrCpy $EditorPath "$EditorPath;$0"
-  ${endif}
-
-FunctionEnd
index a7c02ac3240a60f257fce1b6f08a4baea4d8f23f..27eb357ef530133ba7b3b44d437c261b4f38a364 100644 (file)
@@ -11,6 +11,87 @@ Section "-Installation actions" SecInstallation
   File /r "${PRODUCT_SOURCEDIR}\external"
 
   ; install MiKTeX if not already installed
+  Call MiKTeX
+
+  Call Ghostscript
+
+  Call ImageMagick
+
+  Call Aspell
+
+  Call Aiksaurus
+
+  Call PostScript
+
+  Call BibTeX
+
+  ; install the LaTeX class files that are delivered with LyX
+  ; and enable MiKTeX's automatic package installation
+  Call ConfigureMiKTeX ; Function from LaTeX.nsh
+
+  ; install Aspell dictionaries
+  ${if} $LangCode == "nb_NO"
+   StrCpy $LangCode "no_NO" ; we only have a norwegian dictionary available
+  ${endif}
+  Call InstallAspellDictionary ; function from Aspell.nsh
+
+  ; configure LyX
+  Call ConfigureLyX ; Function from ConfigLyX.nsh
+
+  ; delete unnecessary files
+  ${if} $DelPythonFiles == "True"
+   Delete $INSTDIR\bin\python.exe
+   Delete $INSTDIR\bin\python25.dll
+   Delete $INSTDIR\bin\Python-License.txt
+   RMDir /r $INSTDIR\bin\Lib
+   RMDir /r $INSTDIR\bin\DLLs
+  ${endif}
+  RMDir /r $INSTDIR\external
+
+  ; create Uninstaller
+  WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
+
+  ; run LyX's configure script
+  ; create a bat-file to start configure in a console window so that the user see the progress
+  ; of the configuration and to have a signal when the configuration is ready to start LyX
+  ; this is important when LyX is installed together with MiKTeX or when LyX is installed for the first
+  ; time on a computer, because the installation of missing LaTeX-files required by LyX could last minutes
+  ; a batch file is needed because simply calling ExecWait '"$PythonPath\python.exe" "$INSTDIR\Resources\configure.py"'
+  ; creates the config files in $PythonPath
+  ${if} $PythonPath == ""
+   StrCpy $PythonPath "$INSTDIR\bin"
+  ${endif}
+  StrCpy $1 $INSTDIR 2 ; get drive letter
+  FileOpen $R1 "$INSTDIR\Resources\configLyX.bat" w
+  FileWrite $R1 '$1$\r$\n\
+                cd $INSTDIR\Resources\$\r$\n\
+                "$PythonPath\python.exe" configure.py'
+  FileClose $R1
+  MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
+  ExecWait '"$INSTDIR\Resources\configLyX.bat"'
+  Delete "$INSTDIR\Resources\configLyX.bat"
+
+  ; ask to update MiKTeX
+  ${if} $MiKTeXInstalled == "yes"
+   MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
+   UpdateNow:
+    StrCpy $0 $LaTeXPath -4 ; remove "\bin"
+    ExecWait '"$LaTeXPath\copystart.exe" "$0\config\update.dat"' ; run MiKTeX's update wizard
+   UpdateLater:
+  ${endif}
+
+  ; save MiKTeX's install path to be able to remove LyX's LaTeX-files in the uninstaller
+  FileOpen $R1 "$INSTDIR\Resources\uninstallPaths.dat" w
+  FileWrite $R1 '$LaTeXPath'
+  FileClose $R1
+
+SectionEnd
+
+; -------------------------------------------
+
+Function MiKTeX
+       
+; install MiKTeX if not already installed
   ${if} $LatexPath == ""
    ; launch MiKTeX's installer
    MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)"
@@ -41,6 +122,12 @@ Section "-Installation actions" SecInstallation
    ${endif} ; endif $LatexPath != ""
   ${endif}
 
+FunctionEnd
+
+; -------------------------------------------
+
+Function Ghostscript
+
   ; if GhostScript is not installed
   ${if} $GhostscriptPath == ""
    ; register Ghostscript
@@ -54,6 +141,12 @@ Section "-Installation actions" SecInstallation
    RMDir /r ${GhostscriptDir}   
   ${endif}
 
+FunctionEnd
+
+; -------------------------------------------
+
+Function ImageMagick
+
   ; if ImageMagick is not installed
   ${if} $ImageMagickPath == ""
    ; register ImageMagick
@@ -79,6 +172,12 @@ Section "-Installation actions" SecInstallation
    RMDir /r ${ImageMagickDir}
   ${endif}
 
+FunctionEnd
+
+; -------------------------------------------
+
+Function Aspell
+
   ; if Aspell is not installed
   ${if} $AspellPath == ""
    ; extract Aspell's program files
@@ -99,6 +198,12 @@ Section "-Installation actions" SecInstallation
    WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "UninstallString" "${AspellDir}\${AspellUninstall}"
   ${endif}
 
+FunctionEnd
+
+; -------------------------------------------
+
+Function Aiksaurus
+
   ; if Aiksaurus is not installed
   ${if} $AiksaurusPath == ""
    ; extract Aiksaurus' program files
@@ -110,7 +215,13 @@ Section "-Installation actions" SecInstallation
 ;   WriteRegStr HKLM "Software\Aiksaurus" "Data Path" "${AiksaurusDir}"
   ${endif}
 
-  ; if no PostScript viewer is installed
+FunctionEnd
+
+; -------------------------------------------
+
+Function PostScript
+
+; if no PostScript viewer is installed
   ${if} $PSVPath == ""
    ${if} $InstallGSview == "true"
     ; launch installer
@@ -125,7 +236,13 @@ Section "-Installation actions" SecInstallation
    ${endif}
   ${endif}
 
-  ; if no BibTeX editor is installed
+FunctionEnd
+
+; -------------------------------------------
+
+Function BibTeX
+
+; if no BibTeX editor is installed
   ${if} $BibTeXEditorPath == ""
    ${if} $InstallJabRef == "true"
     ; launch installer
@@ -142,64 +259,5 @@ Section "-Installation actions" SecInstallation
    ${endif}
   ${endif}
 
-  ; install the LaTeX class files that are delivered with LyX
-  ; and enable MiKTeX's automatic package installation
-  Call ConfigureMiKTeX ; Function from LaTeX.nsh
-
-  ; install Aspell dictionaries
-  ${if} $LangCode == "nb_NO"
-   StrCpy $LangCode "no_NO" ; we only have a norwegian dictionary available
-  ${endif}
-  Call InstallAspellDictionary ; function from Aspell.nsh
-
-  ; configure LyX
-  Call ConfigureLyX ; Function from ConfigLyX.nsh
-
-  ; delete unnecessary files
-  ${if} $DelPythonFiles == "True"
-   Delete $INSTDIR\bin\python.exe
-   Delete $INSTDIR\bin\python25.dll
-   Delete $INSTDIR\bin\Python-License.txt
-   RMDir /r $INSTDIR\bin\Lib
-   RMDir /r $INSTDIR\bin\DLLs
-  ${endif}
-  RMDir /r $INSTDIR\external
-
-  ; create Uninstaller
-  WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
-
-  ; run LyX's configure script
-  ; create a bat-file to start configure in a console window so that the user see the progress
-  ; of the configuration and to have a signal when the configuration is ready to start LyX
-  ; this is important when LyX is installed together with MiKTeX or when LyX is installed for the first
-  ; time on a computer, because the installation of missing LaTeX-files required by LyX could last minutes
-  ; a batch file is needed because simply calling ExecWait '"$PythonPath\python.exe" "$INSTDIR\Resources\configure.py"'
-  ; creates the config files in $PythonPath
-  ${if} $PythonPath == ""
-   StrCpy $PythonPath "$INSTDIR\bin"
-  ${endif}
-  StrCpy $1 $INSTDIR 2 ; get drive letter
-  FileOpen $R1 "$INSTDIR\Resources\configLyX.bat" w
-  FileWrite $R1 '$1$\r$\n\
-                cd $INSTDIR\Resources\$\r$\n\
-                "$PythonPath\python.exe" configure.py'
-  FileClose $R1
-  MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
-  ExecWait '"$INSTDIR\Resources\configLyX.bat"'
-  Delete "$INSTDIR\Resources\configLyX.bat"
-
-  ; ask to update MiKTeX
-  ${if} $MiKTeXInstalled == "yes"
-   MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
-   UpdateNow:
-    StrCpy $0 $LaTeXPath -4 ; remove "\bin"
-    ExecWait '"$LaTeXPath\copystart.exe" "$0\config\update.dat"' ; run MiKTeX's update wizard
-   UpdateLater:
-  ${endif}
-
-  ; save MiKTeX's install path to be able to remove LyX's LaTeX-files in the uninstaller
-  FileOpen $R1 "$INSTDIR\Resources\uninstallPaths.dat" w
-  FileWrite $R1 '$LaTeXPath'
-  FileClose $R1
+FunctionEnd
 
-SectionEnd
index 5b332b905c3cd06f8f20db8089c6f75facc831a1..c9f2c4372e05be2309aa88de13d7d8f9b2621c93 100644 (file)
@@ -9,6 +9,80 @@ Section "-Installation actions" SecInstallation
   File /r "${PRODUCT_SOURCEDIR}\etc"
   File /r "${PRODUCT_SOURCEDIR}\Resources"
 
+  Call Ghostscript
+
+  Call ImageMagick
+
+  Call Aspell
+
+  Call Aiksaurus
+
+  ; install the LaTeX class files that are delivered with LyX
+  ; and enable MiKTeX's automatic package installation
+  Call ConfigureMiKTeX ; Function from LaTeX.nsh
+
+  ; install Aspell dictionaries
+  ${if} $LangCode == "nb_NO"
+   StrCpy $LangCode "no_NO" ; we only have a norwegian dictionary available
+  ${endif}
+  Call InstallAspellDictionary ; function from Aspell.nsh
+
+  ; configure LyX
+  Call ConfigureLyX ; Function from ConfigLyX.nsh
+
+  ; delete unnecessary files
+  ${if} $DelPythonFiles == "True"
+   Delete $INSTDIR\bin\python.exe
+   Delete $INSTDIR\bin\python25.dll
+   Delete $INSTDIR\bin\Python-License.txt
+   RMDir /r $INSTDIR\bin\Lib
+   RMDir /r $INSTDIR\bin\DLLs
+  ${endif}
+  RMDir /r $INSTDIR\external
+
+  ; create Uninstaller
+  WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
+
+  ; run LyX's configure script
+  ; create a bat-file to start configure in a console window so that the user see the progress
+  ; of the configuration and to have a signal when the configuration is ready to start LyX
+  ; this is important when LyX is installed together with MiKTeX or when LyX is installed for the first
+  ; time on a computer, because the installation of missing LaTeX-files required by LyX could last minutes
+  ; a batch file is needed because simply calling ExecWait '"$PythonPath\python.exe" "$INSTDIR\Resources\configure.py"'
+  ; creates the config files in $PythonPath
+  ${if} $PythonPath == ""
+   StrCpy $PythonPath "$INSTDIR\bin"
+  ${endif}
+  StrCpy $1 $INSTDIR 2 ; get drive letter
+  FileOpen $R1 "$INSTDIR\Resources\configLyX.bat" w
+  FileWrite $R1 '$1$\r$\n\
+                cd $INSTDIR\Resources\$\r$\n\
+                "$PythonPath\python.exe" configure.py'
+  FileClose $R1
+  MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
+  ExecWait '"$INSTDIR\Resources\configLyX.bat"'
+  Delete "$INSTDIR\Resources\configLyX.bat"
+
+  ; ask to update MiKTeX
+  ${if} $MiKTeXInstalled == "yes"
+   MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
+   UpdateNow:
+    StrCpy $0 $LaTeXPath -4 ; remove "\bin"
+    ExecWait '"$LaTeXPath\copystart.exe" "$0\config\update.dat"' ; run MiKTeX's update wizard
+   UpdateLater:
+  ${endif}
+
+  ; save MiKTeX's install path to be able to remove LyX's LaTeX-files in the uninstaller
+  FileOpen $R1 "$INSTDIR\Resources\uninstallPaths.dat" w
+  FileWrite $R1 '$LaTeXPath'
+  FileClose $R1
+
+SectionEnd
+
+; -------------------------------------------
+
+Function Ghostscript
+
   ; if GhostScript is not installed
   ${if} $GhostscriptPath == ""
    ; register Ghostscript
@@ -22,6 +96,12 @@ Section "-Installation actions" SecInstallation
    RMDir /r ${GhostscriptDir}   
   ${endif}
 
+FunctionEnd
+
+; -------------------------------------------
+
+Function ImageMagick
+
   ; if ImageMagick is not installed
   ${if} $ImageMagickPath == ""
    ; register ImageMagick
@@ -47,6 +127,12 @@ Section "-Installation actions" SecInstallation
    RMDir /r ${ImageMagickDir}
   ${endif}
 
+FunctionEnd
+
+; -------------------------------------------
+
+Function Aspell
+
   ; if Aspell is not installed
   ${if} $AspellPath == ""
    ; extract Aspell's program files
@@ -67,6 +153,12 @@ Section "-Installation actions" SecInstallation
    WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "UninstallString" "${AspellDir}\${AspellUninstall}"
   ${endif}
 
+FunctionEnd
+
+; -------------------------------------------
+
+Function Aiksaurus
+
   ; if Aiksaurus is not installed
   ${if} $AiksaurusPath == ""
    ; extract Aiksaurus' program files
@@ -78,64 +170,5 @@ Section "-Installation actions" SecInstallation
 ;   WriteRegStr HKLM "Software\Aiksaurus" "Data Path" "${AiksaurusDir}"
   ${endif}
 
-  ; install the LaTeX class files that are delivered with LyX
-  ; and enable MiKTeX's automatic package installation
-  Call ConfigureMiKTeX ; Function from LaTeX.nsh
-
-  ; install Aspell dictionaries
-  ${if} $LangCode == "nb_NO"
-   StrCpy $LangCode "no_NO" ; we only have a norwegian dictionary available
-  ${endif}
-  Call InstallAspellDictionary ; function from Aspell.nsh
-
-  ; configure LyX
-  Call ConfigureLyX ; Function from ConfigLyX.nsh
-
-  ; delete unnecessary files
-  ${if} $DelPythonFiles == "True"
-   Delete $INSTDIR\bin\python.exe
-   Delete $INSTDIR\bin\python25.dll
-   Delete $INSTDIR\bin\Python-License.txt
-   RMDir /r $INSTDIR\bin\Lib
-   RMDir /r $INSTDIR\bin\DLLs
-  ${endif}
-  RMDir /r $INSTDIR\external
-
-  ; create Uninstaller
-  WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
-
-  ; run LyX's configure script
-  ; create a bat-file to start configure in a console window so that the user see the progress
-  ; of the configuration and to have a signal when the configuration is ready to start LyX
-  ; this is important when LyX is installed together with MiKTeX or when LyX is installed for the first
-  ; time on a computer, because the installation of missing LaTeX-files required by LyX could last minutes
-  ; a batch file is needed because simply calling ExecWait '"$PythonPath\python.exe" "$INSTDIR\Resources\configure.py"'
-  ; creates the config files in $PythonPath
-  ${if} $PythonPath == ""
-   StrCpy $PythonPath "$INSTDIR\bin"
-  ${endif}
-  StrCpy $1 $INSTDIR 2 ; get drive letter
-  FileOpen $R1 "$INSTDIR\Resources\configLyX.bat" w
-  FileWrite $R1 '$1$\r$\n\
-                cd $INSTDIR\Resources\$\r$\n\
-                "$PythonPath\python.exe" configure.py'
-  FileClose $R1
-  MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
-  ExecWait '"$INSTDIR\Resources\configLyX.bat"'
-  Delete "$INSTDIR\Resources\configLyX.bat"
-
-  ; ask to update MiKTeX
-  ${if} $MiKTeXInstalled == "yes"
-   MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
-   UpdateNow:
-    StrCpy $0 $LaTeXPath -4 ; remove "\bin"
-    ExecWait '"$LaTeXPath\copystart.exe" "$0\config\update.dat"' ; run MiKTeX's update wizard
-   UpdateLater:
-  ${endif}
-
-  ; save MiKTeX's install path to be able to remove LyX's LaTeX-files in the uninstaller
-  FileOpen $R1 "$INSTDIR\Resources\uninstallPaths.dat" w
-  FileWrite $R1 '$LaTeXPath'
-  FileClose $R1
+FunctionEnd
 
-SectionEnd
index 44ee6105242e08c937b65e08ab95f84c49501ee4..46afc8e050441853976b7672375f4839fce89969 100644 (file)
Binary files a/development/Win32/packaging/installer/LyXWinInstaller/InstallerStructure.odg and b/development/Win32/packaging/installer/LyXWinInstaller/InstallerStructure.odg differ
index a152f89767fbf5a0ea277ba5f501d1e88bc86fb6..1bc60af6520c42e53a736110fd94292d880eca71 100644 (file)
Binary files a/development/Win32/packaging/installer/LyXWinInstaller/InstallerStructure.pdf and b/development/Win32/packaging/installer/LyXWinInstaller/InstallerStructure.pdf differ
diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyX-Installer-Complete.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyX-Installer-Complete.nsi
deleted file mode 100644 (file)
index c14e605..0000000
+++ /dev/null
@@ -1,393 +0,0 @@
-; Lyx for Windows, NSIS v2 series installer script
-
-; File LyXWinInstaller.nsi
-; This file is part of LyX, the document processor.
-; http://www.lyx.org/
-; Licence details can be found in the file COPYING or copy at
-; http://www.lyx.org/about/license.php3
-
-; Author Uwe Stöhr based on the work of Angus Leeming and Joost Verburg
-; Full author contact details are available in file CREDITS or copy at
-; http://www.lyx.org/about/credits.php
-
-; This script requires NSIS 2.25 and newer
-; http://nsis.sourceforge.net/
-;--------------------------------
-
-; Do a Cyclic Redundancy Check to make sure the installer
-; was not corrupted by the download.
-CRCCheck force
-
-; Make the installer as small as possible.
-SetCompressor lzma
-
-;--------------------------------
-; You should need to change only these macros...
-
-!define PRODUCT_DIR "D:\LyXPackage1.5"
-!define PRODUCT_NAME "LyX"
-!define PRODUCT_VERSION "1.5beta2-21-04-2007"
-!define PRODUCT_VERSION_SHORT "150svn"
-!define PRODUCT_SUBFOLDER "lyx15"
-!define PRODUCT_LICENSE_FILE "${PRODUCT_DIR}\License.txt"
-!define PRODUCT_SOURCEDIR "${PRODUCT_DIR}\LyX"
-!define PRODUCT_EXE "$INSTDIR\bin\lyx.exe"
-!define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
-!define PRODUCT_EXT ".lyx"
-!define PRODUCT_MIME_TYPE "application/lyx"
-!define PRODUCT_UNINSTALL_EXE "$INSTDIR\LyXWinUninstall.exe"
-!define PRODUCT_HELP_LINK "http://www.lyx.org/internet/mailing.php"
-!define PRODUCT_ABOUT_URL "http://www.lyx.org/about/"
-!define PRODUCT_INFO_URL "http://www.lyx.org/"
-
-BrandingText "LyXWinInstaller v3.13 - Complete"
-!define INSTALLER_VERSION "Complete"
-!define INSTALLER_EXE "LyXWin150svnComplete-3-13.exe"
-!define INSTALLER2_EXE "LyXWin150svnSmall-3-13.exe" ; to check later if this installer version is running at the same time
-!define VERSION_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_vert${PRODUCT_VERSION_SHORT}.bmp"
-
-; Replaced by HKLM or HKCU depending on SetShellVarContext.
-!define PRODUCT_ROOT_KEY "SHCTX"
-
-!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\lyx.exe"
-!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX${PRODUCT_VERSION_SHORT}"
-
-!define ClassFileDir "${PRODUCT_SOURCEDIR}\Resources\tex"
-
-!define ImageMagickVersion "6.3.3"
-!define ImageMagickDir "$INSTDIR\etc\ImageMagick" ; for some odd reason the ImageMagick folder may not be a subfolder of $INSTDIR\bin!
-!define GhostscriptDir "$INSTDIR\etc\Ghostscript"
-!define GhostscriptVersion "8.56"
-!define AiksaurusDir "$APPDATA\Aiksaurus"
-!define AiksaurusInstall "external\Aiksaurus"
-!define AspellDir "$APPDATA\Aspell"
-!define AspellDisplay "Aspell 0.60.4 Data"
-!define AspellInstall "external\Aspell"
-!define AspellUninstall "Uninstall-AspellData.exe"
-!define AspellDictPath "${AspellDir}\Dictionaries"
-!define AspellPersonalPath "${AspellDir}\Personal"
-!define AspellLocationExact "http://developer.berlios.de/project/showfiles.php?group_id=5117&release_id=9651"
-!define AspellLocation "http://developer.berlios.de/projects/lyxwininstall/"
-!define GSviewInstall "external\gsv48w32.exe"
-!define JabRefInstall "external\JabRef-2.2-Setup.exe"
-!define JabRefVersion "JabRef 2.2"
-!define DVIPostFileDir "${PRODUCT_SOURCEDIR}\external\dvipost"
-; the following variable is needed for a possible CD-version, see InstallActions.nsh, around line 213
-;!define LaTeXPackagesDir "${PRODUCT_SOURCEDIR}\latex"
-!define MiKTeXRepo "ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/"
-!define MiKTeXConfigFolder "MiKTeX\2.5\miktex\config"
-!define MiKTeXDeliveredVersion "MiKTeX 2.5"
-!define MiKTeXInstall "$INSTDIR\external\basic-miktex-2.5.2580.exe"
-!define PRODUCT_VERSION_OLD "none" ; only here to avoid warning message - variable only used in Update installer version
-
-;--------------------------------
-; Make some of the information above available to NSIS.
-
-Name "${PRODUCT_NAME}"
-OutFile "${INSTALLER_EXE}"
-InstallDir "$PROGRAMFILES\${PRODUCT_NAME} ${PRODUCT_VERSION}"
-
-;--------------------------------
-; Variables
-
-Var LatexPath
-Var PythonPath
-Var DelPythonFiles
-Var GhostscriptPath
-Var ImageMagickPath
-Var AiksaurusPath
-Var AspellPath
-Var AspellInstallYes
-Var AspellBaseReg
-Var AspellMessage
-Var Acrobat
-Var PSVPath
-Var EditorPath
-Var ImageEditorPath
-Var BibTeXEditorPath
-Var JabRefInstalled
-Var PathPrefix
-Var Answer
-Var UserName
-Var LangName
-Var LangNameSys
-Var LangCode
-Var LangCodeSys
-Var LangEncoding
-Var LangSysEncoding
-Var DictCode
-Var MissedProg
-Var LaTeXName
-Var MiKTeXVersion
-Var MiKTeXInstalled
-Var MiKTeXUser
-Var MiKTeXPath
-Var InstallGSview
-Var InstallJabRef
-Var CreateFileAssociations
-Var CreateDesktopIcon
-Var StartmenuFolder
-Var ProductRootKey
-Var AppPre
-Var AppSuff
-Var AppPath
-Var String
-Var Search
-Var Pointer
-Var UserList
-Var RunNumber
-
-;--------------------------------
-; load some NSIS libraries
-!include "MUI.nsh"
-!include "LogicLib.nsh"
-!include "FileFunc.nsh"
-!include "StrFunc.nsh"
-!include "TextFunc.nsh"
-!insertmacro LineFind
-!include "WordFunc.nsh"
-!insertmacro WordReplace
-
-; Set of various macros and functions
-!include "LyXUtils.nsh"
-
-; Functions to check and configure the LaTeX-system
-!include "LaTeX.nsh"
-
-; Function to check installed LaTeX-editors
-!include "Editors.nsh"
-
-; Function to check if needed programs are missing or not
-!include "MissingPrograms.nsh"
-
-; Functions for page to set installer language
-; and LyX's menu language
-!include "LanguageSettings.nsh"
-
-; Use the Abiword macros to help set up associations with the file extension in the Registry.
-; Grabbed from
-; http://abiword.pchasm.org/source/cvs/abiword-cvs/abi/src/pkg/win/setup/NSISv2/abi_util_fileassoc.nsh
-!include "abi_util_fileassoc.nsh"
-
-; Function to configure LyX
-!include "ConfigLyX.nsh"
-
-; Function for page to install Aspell dictionaries
-!include "Aspell.nsh"
-
-;--------------------------------
-; Remember the installer language
-!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
-!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
-!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
-
-!define MUI_ABORTWARNING
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_hi.bmp"
-!define MUI_ICON "${PRODUCT_DIR}\icons\lyx.ico"
-!define MUI_UNICON "${PRODUCT_DIR}\icons\lyx.ico"
-!define MUI_WELCOMEFINISHPAGE_BITMAP "${VERSION_BITMAP}"
-
-; Welcome page
-!define MUI_WELCOMEPAGE_TEXT "$(WelcomePageText)"
-!insertmacro MUI_PAGE_WELCOME
-
-; Show the license.
-!insertmacro MUI_PAGE_LICENSE "${PRODUCT_LICENSE_FILE}"
-
-; Specify the installation directory.
-!insertmacro MUI_PAGE_DIRECTORY
-
-; Specify LyX's menu language.
-Page custom SelectMenuLanguage SelectMenuLanguage_LeaveFunction
-
-; Define which components to install.
-!insertmacro MUI_PAGE_COMPONENTS
-
-; Specify where to install program shortcuts.
-!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_ROOT_KEY}"
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
-!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
-!define MUI_STARTMENUPAGE_DEFAULTFOLDER "LyX ${PRODUCT_VERSION}"
-!insertmacro MUI_PAGE_STARTMENU ${PRODUCT_NAME} $StartmenuFolder
-
-; Check for needed programs
-Page custom MissingProgramsPage MissingProgramsPage_LeaveFunction
-
-; Watch the components being installed.
-!insertmacro MUI_PAGE_INSTFILES
-
-; Finish page
-!define MUI_FINISHPAGE_RUN 
-!define MUI_FINISHPAGE_TEXT "$(FinishPageMessage)"
-!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageRun)"
-!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchProduct"
-!insertmacro MUI_PAGE_FINISH
-
-; The uninstaller.
-!insertmacro MUI_UNPAGE_COMPONENTS
-!insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-; Languages
-
-!insertmacro MUI_LANGUAGE "English" ; first language is the default language
-!insertmacro MUI_LANGUAGE "Danish"
-!insertmacro MUI_LANGUAGE "Dutch"
-!insertmacro MUI_LANGUAGE "French"
-!insertmacro MUI_LANGUAGE "German"
-!insertmacro MUI_LANGUAGE "Galician"
-!insertmacro MUI_LANGUAGE "Hungarian"
-!insertmacro MUI_LANGUAGE "Italian"
-!insertmacro MUI_LANGUAGE "Norwegian"
-!insertmacro MUI_LANGUAGE "Polish"
-!insertmacro MUI_LANGUAGE "Portuguese"
-!insertmacro MUI_LANGUAGE "Slovak"
-!insertmacro MUI_LANGUAGE "Spanish"
-!insertmacro MUI_LANGUAGE "Swedish"
-!insertmacro MUI_LANGUAGE "Turkish"
-
-!include "lyx_languages\english.nsh"
-!include "lyx_languages\danish.nsh"
-!include "lyx_languages\dutch.nsh"
-!include "lyx_languages\french.nsh"
-!include "lyx_languages\german.nsh"
-!include "lyx_languages\galician.nsh"
-!include "lyx_languages\hungarian.nsh"
-!include "lyx_languages\italian.nsh"
-!include "lyx_languages\norwegian.nsh"
-!include "lyx_languages\polish.nsh"
-!include "lyx_languages\portuguese.nsh"
-!include "lyx_languages\slovak.nsh"
-!include "lyx_languages\spanish.nsh"
-!include "lyx_languages\swedish.nsh"
-!include "lyx_languages\turkish.nsh"
-
-LicenseData "$(LyXLicenseData)"
-
-;--------------------------------
-; Reserve Files
-
-; These files are inserted before other files in the data block
-!insertmacro MUI_RESERVEFILE_LANGDLL
-ReserveFile "io_ui_language.ini"
-!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-; Installer sections
-
-Section "!${PRODUCT_NAME}" SecCore
-  SectionIn RO
-SectionEnd
-Section "$(SecAllUsersTitle)" SecAllUsers
-  SetShellVarContext all
-  StrCpy $ProductRootKey "HKLM"
-SectionEnd
-Section "$(SecFileAssocTitle)" SecFileAssoc
-  StrCpy $CreateFileAssociations "true"
-SectionEnd
-Section "$(SecDesktopTitle)" SecDesktop
-  StrCpy $CreateDesktopIcon "true"
-SectionEnd
-Section /o "$(SecInstGSviewTitle)" SecInstGSview
- AddSize 4000
- StrCpy $InstallGSview "true"
-SectionEnd
-Section /o "$(SecInstJabRefTitle)" SecInstJabRef
- AddSize 5000
- StrCpy $InstallJabRef "true"
-SectionEnd
-
-; Section descriptions
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
-!insertmacro MUI_DESCRIPTION_TEXT ${SecAllUsers} "$(SecAllUsersDescription)"
-!insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssoc} "$(SecFileAssocDescription)"
-!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
-!insertmacro MUI_DESCRIPTION_TEXT ${SecInstGSview} "$(SecInstGSviewDescription)"
-!insertmacro MUI_DESCRIPTION_TEXT ${SecInstJabRef} "$(SecInstJabRefDescription)"
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-; the installation section
-!include "InstallActions-complete.nsh"
-
-;--------------------------------
-; This hook function is called internally by NSIS on installer startup
-Function .onInit
-
-  ; set the installer language to the Windows locale language
-  System::Call "kernel32::GetUserDefaultLangID()i.a"
-
-  ; check that the installer is not currently running
-  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${INSTALLER_EXE}.Instance") i .r1 ?e'
-  Pop $R0
-  ${if} $R0 != "0"
-   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
-   Abort
-  ${endif}
-  FindProcDLL::FindProc "${INSTALLER2_EXE}"
-  ${if} $R0 == "1"
-   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
-   Abort
-  ${endif}
-
-  ; check if LyX is already installed
-  ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY}" "Publisher"
-  ${if} $0 != ""
-   MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
-   Abort
-  ${endif}
-
-  ; default settings
-  ; these can be reset to "all" in section SecAllUsers
-  SetShellVarContext current
-  StrCpy $ProductRootKey "HKCU"
-
-  ; this can be reset to "true" in section SecDesktop
-  StrCpy $CreateDesktopIcon "false"
-  StrCpy $CreateFileAssociations "false"
-
-  ; if the user does *not* have administrator privileges, abort
-  StrCpy $Answer ""
-  StrCpy $UserName ""
-  !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
-  ${if} $Answer == "yes"
-    !define ENABLE 0x00000001
-    SectionGetFlags ${SecAllUsers} $0
-    IntOp $0 $0 | ${ENABLE}
-    SectionSetFlags ${SecAllUsers} $0
-    !undef ENABLE
-  ${else}
-    MessageBox MB_OK|MB_ICONSTOP "$(NotAdmin)"
-    Abort
-  ${endif}
-
-  ; check the LaTeX-system
-  Call LaTeXActions ; Function from LaTeX.nsh
-
-  ; check which programs are installed or not
-  Call MissingPrograms ; function from MissingPrograms.nsh
-
-  ; don't let the installer sections appear when the programs are already installed
-  ${if} $PSVPath != ""
-   SectionSetText 4 "" ; hides the corresponding uninstaller section, ${SecInstGSview}
-  ${endif}
-  ${if} $BibTeXEditorPath != ""
-   SectionSetText 5 "" ; hides the corresponding uninstaller section, ${SecInstJabRef}
-  ${endif}
-
-  ClearErrors
-FunctionEnd
-
-;--------------------------------
-
-Function LaunchProduct
-  Exec ${PRODUCT_BAT}
-FunctionEnd
-
-;--------------------------------
-; The Uninstaller
-
-!include "Uninstall.nsh"
-
-; eof
diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyX-Installer-Small.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyX-Installer-Small.nsi
deleted file mode 100644 (file)
index c423614..0000000
+++ /dev/null
@@ -1,377 +0,0 @@
-; Lyx for Windows, NSIS v2 series installer script
-
-; File LyXWinInstaller.nsi
-; This file is part of LyX, the document processor.
-; http://www.lyx.org/
-; Licence details can be found in the file COPYING or copy at
-; http://www.lyx.org/about/license.php3
-
-; Author Uwe Stöhr based on the work of Angus Leeming and Joost Verburg
-; Full author contact details are available in file CREDITS or copy at
-; http://www.lyx.org/about/credits.php
-
-; This script requires NSIS 2.25 and newer
-; http://nsis.sourceforge.net/
-;--------------------------------
-
-; Do a Cyclic Redundancy Check to make sure the installer
-; was not corrupted by the download.
-CRCCheck force
-
-; Make the installer as small as possible.
-SetCompressor lzma
-
-;--------------------------------
-; You should need to change only these macros...
-
-!define PRODUCT_DIR "D:\LyXPackage1.5"
-!define PRODUCT_NAME "LyX"
-!define PRODUCT_VERSION "1.5beta2-21-04-2007"
-!define PRODUCT_VERSION_SHORT "150svn"
-!define PRODUCT_SUBFOLDER "lyx15"
-!define PRODUCT_LICENSE_FILE "${PRODUCT_DIR}\License.txt"
-!define PRODUCT_SOURCEDIR "${PRODUCT_DIR}\LyX"
-!define PRODUCT_EXE "$INSTDIR\bin\lyx.exe"
-!define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
-!define PRODUCT_EXT ".lyx"
-!define PRODUCT_MIME_TYPE "application/lyx"
-!define PRODUCT_UNINSTALL_EXE "$INSTDIR\LyXWinUninstall.exe"
-!define PRODUCT_HELP_LINK "http://www.lyx.org/internet/mailing.php"
-!define PRODUCT_ABOUT_URL "http://www.lyx.org/about/"
-!define PRODUCT_INFO_URL "http://www.lyx.org/"
-
-BrandingText "LyXWinInstaller v3.13 - Small"
-!define INSTALLER_VERSION "Small"
-!define INSTALLER_EXE "LyXWin150svnSmall-3-13.exe"
-!define INSTALLER2_EXE "LyXWin150svnComplete-3-13.exe" ; to check later if this installer version is running at the same time
-!define VERSION_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_vert${PRODUCT_VERSION_SHORT}.bmp"
-
-; Replaced by HKLM or HKCU depending on SetShellVarContext.
-!define PRODUCT_ROOT_KEY "SHCTX"
-
-!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\lyx.exe"
-!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX${PRODUCT_VERSION_SHORT}"
-
-!define ClassFileDir "${PRODUCT_SOURCEDIR}\Resources\tex"
-
-!define ImageMagickVersion "6.3.3"
-!define ImageMagickDir "$INSTDIR\etc\ImageMagick" ; for some odd reason the ImageMagick folder may not be a subfolder of $INSTDIR\bin!
-!define GhostscriptDir "$INSTDIR\etc\Ghostscript"
-!define GhostscriptVersion "8.56"
-!define AiksaurusDir "$APPDATA\Aiksaurus"
-!define AiksaurusInstall "external\Aiksaurus"
-!define AspellDir "$APPDATA\Aspell"
-!define AspellDisplay "Aspell 0.60.4 Data"
-!define AspellInstall "external\Aspell"
-!define AspellUninstall "Uninstall-AspellData.exe"
-!define AspellDictPath "${AspellDir}\Dictionaries"
-!define AspellPersonalPath "${AspellDir}\Personal"
-!define AspellLocationExact "http://developer.berlios.de/project/showfiles.php?group_id=5117&release_id=9651"
-!define AspellLocation "http://developer.berlios.de/projects/lyxwininstall/"
-!define JabRefVersion "JabRef not included"
-!define DVIPostFileDir "${PRODUCT_SOURCEDIR}\external\dvipost"
-!define MiKTeXRepo "ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/"
-!define MiKTeXConfigFolder "MiKTeX\2.5\miktex\config"
-!define MiKTeXDeliveredVersion "MiKTeX not included" ; only here to avoid warning message - variable only used in Complete installer version
-!define PRODUCT_VERSION_OLD "none" ; only here to avoid warning message - variable only used in Update installer version
-
-;--------------------------------
-; Make some of the information above available to NSIS.
-
-Name "${PRODUCT_NAME}"
-OutFile "${INSTALLER_EXE}"
-InstallDir "$PROGRAMFILES\${PRODUCT_NAME} ${PRODUCT_VERSION}"
-
-;--------------------------------
-; Variables
-
-Var LatexPath
-Var PythonPath
-Var DelPythonFiles
-Var GhostscriptPath
-Var ImageMagickPath
-Var AiksaurusPath
-Var AspellPath
-Var AspellInstallYes
-Var AspellBaseReg
-Var AspellMessage
-Var Acrobat
-Var PSVPath
-Var EditorPath
-Var ImageEditorPath
-Var BibTeXEditorPath
-Var JabRefInstalled
-Var PathPrefix
-Var Answer
-Var UserName
-Var LangName
-Var LangNameSys
-Var LangCode
-Var LangCodeSys
-Var LangEncoding
-Var LangSysEncoding
-Var DictCode
-Var MissedProg
-Var LaTeXName
-Var MiKTeXVersion
-Var MiKTeXInstalled
-Var MiKTeXUser
-Var CreateFileAssociations
-Var CreateDesktopIcon
-Var StartmenuFolder
-Var ProductRootKey
-Var AppPre
-Var AppSuff
-Var AppPath
-Var State
-Var String
-Var Search
-Var Pointer
-Var UserList
-Var RunNumber
-
-;--------------------------------
-; load some NSIS libraries
-!include "MUI.nsh"
-!include "LogicLib.nsh"
-!include "FileFunc.nsh"
-!include "StrFunc.nsh"
-!include "TextFunc.nsh"
-!insertmacro LineFind
-!include "WordFunc.nsh"
-!insertmacro WordReplace
-
-; Set of various macros and functions
-!include "LyXUtils.nsh"
-
-; Functions to check and configure the LaTeX-system
-!include "LaTeX.nsh"
-
-; Function to check installed LaTeX-editors
-!include "Editors.nsh"
-
-; Function to check if needed programs are missing or not
-!include "MissingPrograms.nsh"
-
-; Function for page to manually select LaTeX's installation folder
-!include "LaTeXFolder.nsh"
-
-; Functions for page to set installer language
-; and LyX's menu language
-!include "LanguageSettings.nsh"
-
-; Use the Abiword macros to help set up associations with the file extension in the Registry.
-; Grabbed from
-; http://abiword.pchasm.org/source/cvs/abiword-cvs/abi/src/pkg/win/setup/NSISv2/abi_util_fileassoc.nsh
-!include "abi_util_fileassoc.nsh"
-
-; Function to configure LyX
-!include "ConfigLyX.nsh"
-
-; Function for page to install Aspell dictionaries
-!include "Aspell.nsh"
-
-;--------------------------------
-; Remember the installer language
-!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
-!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
-!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
-
-!define MUI_ABORTWARNING
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_hi.bmp"
-!define MUI_ICON "${PRODUCT_DIR}\icons\lyx.ico"
-!define MUI_UNICON "${PRODUCT_DIR}\icons\lyx.ico"
-!define MUI_WELCOMEFINISHPAGE_BITMAP "${VERSION_BITMAP}"
-
-; Welcome page
-!define MUI_WELCOMEPAGE_TEXT "$(WelcomePageText)"
-!insertmacro MUI_PAGE_WELCOME
-
-; Show the license.
-!insertmacro MUI_PAGE_LICENSE "${PRODUCT_LICENSE_FILE}"
-
-; Specify the installation directory.
-!insertmacro MUI_PAGE_DIRECTORY
-
-; Specify LyX's menu language.
-Page custom SelectMenuLanguage SelectMenuLanguage_LeaveFunction
-
-; Define which components to install.
-!insertmacro MUI_PAGE_COMPONENTS
-
-; Specify where to install program shortcuts.
-!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_ROOT_KEY}"
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
-!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
-!define MUI_STARTMENUPAGE_DEFAULTFOLDER "LyX ${PRODUCT_VERSION}"
-!insertmacro MUI_PAGE_STARTMENU ${PRODUCT_NAME} $StartmenuFolder
-
-; Select latex.exe manually
-Page custom LatexFolder LatexFolder_LeaveFunction
-
-; Check for needed programs
-Page custom MissingProgramsPage MissingProgramsPage_LeaveFunction
-
-; Watch the components being installed.
-!insertmacro MUI_PAGE_INSTFILES
-
-; Finish page
-!define MUI_FINISHPAGE_RUN 
-!define MUI_FINISHPAGE_TEXT "$(FinishPageMessage)"
-!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageRun)"
-!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchProduct"
-!insertmacro MUI_PAGE_FINISH
-
-; The uninstaller.
-!insertmacro MUI_UNPAGE_COMPONENTS
-!insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-; Languages
-
-!insertmacro MUI_LANGUAGE "English" ; first language is the default language
-!insertmacro MUI_LANGUAGE "Danish"
-!insertmacro MUI_LANGUAGE "Dutch"
-!insertmacro MUI_LANGUAGE "French"
-!insertmacro MUI_LANGUAGE "German"
-!insertmacro MUI_LANGUAGE "Galician"
-!insertmacro MUI_LANGUAGE "Hungarian"
-!insertmacro MUI_LANGUAGE "Italian"
-!insertmacro MUI_LANGUAGE "Norwegian"
-!insertmacro MUI_LANGUAGE "Polish"
-!insertmacro MUI_LANGUAGE "Portuguese"
-!insertmacro MUI_LANGUAGE "Slovak"
-!insertmacro MUI_LANGUAGE "Spanish"
-!insertmacro MUI_LANGUAGE "Swedish"
-!insertmacro MUI_LANGUAGE "Turkish"
-
-!include "lyx_languages\english.nsh"
-!include "lyx_languages\danish.nsh"
-!include "lyx_languages\dutch.nsh"
-!include "lyx_languages\french.nsh"
-!include "lyx_languages\german.nsh"
-!include "lyx_languages\galician.nsh"
-!include "lyx_languages\hungarian.nsh"
-!include "lyx_languages\italian.nsh"
-!include "lyx_languages\norwegian.nsh"
-!include "lyx_languages\polish.nsh"
-!include "lyx_languages\portuguese.nsh"
-!include "lyx_languages\slovak.nsh"
-!include "lyx_languages\spanish.nsh"
-!include "lyx_languages\swedish.nsh"
-!include "lyx_languages\turkish.nsh"
-
-LicenseData "$(LyXLicenseData)"
-
-;--------------------------------
-; Reserve Files
-
-; These files are inserted before other files in the data block
-!insertmacro MUI_RESERVEFILE_LANGDLL
-ReserveFile "io_ui_language.ini"
-!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-; Installer sections
-
-Section "!${PRODUCT_NAME}" SecCore
-  SectionIn RO
-SectionEnd
-Section "$(SecAllUsersTitle)" SecAllUsers
-  SetShellVarContext all
-  StrCpy $ProductRootKey "HKLM"
-SectionEnd
-Section "$(SecFileAssocTitle)" SecFileAssoc
-  StrCpy $CreateFileAssociations "true"
-SectionEnd
-Section "$(SecDesktopTitle)" SecDesktop
-  StrCpy $CreateDesktopIcon "true"
-SectionEnd
-
-; Section descriptions
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
-!insertmacro MUI_DESCRIPTION_TEXT ${SecAllUsers} "$(SecAllUsersDescription)"
-!insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssoc} "$(SecFileAssocDescription)"
-!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-; the installation section
-!include "InstallActions-small.nsh"
-
-;--------------------------------
-; This hook function is called internally by NSIS on installer startup
-Function .onInit
-
-  ; set the installer language to the Windows locale language
-  System::Call "kernel32::GetUserDefaultLangID()i.a"
-
-  ; check that the installer is not currently running
-  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${INSTALLER_EXE}.Instance") i .r1 ?e'
-  Pop $R0
-  ${if} $R0 != "0"
-   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
-   Abort
-  ${endif}
-  FindProcDLL::FindProc "${INSTALLER2_EXE}"
-  ${if} $R0 == "1"
-   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
-   Abort
-  ${endif}
-
-  ; check if LyX is already installed
-  ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY}" "Publisher"
-  ${if} $0 != ""
-   MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
-   Abort
-  ${endif}
-
-  ; default settings
-  ; these can be reset to "all" in section SecAllUsers
-  SetShellVarContext current
-  StrCpy $ProductRootKey "HKCU"
-
-  ; this can be reset to "true" in section SecDesktop
-  StrCpy $CreateDesktopIcon "false"
-  StrCpy $CreateFileAssociations "false"
-
-  ; if the user does *not* have administrator privileges, abort
-  StrCpy $Answer ""
-  StrCpy $UserName ""
-  !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
-  ${if} $Answer == "yes"
-    !define ENABLE 0x00000001
-    SectionGetFlags ${SecAllUsers} $0
-    IntOp $0 $0 | ${ENABLE}
-    SectionSetFlags ${SecAllUsers} $0
-    !undef ENABLE
-  ${else}
-    MessageBox MB_OK|MB_ICONSTOP "$(NotAdmin)"
-    Abort
-  ${endif}
-
-  ; check the LaTeX-system
-  Call LaTeXActions ; Function from LaTeX.nsh
-
-  ; check which programs are installed or not
-  Call MissingPrograms ; function from MissingPrograms.nsh
-
-  ; used later in the function LatexFolder
-  StrCpy $State "0"
-
-  ClearErrors
-FunctionEnd
-
-;--------------------------------
-
-Function LaunchProduct
-  Exec ${PRODUCT_BAT}
-FunctionEnd
-
-;--------------------------------
-; The Uninstaller
-
-!include "Uninstall.nsh"
-
-; eof
diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyX-Installer-Update.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyX-Installer-Update.nsi
deleted file mode 100644 (file)
index 4a36b57..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-; Lyx for Windows, NSIS v2 series installer script
-
-; File LyX-Installer-Update.nsi
-; This file is part of LyX, the document processor.
-; http://www.lyx.org/
-; Licence details can be found in the file COPYING or copy at
-; http://www.lyx.org/about/license.php3
-
-; Author Uwe Stöhr
-; Full author contact details are available in file CREDITS or copy at
-; http://www.lyx.org/about/credits.php
-
-; This script requires NSIS 2.25 and newer
-; http://nsis.sourceforge.net/
-;--------------------------------
-
-; Do a Cyclic Redundancy Check to make sure the installer
-; was not corrupted by the download.
-CRCCheck force
-
-; Make the installer as small as possible.
-SetCompressor lzma
-
-;--------------------------------
-; You should need to change only these macros...
-
-!define PRODUCT_DIR "D:\LyXPackage1.5"
-!define PRODUCT_NAME "LyX"
-!define PRODUCT_VERSION "1.5beta2-21-04-2007"
-!define PRODUCT_VERSION_SHORT "150svn"
-!define PRODUCT_SUBFOLDER "lyx15"
-!define PRODUCT_LICENSE_FILE "${PRODUCT_DIR}\License.txt"
-!define PRODUCT_SOURCEDIR "${PRODUCT_DIR}\LyX"
-!define PRODUCT_EXE "$INSTDIR\bin\lyx.exe"
-!define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
-!define PRODUCT_EXT ".lyx"
-!define PRODUCT_MIME_TYPE "application/lyx"
-!define PRODUCT_UNINSTALL_EXE "$INSTDIR\LyXWinUninstall${PRODUCT_VERSION}.exe"
-!define PRODUCT_HELP_LINK "http://www.lyx.org/internet/mailing.php"
-!define PRODUCT_ABOUT_URL "http://www.lyx.org/about/"
-!define PRODUCT_INFO_URL "http://www.lyx.org/"
-
-BrandingText "LyXWinInstaller v3.13 - Update"
-!define INSTALLER_VERSION "Small"
-!define INSTALLER_EXE "LyXWin150svnUpdate-3-13.exe"
-!define INSTALLER2_EXE "LyXWin150svnSmall-3-13.exe" ; to check later if this installer version is running at the same time
-!define INSTALLER3_EXE "LyXWin150svnComplete-3-13.exe" ; to check later if this installer version is running at the same time
-!define VERSION_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_vert${PRODUCT_VERSION_SHORT}.bmp"
-
-!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\lyx.exe"
-!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX${PRODUCT_VERSION_SHORT}"
-!define PRODUCT_UNINST_KEY_OLD "Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX150svn"
-!define PRODUCT_VERSION_OLD "LyX 1.5svn-15-04-2007"
-!define PRODUCT_UNINSTALL_EXE_OLD "$INSTDIR\LyXWinUninstall.exe"
-
-;--------------------------------
-; Make some of the information above available to NSIS.
-
-Name "${PRODUCT_NAME}"
-OutFile "${INSTALLER_EXE}"
-InstallDir "$PROGRAMFILES\${PRODUCT_NAME} ${PRODUCT_VERSION}"
-
-;--------------------------------
-; Variables
-
-Var LatexPath
-Var PythonPath
-Var ImageMagickPath
-Var PathPrefix
-Var Answer
-Var UserName
-Var CreateDesktopIcon
-Var StartmenuFolder
-Var ProductRootKey
-Var AppPre
-Var AppSuff
-Var AppPath
-Var String
-Var Search
-Var Pointer
-Var UserList
-Var INSTDIR_NEW
-Var FileName
-Var OldString
-Var NewString
-
-;--------------------------------
-; load some NSIS libraries
-!include "MUI.nsh"
-!include "LogicLib.nsh"
-!include "FileFunc.nsh"
-!include "StrFunc.nsh"
-!include "TextFunc.nsh"
-!insertmacro LineFind
-!include "WordFunc.nsh"
-!insertmacro WordReplace
-
-; Set of various macros and functions
-!include "LyXUtils.nsh"
-
-; Use the Abiword macros to help set up associations with the file extension in the Registry.
-; Grabbed from
-; http://abiword.pchasm.org/source/cvs/abiword-cvs/abi/src/pkg/win/setup/NSISv2/abi_util_fileassoc.nsh
-!include "abi_util_fileassoc.nsh"
-
-; list with modified files
-!include "Updated.nsh"
-
-; list with deleted files
-!include "Deleted.nsh"
-
-;--------------------------------
-
-; Remember the installer language
-!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
-!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
-!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
-
-!define MUI_ABORTWARNING
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_hi.bmp"
-!define MUI_ICON "${PRODUCT_DIR}\icons\lyx.ico"
-!define MUI_UNICON "${PRODUCT_DIR}\icons\lyx.ico"
-!define MUI_WELCOMEFINISHPAGE_BITMAP "${VERSION_BITMAP}"
-
-; Welcome page
-!define MUI_WELCOMEPAGE_TEXT "$(WelcomePageText)"
-!insertmacro MUI_PAGE_WELCOME
-
-; Show the license.
-!insertmacro MUI_PAGE_LICENSE "${PRODUCT_LICENSE_FILE}"
-
-; Define which components to install.
-!insertmacro MUI_PAGE_COMPONENTS
-
-; Specify where to install program shortcuts.
-!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
-!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
-!define MUI_STARTMENUPAGE_DEFAULTFOLDER "LyX ${PRODUCT_VERSION}"
-!insertmacro MUI_PAGE_STARTMENU ${PRODUCT_NAME} $StartmenuFolder
-
-; Watch the components being installed.
-!insertmacro MUI_PAGE_INSTFILES
-
-; Finish page
-!define MUI_FINISHPAGE_RUN 
-!define MUI_FINISHPAGE_TEXT "$(FinishPageMessage)"
-!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageRun)"
-!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchProduct"
-!insertmacro MUI_PAGE_FINISH
-
-; The uninstaller.
-!insertmacro MUI_UNPAGE_COMPONENTS
-!insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-; Languages
-
-!insertmacro MUI_LANGUAGE "English" ; first language is the default language
-!insertmacro MUI_LANGUAGE "Danish"
-!insertmacro MUI_LANGUAGE "Dutch"
-!insertmacro MUI_LANGUAGE "French"
-!insertmacro MUI_LANGUAGE "German"
-!insertmacro MUI_LANGUAGE "Galician"
-!insertmacro MUI_LANGUAGE "Hungarian"
-!insertmacro MUI_LANGUAGE "Italian"
-!insertmacro MUI_LANGUAGE "Norwegian"
-!insertmacro MUI_LANGUAGE "Polish"
-!insertmacro MUI_LANGUAGE "Portuguese"
-!insertmacro MUI_LANGUAGE "Slovak"
-!insertmacro MUI_LANGUAGE "Spanish"
-!insertmacro MUI_LANGUAGE "Swedish"
-!insertmacro MUI_LANGUAGE "Turkish"
-
-!include "lyx_languages\english.nsh"
-!include "lyx_languages\danish.nsh"
-!include "lyx_languages\dutch.nsh"
-!include "lyx_languages\french.nsh"
-!include "lyx_languages\german.nsh"
-!include "lyx_languages\galician.nsh"
-!include "lyx_languages\hungarian.nsh"
-!include "lyx_languages\italian.nsh"
-!include "lyx_languages\norwegian.nsh"
-!include "lyx_languages\polish.nsh"
-!include "lyx_languages\portuguese.nsh"
-!include "lyx_languages\slovak.nsh"
-!include "lyx_languages\spanish.nsh"
-!include "lyx_languages\swedish.nsh"
-!include "lyx_languages\turkish.nsh"
-
-LicenseData "$(LyXLicenseData)"
-
-;--------------------------------
-; Reserve Files
-
-; These files are inserted before other files in the data block
-!insertmacro MUI_RESERVEFILE_LANGDLL
-!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-; Installer sections
-
-Section "!${PRODUCT_NAME}" SecCore
-  SectionIn RO
-SectionEnd
-Section "$(SecDesktopTitle)" SecDesktop
-  StrCpy $CreateDesktopIcon "true"
-SectionEnd
-
-; Section descriptions
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
-!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-; the installation section
-!include "InstallActions-update.nsh"
-
-;--------------------------------
-; This hook function is called internally by NSIS on installer startup
-Function .onInit
-
-  ; Check that LyX is not currently running
-  FindProcDLL::FindProc "lyx.exe"
-  ${if} $R0 == "1"
-   MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)"
-   Abort
-  ${endif}
-  
-  ; set the installer language to the Windows locale language
-  System::Call "kernel32::GetUserDefaultLangID()i.a"
-  
-  ; Check that the installer is not currently running
-  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${INSTALLER_EXE}.Instance") i .r1 ?e'
-  Pop $R0
-  ${if} $R0 != "0"
-   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
-   Abort
-  ${endif}
-  FindProcDLL::FindProc "${INSTALLER2_EXE}"
-  ${if} $R0 == "1"
-   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
-   Abort
-  ${endif}
-  FindProcDLL::FindProc "${INSTALLER3_EXE}"
-  ${if} $R0 == "1"
-   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
-   Abort
-  ${endif}
-  
-  ; check where LyX is installed
-  ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY_OLD}" "DisplayIcon"
-  ${if} $0 != ""
-    SetShellVarContext all
-    StrCpy $ProductRootKey "HKLM"
-  ${endif}
-  ${if} $0 == ""
-   ReadRegStr $0 HKCU "${PRODUCT_UNINST_KEY_OLD}" "DisplayIcon"
-   ${if} $0 != ""
-    SetShellVarContext current
-    StrCpy $ProductRootKey "HKCU"
-   ${endif}
-   ${if} $0 == ""
-    MessageBox MB_OK|MB_ICONSTOP "$(UpdateNotAllowed)"
-    Abort
-   ${endif}
-  ${endif} ; end if $0 == 0
-  ${if} $0 != "" ; if it is found
-   StrCpy $INSTDIR $0
-   StrCpy $INSTDIR $INSTDIR -12 ; delete the string "\bin\lyx.exe" or "\bin\lyx.bat"
-  ${endif}
-  
-  ; abort if the user doesn't have administrator privileges but LyX was installed as admin
-  StrCpy $Answer ""
-  StrCpy $UserName ""
-  !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
-  ${if} $Answer != "yes"
-  ${andif} $ProductRootKey == "HKLM"
-    MessageBox MB_OK|MB_ICONSTOP "$(NotAdmin)"
-    Abort
-  ${endif}
-  
-  ; This can be reset to "true" in section SecDesktop.
-  StrCpy $CreateDesktopIcon "false"
-  
-  ClearErrors
-FunctionEnd
-
-;--------------------------------
-
-Function LaunchProduct
-  Exec ${PRODUCT_BAT}
-FunctionEnd
-
-;--------------------------------
-; The Uninstaller
-
-Function un.onInit
-       
-  ; Check that LyX is not currently running
-  FindProcDLL::FindProc "lyx.exe"
-  ${if} $R0 == "1"
-   MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)"
-   Abort
-  ${endif}
-
-  ; set registry root key
-  StrCpy $Answer ""
-  !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
-  ${if} $Answer == "yes"
-    SetShellVarContext all
-  ${else}
-   SetShellVarContext current
-  ${endif}
-
-  ; Ascertain whether the user has sufficient privileges to uninstall.
-  ; abort when LyX was installed with admin permissions but the user doesn't have administrator privileges
-  ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY}" "RootKey"
-  ${if} $0 != ""
-  ${andif} $Answer != "yes"
-   MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)"
-   Abort
-  ${endif}
-  ; abort when LyX couldn't be found in the registry
-  ${if} $0 == "" ; check in HKCU
-   ReadRegStr $0 HKCU "${PRODUCT_UNINST_KEY}" "RootKey"
-   ${if} $0 == ""
-     MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)"
-   ${endif}
-  ${endif}
-  
-FunctionEnd
-
-Function un.onUninstSuccess
-
- HideWindow ; hides the uninstaller Window when it is ready
-
-FunctionEnd
-
-Section "un.LyX" un.SecUnProgramFiles
-
-  SectionIn RO
-
-  ; delete LaTeX class files that were installed together with LyX
-  FileOpen $R5 "$INSTDIR\Resources\uninstallPaths.dat" r
-  FileRead $R5 $LatexPath
-  FileClose $R5
-  StrCpy $String $LatexPath
-  StrCpy $Search "miktex\bin"
-  StrLen $3 $String
-  Call un.StrPoint ; search the LaTeXPath for the phrase "miktex\bin" (function from LyXUtils.nsh)
-  ${if} $Pointer != "-1" ; if something was found
-   IntOp $Pointer $Pointer - 1 ; jump before the first "\" of "\miktex\bin"
-   StrCpy $String $String "$Pointer" ; $String is now the part before "\miktex\bin"
-   Delete "$String\tex\latex\cv.cls"
-   RMDir /r "$String\tex\latex\lyx"
-   RMDir /r "$String\tex\latex\revtex"
-   RMDir /r "$String\tex\latex\hollywood"
-   RMDir /r "$String\tex\latex\broadway"
-   ExecWait "$LatexPath\initexmf --update-fndb"
-  ${endif}
-
-  ; delete start menu folder
-  ReadRegStr $0 SHCTX "${PRODUCT_UNINST_KEY}" "StartMenu"
-  RMDir /r "$0"
-  ; delete desktop icon
-  Delete "$DESKTOP\LyX ${PRODUCT_VERSION}.lnk"
-  ; delete registry entries
-  DeleteRegKey HKCU "${PRODUCT_UNINST_KEY}"
-  DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY}"
-  DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
-  
-  ; run the installer of the old LyX version to clean up the third party products
-  WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "RootKey" "Start" ; dummy entry to let the uninstaller start
-  Exec "${PRODUCT_UNINSTALL_EXE_OLD}"
-  
-SectionEnd
-
-
-; eof
diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi
new file mode 100644 (file)
index 0000000..ff499f0
--- /dev/null
@@ -0,0 +1,325 @@
+; Lyx for Windows, NSIS v2 series installer script
+
+; File LyXInstaller-complete.nsi
+; This file is part of LyX, the document processor.
+; http://www.lyx.org/
+; Licence details can be found in the file COPYING or copy at
+; http://www.lyx.org/about/license.php3
+
+; Author Uwe Stöhr based on the work of Angus Leeming and Joost Verburg
+; Full author contact details are available in file CREDITS or copy at
+; http://www.lyx.org/about/credits.php
+
+; This script requires NSIS 2.25 and newer
+; http://nsis.sourceforge.net/
+;--------------------------------
+
+; Do a Cyclic Redundancy Check to make sure the installer
+; was not corrupted by the download.
+CRCCheck force
+
+; Make the installer as small as possible.
+;SetCompressor lzma
+
+;--------------------------------
+; You should need to change only these macros...
+
+!define INSTALLER_VERSION "Complete"
+!define INSTALLER2_VERSION "Small"
+!define INSTALLER3_VERSION "Update"
+
+; load the settings
+!include "Settings.nsh"
+
+!define GSviewInstall "external\gsv48w32.exe"
+!define JabRefInstall "external\JabRef-2.2-Setup.exe"
+!define JabRefVersion "JabRef 2.2"
+!define MiKTeXDeliveredVersion "MiKTeX 2.5"
+!define MiKTeXInstall "$INSTDIR\external\basic-miktex-2.5.2580.exe"
+!define PRODUCT_VERSION_OLD "none" ; only here to avoid warning message - variable only used in Update installer version
+
+;--------------------------------
+; variables only used in this installer version
+
+Var DelPythonFiles
+Var GhostscriptPath
+Var AiksaurusPath
+Var AspellPath
+Var AspellInstallYes
+Var AspellBaseReg
+Var AspellMessage
+Var Acrobat
+Var PSVPath
+Var EditorPath
+Var ImageEditorPath
+Var BibTeXEditorPath
+Var JabRefInstalled
+Var LangName
+Var LangNameSys
+Var LangCode
+Var LangCodeSys
+Var LangEncoding
+Var LangSysEncoding
+Var DictCode
+Var MissedProg
+Var LaTeXName
+Var MiKTeXVersion
+Var MiKTeXInstalled
+Var MiKTeXUser
+Var MiKTeXPath
+Var InstallGSview
+Var InstallJabRef
+Var CreateFileAssociations
+Var RunNumber
+
+;--------------------------------
+; load some NSIS libraries
+!include "MUI.nsh"
+!include "LogicLib.nsh"
+!include "FileFunc.nsh"
+!include "StrFunc.nsh"
+!include "TextFunc.nsh"
+!insertmacro LineFind
+!include "WordFunc.nsh"
+!insertmacro WordReplace
+
+; Set of various macros and functions
+!include "LyXUtils.nsh"
+
+; Functions to check and configure the LaTeX-system
+!include "LaTeX.nsh"
+
+; Function to check if needed programs are missing or not
+!include "MissingPrograms.nsh"
+
+; Functions for page to set installer language
+; and LyX's menu language
+!include "LanguageSettings.nsh"
+
+; Use the Abiword macros to help set up associations with the file extension in the Registry.
+; Grabbed from
+; http://abiword.pchasm.org/source/cvs/abiword-cvs/abi/src/pkg/win/setup/NSISv2/abi_util_fileassoc.nsh
+!include "abi_util_fileassoc.nsh"
+
+; Function to configure LyX
+!include "ConfigLyX.nsh"
+
+; Function for page to install Aspell dictionaries
+!include "Aspell.nsh"
+
+;--------------------------------
+; Remember the installer language
+!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
+!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
+
+!define MUI_ABORTWARNING
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_hi.bmp"
+!define MUI_ICON "${PRODUCT_DIR}\icons\lyx.ico"
+!define MUI_UNICON "${PRODUCT_DIR}\icons\lyx.ico"
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${VERSION_BITMAP}"
+
+; Welcome page
+!define MUI_WELCOMEPAGE_TEXT "$(WelcomePageText)"
+!insertmacro MUI_PAGE_WELCOME
+
+; Show the license.
+!insertmacro MUI_PAGE_LICENSE "${PRODUCT_LICENSE_FILE}"
+
+; Specify the installation directory.
+!insertmacro MUI_PAGE_DIRECTORY
+
+; Specify LyX's menu language.
+Page custom SelectMenuLanguage SelectMenuLanguage_LeaveFunction
+
+; Define which components to install.
+!insertmacro MUI_PAGE_COMPONENTS
+
+; Specify where to install program shortcuts.
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_ROOT_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "LyX ${PRODUCT_VERSION}"
+!insertmacro MUI_PAGE_STARTMENU ${PRODUCT_NAME} $StartmenuFolder
+
+; Check for needed programs
+Page custom MissingProgramsPage MissingProgramsPage_LeaveFunction
+
+; Watch the components being installed.
+!insertmacro MUI_PAGE_INSTFILES
+
+; Finish page
+!define MUI_FINISHPAGE_RUN 
+!define MUI_FINISHPAGE_TEXT "$(FinishPageMessage)"
+!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageRun)"
+!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchProduct"
+!insertmacro MUI_PAGE_FINISH
+
+; The uninstaller.
+!insertmacro MUI_UNPAGE_COMPONENTS
+!insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+; Languages
+
+!insertmacro MUI_LANGUAGE "English" ; first language is the default language
+!insertmacro MUI_LANGUAGE "Danish"
+!insertmacro MUI_LANGUAGE "Dutch"
+!insertmacro MUI_LANGUAGE "French"
+!insertmacro MUI_LANGUAGE "German"
+!insertmacro MUI_LANGUAGE "Galician"
+!insertmacro MUI_LANGUAGE "Hungarian"
+!insertmacro MUI_LANGUAGE "Italian"
+!insertmacro MUI_LANGUAGE "Norwegian"
+!insertmacro MUI_LANGUAGE "Polish"
+!insertmacro MUI_LANGUAGE "Portuguese"
+!insertmacro MUI_LANGUAGE "Slovak"
+!insertmacro MUI_LANGUAGE "Spanish"
+!insertmacro MUI_LANGUAGE "Swedish"
+!insertmacro MUI_LANGUAGE "Turkish"
+
+!include "lyx_languages\english.nsh"
+!include "lyx_languages\danish.nsh"
+!include "lyx_languages\dutch.nsh"
+!include "lyx_languages\french.nsh"
+!include "lyx_languages\german.nsh"
+!include "lyx_languages\galician.nsh"
+!include "lyx_languages\hungarian.nsh"
+!include "lyx_languages\italian.nsh"
+!include "lyx_languages\norwegian.nsh"
+!include "lyx_languages\polish.nsh"
+!include "lyx_languages\portuguese.nsh"
+!include "lyx_languages\slovak.nsh"
+!include "lyx_languages\spanish.nsh"
+!include "lyx_languages\swedish.nsh"
+!include "lyx_languages\turkish.nsh"
+
+LicenseData "$(LyXLicenseData)"
+
+;--------------------------------
+; Reserve Files
+
+; These files are inserted before other files in the data block
+!insertmacro MUI_RESERVEFILE_LANGDLL
+ReserveFile "io_ui_language.ini"
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+;--------------------------------
+; Installer sections
+
+Section "!${PRODUCT_NAME}" SecCore
+  SectionIn RO
+SectionEnd
+Section "$(SecAllUsersTitle)" SecAllUsers
+  SetShellVarContext all
+  StrCpy $ProductRootKey "HKLM"
+SectionEnd
+Section "$(SecFileAssocTitle)" SecFileAssoc
+  StrCpy $CreateFileAssociations "true"
+SectionEnd
+Section "$(SecDesktopTitle)" SecDesktop
+  StrCpy $CreateDesktopIcon "true"
+SectionEnd
+Section /o "$(SecInstGSviewTitle)" SecInstGSview
+ AddSize 4000
+ StrCpy $InstallGSview "true"
+SectionEnd
+Section /o "$(SecInstJabRefTitle)" SecInstJabRef
+ AddSize 5000
+ StrCpy $InstallJabRef "true"
+SectionEnd
+
+; Section descriptions
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecAllUsers} "$(SecAllUsersDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssoc} "$(SecFileAssocDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecInstGSview} "$(SecInstGSviewDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecInstJabRef} "$(SecInstJabRefDescription)"
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+; the installation section
+!include "InstallActions-complete.nsh"
+
+;--------------------------------
+; This hook function is called internally by NSIS on installer startup
+Function .onInit
+
+  ; set the installer language to the Windows locale language
+  System::Call "kernel32::GetUserDefaultLangID()i.a"
+
+  ; check that the installer is not currently running
+  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${INSTALLER_EXE}.Instance") i .r1 ?e'
+  Pop $R0
+  ${if} $R0 != "0"
+   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
+   Abort
+  ${endif}
+  FindProcDLL::FindProc "${INSTALLER2_EXE}"
+  ${if} $R0 == "1"
+   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
+   Abort
+  ${endif}
+
+  ; check if LyX is already installed
+  ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY}" "Publisher"
+  ${if} $0 != ""
+   MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
+   Abort
+  ${endif}
+
+  ; default settings
+  ; these can be reset to "all" in section SecAllUsers
+  SetShellVarContext current
+  StrCpy $ProductRootKey "HKCU"
+
+  ; this can be reset to "true" in section SecDesktop
+  StrCpy $CreateDesktopIcon "false"
+  StrCpy $CreateFileAssociations "false"
+
+  ; if the user does *not* have administrator privileges, abort
+  StrCpy $Answer ""
+  StrCpy $UserName ""
+  !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
+  ${if} $Answer == "yes"
+    !define ENABLE 0x00000001
+    SectionGetFlags ${SecAllUsers} $0
+    IntOp $0 $0 | ${ENABLE}
+    SectionSetFlags ${SecAllUsers} $0
+    !undef ENABLE
+  ${else}
+    MessageBox MB_OK|MB_ICONSTOP "$(NotAdmin)"
+    Abort
+  ${endif}
+
+  ; check the LaTeX-system
+  Call LaTeXActions ; Function from LaTeX.nsh
+
+  ; check which programs are installed or not
+  Call MissingPrograms ; function from MissingPrograms.nsh
+
+  ; don't let the installer sections appear when the programs are already installed
+  ${if} $PSVPath != ""
+   SectionSetText 4 "" ; hides the corresponding uninstaller section, ${SecInstGSview}
+  ${endif}
+  ${if} $BibTeXEditorPath != ""
+   SectionSetText 5 "" ; hides the corresponding uninstaller section, ${SecInstJabRef}
+  ${endif}
+
+  ClearErrors
+FunctionEnd
+
+;--------------------------------
+
+Function LaunchProduct
+  Exec ${PRODUCT_BAT}
+FunctionEnd
+
+;--------------------------------
+; The Uninstaller
+
+!include "Uninstall.nsh"
+
+; eof
diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi
new file mode 100644 (file)
index 0000000..c149358
--- /dev/null
@@ -0,0 +1,311 @@
+; Lyx for Windows, NSIS v2 series installer script
+
+; File LyXInstaller-small.nsi
+; This file is part of LyX, the document processor.
+; http://www.lyx.org/
+; Licence details can be found in the file COPYING or copy at
+; http://www.lyx.org/about/license.php3
+
+; Author Uwe Stöhr based on the work of Angus Leeming and Joost Verburg
+; Full author contact details are available in file CREDITS or copy at
+; http://www.lyx.org/about/credits.php
+
+; This script requires NSIS 2.25 and newer
+; http://nsis.sourceforge.net/
+;--------------------------------
+
+; Do a Cyclic Redundancy Check to make sure the installer
+; was not corrupted by the download.
+CRCCheck force
+
+; Make the installer as small as possible.
+;SetCompressor lzma
+
+;--------------------------------
+; You should need to change only these macros...
+
+!define INSTALLER_VERSION "Small"
+!define INSTALLER2_VERSION "Complete"
+!define INSTALLER3_VERSION "Update"
+
+; load the settings
+!include "Settings.nsh"
+
+!define JabRefVersion "JabRef not included" ; only here to avoid warning message - variable only used in Complete installer version
+!define MiKTeXDeliveredVersion "MiKTeX not included" ; only here to avoid warning message - variable only used in Complete installer version
+!define PRODUCT_VERSION_OLD "none" ; only here to avoid warning message - variable only used in Update installer version
+
+;--------------------------------
+; variables only used in this installer version
+
+Var DelPythonFiles
+Var GhostscriptPath
+Var AiksaurusPath
+Var AspellPath
+Var AspellInstallYes
+Var AspellBaseReg
+Var AspellMessage
+Var Acrobat
+Var PSVPath
+Var EditorPath
+Var ImageEditorPath
+Var BibTeXEditorPath
+Var JabRefInstalled
+Var LangName
+Var LangNameSys
+Var LangCode
+Var LangCodeSys
+Var LangEncoding
+Var LangSysEncoding
+Var DictCode
+Var MissedProg
+Var LaTeXName
+Var MiKTeXVersion
+Var MiKTeXInstalled
+Var MiKTeXUser
+Var CreateFileAssociations
+Var State
+Var RunNumber
+
+;--------------------------------
+; load some NSIS libraries
+!include "MUI.nsh"
+!include "LogicLib.nsh"
+!include "FileFunc.nsh"
+!include "StrFunc.nsh"
+!include "TextFunc.nsh"
+!insertmacro LineFind
+!include "WordFunc.nsh"
+!insertmacro WordReplace
+
+; Set of various macros and functions
+!include "LyXUtils.nsh"
+
+; Functions to check and configure the LaTeX-system
+!include "LaTeX.nsh"
+
+; Function to check if needed programs are missing or not
+!include "MissingPrograms.nsh"
+
+; Function for page to manually select LaTeX's installation folder
+!include "LaTeXFolder.nsh"
+
+; Functions for page to set installer language
+; and LyX's menu language
+!include "LanguageSettings.nsh"
+
+; Use the Abiword macros to help set up associations with the file extension in the Registry.
+; Grabbed from
+; http://abiword.pchasm.org/source/cvs/abiword-cvs/abi/src/pkg/win/setup/NSISv2/abi_util_fileassoc.nsh
+!include "abi_util_fileassoc.nsh"
+
+; Function to configure LyX
+!include "ConfigLyX.nsh"
+
+; Function for page to install Aspell dictionaries
+!include "Aspell.nsh"
+
+;--------------------------------
+; Remember the installer language
+!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
+!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
+
+!define MUI_ABORTWARNING
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_hi.bmp"
+!define MUI_ICON "${PRODUCT_DIR}\icons\lyx.ico"
+!define MUI_UNICON "${PRODUCT_DIR}\icons\lyx.ico"
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${VERSION_BITMAP}"
+
+; Welcome page
+!define MUI_WELCOMEPAGE_TEXT "$(WelcomePageText)"
+!insertmacro MUI_PAGE_WELCOME
+
+; Show the license.
+!insertmacro MUI_PAGE_LICENSE "${PRODUCT_LICENSE_FILE}"
+
+; Specify the installation directory.
+!insertmacro MUI_PAGE_DIRECTORY
+
+; Specify LyX's menu language.
+Page custom SelectMenuLanguage SelectMenuLanguage_LeaveFunction
+
+; Define which components to install.
+!insertmacro MUI_PAGE_COMPONENTS
+
+; Specify where to install program shortcuts.
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_ROOT_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "LyX ${PRODUCT_VERSION}"
+!insertmacro MUI_PAGE_STARTMENU ${PRODUCT_NAME} $StartmenuFolder
+
+; Select latex.exe manually
+Page custom LatexFolder LatexFolder_LeaveFunction
+
+; Check for needed programs
+Page custom MissingProgramsPage MissingProgramsPage_LeaveFunction
+
+; Watch the components being installed.
+!insertmacro MUI_PAGE_INSTFILES
+
+; Finish page
+!define MUI_FINISHPAGE_RUN 
+!define MUI_FINISHPAGE_TEXT "$(FinishPageMessage)"
+!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageRun)"
+!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchProduct"
+!insertmacro MUI_PAGE_FINISH
+
+; The uninstaller.
+!insertmacro MUI_UNPAGE_COMPONENTS
+!insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+; Languages
+
+!insertmacro MUI_LANGUAGE "English" ; first language is the default language
+!insertmacro MUI_LANGUAGE "Danish"
+!insertmacro MUI_LANGUAGE "Dutch"
+!insertmacro MUI_LANGUAGE "French"
+!insertmacro MUI_LANGUAGE "German"
+!insertmacro MUI_LANGUAGE "Galician"
+!insertmacro MUI_LANGUAGE "Hungarian"
+!insertmacro MUI_LANGUAGE "Italian"
+!insertmacro MUI_LANGUAGE "Norwegian"
+!insertmacro MUI_LANGUAGE "Polish"
+!insertmacro MUI_LANGUAGE "Portuguese"
+!insertmacro MUI_LANGUAGE "Slovak"
+!insertmacro MUI_LANGUAGE "Spanish"
+!insertmacro MUI_LANGUAGE "Swedish"
+!insertmacro MUI_LANGUAGE "Turkish"
+
+!include "lyx_languages\english.nsh"
+!include "lyx_languages\danish.nsh"
+!include "lyx_languages\dutch.nsh"
+!include "lyx_languages\french.nsh"
+!include "lyx_languages\german.nsh"
+!include "lyx_languages\galician.nsh"
+!include "lyx_languages\hungarian.nsh"
+!include "lyx_languages\italian.nsh"
+!include "lyx_languages\norwegian.nsh"
+!include "lyx_languages\polish.nsh"
+!include "lyx_languages\portuguese.nsh"
+!include "lyx_languages\slovak.nsh"
+!include "lyx_languages\spanish.nsh"
+!include "lyx_languages\swedish.nsh"
+!include "lyx_languages\turkish.nsh"
+
+LicenseData "$(LyXLicenseData)"
+
+;--------------------------------
+; Reserve Files
+
+; These files are inserted before other files in the data block
+!insertmacro MUI_RESERVEFILE_LANGDLL
+ReserveFile "io_ui_language.ini"
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+;--------------------------------
+; Installer sections
+
+Section "!${PRODUCT_NAME}" SecCore
+  SectionIn RO
+SectionEnd
+Section "$(SecAllUsersTitle)" SecAllUsers
+  SetShellVarContext all
+  StrCpy $ProductRootKey "HKLM"
+SectionEnd
+Section "$(SecFileAssocTitle)" SecFileAssoc
+  StrCpy $CreateFileAssociations "true"
+SectionEnd
+Section "$(SecDesktopTitle)" SecDesktop
+  StrCpy $CreateDesktopIcon "true"
+SectionEnd
+
+; Section descriptions
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecAllUsers} "$(SecAllUsersDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssoc} "$(SecFileAssocDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+; the installation section
+!include "InstallActions-small.nsh"
+
+;--------------------------------
+; This hook function is called internally by NSIS on installer startup
+Function .onInit
+
+  ; set the installer language to the Windows locale language
+  System::Call "kernel32::GetUserDefaultLangID()i.a"
+
+  ; check that the installer is not currently running
+  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${INSTALLER_EXE}.Instance") i .r1 ?e'
+  Pop $R0
+  ${if} $R0 != "0"
+   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
+   Abort
+  ${endif}
+  FindProcDLL::FindProc "${INSTALLER2_EXE}"
+  ${if} $R0 == "1"
+   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
+   Abort
+  ${endif}
+
+  ; check if LyX is already installed
+  ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY}" "Publisher"
+  ${if} $0 != ""
+   MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
+   Abort
+  ${endif}
+
+  ; default settings
+  ; these can be reset to "all" in section SecAllUsers
+  SetShellVarContext current
+  StrCpy $ProductRootKey "HKCU"
+
+  ; this can be reset to "true" in section SecDesktop
+  StrCpy $CreateDesktopIcon "false"
+  StrCpy $CreateFileAssociations "false"
+
+  ; if the user does *not* have administrator privileges, abort
+  StrCpy $Answer ""
+  StrCpy $UserName ""
+  !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
+  ${if} $Answer == "yes"
+    !define ENABLE 0x00000001
+    SectionGetFlags ${SecAllUsers} $0
+    IntOp $0 $0 | ${ENABLE}
+    SectionSetFlags ${SecAllUsers} $0
+    !undef ENABLE
+  ${else}
+    MessageBox MB_OK|MB_ICONSTOP "$(NotAdmin)"
+    Abort
+  ${endif}
+
+  ; check the LaTeX-system
+  Call LaTeXActions ; Function from LaTeX.nsh
+
+  ; check which programs are installed or not
+  Call MissingPrograms ; function from MissingPrograms.nsh
+
+  ; used later in the function LatexFolder
+  StrCpy $State "0"
+
+  ClearErrors
+FunctionEnd
+
+;--------------------------------
+
+Function LaunchProduct
+  Exec ${PRODUCT_BAT}
+FunctionEnd
+
+;--------------------------------
+; The Uninstaller
+
+!include "Uninstall.nsh"
+
+; eof
diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi
new file mode 100644 (file)
index 0000000..a028e8a
--- /dev/null
@@ -0,0 +1,337 @@
+; Lyx for Windows, NSIS v2 series installer script
+
+; File LyXInstaller-update.nsi
+; This file is part of LyX, the document processor.
+; http://www.lyx.org/
+; Licence details can be found in the file COPYING or copy at
+; http://www.lyx.org/about/license.php3
+
+; Author Uwe Stöhr
+; Full author contact details are available in file CREDITS or copy at
+; http://www.lyx.org/about/credits.php
+
+; This script requires NSIS 2.25 and newer
+; http://nsis.sourceforge.net/
+;--------------------------------
+
+; Do a Cyclic Redundancy Check to make sure the installer
+; was not corrupted by the download.
+CRCCheck force
+
+; Make the installer as small as possible.
+SetCompressor lzma
+
+;--------------------------------
+; You should need to change only these macros...
+
+!define INSTALLER_VERSION "Update"
+!define INSTALLER2_VERSION "Small"
+!define INSTALLER3_VERSION "Complete"
+
+; load the settings
+!include "Settings.nsh"
+
+!define PRODUCT_UNINST_KEY_OLD "Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX150svn"
+!define PRODUCT_VERSION_OLD "LyX 1.5svn-15-04-2007"
+!define PRODUCT_UNINSTALL_EXE_OLD "$INSTDIR\LyXWinUninstall.exe"
+
+;--------------------------------
+; variables only used in this installer version
+
+Var INSTDIR_NEW
+
+;--------------------------------
+; load some NSIS libraries
+!include "MUI.nsh"
+!include "LogicLib.nsh"
+!include "FileFunc.nsh"
+!include "StrFunc.nsh"
+!include "TextFunc.nsh"
+!insertmacro LineFind
+!include "WordFunc.nsh"
+!insertmacro WordReplace
+
+; Set of various macros and functions
+!include "LyXUtils.nsh"
+
+; Use the Abiword macros to help set up associations with the file extension in the Registry.
+; Grabbed from
+; http://abiword.pchasm.org/source/cvs/abiword-cvs/abi/src/pkg/win/setup/NSISv2/abi_util_fileassoc.nsh
+!include "abi_util_fileassoc.nsh"
+
+; list with modified files
+!include "Updated.nsh"
+
+; list with deleted files
+!include "Deleted.nsh"
+
+;--------------------------------
+
+; Remember the installer language
+!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
+!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
+
+!define MUI_ABORTWARNING
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_hi.bmp"
+!define MUI_ICON "${PRODUCT_DIR}\icons\lyx.ico"
+!define MUI_UNICON "${PRODUCT_DIR}\icons\lyx.ico"
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${VERSION_BITMAP}"
+
+; Welcome page
+!define MUI_WELCOMEPAGE_TEXT "$(WelcomePageText)"
+!insertmacro MUI_PAGE_WELCOME
+
+; Show the license.
+!insertmacro MUI_PAGE_LICENSE "${PRODUCT_LICENSE_FILE}"
+
+; Define which components to install.
+!insertmacro MUI_PAGE_COMPONENTS
+
+; Specify where to install program shortcuts.
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "LyX ${PRODUCT_VERSION}"
+!insertmacro MUI_PAGE_STARTMENU ${PRODUCT_NAME} $StartmenuFolder
+
+; Watch the components being installed.
+!insertmacro MUI_PAGE_INSTFILES
+
+; Finish page
+!define MUI_FINISHPAGE_RUN 
+!define MUI_FINISHPAGE_TEXT "$(FinishPageMessage)"
+!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageRun)"
+!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchProduct"
+!insertmacro MUI_PAGE_FINISH
+
+; The uninstaller.
+!insertmacro MUI_UNPAGE_COMPONENTS
+!insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+; Languages
+
+!insertmacro MUI_LANGUAGE "English" ; first language is the default language
+!insertmacro MUI_LANGUAGE "Danish"
+!insertmacro MUI_LANGUAGE "Dutch"
+!insertmacro MUI_LANGUAGE "French"
+!insertmacro MUI_LANGUAGE "German"
+!insertmacro MUI_LANGUAGE "Galician"
+!insertmacro MUI_LANGUAGE "Hungarian"
+!insertmacro MUI_LANGUAGE "Italian"
+!insertmacro MUI_LANGUAGE "Norwegian"
+!insertmacro MUI_LANGUAGE "Polish"
+!insertmacro MUI_LANGUAGE "Portuguese"
+!insertmacro MUI_LANGUAGE "Slovak"
+!insertmacro MUI_LANGUAGE "Spanish"
+!insertmacro MUI_LANGUAGE "Swedish"
+!insertmacro MUI_LANGUAGE "Turkish"
+
+!include "lyx_languages\english.nsh"
+!include "lyx_languages\danish.nsh"
+!include "lyx_languages\dutch.nsh"
+!include "lyx_languages\french.nsh"
+!include "lyx_languages\german.nsh"
+!include "lyx_languages\galician.nsh"
+!include "lyx_languages\hungarian.nsh"
+!include "lyx_languages\italian.nsh"
+!include "lyx_languages\norwegian.nsh"
+!include "lyx_languages\polish.nsh"
+!include "lyx_languages\portuguese.nsh"
+!include "lyx_languages\slovak.nsh"
+!include "lyx_languages\spanish.nsh"
+!include "lyx_languages\swedish.nsh"
+!include "lyx_languages\turkish.nsh"
+
+LicenseData "$(LyXLicenseData)"
+
+;--------------------------------
+; Reserve Files
+
+; These files are inserted before other files in the data block
+!insertmacro MUI_RESERVEFILE_LANGDLL
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+;--------------------------------
+; Installer sections
+
+Section "!${PRODUCT_NAME}" SecCore
+  SectionIn RO
+SectionEnd
+Section "$(SecDesktopTitle)" SecDesktop
+  StrCpy $CreateDesktopIcon "true"
+SectionEnd
+
+; Section descriptions
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
+!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+; the installation section
+!include "InstallActions-update.nsh"
+
+;--------------------------------
+; This hook function is called internally by NSIS on installer startup
+Function .onInit
+
+  ; Check that LyX is not currently running
+  FindProcDLL::FindProc "lyx.exe"
+  ${if} $R0 == "1"
+   MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)"
+   Abort
+  ${endif}
+  
+  ; set the installer language to the Windows locale language
+  System::Call "kernel32::GetUserDefaultLangID()i.a"
+  
+  ; Check that the installer is not currently running
+  System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${INSTALLER_EXE}.Instance") i .r1 ?e'
+  Pop $R0
+  ${if} $R0 != "0"
+   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
+   Abort
+  ${endif}
+  FindProcDLL::FindProc "${INSTALLER2_EXE}"
+  ${if} $R0 == "1"
+   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
+   Abort
+  ${endif}
+  FindProcDLL::FindProc "${INSTALLER3_EXE}"
+  ${if} $R0 == "1"
+   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
+   Abort
+  ${endif}
+  
+  ; check where LyX is installed
+  ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY_OLD}" "DisplayIcon"
+  ${if} $0 != ""
+    SetShellVarContext all
+    StrCpy $ProductRootKey "HKLM"
+  ${endif}
+  ${if} $0 == ""
+   ReadRegStr $0 HKCU "${PRODUCT_UNINST_KEY_OLD}" "DisplayIcon"
+   ${if} $0 != ""
+    SetShellVarContext current
+    StrCpy $ProductRootKey "HKCU"
+   ${endif}
+   ${if} $0 == ""
+    MessageBox MB_OK|MB_ICONSTOP "$(UpdateNotAllowed)"
+    Abort
+   ${endif}
+  ${endif} ; end if $0 == 0
+  ${if} $0 != "" ; if it is found
+   StrCpy $INSTDIR $0
+   StrCpy $INSTDIR $INSTDIR -12 ; delete the string "\bin\lyx.exe" or "\bin\lyx.bat"
+  ${endif}
+  
+  ; abort if the user doesn't have administrator privileges but LyX was installed as admin
+  StrCpy $Answer ""
+  StrCpy $UserName ""
+  !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
+  ${if} $Answer != "yes"
+  ${andif} $ProductRootKey == "HKLM"
+    MessageBox MB_OK|MB_ICONSTOP "$(NotAdmin)"
+    Abort
+  ${endif}
+  
+  ; This can be reset to "true" in section SecDesktop.
+  StrCpy $CreateDesktopIcon "false"
+  
+  ClearErrors
+FunctionEnd
+
+;--------------------------------
+
+Function LaunchProduct
+  Exec ${PRODUCT_BAT}
+FunctionEnd
+
+;--------------------------------
+; The Uninstaller
+
+Function un.onInit
+       
+  ; Check that LyX is not currently running
+  FindProcDLL::FindProc "lyx.exe"
+  ${if} $R0 == "1"
+   MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)"
+   Abort
+  ${endif}
+
+  ; set registry root key
+  StrCpy $Answer ""
+  !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
+  ${if} $Answer == "yes"
+    SetShellVarContext all
+  ${else}
+   SetShellVarContext current
+  ${endif}
+
+  ; Ascertain whether the user has sufficient privileges to uninstall.
+  ; abort when LyX was installed with admin permissions but the user doesn't have administrator privileges
+  ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY}" "RootKey"
+  ${if} $0 != ""
+  ${andif} $Answer != "yes"
+   MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)"
+   Abort
+  ${endif}
+  ; abort when LyX couldn't be found in the registry
+  ${if} $0 == "" ; check in HKCU
+   ReadRegStr $0 HKCU "${PRODUCT_UNINST_KEY}" "RootKey"
+   ${if} $0 == ""
+     MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)"
+   ${endif}
+  ${endif}
+  
+FunctionEnd
+
+Function un.onUninstSuccess
+
+ HideWindow ; hides the uninstaller Window when it is ready
+
+FunctionEnd
+
+Section "un.LyX" un.SecUnProgramFiles
+
+  SectionIn RO
+
+  ; delete LaTeX class files that were installed together with LyX
+  FileOpen $R5 "$INSTDIR\Resources\uninstallPaths.dat" r
+  FileRead $R5 $LatexPath
+  FileClose $R5
+  StrCpy $String $LatexPath
+  StrCpy $Search "miktex\bin"
+  StrLen $3 $String
+  Call un.StrPoint ; search the LaTeXPath for the phrase "miktex\bin" (function from LyXUtils.nsh)
+  ${if} $Pointer != "-1" ; if something was found
+   IntOp $Pointer $Pointer - 1 ; jump before the first "\" of "\miktex\bin"
+   StrCpy $String $String "$Pointer" ; $String is now the part before "\miktex\bin"
+   Delete "$String\tex\latex\cv.cls"
+   RMDir /r "$String\tex\latex\lyx"
+   RMDir /r "$String\tex\latex\revtex"
+   RMDir /r "$String\tex\latex\hollywood"
+   RMDir /r "$String\tex\latex\broadway"
+   ExecWait "$LatexPath\initexmf --update-fndb"
+  ${endif}
+
+  ; delete start menu folder
+  ReadRegStr $0 SHCTX "${PRODUCT_UNINST_KEY}" "StartMenu"
+  RMDir /r "$0"
+  ; delete desktop icon
+  Delete "$DESKTOP\LyX ${PRODUCT_VERSION}.lnk"
+  ; delete registry entries
+  DeleteRegKey HKCU "${PRODUCT_UNINST_KEY}"
+  DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY}"
+  DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
+  
+  ; run the installer of the old LyX version to clean up the third party products
+  WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "RootKey" "Start" ; dummy entry to let the uninstaller start
+  Exec "${PRODUCT_UNINSTALL_EXE_OLD}"
+  
+SectionEnd
+
+
+; eof
index bc0544efb543d6993f5f3df8db9a38a12b53fbb9..8f1a80d57642d6ba5aa14b1829e30216121d4ebd 100644 (file)
@@ -96,8 +96,8 @@ Function MissingPrograms
   StrCpy $PSVPath ""
   ReadRegStr $PSVPath HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\gsview32.exe" "Path"
 
-  ; test if an editor with syntax-highlighting for LaTeX-files is installed (function in LyXUtils.nsh)
-  Call EditorCheck ; function from Editors.nsh
+  ; test if an editor with syntax-highlighting for LaTeX-files is installed
+  Call EditorCheck
 
   ; test if an image editor is installed (due to LyX's bug 2654 first check for GIMP)
   StrCpy $ImageEditorPath ""
@@ -125,6 +125,8 @@ Function MissingPrograms
 
 FunctionEnd
 
+; ---------------------------------------
+
 Function MissingProgramsPage
 
   ; generate the installer page - re-read empty page first
@@ -159,6 +161,102 @@ Function MissingProgramsPage
 
 FunctionEnd
 
+; ---------------------------------------
+
 Function MissingProgramsPage_LeaveFunction
 
+ ; this function is needed for the installer page
+
+FunctionEnd
+
+; ---------------------------------------
+
+Function EditorCheck
+
+  ; test if an editor with syntax-highlighting for LaTeX-files is installed
+  ; (check for jEdit, PSPad, WinShell, ConTEXT, Crimson Editor, Vim, TeXnicCenter, LaTeXEditor, WinEdt, LEd, WinTeX)
+  StrCpy $EditorPath ""
+  StrCpy $0 ""
+  ; check for jEdit
+  ReadRegStr $EditorPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\jEdit_is1" "InstallLocation"
+  ${if} $EditorPath != ""
+   StrCpy $EditorPath $EditorPath -1 ; remove "\" from the end of the string
+  ${endif}
+  ; check for PSPad
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PSPad editor_is1" "InstallLocation"
+  ${if} $0 != ""
+   StrCpy $0 $0 -1
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for WinShell
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinShell_is1" "InstallLocation"
+  ${if} $0 != ""
+   StrCpy $0 $0 -1
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for ConTEXT
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ConTEXTEditor_is1" "InstallLocation"
+  ${if} $0 != ""
+   StrCpy $0 $0 -1
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for Crimson Editor
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Crimson Editor" "UninstallString"
+  ${if} $0 != ""
+   StrCpy $0 $0 -14 ; remove "\uninstall.exe"
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for Vim 6.x
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Classes\Applications\gvim.exe\shell\edit\command" ""
+  ${if} $0 != ""
+   StrCpy $0 $0 -13 ; remove "gvim.exe "%1""
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for Vim 7.0
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 7.0" "UninstallString"
+  ${if} $0 != ""
+   StrCpy $0 $0 -18 ; remove "\uninstall-gui.exe"
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for TeXnicCenter
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TeXnicCenter_is1" "Inno Setup: App Path"
+  ${if} $0 != ""
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for LaTeXEditor
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LaTeX Editor" "InstallLocation"
+  ${if} $0 != ""
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for WinEdt
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinEdt_is1" "InstallLocation"
+  ${if} $0 != ""
+   StrCpy $0 $0 -1
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for LEd
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LEd_is1" "InstallLocation"
+  ${if} $0 != ""
+   StrCpy $0 $0 -1
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+  ; check for WinTeX
+  StrCpy $0 ""
+  ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinTeX XP" "DisplayIcon"
+  ${if} $0 != ""
+   StrCpy $0 $0 -11 ; remove "\wintex.exe"
+   StrCpy $EditorPath "$EditorPath;$0"
+  ${endif}
+
 FunctionEnd
+
diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Settings.nsh b/development/Win32/packaging/installer/LyXWinInstaller/Settings.nsh
new file mode 100644 (file)
index 0000000..508c7ff
--- /dev/null
@@ -0,0 +1,85 @@
+; installer settings
+; You should need to change only these macros for new releases.
+
+!define PRODUCT_DIR "D:\LyXPackage1.5"
+!define PRODUCT_NAME "LyX"
+!define PRODUCT_VERSION "1.5svn-xx-04-2007"
+!define PRODUCT_VERSION_SHORT "150svn"
+!define PRODUCT_SUBFOLDER "lyx15"
+!define PRODUCT_LICENSE_FILE "${PRODUCT_DIR}\License.txt"
+!define PRODUCT_SOURCEDIR "${PRODUCT_DIR}\LyX"
+!define PRODUCT_EXE "$INSTDIR\bin\lyx.exe"
+!define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
+!define PRODUCT_EXT ".lyx"
+!define PRODUCT_MIME_TYPE "application/lyx"
+!define PRODUCT_UNINSTALL_EXE "$INSTDIR\LyXWinUninstall.exe"
+!define PRODUCT_HELP_LINK "http://www.lyx.org/internet/mailing.php"
+!define PRODUCT_ABOUT_URL "http://www.lyx.org/about/"
+!define PRODUCT_INFO_URL "http://www.lyx.org/"
+
+BrandingText "LyXWinInstaller v3.14 - ${INSTALLER_VERSION}"
+
+; to check later if this installer version is running at the same time
+!define INSTALLER_EXE "LyXWin${PRODUCT_VERSION_SHORT}${INSTALLER_VERSION}-3-14.exe"
+!define INSTALLER2_EXE "LyXWin${PRODUCT_VERSION_SHORT}${INSTALLER2_VERSION}-3-14.exe"
+!define INSTALLER3_EXE "LyXWin${PRODUCT_VERSION_SHORT}${INSTALLER3_VERSION}-3-14.exe"
+!define VERSION_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_vert${PRODUCT_VERSION_SHORT}.bmp"
+
+; Replaced by HKLM or HKCU depending on SetShellVarContext.
+!define PRODUCT_ROOT_KEY "SHCTX"
+
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\lyx.exe"
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX${PRODUCT_VERSION_SHORT}"
+
+!define ClassFileDir "${PRODUCT_SOURCEDIR}\Resources\tex"
+
+!define ImageMagickVersion "6.3.3"
+!define ImageMagickDir "$INSTDIR\etc\ImageMagick" ; for some odd reason the ImageMagick folder may not be a subfolder of $INSTDIR\bin!
+!define GhostscriptDir "$INSTDIR\etc\Ghostscript"
+!define GhostscriptVersion "8.56"
+!define AiksaurusDir "$APPDATA\Aiksaurus"
+!define AiksaurusInstall "external\Aiksaurus"
+!define AspellDir "$APPDATA\Aspell"
+!define AspellDisplay "Aspell 0.60.4 Data"
+!define AspellInstall "external\Aspell"
+!define AspellUninstall "Uninstall-AspellData.exe"
+!define AspellDictPath "${AspellDir}\Dictionaries"
+!define AspellPersonalPath "${AspellDir}\Personal"
+!define AspellLocationExact "http://developer.berlios.de/project/showfiles.php?group_id=5117&release_id=9651"
+!define AspellLocation "http://developer.berlios.de/projects/lyxwininstall/"
+!define DVIPostFileDir "${PRODUCT_SOURCEDIR}\external\dvipost"
+; the following variable is needed for a possible CD-version
+;!define LaTeXPackagesDir "${PRODUCT_SOURCEDIR}\latex"
+!define MiKTeXRepo "ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/"
+!define MiKTeXConfigFolder "MiKTeX\2.5\miktex\config"
+
+;--------------------------------
+; make some of the information above available to NSIS.
+
+Name "${PRODUCT_NAME}"
+OutFile "${INSTALLER_EXE}"
+InstallDir "$PROGRAMFILES\${PRODUCT_NAME} ${PRODUCT_VERSION}"
+
+; -------------------------------
+; Variables used by all installer versions
+
+Var LatexPath
+Var PythonPath
+Var ImageMagickPath
+Var PathPrefix
+Var Answer
+Var UserName
+Var CreateDesktopIcon
+Var StartmenuFolder
+Var ProductRootKey
+Var AppPre
+Var AppSuff
+Var AppPath
+Var String
+Var Search
+Var Pointer
+Var UserList
+Var FileName
+Var OldString
+Var NewString
+