installer: sync with new version from trunk and prepare for LyX 1.5.6

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@25127 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2008-06-04 23:51:06 +00:00
parent 9033b5a646
commit b1c5fd9177
11 changed files with 101 additions and 127 deletions

View File

@ -11,6 +11,11 @@ Function InstallAspell
File /r "${PRODUCT_SOURCEDIR}\${AspellInstall}"
# copy the files and register Aspell
CopyFiles "$INSTDIR\${AspellInstall}" "$APPDATA"
# finally copy the Aspell personal files to the Application folder of all users
# this assures that every user can have its own word list
StrCpy $AppSubfolder "Aspell"
StrCpy $AppFiles "$APPDATA\Aspell\Personal"
Call CreateAppPathSub # function from LyXUtils.nsh
WriteRegStr HKLM "SOFTWARE\Aspell" "Base Path" "${AspellDir}"
WriteRegStr HKLM "SOFTWARE\Aspell" "Dictionary Path" "${AspellDictPath}"
@ -245,7 +250,13 @@ Function InstallAspellDictionary
DownloadNow:
ExecShell "open" "${AspellLocationExact}"
DownloadLater:
# finally copy the Aspell dictionary files to the Application folder of all users
# this assures that every user can have its own word list
StrCpy $AppSubfolder "Aspell"
StrCpy $AppFiles "$APPDATA\Aspell\Dictionaries"
Call CreateAppPathSub # function from LyXUtils.nsh
FunctionEnd
!endif # endif ${INSTALLER_TYPE} == "NotUpdate"
@ -258,6 +269,9 @@ Function un.UninstAspell
ReadRegStr $1 SHCTX "Software\Aspell" "Base Path"
# delete Aspells' install folder
RMDir /r $1
# remove LyX's config files
StrCpy $AppSubfolder "Aspell"
Call un.DelAppPathSub # function from LyXUtils.nsh
# unregister Aspell and its dictionaries
DeleteRegKey SHCTX "Software\Aspell"
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell"

View File

@ -1,4 +1,15 @@
Version 3.24
Version 3.25
- LyX 1.5.6
- When Aspell is installed together with this installer (this will be the
case when Aspell is not already installed), now every user on the PC
gets his personal word list files.
- The .lyx file extension is no longer removed when it was not created by
the LyX version that is uninstalled. (necessary to be able to install new LyX
versions without touching existing LyX installations)
Version 3.24
- LyX 1.5.5
- updated to MiKTeX 2.7 (build 3053)

View File

@ -56,7 +56,7 @@ Function ConfigureLyX
${if} $Acrobat == "Yes" # used for Acrobat / Adobe Reader
# writes settings to the preferences file
${LineFind} "$INSTDIR\Resources\preferences" "$INSTDIR\Resources\preferences" "75" "AcroPref"
# ${LineFind} macro from TextFunc.nsh # calls Function AcroPref
# ${LineFind} is a macro from TextFunc.nsh # calls Function AcroPref
${endif}
# if a SVG to PDF converter ws found (e.g. Inkscape) define it in the preferences
@ -106,6 +106,7 @@ Function ConfigureLyX
# register the extension .lyx
${if} $CreateFileAssociations == "true"
WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to test if they were registered by this LyX version
# write informations about file type
WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}" "" "${PRODUCT_NAME} Document"
WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\DefaultIcon" "" "${PRODUCT_EXE}"
@ -120,7 +121,10 @@ Function ConfigureLyX
# create the LyX Application Data folder for all users
# this folder is automatically created by LyX when it is first started but we want to start LyX with a specific session file,
# so we create this folder before LyX starts and copy there the session file
StrCpy $AppSubfolder ${PRODUCT_SUBFOLDER}
StrCpy $AppFiles "$INSTDIR\Resources\session"
Call CreateAppPathSub # function from LyXUtils.nsh
Delete "$INSTDIR\Resources\session" # delete the session file in the INSTDIR because it is unneeded there
# delete unnecessary files
${if} $DelPythonFiles == "True"
@ -154,7 +158,7 @@ FunctionEnd
# --------------------------------
Function AcroPref
# writes PDF settings to the preferences file
# writes PDF settings to the preferences file
FileWrite $R4 '\format "pdf3" "pdf" "PDF (dvipdfm)" "m" "pdfview" "" "document,vector"$\r$\n\
\format "pdf2" "pdf" "PDF (pdflatex)" "F" "pdfview" "" "document,vector"$\r$\n\

View File

@ -56,37 +56,7 @@ Var InstallGSview
Var InstallJabRef
Var SVGPath
# Variables used by all installer versions
Var AspellInstallYes
Var AspellBaseReg
Var AspellMessage
Var ImageMagickPath
Var JabRefInstalled
Var LatexPath
Var MiKTeXInstalled
Var PythonPath
Var Answer
Var AppPre
Var AppSuff
Var AppPath
Var CreateDesktopIcon
Var CreateFileAssociations
Var DictCode
Var FileName
Var LangCode
Var LangCodeSys
Var LangName
Var LangNameSys
Var NewString
Var OldString
Var PathPrefix
Var Pointer
Var ProductRootKey
Var RunNumber
Var StartmenuFolder
Var String
Var Search
Var UserList
Var UserName
!include "Variables.nsh"
#--------------------------------
# load some NSIS libraries

