]> git.lyx.org Git - features.git/commitdiff
installer: fix a bug with file associations
authorUwe Stöhr <uwestoehr@lyx.org>
Sun, 30 Mar 2014 03:33:55 +0000 (05:33 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Sun, 30 Mar 2014 03:33:55 +0000 (05:33 +0200)
- this fixes the bug I mentioned in my previous installer commit

development/Win32/packaging/installer/include/declarations.nsh
development/Win32/packaging/installer/setup/configure.nsh

index 797ac6eb24287f574357d0ea458d237a9d046c69..d7fa43263080354842a7c29c609bc71c16aa762a 100644 (file)
@@ -56,9 +56,10 @@ Configuration of LyX installer
 !define APP_WEBPAGE_INFO "${APP_NAME} Website"
 !define APP_WIKI "http://wiki.lyx.org"
 !define APP_WIKI_INFO "${APP_NAME} Wiki"
-!define APP_COPYRIGHT "LyX is Copyright © 1995 by Matthias Ettrich, 1995-2012 by the LyX Team"
+!define APP_COPYRIGHT "LyX is Copyright © 1995 by Matthias Ettrich, 1995-2014 by the LyX Team"
 
 !define APP_RUN "bin\lyx.exe"
+!define BIN_LYX "lyx.exe"
 
 !define APP_REGKEY "Software\${APP_NAME}${APP_SERIES_KEY}" # like "LyX200"
 !define APP_REGKEY_SETUP "${APP_REGKEY}\Setup"
@@ -95,7 +96,7 @@ Configuration of LyX installer
 !define SETUP_UNINSTALLER_KEY "${APP_NAME}${APP_SERIES_KEY}"
 
 #--------------------------------
-# Names of binaries to identify compontents
+# Names of binaries to identify components
 
 !define BIN_LATEX "latex.exe"
 !define BIN_BIBTEXEDITOR "JabRef.exe"
index 406aeb6bdf5ce7160e8256a9c4eca55d77dc4fb3..9e6d18be9552aade234beca8aa31e47c008c32f3 100644 (file)
@@ -83,6 +83,13 @@ Section -Configure
    WriteRegStr SHCTX "Software\Classes\${APP_REGNAME_DOC}" "" "${APP_NAME} Document"
    WriteRegStr SHCTX "Software\Classes\${APP_REGNAME_DOC}\DefaultIcon" "" "$INSTDIR\${APP_RUN},0"
    WriteRegStr SHCTX "Software\Classes\${APP_REGNAME_DOC}\Shell\open\command" "" '"$INSTDIR\${APP_RUN}" "%1"'
+   # we need to update also the automatically created entry about the lyx.exe
+   # otherwise .lyx-files will could be opened with an older LyX version
+   ReadRegStr $0 SHCTX "Software\Classes\Applications\${BIN_LYX}\shell\open\command" ""
+   ${if} $0 != "" # if something was found
+    WriteRegStr SHCTX "Software\Classes\Applications\${BIN_LYX}\shell\open\command" "" '"$INSTDIR\${APP_RUN}" "%1"'
+   ${endif}
+   # .lyx
    WriteRegStr SHCTX "Software\Classes\${APP_EXT}" "" "${APP_REGNAME_DOC}"
    WriteRegStr SHCTX "Software\Classes\${APP_EXT}" "Content Type" "${APP_MIME_TYPE}"
    # .lyx13