diff options
| author | Anton <anton@picapica> | 2019-03-15 22:02:40 +0400 |
|---|---|---|
| committer | Anton <anton@picapica> | 2019-03-15 22:02:40 +0400 |
| commit | efff1cb683cbf0d5cc2fb51196d257c1a65f468c (patch) | |
| tree | 792203860fdd84d96f5579fa5e8285d3a0787d84 | |
| parent | 3e980a0f6bc1ad8ac7240f2c38a6217b183941c3 (diff) | |
| download | pica-pica-efff1cb683cbf0d5cc2fb51196d257c1a65f468c.tar.gz pica-pica-efff1cb683cbf0d5cc2fb51196d257c1a65f468c.zip | |
NSIS script of windows installer for pica-node
| -rw-r--r-- | windows/pica-node.nsi | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/windows/pica-node.nsi b/windows/pica-node.nsi new file mode 100644 index 0000000..1466af7 --- /dev/null +++ b/windows/pica-node.nsi @@ -0,0 +1,76 @@ +
+Name "Pica Pica Node"
+OutFile "pica-node_setup.exe"
+
+Page license
+Page directory
+Page instfiles
+
+LicenseData "COPYING"
+
+InstallDir "$PROGRAMFILES\Pica Pica Node"
+
+Icon "picapica-icon-sit.ico"
+
+RequestExecutionLevel admin
+
+; The stuff to install
+Section "" ;No components page, name is not important
+
+ ; Set output path to the installation directory.
+ SetOutPath $INSTDIR
+
+ ; Put file there
+ File "pica-node.exe"
+ File "libeay32.dll"
+ File "libevent-2-1-6.dll"
+ File "libgcc_s_sjlj-1.dll"
+ File "libsqlite3-0.dll"
+ File "miniupnpc.dll"
+ File "ssleay32.dll"
+ File "pica-node.conf"
+ File "nodelist.db"
+ File "COPYING"
+ File "README"
+ File "OPENSSL.LICENSE.txt"
+ File "libevent.LICENSE.txt"
+ File "openssl.cnf"
+ SetOutPath "$INSTDIR\share"
+ File "share\dhparam4096.pem"
+
+ WriteUninstaller "uninstall.exe"
+
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Node" "DisplayName" "Pica Pica Node"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Node" "UninstallString" '"$INSTDIR\uninstall.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Node" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Node" "NoRepair" 1
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Node" "HelpLink" "https://picapica.im"
+
+ Exec 'sc create PicaNodeService binPath= $\"$INSTDIR\pica-node.exe$\" start= auto'
+SectionEnd ; end the section
+
+
+Section "Uninstall"
+ Exec 'sc stop PicaNodeService'
+ Delete $INSTDIR\uninstall.exe
+ Delete "$INSTDIR\pica-node.exe"
+ Delete "$INSTDIR\libeay32.dll"
+ Delete "$INSTDIR\libevent-2-1-6.dll"
+ Delete "$INSTDIR\libgcc_s_sjlj-1.dll"
+ Delete "$INSTDIR\libsqlite3-0.dll"
+ Delete "$INSTDIR\miniupnpc.dll"
+ Delete "$INSTDIR\ssleay32.dll"
+ Delete "$INSTDIR\pica-node.conf"
+ Delete "$INSTDIR\nodelist.db"
+ Delete "$INSTDIR\COPYING"
+ Delete "$INSTDIR\README"
+ Delete "$INSTDIR\OPENSSL.LICENSE.txt"
+ Delete "$INSTDIR\libevent.LICENSE.txt"
+ Delete "$INSTDIR\openssl.cnf"
+ Delete "$INSTDIR\share\dhparam4096.pem"
+ RMDir $INSTDIR\share
+ RMDir $INSTDIR
+
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pica Pica Node"
+ Exec 'sc delete PicaNodeService'
+SectionEnd
|
