From 09cd4da93f35b1f3937d9c17947b722ab66d3011 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Tue, 1 May 2007 14:21:21 +0000 Subject: [PATCH] more installer infrastructure changes: - hide LyX's console window - update source code Readmes - get rid of abi_util_fileassoc.nsh - small uninstaller cleanup - fix all known Update installer bugs git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18152 a592a061-630c-0410-9148-cb99ea01b6c8 --- .../installer/LyXWinInstaller/Changelog.txt | 5 +- .../installer/LyXWinInstaller/ConfigLyX.nsh | 37 +++--- .../LyXWinInstaller/InstallActions-update.nsh | 44 ++++++- .../installer/LyXWinInstaller/Launch.nsi | 45 ++++++++ .../LyXWinInstaller/LyXInstaller-complete.nsi | 5 - .../LyXWinInstaller/LyXInstaller-small.nsi | 5 - .../LyXWinInstaller/LyXInstaller-update.nsi | 6 +- .../LyXWinInstaller/ReadmePackage1.5.txt | 12 +- .../LyXWinInstaller/ReadmeScripts1.5.txt | 10 ++ .../installer/LyXWinInstaller/Settings.nsh | 6 + .../installer/LyXWinInstaller/Uninstall.nsh | 11 +- .../installer/LyXWinInstaller/Updated.nsh | 4 +- .../LyXWinInstaller/abi_util_fileassoc.nsh | 109 ------------------ .../LyXWinInstaller/specials/Console.dll | Bin 0 -> 6144 bytes 14 files changed, 149 insertions(+), 150 deletions(-) create mode 100644 development/Win32/packaging/installer/LyXWinInstaller/Launch.nsi delete mode 100644 development/Win32/packaging/installer/LyXWinInstaller/abi_util_fileassoc.nsh create mode 100644 development/Win32/packaging/installer/LyXWinInstaller/specials/Console.dll diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Changelog.txt b/development/Win32/packaging/installer/LyXWinInstaller/Changelog.txt index b19b6d04b4..ecaa72ab3f 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/Changelog.txt +++ b/development/Win32/packaging/installer/LyXWinInstaller/Changelog.txt @@ -1,11 +1,14 @@ Version LyX 1.5svn-02-05-2007 - LyX 1.5svn from 02-05-2007 +- LyX's console window is now hidden -> updated source code Readmes - fix bug that file associations were set also when the user has chosen to leave them untouched - Update installer: new option to choose wheter the file associations should be updated or not - Update installer: fix uninstalling +- Update installer: fix that a subfolder of the old install folder + remained after the new install folder has been set Version LyX 1.5beta2-21-04-2007 @@ -50,7 +53,7 @@ Version LyX 1.5svn-09-04-2007 - new layout and template files for the g-brief2 letter class and the moderncv and europecv curriculum vitae classes - reworked BibTeX file parser - - reworked graphics, nomenclature, and math delimiter dialog + - reworked graphics, glossary, and math delimiter dialog - new Spanish translation of the Extended manual - many other bugfixes diff --git a/development/Win32/packaging/installer/LyXWinInstaller/ConfigLyX.nsh b/development/Win32/packaging/installer/LyXWinInstaller/ConfigLyX.nsh index cfb2dc6563..3355ff3f3e 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/ConfigLyX.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/ConfigLyX.nsh @@ -43,7 +43,7 @@ Function ConfigureLyX FileWrite $R1 '@echo off$\r$\n\ SET LANG=$LangCode$\r$\n\ SET AIK_DATA_DIR=${AiksaurusDir}$\r$\n\ - start "LyX" "lyx.exe" %*$\r$\n' + start "${PRODUCT_NAME}" "${LAUNCHER_NAME}" %*$\r$\n' FileClose $R1 IfErrors 0 +2 MessageBox MB_OK|MB_ICONEXCLAMATION "$(CreateCmdFilesFailed)" @@ -73,18 +73,18 @@ Function ConfigureLyX ${if} $CreateFileAssociations == "true" WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "${PRODUCT_EXE}" ${endif} - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "RootKey" "$ProductRootKey" - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "${PRODUCT_NAME} ${PRODUCT_VERSION}" - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "${PRODUCT_UNINSTALL_EXE}" - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "${PRODUCT_EXE}" - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "StartMenu" "$SMPROGRAMS\$StartmenuFolder" - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_INFO_URL}" - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_ABOUT_URL}" - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "LyX Team" - WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "HelpLink" "${PRODUCT_HELP_LINK}" - WriteRegDWORD ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "NoModify" 0x00000001 - WriteRegDWORD ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "NoRepair" 0x00000001 + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "RootKey" "$ProductRootKey" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayName" "${PRODUCT_NAME} ${PRODUCT_VERSION}" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" "${PRODUCT_UNINSTALL_EXE}" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayIcon" "${PRODUCT_EXE}" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "StartMenu" "$SMPROGRAMS\$StartmenuFolder" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_INFO_URL}" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_ABOUT_URL}" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "Publisher" "LyX Team" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "HelpLink" "${PRODUCT_HELP_LINK}" + WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoModify" 0x00000001 + WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoRepair" 0x00000001 ; create start menu entry SetOutPath "$INSTDIR\bin" @@ -101,8 +101,15 @@ Function ConfigureLyX ; register the extension .lyx ${if} $CreateFileAssociations == "true" - ${CreateApplicationAssociation} "${PRODUCT_NAME}" "${PRODUCT_NAME}" "$(FileTypeTitle)" "${PRODUCT_EXE}" "${PRODUCT_BAT}" - ${CreateFileAssociation} "${PRODUCT_EXT}" "${PRODUCT_NAME}" "${PRODUCT_MIME_TYPE}" + ; write informations about file type + WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}" "" "${PRODUCT_NAME} Document" + WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\DefaultIcon" "" "${PRODUCT_EXE}" + WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\Shell\open\command" "" '"${LAUNCHER_EXE}" "%1"' + ; write informations about file extensions + WriteRegStr SHCTX "Software\Classes\${PRODUCT_EXT}" "" "${PRODUCT_REGNAME}" + WriteRegStr SHCTX "Software\Classes\${PRODUCT_EXT}" "Content Type" "${PRODUCT_MIME_TYPE}" + ; refresh shell + System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)' ${endif} ; create the LyX Application Data folder for all users diff --git a/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-update.nsh b/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-update.nsh index 9d3865caf0..7336741b68 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-update.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-update.nsh @@ -10,6 +10,10 @@ Section "-Installation actions" SecInstallation StrCpy $LangName "" StrCpy $LangNameSys "" + ; init, this variable is later only set to a value in function InstDirChange + ; when the $INSTDIR is changed + StrCpy $INSTDIR_OLD "" + ; extract modified files Call UpdateModifiedFiles ; macro from Updated.nsh @@ -28,8 +32,12 @@ Section "-Installation actions" SecInstallation ; delete old registry entries ${if} $CreateFileAssociations == "true" DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}" - ; remove extension .lyx - ${RemoveFileAssociation} "${PRODUCT_EXT}" "${PRODUCT_NAME}" + ; 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}" + ${endif} ${endif} DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY_OLD}" DeleteRegKey HKCR "Applications\lyx.bat" @@ -43,6 +51,19 @@ Section "-Installation actions" SecInstallation ; Refresh registry setings for the uninstaller Call RefreshRegUninst + ; Create a batch file to start LyX with the environment variables set + ; !only needed in this version! remove it for the next release + ClearErrors + Delete "${PRODUCT_BAT}" + FileOpen $R1 "${PRODUCT_BAT}" w + FileWrite $R1 '@echo off$\r$\n\ + SET LANG=$LangCode$\r$\n\ + SET AIK_DATA_DIR=${AiksaurusDir}$\r$\n\ + start "${PRODUCT_NAME}" "${LAUNCHER_NAME}" %*$\r$\n' + FileClose $R1 + IfErrors 0 +2 + MessageBox MB_OK|MB_ICONEXCLAMATION "$(CreateCmdFilesFailed)" + ; register LyX ${if} $CreateFileAssociations == "true" WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "" "${PRODUCT_EXE}" @@ -75,8 +96,15 @@ Section "-Installation actions" SecInstallation ; register the extension .lyx ${if} $CreateFileAssociations == "true" - ${CreateApplicationAssociation} "${PRODUCT_NAME}" "${PRODUCT_NAME}" "$(FileTypeTitle)" "${PRODUCT_EXE}" "${PRODUCT_BAT}" - ${CreateFileAssociation} "${PRODUCT_EXT}" "${PRODUCT_NAME}" "${PRODUCT_MIME_TYPE}" + ; write informations about file type + WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}" "" "${PRODUCT_NAME} Document" + WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\DefaultIcon" "" "${PRODUCT_EXE}" + WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\Shell\open\command" "" '"${LAUNCHER_EXE}" "%1"' + ; write informations about file extensions + WriteRegStr SHCTX "Software\Classes\${PRODUCT_EXT}" "" "${PRODUCT_REGNAME}" + WriteRegStr SHCTX "Software\Classes\${PRODUCT_EXT}" "Content Type" "${PRODUCT_MIME_TYPE}" + ; refresh shell + System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)' ${endif} ; create Uninstaller @@ -108,6 +136,13 @@ Section "-Installation actions" SecInstallation MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)" ExecWait '"$INSTDIR\Resources\configLyX.bat"' Delete "$INSTDIR\Resources\configLyX.bat" + + ; for some unknown odd reason the folder $INSTDIR_OLD\Resources\ui + ; is not deleted in function InstDirChange, so the deletion has to be called + ; again to make it work + ${if} $INSTDIR_OLD != "" + RMDir /r $INSTDIR_OLD + ${endif} SectionEnd @@ -132,6 +167,7 @@ Function InstDirChange CopyFiles "$INSTDIR\*.*" "$INSTDIR_NEW" ; delete the old folder RMDir /r $INSTDIR + StrCpy $INSTDIR_OLD $INSTDIR StrCpy $INSTDIR $INSTDIR_NEW ; set new PATH_PREFIX in the file lyxrc.dist diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Launch.nsi b/development/Win32/packaging/installer/LyXWinInstaller/Launch.nsi new file mode 100644 index 0000000000..857c812773 --- /dev/null +++ b/development/Win32/packaging/installer/LyXWinInstaller/Launch.nsi @@ -0,0 +1,45 @@ +# LyX for Windows Launcher +# Author: Joost Verburg and Uwe Stöhr +# +# This application will start LyX without the console. + +!include "FileFunc.nsh" +!insertmacro GetParameters + +Var Parameters + +OutFile LyXLauncher.exe + +Icon "icons\lyx_32x32.ico" +LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf" + +#-------------------------------- +#Version information + +VIProductVersion "1.0.0.0" +VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "LyXLauncher" +VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Launcher for LyX - The Document Processor" +VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "1.0" +VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "LyX is Copyright 1995-2007 by the LyX Team" + +#-------------------------------- +#Main application + +Section -Launch + + # hide the application window as only the window of the startet lyx.exe + # should be visible + HideWindow + + # get the parameters LyX is called with: LyX-document to be opened etc. + ${GetParameters} $Parameters # macro from FileFunc.nsh + + # start LyX and hide the command line window + Push '"$EXEDIR\lyx.exe" $Parameters' + CallInstDLL "$EXEDIR\Console.dll" ExecToLog + + # quit the application when LyX was closed by the user + Quit + +SectionEnd + diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi index 67e5ebeb57..c3651a2572 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi +++ b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi @@ -111,11 +111,6 @@ Var UserName ; 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" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi index a13d02a8be..3adaf1054b 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi +++ b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi @@ -112,11 +112,6 @@ Var UserName ; 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" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi index 2e5a06b90a..55263abaa2 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi +++ b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi @@ -35,6 +35,7 @@ SetCompressor lzma ; variables only used in this installer version Var INSTDIR_NEW +Var INSTDIR_OLD ; Variables used by all installer versions Var AspellInstallYes Var AspellBaseReg @@ -84,11 +85,6 @@ Var UserName ; 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" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/ReadmePackage1.5.txt b/development/Win32/packaging/installer/LyXWinInstaller/ReadmePackage1.5.txt index 74670923f8..dd9339dcb8 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/ReadmePackage1.5.txt +++ b/development/Win32/packaging/installer/LyXWinInstaller/ReadmePackage1.5.txt @@ -8,11 +8,21 @@ http://developer.berlios.de/projects/lyxwininstall/ --- General + To compile the installer scripts you need at least NSIS version 2.25. + The installer scripts needs the plugins "FindProc" and "InetLoad". -To use them copy the files "FindProcDLL.dll" and "InetLoad.dll" from the +To use them, copy the files "FindProcDLL.dll" and "InetLoad.dll" from the "LyXPackage" folder to NSIS'"Plugins" directory. +Only when you have built your own file tree: +- Copy the files "preferencesxxx", "Aspellxxx.txt", and "session" from the + specials folder to the \Resources folder +- Copy the files "Console.dll" and "LyXLauncher.exe" from the specials folder + to the \bin folder where also the "lyx.exe" is. +- Copy all "*.exe" files from the specials\PDFViewWin folder to the \bin + folder where also the "lyx.exe" is. + --- Internationalization diff --git a/development/Win32/packaging/installer/LyXWinInstaller/ReadmeScripts1.5.txt b/development/Win32/packaging/installer/LyXWinInstaller/ReadmeScripts1.5.txt index f722736839..068b985637 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/ReadmeScripts1.5.txt +++ b/development/Win32/packaging/installer/LyXWinInstaller/ReadmeScripts1.5.txt @@ -8,11 +8,21 @@ http://developer.berlios.de/projects/lyxwininstall/ --- General + To compile the installer scripts you need at least NSIS version 2.25. + The installer scripts needs the plugins "FindProc" and "InetLoad". To use them copy the files "FindProcDLL.dll" and "InetLoad.dll" from the "LyXPackage" folder to NSIS'"Plugins" directory. +Only when you have built your own file tree: +- Copy the files "preferencesxxx", "Aspellxxx.txt", and "session" from the + specials folder to the \Resources folder +- Copy the files "Console.dll" and "LyXLauncher.exe" from the specials folder + to the \bin folder where also the "lyx.exe" is. +- Copy all "*.exe" files from the specials\PDFViewWin folder to the \bin + folder where also the "lyx.exe" is. + --- Internationalization diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Settings.nsh b/development/Win32/packaging/installer/LyXWinInstaller/Settings.nsh index 8cbf4f3c58..2ae5f1aad0 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/Settings.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/Settings.nsh @@ -11,11 +11,14 @@ !define PRODUCT_EXE "$INSTDIR\bin\lyx.exe" !define PRODUCT_BAT "$INSTDIR\bin\lyx.bat" !define PRODUCT_EXT ".lyx" +!define PRODUCT_REGNAME "LyX.Document" !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/" +!define LAUNCHER_NAME "LyXLauncher.exe" +!define LAUNCHER_EXE "$INSTDIR\bin\LyXLauncher.exe" BrandingText "LyXWinInstaller v3.14 - ${INSTALLER_VERSION}" @@ -28,6 +31,9 @@ BrandingText "LyXWinInstaller v3.14 - ${INSTALLER_VERSION}" ; Replaced by HKLM or HKCU depending on SetShellVarContext. !define PRODUCT_ROOT_KEY "SHCTX" +; registry preparations +!define SHCNE_ASSOCCHANGED 0x08000000 +!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}" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Uninstall.nsh b/development/Win32/packaging/installer/LyXWinInstaller/Uninstall.nsh index 733ae8774d..a3423bb4a0 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/Uninstall.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/Uninstall.nsh @@ -132,6 +132,13 @@ Section "un.LyX" un.SecUnProgramFiles DeleteRegKey SHCTX "SOFTWARE\Aiksaurus" ${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}" + ${endif} + ; the following can only be done with admin permissions ${if} $Answer == "yes" ; if admin @@ -164,10 +171,6 @@ Section "un.LyX" un.SecUnProgramFiles DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_AUTOINSTALL" DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "MIKTEX_REPOSITORY" - ; remove extension .lyx - ${RemoveFileAssociation} "${PRODUCT_EXT}" "${PRODUCT_NAME}" - DeleteRegKey HKCR "${PRODUCT_NAME}" - ${endif} ; end if Answer (if admin) SetAutoClose true diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Updated.nsh b/development/Win32/packaging/installer/LyXWinInstaller/Updated.nsh index 010ddbee65..b3880c0e84 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/Updated.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/Updated.nsh @@ -2,7 +2,9 @@ Function UpdateModifiedFiles ; list with modified files for LyX 1.5svn 30-04-2007 SetOutPath "$INSTDIR\bin" + File "${PRODUCT_SOURCEDIR}\bin\Console.dll" File "${PRODUCT_SOURCEDIR}\bin\lyx.exe" ; always here + File "${PRODUCT_SOURCEDIR}\bin\LyXLauncher.exe" File "${PRODUCT_SOURCEDIR}\bin\tex2lyx.exe" ; always here SetOutPath "$INSTDIR\Resources" File "${PRODUCT_SOURCEDIR}\Resources\unicodesymbols" @@ -33,7 +35,7 @@ Function UpdateModifiedFiles File "${PRODUCT_SOURCEDIR}\Resources\examples\modernCV.lyx" File "${PRODUCT_SOURCEDIR}\Resources\examples\simplecv.lyx" SetOutPath "$INSTDIR\Resources\examples\de" - File "$INSTDIR\Resources\examples\de\Dezimal.lyx" + File "${PRODUCT_SOURCEDIR}\Resources\examples\de\Dezimal.lyx" SetOutPath "$INSTDIR\Resources\images" File "${PRODUCT_SOURCEDIR}\Resources\images\math-superscript.xpm" File "${PRODUCT_SOURCEDIR}\Resources\images\tabular-feature_set-rotate-cell.xpm" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/abi_util_fileassoc.nsh b/development/Win32/packaging/installer/LyXWinInstaller/abi_util_fileassoc.nsh deleted file mode 100644 index e63e1d5098..0000000000 --- a/development/Win32/packaging/installer/LyXWinInstaller/abi_util_fileassoc.nsh +++ /dev/null @@ -1,109 +0,0 @@ -;Title AbiWord for Windows, NSIS v2 series installer script -;FileDesc Utility functions to set and save/restore file extension to application associations - - -!ifndef _ABI_UTIL_FILEASSOC_NSH_ -!define _ABI_UTIL_FILEASSOC_NSH_ - - -!ifdef HAVE_SYSTEM_PLUGIN -;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; RefreshShellIcons based on -;; http://nsis.sourceforge.net/archive/nsisweb.php?page=236&instances=0 -;; by jerome tremblay - april 2003 - -!define SHCNE_ASSOCCHANGED 0x08000000 -!define SHCNF_IDLIST 0 - -Function RefreshShellIcons - System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v \ - (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)' -FunctionEnd - -!define RefreshShellIcons "call RefreshShellIcons" -!else -!define RefreshShellIcons -!endif ; HAVE_SYSTEM_PLUGIN - - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; parts from http://nsis.sourceforge.net/archive/viewpage.php?pageid=282 by Vytautas -;; Will add the registry entries to associate the given file extension with the -;; previously set (see CreateApplicationAssociation) appType. I.e. indicate to -;; open documents with this extension using the application specified by appType -;; registry entry. If the extension is currently associated with a different -;; appType, it will store the current association in the "prior_appType" key. - -!macro CreateFileAssociation extension appType contentType - !define skipBackupLbl "skipBackup_${__LINE__}" - push $0 - - ; back up old value of extension (.ext) if it exists - ReadRegStr $0 HKCR "${extension}" "" ; read current value - StrCmp $0 "" "${skipBackupLbl}" ; nothing, then skip storing old value - StrCmp $0 "${appType}" "${skipBackupLbl}" ; only store if old is different than current - WriteRegStr HKCR "${extension}" "prior_value" "$0" ; actually store the old association - - "${skipBackupLbl}:" - ; Write File Associations - WriteRegStr HKCR "${extension}" "" "${appType}" - WriteRegStr HKCR "${extension}" "Content Type" "${contentType}" - ; Force shell refresh (so icons updated as needed) - ${RefreshShellIcons} - - pop $0 - !undef skipBackupLbl -!macroend -!define CreateFileAssociation "!insertmacro CreateFileAssociation" - - -!macro CreateApplicationAssociation appType appName appDesc defIcon exeCmd - WriteRegStr HKCR "${appType}" "" "${appDesc}" - WriteRegStr HKCR "${appType}\shell" "" "open" - WriteRegStr HKCR "${appType}\DefaultIcon" "" "${defIcon}" - - ; Basic command to open the file (pass filename as argv[1] to program executable) - WriteRegStr HKCR "${appType}\shell\open\command" "" '"${exeCmd}" "%1"' - - ; To open file via DDE (OLE, ie via already active instance) instead of in a new process - ; Here for those who want to locally enable, not normally used as having each document - ; open in a new process while more resource intensive means a crash with one document - ; won't cause loss of work with other open documents. -; WriteRegStr HKCR "${appType}\shell\open\command" "" "${exeCmd}" -; WriteRegStr HKCR "${appType}\shell\open\ddeexec" "" '[Open("%1")]' -; WriteRegStr HKCR "${appType}\shell\open\ddeexec\application" "" "${appName}" -; WriteRegStr HKCR "${appType}\shell\open\ddeexec\topic" "" "System" - - ; If editing file is a different action than simply opening file -; WriteRegStr HKCR "${appType}\shell\edit" "" "Edit Options File" -; WriteRegStr HKCR "${appType}\shell\edit\command" "" '"${exeCmd}" "%1"' - -!macroend -!define CreateApplicationAssociation "!insertmacro CreateApplicationAssociation" - - -; check if a file extension is associated with us and if so delete it -!macro RemoveFileAssociation extension appType - push $0 - push $1 - - ReadRegStr $0 HKCR "${extension}" "" - StrCmp "$0" "${appType}" 0 Skip_Del_File_Assoc.${extension} - ReadRegStr $0 HKCR "${extension}" "prior_value" - StrCmp "$0" "" "DeleteFA.${extension}" 0 ; if "prior_value" is not empty - ReadRegStr $1 HKCR "$0" "" ; restore previous association - StrCmp "$1" "" DeleteFA.${extension} ; only if it is still valid (has something defined) - WriteRegStr HKCR "${extension}" "" $0 ; actually restore prior association - DeleteRegValue HKCR "${extension}" "prior_value" ; and remove stored value - Goto Skip_Del_File_Assoc.${extension} - DeleteFA.${extension}: ; else delete file association key - DeleteRegKey HKCR "${extension}" ; actually remove file assoications - - Skip_Del_File_Assoc.${extension}: - pop $1 - pop $0 -!macroend -!define RemoveFileAssociation "!insertmacro RemoveFileAssociation" - - -!endif ; _ABI_UTIL_FILEASSOC_NSH_ diff --git a/development/Win32/packaging/installer/LyXWinInstaller/specials/Console.dll b/development/Win32/packaging/installer/LyXWinInstaller/specials/Console.dll new file mode 100644 index 0000000000000000000000000000000000000000..54710e277cc6699a10431d0d5e0b9137f2ce121d GIT binary patch literal 6144 zcmeHL4QyLi6~2z0Hp$W^8}rDZYu(OlWgVFl+p(Rro1OTjDa7q-Uz(p$ck$wv+NuAr z-&@FO7k zAJTQdxV$G6PMH$P__kyqY8nc}VsXiIzi3LzF;h5Z@@^1J(Rfg7T(qdhTr&OD+aEjo ztIoF$m+^sh2M_;7qu)Gy75&xGeTQGx`iBpn)_PUzH-(2nY);ujo+G4NS4o!oHegh2 zXGq2J>vUCw)PQC{`*uAZ3?_h$*tnt?KVz^wXl)Qr5T37;#ZY9r?4k9=?g<1EW$fjI z@T_+e@?F-yyFqy6-MoK=HW700ALuno;!X+j*Q)Vgez7>O1%WY|iIBm@WH2BF2w7BF zWRL~u7X$N}8{Rh-)yNWN!!l1eZwS3yV=|Q-0#Az-43Nv2LW=R z>D@F>2}3s_?eFCLpZZT_Kv(!`mtQE^kKy^c0syT?KJRIGS^b$sEO1o3zS7np*O3e z#&IyLxq{xBb8mg#Kr(BXgh;lp8<<8WSH+LGsj(JX)XrGSd1gp6X!L@sEu~at7iTSO zK3jf&gN@mAKVM5WE9WxjRtkOAmq)6tIoB=qkPN8lSF--oZ%j%{pZ5Xbw4^*Sd_U`y{B$FtBPqj@QeU=d`iafan+8BQmEXB?eQmAV6QK_1zvlCUVKb2p{ps--{l1X0Z z));T9zWhejcVMF+2qQW{;00prEnbKVMHas}b{OA3FC;F;twaJ?fZ`QY!G{U+qSp|LGM< zS)>NoQ^yWzVcFT4q{iK_tBySb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