!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"
!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"
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