From e5fbe750aede67c9e6a1ad1f7e74ebe4d832942e Mon Sep 17 00:00:00 2001 From: Molunerfinn Date: Mon, 15 Apr 2019 14:10:01 +0800 Subject: [PATCH] :sparkles: Feature: add windows context menu for uploading pictures with picgo.exe --- build/installer.nsh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/build/installer.nsh b/build/installer.nsh index 0c93e80..1b86bf8 100644 --- a/build/installer.nsh +++ b/build/installer.nsh @@ -1,8 +1,13 @@ - !macro preInit - SetRegView 64 - WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\PicGo" - WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\PicGo" - SetRegView 32 - WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\PicGo" - WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\PicGo" - !macroend \ No newline at end of file +!macro customInstall + SetRegView 64 + WriteRegStr HKCR "*\shell\PicGo" "" "Upload pictures w&ith PicGo" + WriteRegStr HKCR "*\shell\PicGo" "Icon" "$INSTDIR\PicGo.exe" + WriteRegStr HKCR "*\shell\PicGo\command" "" '"$INSTDIR\PicGo.exe" "upload" "%1"' + SetRegView 32 + WriteRegStr HKCR "*\shell\PicGo" "" "Upload pictures w&ith PicGo" + WriteRegStr HKCR "*\shell\PicGo" "Icon" "$INSTDIR\PicGo.exe" + WriteRegStr HKCR "*\shell\PicGo\command" "" '"$INSTDIR\PicGo.exe" "upload" "%1"' +!macroend +!macro customUninstall + DeleteRegKey HKCR "*\shell\PicGo" +!macroend