[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.3.1-137-g87b329c
by Andre Heinecke
cvs at cvs.gnupg.org
Wed Apr 13 17:31:16 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG for Windows".
The branch, master has been updated
via 87b329c66094908233bbf674dbdd26e2505210e7 (commit)
from f6da85f22f2534f4971d58846d62bffce97f668c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 87b329c66094908233bbf674dbdd26e2505210e7
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Wed Apr 13 16:46:07 2016 +0200
Register file extensions and AppIDs in Windows
* src/inst-gpa.nsi, src/inst-kleopatra.nsi: Set up AppIDs.
* src/installer-finish.nsi: Register mime types and extensions for
Kleopatra and or GPA.
* src/uninst-gpa.nsi, src/uninst-kleopatra.nsi: Clean up afterwards.
* src/file-ext.ico: New. Icon for file extensions.
--
This might take over .pgp, .sig, .asc, .gpg, .p7m, .p7s,
.arl, .crl by default.
For the certificate types .cer, crt, .der, .p10, .p12, .p7c .pfx
GPA and Kleopatra are only listed as supported applications
in the OpenWith menu.
diff --git a/src/file-ext.ico b/src/file-ext.ico
new file mode 100644
index 0000000..f65324e
Binary files /dev/null and b/src/file-ext.ico differ
diff --git a/src/inst-gpa.nsi b/src/inst-gpa.nsi
index 28a40cb..58a147c 100644
--- a/src/inst-gpa.nsi
+++ b/src/inst-gpa.nsi
@@ -72,6 +72,10 @@
no_config_gpa_files:
+ WriteRegStr HKLM "Software\Gpg4win\gpa\Capabilities" "ApplicationDescription" "$(DESC_SEC_gpa)"
+ WriteRegStr HKLM "Software\Gpg4win\gpa\Capabilities" "ApplicationIcon" "$INSTDIR\bin\gpa.exe,0"
+ WriteRegStr HKLM "Software\Gpg4win\gpa\Capabilities" "ApplicationName" "$(DESC_SEC_gpa)"
+
!endif
${MementoSectionEnd}
diff --git a/src/inst-kleopatra.nsi b/src/inst-kleopatra.nsi
index b84b029..8bc09a6 100644
--- a/src/inst-kleopatra.nsi
+++ b/src/inst-kleopatra.nsi
@@ -223,7 +223,9 @@ ${MementoSection} "Kleopatra" SEC_kleopatra
FileClose $1
pop $1
-
+ WriteRegStr HKLM "Software\Gpg4win\kleopatra\Capabilities" "ApplicationDescription" "$(DESC_SEC_kleopatra)"
+ WriteRegStr HKLM "Software\Gpg4win\kleopatra\Capabilities" "ApplicationIcon" "$INSTDIR\bin\kleopatra.exe,0"
+ WriteRegStr HKLM "Software\Gpg4win\kleopatra\Capabilities" "ApplicationName" "Kleopatra"
!endif
${MementoSectionEnd}
diff --git a/src/installer-finish.nsi b/src/installer-finish.nsi
index 60996e7..21cf941 100644
--- a/src/installer-finish.nsi
+++ b/src/installer-finish.nsi
@@ -19,6 +19,161 @@
Var MYTMP
+Function SetupExtRegKeys
+ Pop $0
+ # .gpg
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.GPG" "" "$(T_File_Type_gpg_Name)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.GPG" "FriendlyTypeName" "$(T_File_Type_gpg_Name)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.GPG" "PercievedType" "Document"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.GPG" "InfoTip" "$(T_File_Type_info_tip)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.GPG\CurVer" "" "${VERSION}"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.GPG\shell\open\command" "" "$\"$INSTDIR\bin\$0.exe$\" $\"%1$\""
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.GPG\DefaultIcon" "" "$INSTDIR\share\gpg4win\file-ext.ico"
+
+ WriteRegBin HKLM "Software\Classes\.gpg\OpenWithProgIDs" "gpg4win.AssocFile.$0.GPG" 0
+
+ # .asc
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.ASC" "" "$(T_File_Type_asc_Name)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.ASC" "FriendlyTypeName" "$(T_File_Type_asc_Name)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.ASC" "PercievedType" "Document"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.ASC" "InfoTip" "$(T_File_Type_info_tip)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.ASC\CurVer" "" "${VERSION}"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.ASC\shell\open\command" "" "$\"$INSTDIR\bin\$0.exe$\" $\"%1$\""
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.ASC\DefaultIcon" "" "$INSTDIR\share\gpg4win\file-ext.ico"
+ WriteRegBin HKLM "Software\Classes\.asc\OpenWithProgIDs" "gpg4win.AssocFile.$0.ASC" 0
+
+ # .pgp
+ WriteRegBin HKLM "Software\Classes\.pgp\OpenWithProgIDs" "gpg4win.AssocFile.$0.GPG" 0
+
+ # .sig
+ WriteRegExpandStr HKLM "Software\Classes\gpg4win.AssocFile.$0.PGPSIG\shell\open\command" "" "$\"$INSTDIR\bin\$0.exe$\" $\"%1$\""
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.PGPSIG" "FriendlyTypeName" "$(T_File_Type_sig_Name)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.PGPSIG" "PercievedType" "Document"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.PGPSIG" "InfoTip" "$(T_File_Type_sig_info_tip)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.PGPSIG\CurVer" "" "${VERSION}"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.PGPSIG\shell\open\command" "" "$\"$INSTDIR\bin\$0.exe$\" $\"%1$\""
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.PGPSIG\DefaultIcon" "" "$INSTDIR\share\gpg4win\file-ext.ico"
+
+ WriteRegBin HKLM "Software\Classes\.sig\OpenWithProgIDs" "gpg4win.AssocFile.$0.PGPSIG" 0
+
+ # CMS
+ WriteRegExpandStr HKLM "Software\Classes\gpg4win.AssocFile.$0.CMS\shell\open\command" "" "$\"$INSTDIR\bin\$0.exe$\" $\"%1$\""
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.CMS" "FriendlyTypeName" "$(T_File_Type_pem_Name)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.CMS" "PercievedType" "Document"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.CMS" "InfoTip" "$(T_File_Type_info_tip)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.CMS\CurVer" "" "${VERSION}"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.CMS\shell\open\command" "" "$\"$INSTDIR\bin\$0.exe$\" $\"%1$\""
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.CMS\DefaultIcon" "" "$INSTDIR\share\gpg4win\file-ext.ico"
+# WriteRegBin HKLM "Software\Classes\gpg4win.AssocFile.$0.CMS" "AllowSilentDefaultTakeOver" 0
+
+ WriteRegBin HKLM "Software\Classes\.p7s\OpenWithProgIDs" "gpg4win.AssocFile.$0.CMS" 0
+ WriteRegBin HKLM "Software\Classes\.p7m\OpenWithProgIDs" "gpg4win.AssocFile.$0.CMS" 0
+ WriteRegBin HKLM "Software\Classes\.crl\OpenWithProgIDs" "gpg4win.AssocFile.$0.CMS" 0
+ WriteRegBin HKLM "Software\Classes\.pem\OpenWithProgIDs" "gpg4win.AssocFile.$0.CMS" 0
+ WriteRegBin HKLM "Software\Classes\.arl\OpenWithProgIDs" "gpg4win.AssocFile.$0.CMS" 0
+
+ # X509 Certificates
+ WriteRegExpandStr HKLM "Software\Classes\gpg4win.AssocFile.$0.X509\shell\open\command" "" "$\"$INSTDIR\bin\$0.exe$\" $\"%1$\""
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.X509" "FriendlyTypeName" "$(T_File_Type_x509_Name)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.X509" "PercievedType" "Document"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.X509" "InfoTip" "$(T_File_Type_x509_info_tip)"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.X509\CurVer" "" "${VERSION}"
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.X509\shell\open\command" "" "$\"$INSTDIR\bin\$0.exe$\" $\"%1$\""
+ WriteRegStr HKLM "Software\Classes\gpg4win.AssocFile.$0.X509\DefaultIcon" "" "$INSTDIR\share\gpg4win\file-ext.ico"
+ WriteRegBin HKLM "Software\Classes\gpg4win.AssocFile.$0.X509" "AllowSilentDefaultTakeOver" 0
+
+ # Register capabilities
+ WriteRegStr HKLM "Software\RegisteredApplications" "Gpg4win.$0.${VERSION}" "SOFTWARE\Gpg4win\$0\Capabilities"
+
+ # File extensions
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".pgp" "gpg4win.AssocFile.$0.GPG"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".asc" "gpg4win.AssocFile.$0.ASC"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".gpg" "gpg4win.AssocFile.$0.GPG"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".cer" "gpg4win.AssocFile.$0.X509"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".p10" "gpg4win.AssocFile.$0.X509"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".p12" "gpg4win.AssocFile.$0.X509"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".p7c" "gpg4win.AssocFile.$0.X509"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".pfx" "gpg4win.AssocFile.$0.X509"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".crt" "gpg4win.AssocFile.$0.X509"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".der" "gpg4win.AssocFile.$0.X509"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".sig" "gpg4win.AssocFile.$0.PGPSIG"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".arl" "gpg4win.AssocFile.$0.CMS"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".crl" "gpg4win.AssocFile.$0.CMS"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".p7m" "gpg4win.AssocFile.$0.CMS"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".p7s" "gpg4win.AssocFile.$0.CMS"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\FileAssociations" ".pem" "gpg4win.AssocFile.$0.CMS"
+
+ WriteRegExpandStr HKLM "Software\Gpg4win\$0\Capabilities\shell\open\command" "" "$\"$INSTDIR\bin\$0.exe$\" $\"%1$\""
+
+ # Mime extensions For PGP this is probably pretty useless
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\MimeAssociations" "application/pgp" "gpg4win.AssocFile.$0.GPG"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\MimeAssociations" "application/pgp-encrypted" "gpg4win.AssocFile.$0.GPG"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\MimeAssociations" "application/pgp-signature" "gpg4win.AssocFile.$0.GPG"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\MimeAssociations" "application/pkcs7-mime" "gpg4win.AssocFile.$0.CMS"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\MimeAssociations" "application/pkix-cert" "gpg4win.AssocFile.$0.CMS"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\MimeAssociations" "application/x-x509-ca-cert" "gpg4win.AssocFile.$0.X509"
+ WriteRegStr HKLM "Software\Gpg4win\$0\Capabilities\MimeAssociations" "application/x-pkcs12" "gpg4win.AssocFile.$0.X509"
+
+FunctionEnd
+
+Function SetupExtensions
+ g4wihelp::config_fetch_bool "register_extensions"
+ StrCmp $R0 "1" reg_set reg_extensions_not_one
+reg_extensions_not_one:
+ StrCmp $R0 "0" leave 0
+
+reg_set:
+ SetOutPath "$INSTDIR\share\gpg4win"
+ File "file-ext.ico"
+ !insertmacro SectionFlagIsSet ${SEC_kleopatra} \
+ ${SF_SELECTED} have_kleo 0
+ !insertmacro SectionFlagIsSet ${SEC_gpa} \
+ ${SF_SELECTED} have_gpa 0
+ goto leave
+have_kleo:
+ DetailPrint "Registering file extensions"
+ # See:
+ # https://msdn.microsoft.com/en-us/library/windows/desktop/cc144104%28v=vs.85%29.aspx
+ # For documentation.
+
+ push kleopatra
+ call SetupExtRegKeys
+
+ !insertmacro SectionFlagIsSet ${SEC_gpa} \
+ ${SF_SELECTED} 0 leave2
+have_gpa:
+ push gpa
+ call SetupExtRegKeys
+
+leave2:
+System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)'
+leave:
+FunctionEnd
+
+LangString T_File_Type_gpg_Name ${LANG_ENGLISH} \
+ "OpenPGP Binary File"
+
+LangString T_File_Type_asc_Name ${LANG_ENGLISH} \
+ "OpenPGP Text File"
+
+LangString T_File_Type_sig_Name ${LANG_ENGLISH} \
+ "OpenPGP Signature"
+
+LangString T_File_Type_asc_Name ${LANG_ENGLISH} \
+ "CMS (S/MIME) File"
+
+LangString T_File_Type_x509_Name ${LANG_ENGLISH} \
+ "X509 Certificate File"
+
+LangString T_File_Type_x509_info_tip ${LANG_ENGLISH} \
+ "A certificate for CMS (S/MIME)."
+
+LangString T_File_Type_info_tip ${LANG_ENGLISH} \
+ "This can be encrypted data, a signature or a certificate."
+
+LangString T_File_Type_sig_info_tip ${LANG_ENGLISH} \
+ "A cryptographic signature to verify the authenticity of another file."
+
# Last section is a hidden one.
Section
WriteUninstaller "$INSTDIR\${PACKAGE}-uninstall.exe"
@@ -38,11 +193,12 @@ Section
WriteRegStr HKLM $MYTMP "URLInfoAbout" "http://www.gpg4win.org/"
WriteRegDWORD HKLM $MYTMP "NoModify" "1"
WriteRegDWORD HKLM $MYTMP "NoRepair" "1"
+
+ call SetupExtensions
SectionEnd
Section Uninstall
-
# Make sure that the context of the automatic variables has been set to
# the "all users" shell folder. This guarantees that the menu gets written
# for all users. We have already checked that we are running as Admin; or
@@ -64,6 +220,10 @@ Section Uninstall
!endif
Delete "$INSTDIR\${PACKAGE}-uninstall.exe"
+
+ Delete "$INSTDIR\share\gpg4win\file-ext.ico"
+ RMDir "$INSTDIR\share\gpg4win"
+ RMDir "$INSTDIR\share"
RMDir "$INSTDIR"
# If we installed in the default location, try to be really, really
diff --git a/src/uninst-gpa.nsi b/src/uninst-gpa.nsi
index 8b58177..95a35e0 100644
--- a/src/uninst-gpa.nsi
+++ b/src/uninst-gpa.nsi
@@ -44,5 +44,24 @@ Section "-un.gpa"
Delete "$INSTDIR\share\gpa\gpa.png"
RMDir "$INSTDIR\share\gpa"
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.gpa.GPG"
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.gpa.ASC"
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.gpa.CMS"
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.gpa.X509"
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.gpa.PGPSIG"
+ DeleteRegKey HKLM "Software\Gpg4win\gpa"
+ DeleteRegValue HKLM "Software\RegisteredApplications" "Gpg4win.gpa.${VERSION}"
+ DeleteRegValue HKLM "Software\Classes\.gpg" "gpg4win.AssocFile.gpa.GPG"
+ DeleteRegValue HKLM "Software\Classes\.asc" "gpg4win.AssocFile.gpa.ASC"
+ DeleteRegValue HKLM "Software\Classes\.pgp" "gpg4win.AssocFile.gpa.PGP"
+ DeleteRegValue HKLM "Software\Classes\.cer" "gpg4win.AssocFile.gpa.X509"
+ DeleteRegValue HKLM "Software\Classes\.pem" "gpg4win.AssocFile.gpa.CMS"
+
+ DeleteRegKey /ifempty HKLM "Software\Classes\.gpg"
+ DeleteRegKey /ifempty HKLM "Software\Classes\.asc"
+ DeleteRegKey /ifempty HKLM "Software\Classes\.pgp"
+ DeleteRegKey /ifempty HKLM "Software\Classes\.pem"
+ DeleteRegKey /ifempty HKLM "Software\Classes\.sig"
+
!endif
SectionEnd
diff --git a/src/uninst-kleopatra.nsi b/src/uninst-kleopatra.nsi
index 374c348..88e10ec 100644
--- a/src/uninst-kleopatra.nsi
+++ b/src/uninst-kleopatra.nsi
@@ -202,5 +202,25 @@ Section "-un.kleopatra"
RMDir "$INSTDIR\share"
RMDir "$INSTDIR"
+ DetailPrint "Unregistering file extensions"
+
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.kleopatra.GPG"
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.kleopatra.ASC"
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.kleopatra.CMS"
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.kleopatra.X509"
+ DeleteRegKey HKLM "Software\Classes\gpg4win.AssocFile.kleopatra.PGPSIG"
+ DeleteRegKey HKLM "Software\Gpg4win\kleopatra"
+ DeleteRegValue HKLM "Software\RegisteredApplications" "Gpg4win.kleopatra.${VERSION}"
+ DeleteRegValue HKLM "Software\Classes\.gpg" "gpg4win.AssocFile.kleopatra.GPG"
+ DeleteRegValue HKLM "Software\Classes\.asc" "gpg4win.AssocFile.kleopatra.ASC"
+ DeleteRegValue HKLM "Software\Classes\.pgp" "gpg4win.AssocFile.kleopatra.PGP"
+ DeleteRegValue HKLM "Software\Classes\.cer" "gpg4win.AssocFile.kleopatra.X509"
+ DeleteRegValue HKLM "Software\Classes\.pem" "gpg4win.AssocFile.kleopatra.CMS"
+
+ DeleteRegKey /ifempty HKLM "Software\Classes\.gpg"
+ DeleteRegKey /ifempty HKLM "Software\Classes\.asc"
+ DeleteRegKey /ifempty HKLM "Software\Classes\.pgp"
+ DeleteRegKey /ifempty HKLM "Software\Classes\.pem"
+ DeleteRegKey /ifempty HKLM "Software\Classes\.sig"
!endif
SectionEnd
-----------------------------------------------------------------------
Summary of changes:
src/file-ext.ico | Bin 0 -> 145242 bytes
src/inst-gpa.nsi | 4 ++
src/inst-kleopatra.nsi | 4 +-
src/installer-finish.nsi | 162 ++++++++++++++++++++++++++++++++++++++++++++++-
src/uninst-gpa.nsi | 19 ++++++
src/uninst-kleopatra.nsi | 20 ++++++
6 files changed, 207 insertions(+), 2 deletions(-)
create mode 100644 src/file-ext.ico
hooks/post-receive
--
GnuPG for Windows
http://git.gnupg.org
More information about the Gpg4win-commits
mailing list