installer:

- updates
- new script to be able to build all installer version at once via e.g. SCons
- updated to MiKTeX 2.6 -> lots of changes in the recognition of the LaTeX-distributions
- fix uninstalling bug
- added readme for the Update Installer

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18326 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2007-05-15 01:31:19 +00:00
parent 5aefff5be0
commit d9d7d1769a
17 changed files with 210 additions and 100 deletions

View File

@ -0,0 +1,23 @@
# this script compiles the three different installer variants at once
# this is necessary when the installer should e.g. be built by SCons or CMake
SetCompressor /SOLID lzma
#--------------------------------
# The following commands use makensis to compile the three different installer variants.
#--------------------------------
#Compile the Update Installer
!system '"${NSISDIR}\makensis.exe" "LyXInstaller-Update.nsi"'
#--------------------------------
#Compile the Small Installer
!system '"${NSISDIR}\makensis.exe" "LyXInstaller-Small.nsi"'
#--------------------------------
#Compile the Complete Installer
!system '"${NSISDIR}\makensis.exe" "LyXInstaller-Complete.nsi"'

View File

@ -1,16 +1,20 @@
Version LyX 1.5beta3-14-05-2007 Version LyX 1.5beta3-15-05-2007
- LyX 1.5 beta3 from 14-05-2007 - LyX 1.5 beta3 from 15-05-2007
- fix bug, introduced with last version, that all margin notes in - fix bug, introduced with last version, that all margin notes in
a document are lost a document are lost
- support for Chinese, Japenese and Korean - support for Chinese, Japenese and Korean
- support for the LaTeX-package "listings" - support for the LaTeX-package "listings"
- updated to ImageMagick 6.3.4
- updated to Phyton 2.5.1
- updated to MikteX 2.6 (version 2675)
- fix bug that LyX's menu language setting was ignored when LyX is - fix bug that LyX's menu language setting was ignored when LyX is
started by double-clicking on a LyX-file started by double-clicking on a LyX-file
- when Updating PDFs, the PDF is opened at the last viewed position - when Updating PDFs, the PDF is opened at the last viewed position
(only works with Acrobat/adobe Reader version <= 7) (only works with Acrobat/adobe Reader version <= 7)
- fix hopefully the case that PDFs couldn't be updated when - fix hopefully the case that PDFs couldn't be updated when
Adobe Reader 8 is used on Windows Vista Adobe Reader 8 is used on Windows Vista
- fix bug that MiKTeX and JabRef weren't correctly uninstalled
Version LyX 1.5svn-02-05-2007 Version LyX 1.5svn-02-05-2007

View File

@ -16,7 +16,7 @@ Section "-Installation actions" SecInstallation
File /r "${PRODUCT_SOURCEDIR}\external" File /r "${PRODUCT_SOURCEDIR}\external"
# install MiKTeX if not already installed # install MiKTeX if not already installed
Call MiKTeX Call InstallMiKTeX # function from LaTeX.nsh
# install Ghostscript if not already installed # install Ghostscript if not already installed
Call Ghostscript Call Ghostscript
@ -96,51 +96,10 @@ Section "-Installation actions" SecInstallation
FileWrite $R1 '$LaTeXPath' FileWrite $R1 '$LaTeXPath'
FileClose $R1 FileClose $R1
# prepare variables for uninstaller
StrCpy $MiKTeXVersionVar ${MiKTeXDeliveredVersion}
StrCpy $JabRefVersionVar ${JabRefVersion}
SectionEnd SectionEnd
# ------------------------------------------- # -------------------------------------------
Function MiKTeX
# install MiKTeX if not already installed
${if} $LatexPath == ""
# launch MiKTeX's installer
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)"
ExecWait ${MiKTeXInstall}
# test if MiKTeX is installed
ReadRegStr $String HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path"
StrCpy $Search "miktex"
Call LaTeXCheck
${if} $LatexPath == ""
StrCpy $MiKTeXUser "HKCU"
ReadRegStr $String HKCU "Environment" "Path"
StrCpy $Search "miktex"
Call LaTeXCheck
${endif}
${if} $LatexPath != ""
# set package repository (MiKTeX's primary package repository)
WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
StrCpy $MiKTeXInstalled "yes"
${if} $MiKTeXUser != "HKCU"
StrCpy $MiKTeXPath "$LatexPath" -11
#MessageBox MB_OK|MB_ICONINFORMATION "$(MiKTeXPathInfo)" # info that MiKTeX's installation folder must have write permissions for all users to work properly
${endif}
${else}
MessageBox MB_OK|MB_ICONSTOP "$(LatexError1)"
SetOutPath $TEMP # to be able to delete the $INSTDIR
RMDir /r $INSTDIR
Abort
${endif} # endif $LatexPath != ""
${endif}
FunctionEnd
# -------------------------------------------
Function Ghostscript Function Ghostscript
# if GhostScript is not installed # if GhostScript is not installed