View File

@ -54,37 +54,7 @@ Var MiKTeXUser
Var State
Var SVGPath
# Variables used by all installer versions
Var AspellInstallYes
Var AspellBaseReg
Var AspellMessage
Var ImageMagickPath
Var JabRefInstalled
Var LatexPath
Var MiKTeXInstalled
Var PythonPath
Var Answer
Var AppPre
Var AppSuff
Var AppPath
Var CreateDesktopIcon
Var CreateFileAssociations
Var DictCode
Var FileName
Var LangCode
Var LangCodeSys
Var LangName
Var LangNameSys
Var NewString
Var OldString
Var PathPrefix
Var Pointer
Var ProductRootKey
Var RunNumber
Var StartmenuFolder
Var String
Var Search
Var UserList
Var UserName
!include "Variables.nsh"
#--------------------------------
# load some NSIS libraries

View File

@ -38,37 +38,7 @@ SetCompressor lzma
Var INSTDIR_NEW
Var INSTDIR_OLD
# Variables used by all installer versions
Var AspellInstallYes
Var AspellBaseReg
Var AspellMessage
Var ImageMagickPath
Var JabRefInstalled
Var LatexPath
Var MiKTeXInstalled
Var PythonPath
Var Answer
Var AppPre
Var AppSuff
Var AppPath
Var CreateDesktopIcon
Var CreateFileAssociations
Var DictCode
Var FileName
Var LangCode
Var LangCodeSys
Var LangName
Var LangNameSys
Var NewString
Var OldString
Var PathPrefix
Var Pointer
Var ProductRootKey
Var RunNumber
Var StartmenuFolder
Var String
Var Search
Var UserList
Var UserName
!include "Variables.nsh"
#--------------------------------
# load some NSIS libraries

View File

@ -307,13 +307,11 @@ Function un.DelAppPathSub
StrCpy $UserList $UserList "" $Pointer # cut off the first username in the list
# generate the string for the current user
# AppPre and AppSuff are generated in the macro "AppPreSuff"
StrCpy $AppPath "$AppPre\$0\$AppSuff\${PRODUCT_SUBFOLDER}"
RMDir /r $AppPath # delete the folder
RMDir /r "$AppPre\$0\$AppSuff\$AppSubfolder" # delete the folder
Goto loop
ready:
StrCpy $0 $UserList
StrCpy $AppPath "$AppPre\$0\$AppSuff\${PRODUCT_SUBFOLDER}"
RMDir /r $AppPath # delete the folder
RMDir /r "$AppPre\$0\$AppSuff\$AppSubfolder" # delete the folder
FunctionEnd
@ -350,17 +348,14 @@ FunctionEnd
StrCpy $UserList $UserList "" $Pointer # cut off the first username in the list
# generate the string for the current user
# AppPre and AppSuff are generated in the macro "AppPreSuff"
StrCpy $AppPath "$AppPre\$0\$AppSuff\${PRODUCT_SUBFOLDER}"
CreateDirectory $AppPath # create the folder
CopyFiles "$INSTDIR\Resources\session" "$AppPath"
CreateDirectory "$AppPre\$0\$AppSuff\$AppSubfolder" # create the folder
CopyFiles "$AppFiles" "$AppPre\$0\$AppSuff\$AppSubfolder"
Goto loop
ready:
# now do the same for the last user name
StrCpy $0 $UserList
StrCpy $AppPath "$AppPre\$0\$AppSuff\${PRODUCT_SUBFOLDER}"
CreateDirectory $AppPath # create the folder
CopyFiles "$INSTDIR\Resources\session" "$AppPath"
Delete "$INSTDIR\Resources\session" # delete the session file in the INSTDIR because it is unneeded there
CreateDirectory "$AppPre\$0\$AppSuff\$AppSubfolder" # create the folder
CopyFiles "$AppFiles" "$AppPre\$0\$AppSuff\$AppSubfolder"
FunctionEnd

View File

@ -19,12 +19,12 @@
!define PRODUCT_INFO_URL "http://www.lyx.org/"
!define LAUNCHER_EXE "$INSTDIR\bin\LyXLauncher.exe"
BrandingText "LyXWinInstaller v3.24 - ${INSTALLER_VERSION}"
BrandingText "LyXWinInstaller v3.25 - ${INSTALLER_VERSION}"
# to check later if this installer version is running at the same time
!define INSTALLER_EXE "LyX-${PRODUCT_VERSION_SHORT}-3-24-AltInstaller-${INSTALLER_VERSION}.exe"
!define INSTALLER2_EXE "LyX-${PRODUCT_VERSION_SHORT}-3-24-AltInstaller-${INSTALLER2_VERSION}.exe"
!define INSTALLER3_EXE "LyX-${PRODUCT_VERSION_SHORT}-3-24-AltInstaller-${INSTALLER3_VERSION}.exe"
!define INSTALLER_EXE "LyX-${PRODUCT_VERSION_SHORT}-3-25-AltInstaller-${INSTALLER_VERSION}.exe"
!define INSTALLER2_EXE "LyX-${PRODUCT_VERSION_SHORT}-3-25-AltInstaller-${INSTALLER2_VERSION}.exe"
!define INSTALLER3_EXE "LyX-${PRODUCT_VERSION_SHORT}-3-25-AltInstaller-${INSTALLER3_VERSION}.exe"
!define VERSION_BITMAP "${PRODUCT_DIR}\icons\lyx_logo_vert${PRODUCT_VERSION_SHORT}.bmp"
# Replaced by HKLM or HKCU depending on SetShellVarContext.
@ -35,15 +35,16 @@ BrandingText "LyXWinInstaller v3.24 - ${INSTALLER_VERSION}"
!define SHCNF_IDLIST 0
!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_DIR_REGKEY_2 "Software\LyX\LyX-${PRODUCT_VERSION}"
# definitions for the Update installer
!if ${INSTALLER_VERSION} == "Update"
!define PRODUCT_UNINST_KEY_OLD "Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX154"
!define PRODUCT_VERSION_OLD "LyX 1.5.4"
!define PRODUCT_VERSION_SHORT_OLD "154"
!define PRODUCT_UNINST_KEY_OLD "Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX155"
!define PRODUCT_VERSION_OLD "LyX 1.5.5"
!define PRODUCT_VERSION_SHORT_OLD "155"
!define JabRefVersion "2.3.1" # could be an older version
!define ImageMagickVersion_Old "6.3.8" # could be an older version
!define GhostscriptVersion_Old "8.61" # could be an older version
!define GhostscriptVersion_Old "8.62" # could be an older version
!define MiKTeXDeliveredVersion "2.7" # could be an older version
!endif

View File

@ -115,13 +115,7 @@ Section "un.LyX" un.SecUnProgramFiles
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}"
DeleteRegKey HKCR "Applications\lyx.exe"
DeleteRegKey HKCR "Applications\lyx.bat"
# Aiksaurus
!insertmacro FileCheck $5 "meanings.dat" "${AiksaurusDir}" # macro from LyXUtils.nsh
${if} $5 == "True"
@ -136,11 +130,22 @@ Section "un.LyX" un.SecUnProgramFiles
${endif}
# remove file extension .lyx
ReadRegStr $R0 SHCTX "Software\Classes\${PRODUCT_EXT}" ""
${if} $R0 == "${PRODUCT_REGNAME}"
DeleteRegKey SHCTX "Software\Classes\${PRODUCT_EXT}"
DeleteRegKey SHCTX "Software\Classes\${PRODUCT_REGNAME}"
ReadRegStr $0 SHCTX "${PRODUCT_DIR_REGKEY}" "OnlyWithLyX" # special entry to test if they were registered by this LyX version
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
ReadRegStr $R0 SHCTX "Software\Classes\${PRODUCT_EXT}" ""
${if} $R0 == "${PRODUCT_REGNAME}"
DeleteRegKey SHCTX "Software\Classes\${PRODUCT_EXT}"
DeleteRegKey SHCTX "Software\Classes\${PRODUCT_REGNAME}"
${endif}
${endif}
# delete registry entries
DeleteRegKey HKCU "${PRODUCT_UNINST_KEY}"
DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY}"
DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
DeleteRegKey HKCU "${PRODUCT_DIR_REGKEY_2}"
DeleteRegKey HKCR "Applications\lyx.exe"
DeleteRegKey HKCR "Applications\lyx.bat"
# the following can only be done with admin permissions
${if} $Answer == "yes" # if admin
@ -185,6 +190,7 @@ SectionEnd
Section "un.$(UnLyXPreferencesTitle)" un.SecUnPreferences
# remove LyX's config files
StrCpy $AppSubfolder ${PRODUCT_SUBFOLDER}
Call un.DelAppPathSub # function from LyXUtils.nsh
SectionEnd

View File

@ -0,0 +1,33 @@
# Variables used by all installer versions
Var AspellInstallYes
Var AspellBaseReg
Var AspellMessage
Var ImageMagickPath
Var JabRefInstalled
Var LatexPath
Var MiKTeXInstalled
Var PythonPath
Var Answer
Var AppFiles
Var AppPre
Var AppSubfolder
Var AppSuff
Var CreateDesktopIcon
Var CreateFileAssociations
Var DictCode
Var FileName
Var LangCode
Var LangCodeSys
Var LangName
Var LangNameSys
Var NewString
Var OldString
Var PathPrefix
Var Pointer
Var ProductRootKey
Var RunNumber
Var StartmenuFolder
Var String
Var Search
Var UserList
Var UserName

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB