From: Uwe Stöhr Date: Tue, 1 May 2007 14:21:21 +0000 (+0000) Subject: more installer infrastructure changes: X-Git-Tag: 1.6.10~9930 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=09cd4da93f35b1f3937d9c17947b722ab66d3011;p=features.git 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 --- 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 0000000000..54710e277c Binary files /dev/null and b/development/Win32/packaging/installer/LyXWinInstaller/specials/Console.dll differ