installer: sync with branch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31929 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2009-11-10 03:35:49 +00:00
parent bf8f302b64
commit 8f8faa574d
7 changed files with 74 additions and 60 deletions

View File

@ -30,8 +30,6 @@ Function ConfigureLyX
${if} $WMFPath != ""
StrCpy $PathPrefix "$PathPrefix;$WMFPath"
${endif}
# eLyXer is always available
StrCpy $PathPrefix "$PathPrefix;$INSTDIR\Resources\scripts"
# Create a batch file to start LyX with the environment variables set
ClearErrors
@ -70,6 +68,7 @@ Function ConfigureLyX
FileClose $R1
IfErrors 0 +2
MessageBox MB_OK|MB_ICONEXCLAMATION "$(ModifyingConfigureFailed)"
ClearErrors
# register LyX
${if} $CreateFileAssociations == "true"

View File

@ -31,6 +31,9 @@
# install Aspell if not already installed
Call InstallAspell # function from Aspell.nsh
# install eLyXer as Python module
Call eLyXer # function from InstallThirdPartyProgs.nsh
# install Aiksaurus if not already installed
Call Aiksaurus # function from InstallThirdPartyProgs.nsh

View File

@ -214,6 +214,9 @@ Function RefreshRegUninst
WriteRegStr HKLM "SOFTWARE\Aspell" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}"
${endif}
# install eLyXer as Python module
Call eLyXer # function from InstallThirdPartyProgs.nsh
# Metafile2eps
Var /GLOBAL RegLocation
StrCpy $RegLocation "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Metafile to EPS Converter"

View File

@ -56,6 +56,29 @@ FunctionEnd
# -------------------------------------------
Function eLyXer
# install eLyXer as Python module
${if} $PythonPath != ""
# a Python module cannot simply started with
# ExecWait '$PythonPath\python.exe "$INSTDIR\bin\setup.py" install'
# therefore run a script
StrCpy $1 $INSTDIR 2 # get drive letter
FileOpen $R1 "$INSTDIR\bin\eLyXer.bat" w
FileWrite $R1 '$1$\r$\n\
cd "$INSTDIR\bin"$\r$\n\
"$PythonPath\python.exe" setup.py install'
FileClose $R1
ExecWait '"$INSTDIR\bin\eLyXer.bat"'
Delete "$INSTDIR\bin\eLyXer.bat"
${else}
ExecWait '"$INSTDIR\bin\python.exe" "$INSTDIR\bin\setup.py" install'
${endif}
FunctionEnd
# -------------------------------------------
Function Aiksaurus
# if Aiksaurus is not installed

View File

@ -8,7 +8,7 @@ Function LaTeXActions
Call LaTeXCheck # sets the path to the latex.exe to $LatexPath # Function from LyXUtils.nsh
${if} $LatexPath != ""
# check if MiKTeX 2.5 or 2.6 and newer is installed
# check if MiKTeX 2.6 or newer is installed
StrCpy $0 0
loopA:
EnumRegKey $1 HKLM "SOFTWARE\MiKTeX.org\MiKTeX" $0 # check the last subkey
@ -17,10 +17,6 @@ Function LaTeXActions
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"
@ -29,6 +25,10 @@ Function LaTeXActions
StrCpy $MiKTeXVersion "2.7"
StrCpy $LaTeXName "MiKTeX 2.7"
${endif}
${if} $String == "2.8"
StrCpy $MiKTeXVersion "2.8"
StrCpy $LaTeXName "MiKTeX 2.8"
${endif}
${endif}
${if} $LatexPath == "" # check if MiKTeX is installed only for the current user
@ -48,10 +48,6 @@ Function LaTeXActions
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"
@ -60,6 +56,10 @@ Function LaTeXActions
StrCpy $MiKTeXVersion "2.7"
StrCpy $LaTeXName "MiKTeX 2.7"
${endif}
${if} $String == "2.8"
StrCpy $MiKTeXVersion "2.8"
StrCpy $LaTeXName "MiKTeX 2.8"
${endif}
${endif}
${if} $LatexPath != ""
@ -94,9 +94,9 @@ Function LaTeXActions
${endif}
${endif}
${if} $LatexPath != ""
${andif} $LaTeXName != "MiKTeX 2.5"
${andif} $LaTeXName != "MiKTeX 2.6"
${andif} $LaTeXName != "MiKTeX 2.7"
${andif} $LaTeXName != "MiKTeX 2.8"
StrCpy $LaTeXName "TeXLive"
${endif}
@ -182,20 +182,6 @@ Function ConfigureMiKTeX
# refresh MiKTeX's file name database
ExecWait "$LaTeXPath\initexmf --update-fndb"
${if} $MiKTeXVersion == "2.5"
# enable package installation without asking (t = Yes, f = No)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" # if only for current user
${if} $MiKTeXUser != "HKCU"
WriteRegStr SHCTX "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_AUTOINSTALL" "t"
${endif}
# set package repository (MiKTeX's primary package repository)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RemoteRepository" "${MiKTeXRepo}" # if only for current user
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote" # if only for current user
${if} $MiKTeXUser != "HKCU"
WriteRegStr SHCTX "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_REPOSITORY" "${MiKTeXRepo}"
${endif}
${else} # if MiKTeX 2.6 or above
# enable package installation without asking (1 = Yes, 0 = No, 2 = Ask me first)
WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1" # if only for current user
${if} $MiKTeXUser != "HKCU"
@ -209,14 +195,8 @@ Function ConfigureMiKTeX
WriteRegStr SHCTX "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RepositoryType" "remote"
${endif}
${endif} # end if $MiKTeXVersion == "2.5"
# enable MiKTeX's automatic package installation
${if} $MiKTeXVersion == "2.5"
ExecWait '$LaTeXPath\mpm.com --update-fndb'
${else} # MiKTeX 2.6 or newer
ExecWait '$LaTeXPath\mpm.exe --update-fndb'
${endif}
# the following feature is planned to be used for a possible CD-version
# copy LaTeX-packages needed by LyX
# SetOutPath "$INSTDIR"

