aboutsummaryrefslogtreecommitdiffstats
path: root/build/nsis.uninstall.nsh
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-11-09 05:55:39 +0800
committerFelix Lange <fjl@twurst.com>2016-11-09 05:55:39 +0800
commit9bc97a5785d3d350a084b46fc77a8439b8dc533b (patch)
tree1802db150e1fed6272e08dd17b85a8a188ee55c8 /build/nsis.uninstall.nsh
parent6707f70b4a947a06fdcf564619e6c8220a6654ad (diff)
downloadgo-tangerine-9bc97a5785d3d350a084b46fc77a8439b8dc533b.tar
go-tangerine-9bc97a5785d3d350a084b46fc77a8439b8dc533b.tar.gz
go-tangerine-9bc97a5785d3d350a084b46fc77a8439b8dc533b.tar.bz2
go-tangerine-9bc97a5785d3d350a084b46fc77a8439b8dc533b.tar.lz
go-tangerine-9bc97a5785d3d350a084b46fc77a8439b8dc533b.tar.xz
go-tangerine-9bc97a5785d3d350a084b46fc77a8439b8dc533b.tar.zst
go-tangerine-9bc97a5785d3d350a084b46fc77a8439b8dc533b.zip
build: NSIS based Windows installer (#3240)
This commit adds support for creating Windows installers to ci.go
Diffstat (limited to 'build/nsis.uninstall.nsh')
-rw-r--r--build/nsis.uninstall.nsh32
1 files changed, 32 insertions, 0 deletions
diff --git a/build/nsis.uninstall.nsh b/build/nsis.uninstall.nsh
new file mode 100644
index 000000000..ea7d5e298
--- /dev/null
+++ b/build/nsis.uninstall.nsh
@@ -0,0 +1,32 @@
+Section "Uninstall"
+ # uninstall for all users
+ setShellVarContext all
+
+ # Delete (optionally) installed files
+ {{range $}}Delete $INSTDIR\{{.}}
+ {{end}}
+ Delete $INSTDIR\uninstall.exe
+
+ # Delete install directory
+ rmDir $INSTDIR
+
+ # Delete start menu launcher
+ Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
+ Delete "$SMPROGRAMS\${APPNAME}\Attach.lnk"
+ Delete "$SMPROGRAMS\${APPNAME}\Uninstall.lnk"
+ rmDir "$SMPROGRAMS\${APPNAME}"
+
+ # Firewall - remove rules if exists
+ SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30303)"
+ SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30303)"
+ SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
+
+ # Remove IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
+ ${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
+
+ # Remove install directory from PATH
+ ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" $INSTDIR
+
+ # Cleanup registry (deletes all sub keys)
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}"
+SectionEnd