View File

@ -86,10 +86,6 @@ Section "-Installation actions" SecInstallation
FileWrite $R1 '$LaTeXPath' FileWrite $R1 '$LaTeXPath'
FileClose $R1 FileClose $R1
# prepare variables for uninstaller
StrCpy $MiKTeXVersionVar ${MiKTeXDeliveredVersion}
StrCpy $JabRefVersionVar ${JabRefVersion}
SectionEnd SectionEnd
# ------------------------------------------- # -------------------------------------------

View File

@ -205,14 +205,12 @@ Function RefreshRegUninst
ReadRegStr $0 HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" ReadRegStr $0 HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}" ${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
StrCpy $MiKTeXVersionVar ${MiKTeXDeliveredVersionOld}
${endif} ${endif}
# JabRef # JabRef
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${JabRefVersionOld}" "OnlyWithLyX" ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}" ${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${JabRefVersionOld}" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
StrCpy $JabRefVersionVar ${JabRefVersionOld}
${endif} ${endif}
# Aiksaurus # Aiksaurus

View File

@ -1,25 +1,44 @@
Function LaTeXActions Function LaTeXActions
# tests if MiKTeX is installed # check if MiKTeX or TeXLive is installed
# reads the PATH variable via the registry because NSIS' "$%Path%" variable is not updated when the PATH changes
# test if MiKTeX is installed
# reads the PATH variable via the registry because NSIS' "$%Path%" variable is not updated when the PATH changes
ReadRegStr $String HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" ReadRegStr $String HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path"
StrCpy $Search "miktex" StrCpy $Search "miktex"
Call LaTeXCheck # sets the path to the latex.exe to $LatexPath # Function from LyXUtils.nsh Call LaTeXCheck # sets the path to the latex.exe to $LatexPath # Function from LyXUtils.nsh
# check if MiKTeX 2.4 or 2.5 is installed
StrCpy $String "" ${if} $LatexPath != ""
ReadRegStr $String HKLM "Software\MiK\MiKTeX\CurrentVersion\MiKTeX" "Install Root" # check if MiKTeX 2.4, 2.5 or 2.6 is installed
${if} $String != "" ReadRegStr $String HKLM "Software\MiK\MiKTeX\CurrentVersion\MiKTeX" "Install Root"
StrCpy $MiKTeXVersion "2.4" # needed later for the configuration of MiKTeX ${if} $String != ""
StrCpy $LaTeXName "MiKTeX 2.4" StrCpy $MiKTeXVersion "2.4" # needed later for the configuration of MiKTeX
StrCpy $LaTeXName "MiKTeX 2.4"
${endif}
# check if MiKTeX 2.5 or 2.6 is installed
StrCpy $0 0
loopA:
EnumRegKey $1 HKLM "SOFTWARE\MiKTeX.org\MiKTeX" $0 # check the last subkey
StrCmp $1 "" doneA
StrCpy $String $1
IntOp $0 $0 + 1
Goto loopA
doneA:
${if} $String == "2.5"
StrCpy $MiKTeXVersion "2.5"
StrCpy $LaTeXName "MiKTeX 2.5"
${endif}
${if} $String == "2.6"
StrCpy $MiKTeXVersion "2.6"
StrCpy $LaTeXName "MiKTeX 2.6"
${endif}
${endif} ${endif}
${if} $LatexPath == "" # check if MiKTeX is installed only for the current user ${if} $LatexPath == "" # check if MiKTeX is installed only for the current user
# check for MiKTeX 2.5
ReadRegStr $String HKCU "Environment" "Path" ReadRegStr $String HKCU "Environment" "Path"
StrCpy $Search "miktex" StrCpy $Search "miktex"
Call LaTeXCheck # function from LyXUtils.nsh Call LaTeXCheck # function from LyXUtils.nsh
${if} $LatexPath != "" ${if} $LatexPath != ""
StrCpy $MiKTeXUser "HKCU" # needed later to for a message about MiKTeX's install folder write permissions, see InstallActions-*.nsh StrCpy $MiKTeXUser "HKCU" # needed later to configure MiKTeX
${endif} ${endif}
# check for MiKTeX 2.4 # check for MiKTeX 2.4
StrCpy $String "" StrCpy $String ""
@ -28,15 +47,29 @@ Function LaTeXActions
StrCpy $MiKTeXVersion "2.4" StrCpy $MiKTeXVersion "2.4"
StrCpy $LaTeXName "MiKTeX 2.4" StrCpy $LaTeXName "MiKTeX 2.4"
${endif} ${endif}
# check for MiKTeX 2.5 and 2.6
StrCpy $0 0
loopB:
EnumRegKey $1 HKCU "SOFTWARE\MiKTeX.org\MiKTeX" $0 # check the last subkey
StrCmp $1 "" doneB
StrCpy $String $1
IntOp $0 $0 + 1
Goto loopB
doneB:
${if} $String == "2.5"
StrCpy $MiKTeXVersion "2.5"
StrCpy $LaTeXName "MiKTeX 2.5"
${endif}
${if} $String == "2.6"
StrCpy $MiKTeXVersion "2.6"
StrCpy $LaTeXName "MiKTeX 2.6"
${endif}
${endif} ${endif}
${if} $LatexPath != "" ${if} $LatexPath != ""
StrCpy $MiKTeXInstalled "yes" StrCpy $MiKTeXInstalled "yes"
${if} $LaTeXName != "MiKTeX 2.4"
StrCpy $LaTeXName "MiKTeX 2.5"
${endif}
${endif} ${endif}
# test if TeXLive is installed # test if TeXLive is installed
# as described at TeXLives' homepage there should be an entry in the PATH # as described at TeXLives' homepage there should be an entry in the PATH
${if} $LatexPath == "" ${if} $LatexPath == ""
@ -67,11 +100,54 @@ Function LaTeXActions
${if} $LatexPath != "" ${if} $LatexPath != ""
${andif} $LaTeXName != "MiKTeX 2.4" ${andif} $LaTeXName != "MiKTeX 2.4"
${andif} $LaTeXName != "MiKTeX 2.5" ${andif} $LaTeXName != "MiKTeX 2.5"
${andif} $LaTeXName != "MiKTeX 2.6"
StrCpy $LaTeXName "TeXLive" StrCpy $LaTeXName "TeXLive"
${endif} ${endif}
FunctionEnd FunctionEnd
# -------------------------------------------
!if ${INSTALLER_VERSION} == "Complete"
Function InstallMiKTeX
# install MiKTeX if not already installed
${if} $LatexPath == ""
# launch MiKTeX's installer
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)"
ExecWait ${MiKTeXInstall}
# test if MiKTeX is installed
ReadRegStr $String HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path"
StrCpy $Search "miktex"
Call LaTeXCheck
${if} $LatexPath == ""
StrCpy $MiKTeXUser "HKCU"
ReadRegStr $String HKCU "Environment" "Path"
StrCpy $Search "miktex"
Call LaTeXCheck
${endif}
${if} $LatexPath != ""
# set package repository (MiKTeX's primary package repository)
WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
StrCpy $MiKTeXInstalled "yes"
StrCpy $MiKTeXVersion ${MiKTeXDeliveredVersion}
${if} $MiKTeXUser != "HKCU"
StrCpy $MiKTeXPath "$LatexPath" -11 # delete "\miktex\bin"
#MessageBox MB_OK|MB_ICONINFORMATION "$(MiKTeXPathInfo)" # info that MiKTeX's installation folder must have write permissions for all users to work properly
${endif}
${else}
MessageBox MB_OK|MB_ICONSTOP "$(LatexError1)"
SetOutPath $TEMP # to be able to delete the $INSTDIR
RMDir /r $INSTDIR
Abort
${endif} # endif $LatexPath != ""
${endif}
FunctionEnd
!endif # endif ${INSTALLER_VERSION} == "Complete"
# ------------------------------ # ------------------------------
Function ConfigureMiKTeX Function ConfigureMiKTeX
@ -103,9 +179,10 @@ Function ConfigureMiKTeX
SetOutPath "$String\tex\latex\" # Should there be a final \ before "? SetOutPath "$String\tex\latex\" # Should there be a final \ before "?
File /r "${DVIPostFileDir}" File /r "${DVIPostFileDir}"
# refresh MiKTeX's file name database
ExecWait "$LaTeXPath\initexmf --update-fndb"
${if} $MiKTeXVersion == "2.4" ${if} $MiKTeXVersion == "2.4"
# refresh MiKTeX's file name database
ExecWait "$String\miktex\bin\initexmf --update-fndb"
# delete MiKTeX 2.4's dvipng executable as it is an old broken version. Then install a working one. # delete MiKTeX 2.4's dvipng executable as it is an old broken version. Then install a working one.
Delete "$String\miktex\bin\dvipng.exe" Delete "$String\miktex\bin\dvipng.exe"
# Install a new one # Install a new one
@ -116,21 +193,44 @@ Function ConfigureMiKTeX
WriteRegStr HKCU "SOFTWARE\MiK\MiKTeX\CurrentVersion\MPM\Settings" "" "" WriteRegStr HKCU "SOFTWARE\MiK\MiKTeX\CurrentVersion\MPM\Settings" "" ""
# Setting package repository (MiKTeX's primary package repository) # Setting package repository (MiKTeX's primary package repository)
WriteRegStr HKCU "SOFTWARE\MiK\MiKTeX\CurrentVersion\MPM" "RemotePackageRepository" "${MiKTeXRepo}" WriteRegStr HKCU "SOFTWARE\MiK\MiKTeX\CurrentVersion\MPM" "RemotePackageRepository" "${MiKTeXRepo}"
${endif}
${else} # if MiKTeX 2.5 ${if} $MiKTeXVersion == "2.5"
# refresh MiKTeX's file name database
ExecWait "$LaTeXPath\initexmf --update-fndb"
# enable package installation without asking (t = Yes, f = No) # enable package installation without asking (t = Yes, f = No)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\2.5\MPM" "AutoInstall" "1" # if only for curent user WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" # if only for curent user
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_AUTOINSTALL" "t" ${if} $MiKTeXUser != "HKCU"
WriteRegStr SHCTX "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_AUTOINSTALL" "t"
${endif}
# set package repository (MiKTeX's primary package repository) # set package repository (MiKTeX's primary package repository)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\2.5\MPM" "RemoteRepository" "${MiKTeXRepo}" # if only for curent user WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RemoteRepository" "${MiKTeXRepo}" # if only for curent user
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\2.5\MPM" "RepositoryType" "remote" # if only for curent user WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote" # if only for curent user
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_REPOSITORY" "${MiKTeXRepo}" ${if} $MiKTeXUser != "HKCU"
WriteRegStr SHCTX "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_REPOSITORY" "${MiKTeXRepo}"
${endif}
${endif}
${if} $MiKTeXVersion == "2.6"
# enable package installation without asking (t = Yes, f = No)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" # if only for curent user
${if} $MiKTeXUser != "HKCU"
WriteRegStr SHCTX "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" # if only for curent user
${endif}
# set package repository (MiKTeX's primary package repository)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RemoteRepository" "${MiKTeXRepo}" # if only for curent user
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote" # if only for curent user
${if} $MiKTeXUser != "HKCU"
WriteRegStr SHCTX "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RemoteRepository" "${MiKTeXRepo}" # if only for curent user
WriteRegStr SHCTX "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote" # if only for curent user
${endif}
${endif} ${endif}
# enable MiKTeX's automatic package installation # enable MiKTeX's automatic package installation
ExecWait '$LaTeXPath\mpm.com --update-fndb' ${if} $MiKTeXVersion == "2.4"
${orif} $MiKTeXVersion == "2.5"
ExecWait '$LaTeXPath\mpm.com --update-fndb'
${else} # if MiKTeX 2.6
ExecWait '$LaTeXPath\mpm.exe --update-fndb'
${endif}
# the following feature is planned to be used for a possible CD-version # the following feature is planned to be used for a possible CD-version
# copy LaTeX-packages needed by LyX # copy LaTeX-packages needed by LyX
# SetOutPath "$INSTDIR" # SetOutPath "$INSTDIR"

View File

@ -59,10 +59,8 @@ Var AspellBaseReg
Var AspellMessage Var AspellMessage
Var ImageMagickPath Var ImageMagickPath
Var JabRefInstalled Var JabRefInstalled
Var JabRefVersionVar
Var LatexPath Var LatexPath
Var MiKTeXInstalled Var MiKTeXInstalled
Var MiKTeXVersionVar
Var PythonPath Var PythonPath
Var Answer Var Answer
Var AppPre Var AppPre

View File

@ -57,10 +57,8 @@ Var AspellBaseReg
Var AspellMessage Var AspellMessage
Var ImageMagickPath Var ImageMagickPath
Var JabRefInstalled Var JabRefInstalled
Var JabRefVersionVar
Var LatexPath Var LatexPath
Var MiKTeXInstalled Var MiKTeXInstalled
Var MiKTeXVersionVar
Var PythonPath Var PythonPath
Var Answer Var Answer
Var AppPre Var AppPre

View File

@ -43,10 +43,8 @@ Var AspellBaseReg
Var AspellMessage Var AspellMessage
Var ImageMagickPath Var ImageMagickPath
Var JabRefInstalled Var JabRefInstalled
Var JabRefVersionVar
Var LatexPath Var LatexPath
Var MiKTeXInstalled Var MiKTeXInstalled
Var MiKTeXVersionVar
Var PythonPath Var PythonPath
Var Answer Var Answer
Var AppPre Var AppPre

View File

@ -92,5 +92,5 @@ License (GPL). A package with the sourcecode can be found
in the section "LyxWinInstallerSource" of in the section "LyxWinInstallerSource" of
http://developer.berlios.de/project/showfiles.php?group_id=5117 http://developer.berlios.de/project/showfiles.php?group_id=5117
The license files of all used pgrograms can be found in the subdirectory "bin" The license files of all used programs can be found in the subdirectory "bin"
of LyX's installation folder. of LyX's installation folder.

View File

@ -96,5 +96,5 @@ License (GPL). A package with the sourcecode can be found
in the section "LyxWinInstallerSource" of in the section "LyxWinInstallerSource" of
http://developer.berlios.de/project/showfiles.php?group_id=5117 http://developer.berlios.de/project/showfiles.php?group_id=5117
The license files of all used pgrograms can be found in the subdirectory "bin" The license files of all used programs can be found in the subdirectory "bin"
of LyX's installation folder. of LyX's installation folder.

View File

@ -0,0 +1,32 @@
Description
This is the readme of the variant "update" of the LyXWinInstaller. Please read
this file carefully to prevent troubles with the installer.
The LyXWinInstaller installs the wordprocessor "LyX" (www.lyx.org) and some
needed programs on Windows 2000/XP/XPx64/Vista.
! Win95, Win98, and WinME are NOT supported. !
---
General
The installer variant "update" is designed to update existing an LyX installation.
It therefore only actualized some registry entries and updates the file that were
modified since the last LyX release.
Custom user settings and third party programs like ImageMagick are not touched.
---
Prerequisites
You must have the last LyX-version installed, otherwise the update installer
quits with a varning about the wrong LyX version.
---
License
The scripts of the LyXWinInstaller are released under the GNU General Public
License (GPL). A package with the sourcecode can be found
in the section "LyxWinInstallerSource" of
http://developer.berlios.de/project/showfiles.php?group_id=5117
The license files of all used programs can be found in the subdirectory "bin"
of LyX's installation folder.

View File

@ -3,7 +3,7 @@
!define PRODUCT_DIR "D:\LyXPackage1.5" !define PRODUCT_DIR "D:\LyXPackage1.5"
!define PRODUCT_NAME "LyX" !define PRODUCT_NAME "LyX"
!define PRODUCT_VERSION "1.5beta3-14-05-2007" !define PRODUCT_VERSION "1.5beta3-15-05-2007"
!define PRODUCT_VERSION_SHORT "150svn" !define PRODUCT_VERSION_SHORT "150svn"
!define PRODUCT_SUBFOLDER "lyx15" !define PRODUCT_SUBFOLDER "lyx15"
!define PRODUCT_LICENSE_FILE "${PRODUCT_DIR}\License.txt" !define PRODUCT_LICENSE_FILE "${PRODUCT_DIR}\License.txt"
@ -42,8 +42,8 @@ BrandingText "LyXWinInstaller v3.15 - ${INSTALLER_VERSION}"
!define PRODUCT_VERSION_OLD "LyX 1.5svn-02-05-2007" !define PRODUCT_VERSION_OLD "LyX 1.5svn-02-05-2007"
!define PRODUCT_UNINSTALL_EXE_OLD "$INSTDIR\LyXWinUninstall.exe" !define PRODUCT_UNINSTALL_EXE_OLD "$INSTDIR\LyXWinUninstall.exe"
!define PRODUCT_VERSION_SHORT_OLD "150svn" !define PRODUCT_VERSION_SHORT_OLD "150svn"
!define JabRefVersionOld "JabRef 2.2" !define JabRefVersion "2.2" # could be an older version
!define MiKTeXDeliveredVersionOld "MiKTeX 2.5" !define MiKTeXDeliveredVersion "2.5" # could be an older version
!endif !endif
# definitions for the Small installer # definitions for the Small installer
@ -56,14 +56,14 @@ BrandingText "LyXWinInstaller v3.15 - ${INSTALLER_VERSION}"
!if ${INSTALLER_VERSION} == "Complete" !if ${INSTALLER_VERSION} == "Complete"
!define GSviewInstall "external\gsv48w32.exe" !define GSviewInstall "external\gsv48w32.exe"
!define JabRefInstall "external\JabRef-2.2-Setup.exe" !define JabRefInstall "external\JabRef-2.2-Setup.exe"
!define MiKTeXInstall "$INSTDIR\external\basic-miktex-2.5.2580.exe" !define MiKTeXInstall "$INSTDIR\external\basic-miktex-2.6.2675.exe"
!define JabRefVersion "JabRef 2.2" !define JabRefVersion "2.2"
!define MiKTeXDeliveredVersion "MiKTeX 2.5" !define MiKTeXDeliveredVersion "2.6"
!endif !endif
!define ClassFileDir "${PRODUCT_SOURCEDIR}\Resources\tex" !define ClassFileDir "${PRODUCT_SOURCEDIR}\Resources\tex"
!define ImageMagickVersion "6.3.3" !define ImageMagickVersion "6.3.4"
# for some odd reason the ImageMagick folder may not be a subfolder of $INSTDIR\bin! # for some odd reason the ImageMagick folder may not be a subfolder of $INSTDIR\bin!
!define ImageMagickDir "$INSTDIR\etc\ImageMagick" !define ImageMagickDir "$INSTDIR\etc\ImageMagick"
!define GhostscriptDir "$INSTDIR\etc\Ghostscript" !define GhostscriptDir "$INSTDIR\etc\Ghostscript"
@ -82,7 +82,6 @@ BrandingText "LyXWinInstaller v3.15 - ${INSTALLER_VERSION}"
# the following variable is needed for a possible CD-version # the following variable is needed for a possible CD-version
#!define LaTeXPackagesDir "${PRODUCT_SOURCEDIR}\latex" #!define LaTeXPackagesDir "${PRODUCT_SOURCEDIR}\latex"
!define MiKTeXRepo "ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/" !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. # make some of the information above available to NSIS.

View File

@ -43,6 +43,7 @@ Function un.onInit
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}" ${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
SectionSetText 2 "Aspell" # names the corersponding uninstaller section (has the index "2" as it is the third section in Uninstall.nsh) SectionSetText 2 "Aspell" # names the corersponding uninstaller section (has the index "2" as it is the third section in Uninstall.nsh)
StrCpy $AspellInstallYes "Aspell" StrCpy $AspellInstallYes "Aspell"
DeleteRegValue SHCTX "Software\Aspell" "OnlyWithLyX" # special entry to test if it was installed with LyX
${else} ${else}
SectionSetText 2 "" # hides the corresponding uninstaller section SectionSetText 2 "" # hides the corresponding uninstaller section
${endif} ${endif}
@ -52,15 +53,17 @@ Function un.onInit
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}" ${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
SectionSetText 3 "MiKTeX" # names the corersponding uninstaller section SectionSetText 3 "MiKTeX" # names the corersponding uninstaller section
StrCpy $MiKTeXInstalled "MiKTeX" StrCpy $MiKTeXInstalled "MiKTeX"
DeleteRegValue HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
${else} ${else}
SectionSetText 3 "" # hides the corresponding uninstaller section SectionSetText 3 "" # hides the corresponding uninstaller section
${endif} ${endif}
# test if JabRef was installed together with LyX # test if JabRef was installed together with LyX
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\$JabRefVersionVar" "OnlyWithLyX" ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}" ${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
SectionSetText 4 "JabRef" # names the corersponding uninstaller section SectionSetText 4 "JabRef" # names the corersponding uninstaller section
StrCpy $JabRefInstalled "JabRef" StrCpy $JabRefInstalled "JabRef"
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
${else} ${else}
SectionSetText 4 "" # hides the corresponding uninstaller section SectionSetText 4 "" # hides the corresponding uninstaller section
${endif} ${endif}
@ -167,7 +170,7 @@ Section "un.LyX" un.SecUnProgramFiles
${endif} ${endif}
${endif} ${endif}
# MiKTeX specific LyX setting # MiKTeX specific LyX setting !Can be deleted after LyX 1.5.0beta3!
DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_AUTOINSTALL" DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_AUTOINSTALL"
DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_REPOSITORY" DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_REPOSITORY"
@ -201,8 +204,8 @@ SectionEnd
Section "un.MiKTeX" un.SecUnMiKTeX Section "un.MiKTeX" un.SecUnMiKTeX
${if} $MiKTeXInstalled == "MiKTeX" # only uninstall MiKTeX when it was installed together with LyX ${if} $MiKTeXInstalled == "MiKTeX" # only uninstall MiKTeX when it was installed together with LyX
ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\$MiKTeXVersionVar" "UninstallString" ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MiKTeX ${MiKTeXDeliveredVersion}" "UninstallString"
ExecWait "$1" # run MiKTeX's uninstaller ExecWait $1 # run MiKTeX's uninstaller
${endif} ${endif}
SectionEnd SectionEnd
@ -212,7 +215,7 @@ SectionEnd
Section "un.JabRef" un.SecUnJabRef Section "un.JabRef" un.SecUnJabRef
${if} $JabRefInstalled == "JabRef" # only uninstall JabRef when it was installed together with LyX ${if} $JabRefInstalled == "JabRef" # only uninstall JabRef when it was installed together with LyX
ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\$JabRefVersionVar" "UninstallString" ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
ExecWait "$1" # run JabRef's uninstaller ExecWait "$1" # run JabRef's uninstaller
${endif} ${endif}

View File

@ -34,7 +34,9 @@ Function UpdateModifiedFiles
SetOutPath "$INSTDIR\Resources\images" SetOutPath "$INSTDIR\Resources\images"
File /r "${PRODUCT_SOURCEDIR}\Resources\images\math" File /r "${PRODUCT_SOURCEDIR}\Resources\images\math"
SetOutPath "$INSTDIR\Resources\layouts" SetOutPath "$INSTDIR\Resources\layouts"
File "${PRODUCT_SOURCEDIR}\Resources\layouts\beamer.layout"
File "${PRODUCT_SOURCEDIR}\Resources\layouts\simplecv.layout" File "${PRODUCT_SOURCEDIR}\Resources\layouts\simplecv.layout"
File "${PRODUCT_SOURCEDIR}\Resources\layouts\stdcounters.inc"
SetOutPath "$INSTDIR\Resources\lyx2lyx" SetOutPath "$INSTDIR\Resources\lyx2lyx"
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\LyX.py" File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\LyX.py"
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\lyx_1_5.py" File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\lyx_1_5.py"