mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
Update nsis.install.nsh
Correct NSIS comment syntax (; instead of #)
This commit is contained in:
parent
f17df6db91
commit
bc0447314b
1 changed files with 16 additions and 16 deletions
|
|
@ -2,7 +2,7 @@ Name "geth ${MAJORVERSION}.${MINORVERSION}.${BUILDVERSION}" # VERSION variables
|
||||||
InstallDir "$InstDir"
|
InstallDir "$InstDir"
|
||||||
OutFile "${OUTPUTFILE}" # set through command line arguments
|
OutFile "${OUTPUTFILE}" # set through command line arguments
|
||||||
|
|
||||||
# Links for "Add/Remove Programs"
|
; Links for "Add/Remove Programs"
|
||||||
!define HELPURL "https://github.com/ethereum/go-ethereum/issues"
|
!define HELPURL "https://github.com/ethereum/go-ethereum/issues"
|
||||||
!define UPDATEURL "https://github.com/ethereum/go-ethereum/releases"
|
!define UPDATEURL "https://github.com/ethereum/go-ethereum/releases"
|
||||||
!define ABOUTURL "https://github.com/ethereum/go-ethereum#ethereum-go"
|
!define ABOUTURL "https://github.com/ethereum/go-ethereum#ethereum-go"
|
||||||
|
|
@ -12,44 +12,44 @@ PageEx license
|
||||||
LicenseData {{.License}}
|
LicenseData {{.License}}
|
||||||
PageExEnd
|
PageExEnd
|
||||||
|
|
||||||
# Install geth binary
|
; Install geth binary
|
||||||
Section "Geth" GETH_IDX
|
Section "Geth" GETH_IDX
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
file {{.Geth}}
|
file {{.Geth}}
|
||||||
|
|
||||||
# Create start menu launcher
|
; Create start menu launcher
|
||||||
createDirectory "$SMPROGRAMS\${APPNAME}"
|
createDirectory "$SMPROGRAMS\${APPNAME}"
|
||||||
createShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\geth.exe"
|
createShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\geth.exe"
|
||||||
createShortCut "$SMPROGRAMS\${APPNAME}\Attach.lnk" "$INSTDIR\geth.exe" "attach"
|
createShortCut "$SMPROGRAMS\${APPNAME}\Attach.lnk" "$INSTDIR\geth.exe" "attach"
|
||||||
createShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
createShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
||||||
|
|
||||||
# Firewall - remove rules (if exists)
|
; Firewall - remove rules (if exists)
|
||||||
SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30303)"
|
SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30303)"
|
||||||
SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30303)"
|
SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30303)"
|
||||||
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
|
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
|
||||||
|
|
||||||
# Firewall - add rules
|
; Firewall - add rules
|
||||||
SimpleFC::AdvAddRule "Geth incoming peers (TCP:30303)" "" 6 1 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" 30303 "" "" ""
|
SimpleFC::AdvAddRule "Geth incoming peers (TCP:30303)" "" 6 1 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" 30303 "" "" ""
|
||||||
SimpleFC::AdvAddRule "Geth outgoing peers (TCP:30303)" "" 6 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" ""
|
SimpleFC::AdvAddRule "Geth outgoing peers (TCP:30303)" "" 6 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" ""
|
||||||
SimpleFC::AdvAddRule "Geth UDP discovery (UDP:30303)" "" 17 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" ""
|
SimpleFC::AdvAddRule "Geth UDP discovery (UDP:30303)" "" 17 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" ""
|
||||||
|
|
||||||
# Set default IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
; Set default IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
||||||
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
|
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
|
||||||
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "A" "HKLM" "\\.\pipe\geth.ipc"
|
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "A" "HKLM" "\\.\pipe\geth.ipc"
|
||||||
|
|
||||||
# Add instdir to PATH
|
; Add instdir to PATH
|
||||||
Push "$INSTDIR"
|
Push "$INSTDIR"
|
||||||
Call AddToPath
|
Call AddToPath
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
# Install optional develop tools.
|
; Install optional develop tools.
|
||||||
Section /o "Development tools" DEV_TOOLS_IDX
|
Section /o "Development tools" DEV_TOOLS_IDX
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
{{range .DevTools}}file {{.}}
|
{{range .DevTools}}file {{.}}
|
||||||
{{end}}
|
{{end}}
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
# Return on top of stack the total size (as DWORD) of the selected/installed sections.
|
; Return on top of stack the total size (as DWORD) of the selected/installed sections.
|
||||||
Var GetInstalledSize.total
|
Var GetInstalledSize.total
|
||||||
Function GetInstalledSize
|
Function GetInstalledSize
|
||||||
StrCpy $GetInstalledSize.total 0
|
StrCpy $GetInstalledSize.total 0
|
||||||
|
|
@ -68,17 +68,17 @@ Function GetInstalledSize
|
||||||
Push $GetInstalledSize.total
|
Push $GetInstalledSize.total
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
# Write registry, Windows uses these values in various tools such as add/remove program.
|
; Write registry, Windows uses these values in various tools such as add/remove program.
|
||||||
# PowerShell: Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, InstallLocation, InstallDate | Format-Table –AutoSize
|
; PowerShell: Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, InstallLocation, InstallDate | Format-Table –AutoSize
|
||||||
function .onInstSuccess
|
function .onInstSuccess
|
||||||
# Save information in registry in HKEY_LOCAL_MACHINE branch, Windows add/remove functionality depends on this
|
; Save information in registry in HKEY_LOCAL_MACHINE branch, Windows add/remove functionality depends on this
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "DisplayName" "${GROUPNAME} - ${APPNAME} - ${DESCRIPTION}"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "DisplayName" "${GROUPNAME} - ${APPNAME} - ${DESCRIPTION}"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "InstallLocation" "$INSTDIR"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "InstallLocation" "$INSTDIR"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "InstallDate" "${NOW}"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "InstallDate" "${NOW}"
|
||||||
# Wait for Alex
|
; Wait for Alex
|
||||||
#WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "DisplayIcon" "$\"$INSTDIR\logo.ico$\""
|
;WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "DisplayIcon" "$\"$INSTDIR\logo.ico$\""
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "Publisher" "${GROUPNAME}"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "Publisher" "${GROUPNAME}"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "HelpLink" "${HELPURL}"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "HelpLink" "${HELPURL}"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "URLUpdateInfo" "${UPDATEURL}"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "URLUpdateInfo" "${UPDATEURL}"
|
||||||
|
|
@ -86,7 +86,7 @@ function .onInstSuccess
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "DisplayVersion" "${MAJORVERSION}.${MINORVERSION}.${BUILDVERSION}"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "DisplayVersion" "${MAJORVERSION}.${MINORVERSION}.${BUILDVERSION}"
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "VersionMajor" ${MAJORVERSION}
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "VersionMajor" ${MAJORVERSION}
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "VersionMinor" ${MINORVERSION}
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "VersionMinor" ${MINORVERSION}
|
||||||
# There is no option for modifying or repairing the install
|
; There is no option for modifying or repairing the install
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "NoModify" 1
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "NoModify" 1
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "NoRepair" 1
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "NoRepair" 1
|
||||||
|
|
||||||
|
|
@ -94,7 +94,7 @@ function .onInstSuccess
|
||||||
Pop $0
|
Pop $0
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "EstimatedSize" "$0"
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" "EstimatedSize" "$0"
|
||||||
|
|
||||||
# Create uninstaller
|
; Create uninstaller
|
||||||
writeUninstaller "$INSTDIR\uninstall.exe"
|
writeUninstaller "$INSTDIR\uninstall.exe"
|
||||||
functionEnd
|
functionEnd
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue