diff --git a/development/Win32/packaging/AltInstaller/Aspell.nsh b/development/Win32/packaging/AltInstaller/Aspell.nsh index 802cca1aec..4817a173ac 100644 --- a/development/Win32/packaging/AltInstaller/Aspell.nsh +++ b/development/Win32/packaging/AltInstaller/Aspell.nsh @@ -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" diff --git a/development/Win32/packaging/AltInstaller/ChangeLog.txt b/development/Win32/packaging/AltInstaller/ChangeLog.txt index 9c5fffa7db..5c0b15d4dc 100644 --- a/development/Win32/packaging/AltInstaller/ChangeLog.txt +++ b/development/Win32/packaging/AltInstaller/ChangeLog.txt @@ -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) diff --git a/development/Win32/packaging/AltInstaller/ConfigLyX.nsh b/development/Win32/packaging/AltInstaller/ConfigLyX.nsh index 70cc960971..d987bcd358 100644 --- a/development/Win32/packaging/AltInstaller/ConfigLyX.nsh +++ b/development/Win32/packaging/AltInstaller/ConfigLyX.nsh @@ -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\ diff --git a/development/Win32/packaging/AltInstaller/LyXInstaller-complete.nsi b/development/Win32/packaging/AltInstaller/LyXInstaller-complete.nsi index 0ae99f5fe3..8bbf226b34 100644 --- a/development/Win32/packaging/AltInstaller/LyXInstaller-complete.nsi +++ b/development/Win32/packaging/AltInstaller/LyXInstaller-complete.nsi @@ -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 diff --git a/development/Win32/packaging/AltInstaller/LyXInstaller-small.nsi b/development/Win32/packaging/AltInstaller/LyXInstaller-small.nsi index 812bb516d4..85d8ef895b 100644 --- a/development/Win32/packaging/AltInstaller/LyXInstaller-small.nsi +++ b/development/Win32/packaging/AltInstaller/LyXInstaller-small.nsi @@ -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 diff --git a/development/Win32/packaging/AltInstaller/LyXInstaller-update.nsi b/development/Win32/packaging/AltInstaller/LyXInstaller-update.nsi index 9bcb5a132a..16d6ff7ed6 100644 --- a/development/Win32/packaging/AltInstaller/LyXInstaller-update.nsi +++ b/development/Win32/packaging/AltInstaller/LyXInstaller-update.nsi @@ -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 diff --git a/development/Win32/packaging/AltInstaller/LyXUtils.nsh b/development/Win32/packaging/AltInstaller/LyXUtils.nsh index bf06616960..8de5de61dd 100644 --- a/development/Win32/packaging/AltInstaller/LyXUtils.nsh +++ b/development/Win32/packaging/AltInstaller/LyXUtils.nsh @@ -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 diff --git a/development/Win32/packaging/AltInstaller/Settings.nsh b/development/Win32/packaging/AltInstaller/Settings.nsh index 8c9412801e..5b22a59a34 100644 --- a/development/Win32/packaging/AltInstaller/Settings.nsh +++ b/development/Win32/packaging/AltInstaller/Settings.nsh @@ -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 diff --git a/development/Win32/packaging/AltInstaller/Uninstall.nsh b/development/Win32/packaging/AltInstaller/Uninstall.nsh index bd7ad6de8b..2de001efd9 100644 --- a/development/Win32/packaging/AltInstaller/Uninstall.nsh +++ b/development/Win32/packaging/AltInstaller/Uninstall.nsh @@ -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 diff --git a/development/Win32/packaging/AltInstaller/Variables.nsh b/development/Win32/packaging/AltInstaller/Variables.nsh new file mode 100644 index 0000000000..ffcc009561 --- /dev/null +++ b/development/Win32/packaging/AltInstaller/Variables.nsh @@ -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 diff --git a/development/Win32/packaging/AltInstaller/icons/lyx_logo_vert153.bmp b/development/Win32/packaging/AltInstaller/icons/lyx_logo_vert156.bmp similarity index 94% rename from development/Win32/packaging/AltInstaller/icons/lyx_logo_vert153.bmp rename to development/Win32/packaging/AltInstaller/icons/lyx_logo_vert156.bmp index beb62cf523..b1c61c7a5e 100644 Binary files a/development/Win32/packaging/AltInstaller/icons/lyx_logo_vert153.bmp and b/development/Win32/packaging/AltInstaller/icons/lyx_logo_vert156.bmp differ