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
- 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
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)"
${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"
; 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
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
; 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"
; 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}"
; 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
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
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
--- /dev/null
+# 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
+
; 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"
; 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"
; variables only used in this installer version
Var INSTDIR_NEW
+Var INSTDIR_OLD
; Variables used by all installer versions
Var AspellInstallYes
Var AspellBaseReg
; 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"
---
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
---
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
!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}"
; 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}"
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
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
; 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"
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"
+++ /dev/null
-;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_