Add nsis script to add/remove context menu entry

This commit is contained in:
Labhansh Agrawal 2021-01-20 16:17:49 +05:30 committed by Benjamin Staneck
parent 8bc7d979ef
commit e6e39fbe98
2 changed files with 22 additions and 0 deletions

19
build/win/installer.nsh Normal file
View file

@ -0,0 +1,19 @@
!macro customInstall
WriteRegStr HKCU "Software\Classes\Directory\Background\shell\Hyper" "" "Open Hyper here"
WriteRegStr HKCU "Software\Classes\Directory\Background\shell\Hyper" "Icon" "$appExe"
WriteRegStr HKCU "Software\Classes\Directory\Background\shell\Hyper\command" "" `$appExe "%V"`
WriteRegStr HKCU "Software\Classes\Directory\shell\Hyper" "" "Open Hyper here"
WriteRegStr HKCU "Software\Classes\Directory\shell\Hyper" "Icon" "$appExe"
WriteRegStr HKCU "Software\Classes\Directory\shell\Hyper\command" "" `$appExe "%V"`
WriteRegStr HKCU "Software\Classes\Drive\shell\Hyper" "" "Open Hyper here"
WriteRegStr HKCU "Software\Classes\Drive\shell\Hyper" "Icon" "$appExe"
WriteRegStr HKCU "Software\Classes\Drive\shell\Hyper\command" "" `$appExe "%V"`
!macroend
!macro customUnInstall
DeleteRegKey HKCU "Software\Classes\Directory\Background\shell\Hyper"
DeleteRegKey HKCU "Software\Classes\Directory\shell\Hyper"
DeleteRegKey HKCU "Software\Classes\Drive\shell\Hyper"
!macroend

View file

@ -50,6 +50,9 @@
],
"rfc3161TimeStampServer": "http://timestamp.comodoca.com"
},
"nsis": {
"include": "build/win/installer.nsh"
},
"mac": {
"target": {
"target": "default",