diff options
author | Christian Kamm <mail@ckamm.de> | 2018-03-21 14:23:31 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2018-04-18 11:27:51 +0300 |
commit | 70b4dc99dc735511c2402ae066f3c7da7af06408 (patch) | |
tree | 2e7d0009324f4fa32105ec38aeb9ba7bbeb35f0d /cmake | |
parent | 65a2b1aa8a5b43ae8c867c0c9afd24e17f577c8e (diff) |
NSIS: Register placeholder extension
Also change the placeholder suffix config option to not include the dot,
the dotless form is needed in the nsis script.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/NSIS.template.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/modules/NSIS.template.in b/cmake/modules/NSIS.template.in index 967eebdf5..8a2edf965 100644 --- a/cmake/modules/NSIS.template.in +++ b/cmake/modules/NSIS.template.in @@ -7,6 +7,8 @@ !define APPLICATION_CMD_EXECUTABLE "@APPLICATION_EXECUTABLE@cmd.exe" !define APPLICATION_DOMAIN "@APPLICATION_DOMAIN@" !define APPLICATION_LICENSE "@APPLICATION_LICENSE@" +!define APPLICATION_PLACEHOLDER_SUFFIX "@APPLICATION_PLACEHOLDER_SUFFIX@" +!define APPLICATION_PLACEHOLDER_FILECLASS "@APPLICATION_EXECUTABLE@.@APPLICATION_PLACEHOLDER_SUFFIX@" !define WIN_SETUP_BITMAP_PATH "@WIN_SETUP_BITMAP_PATH@" !define CRASHREPORTER_EXECUTABLE "@CRASHREPORTER_EXECUTABLE@" @@ -100,6 +102,8 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll" !include Library.nsh ;Used by the COM registration for shell extensions !include x64.nsh ;Used to determine the right arch for the shell extensions +!include ${source_path}/admin/win/nsi/lib/fileassoc.nsh + ;----------------------------------------------------------------------------- ; Memento selections stored in registry. ;----------------------------------------------------------------------------- @@ -466,6 +470,9 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION ;CSync configs File "${SOURCE_PATH}/sync-exclude.lst" + ;Add file association + !insertmacro APP_ASSOCIATE "${APPLICATION_PLACEHOLDER_SUFFIX}" "${APPLICATION_PLACEHOLDER_FILECLASS}" "Placeholder for Remote File" "$INSTDIR\${APPLICATION_EXECUTABLE},0" "Download" "$INSTDIR\${APPLICATION_EXECUTABLE} $\"%1$\"" + SectionEnd !ifdef OPTION_SECTION_SC_SHELL_EXT @@ -643,6 +650,9 @@ Section Uninstall DeleteRegKey HKCR "${APPLICATION_NAME}" + ;Remove file association + !insertmacro APP_UNASSOCIATE "${APPLICATION_PLACEHOLDER_SUFFIX}" "${APPLICATION_PLACEHOLDER_FILECLASS}" + ;Shell extension !ifdef OPTION_SECTION_SC_SHELL_EXT !define LIBRARY_COM |