Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2018-04-18 12:02:53 +0300
committerChristian Kamm <mail@ckamm.de>2018-04-18 12:02:53 +0300
commit9e8464e1149f79e77ba1807a03520ae9d90cc84a (patch)
treeb2afca52539b5aef9c50a181c47444531d8424fa /cmake
parent57044c1e02934e3aecf637371efe56dc00d0ecf6 (diff)
parenta9561f494b6b6259ed7fb5f0e05e23f6e423f21d (diff)
Merge branch 'placeholder-prototype'
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/NSIS.template.in10
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