View File

@ -91,6 +91,12 @@ Function MissingPrograms
${if} $PythonPath == ""
ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\2.6\InstallPath" ""
${endif}
${if} $PythonPath == ""
ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\3.0\InstallPath" ""
${endif}
${if} $PythonPath == ""
ReadRegStr $PythonPath HKLM "Software\Python\PythonCore\3.1\InstallPath" ""
${endif}
${if} $PythonPath != ""
StrCpy $PythonPath $PythonPath -1 # remove the "\" at the end
StrCpy $DelPythonFiles "True"

View File

@ -1,11 +1,11 @@
# installer settings
# You should need to change only these macros for new releases.
!define INSTALLER_SUBVERSION "16"
!define INSTALLER_SUBVERSION "21"
!define PRODUCT_DIR "D:\LyXPackage1.6"
!define PRODUCT_NAME "LyX"
!define PRODUCT_VERSION "1.6.1"
!define PRODUCT_VERSION_SHORT "161"
!define PRODUCT_VERSION "1.6.4"
!define PRODUCT_VERSION_SHORT "164"
!define PRODUCT_SUBFOLDER "lyx16"
!define PRODUCT_LICENSE_FILE "${PRODUCT_DIR}\License.txt"
!define PRODUCT_SOURCEDIR "${PRODUCT_DIR}\LyX"
@ -40,12 +40,12 @@ BrandingText "LyXWinInstaller v4.${INSTALLER_SUBVERSION} - ${INSTALLER_VERSION}"
# definitions for the Update installer
!if ${INSTALLER_VERSION} == "Update"
!define PRODUCT_VERSION_SHORT_OLD "160"
!define PRODUCT_VERSION_SHORT_OLD "163"
!define PRODUCT_UNINST_KEY_OLD "Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX${PRODUCT_VERSION_SHORT_OLD}"
!define PRODUCT_VERSION_OLD "LyX 1.6.0"
!define PRODUCT_VERSION_OLD "LyX 1.6.3"
!define JabRefVersion "2.4.2" # could be an older version
!define ImageMagickVersion_Old "6.4.5" # could be an older version
!define GhostscriptVersion_Old "8.63" # could be an older version
!define ImageMagickVersion_Old "6.5.3" # could be an older version
!define GhostscriptVersion_Old "8.64" # could be an older version
!define MiKTeXDeliveredVersion "2.7" # could be an older version
!endif
@ -58,19 +58,19 @@ BrandingText "LyXWinInstaller v4.${INSTALLER_SUBVERSION} - ${INSTALLER_VERSION}"
# definitions for the Complete installer
!if ${INSTALLER_VERSION} == "Complete"
!define GSviewInstall "external\gsv49w32.exe"
!define JabRefInstall "external\JabRef-2.4.2-Setup.exe"
!define MiKTeXInstall "$INSTDIR\external\basic-miktex-2.7.3248.exe"
!define JabRefVersion "2.4.2"
!define MiKTeXDeliveredVersion "2.7"
!define JabRefInstall "external\JabRef-2.5-setup.exe"
!define MiKTeXInstall "$INSTDIR\external\basic-miktex-2.8.3582.exe"
!define JabRefVersion "2.5"
!define MiKTeXDeliveredVersion "2.8"
!endif
!define ClassFileDir "${PRODUCT_SOURCEDIR}\Resources\tex"
!define ImageMagickVersion "6.4.7"
!define ImageMagickVersion "6.5.7"
# for some odd reason the ImageMagick folder may not be a subfolder of $INSTDIR\bin!
!define ImageMagickDir "$INSTDIR\etc\ImageMagick"
!define GhostscriptDir "$INSTDIR\etc\Ghostscript"
!define GhostscriptVersion "8.63"
!define GhostscriptVersion "8.64"
!define Metafile2epsDir "$INSTDIR\etc\Metafile2eps"
!define AiksaurusDir "$APPDATA\Aiksaurus"
!define AiksaurusInstall "external\Aiksaurus"