twisterp2pblockchainnetworkbittorrentmicrobloggingipv6social-networkdhtdecentralizedtwisterarmyp2p-networktwister-servertwister-ipv6twister-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
5.2 KiB
152 lines
5.2 KiB
15 years ago
|
Name Bitcoin
|
||
|
|
||
15 years ago
|
RequestExecutionLevel highest
|
||
|
|
||
15 years ago
|
# General Symbol Definitions
|
||
|
!define REGKEY "SOFTWARE\$(^Name)"
|
||
14 years ago
|
!define VERSION 0.3.22
|
||
15 years ago
|
!define COMPANY "Bitcoin project"
|
||
15 years ago
|
!define URL http://www.bitcoin.org/
|
||
15 years ago
|
|
||
|
# MUI Symbol Definitions
|
||
15 years ago
|
!define MUI_ICON "src\rc\bitcoin.ico"
|
||
15 years ago
|
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
|
||
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
|
||
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
|
||
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER Bitcoin
|
||
|
!define MUI_FINISHPAGE_RUN $INSTDIR\bitcoin.exe
|
||
|
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
||
|
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
||
|
|
||
|
# Included files
|
||
|
!include Sections.nsh
|
||
|
!include MUI2.nsh
|
||
|
|
||
|
# Variables
|
||
|
Var StartMenuGroup
|
||
|
|
||
|
# Installer pages
|
||
|
!insertmacro MUI_PAGE_WELCOME
|
||
|
!insertmacro MUI_PAGE_DIRECTORY
|
||
|
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
|
||
|
!insertmacro MUI_PAGE_INSTFILES
|
||
|
!insertmacro MUI_PAGE_FINISH
|
||
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||
|
|
||
|
# Installer languages
|
||
|
!insertmacro MUI_LANGUAGE English
|
||
|
|
||
|
# Installer attributes
|
||
14 years ago
|
OutFile bitcoin-0.3.22-win32-setup.exe
|
||
15 years ago
|
InstallDir $PROGRAMFILES\Bitcoin
|
||
|
CRCCheck on
|
||
|
XPStyle on
|
||
|
ShowInstDetails show
|
||
14 years ago
|
VIProductVersion 0.3.22.0
|
||
15 years ago
|
VIAddVersionKey ProductName Bitcoin
|
||
|
VIAddVersionKey ProductVersion "${VERSION}"
|
||
|
VIAddVersionKey CompanyName "${COMPANY}"
|
||
|
VIAddVersionKey CompanyWebsite "${URL}"
|
||
|
VIAddVersionKey FileVersion "${VERSION}"
|
||
|
VIAddVersionKey FileDescription ""
|
||
|
VIAddVersionKey LegalCopyright ""
|
||
15 years ago
|
InstallDirRegKey HKCU "${REGKEY}" Path
|
||
15 years ago
|
ShowUninstDetails show
|
||
|
|
||
|
# Installer sections
|
||
|
Section -Main SEC0000
|
||
|
SetOutPath $INSTDIR
|
||
|
SetOverwrite on
|
||
|
File bitcoin.exe
|
||
14 years ago
|
File libeay32.dll
|
||
15 years ago
|
File license.txt
|
||
|
File readme.txt
|
||
15 years ago
|
SetOutPath $INSTDIR\daemon
|
||
|
File /r daemon\*.*
|
||
|
SetOutPath $INSTDIR\locale
|
||
|
File /r locale\*.*
|
||
15 years ago
|
SetOutPath $INSTDIR\src
|
||
|
File /r src\*.*
|
||
|
SetOutPath $INSTDIR
|
||
15 years ago
|
WriteRegStr HKCU "${REGKEY}\Components" Main 1
|
||
15 years ago
|
SectionEnd
|
||
|
|
||
|
Section -post SEC0001
|
||
15 years ago
|
WriteRegStr HKCU "${REGKEY}" Path $INSTDIR
|
||
15 years ago
|
SetOutPath $INSTDIR
|
||
|
WriteUninstaller $INSTDIR\uninstall.exe
|
||
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||
15 years ago
|
CreateDirectory $SMPROGRAMS\$StartMenuGroup
|
||
15 years ago
|
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk" $INSTDIR\bitcoin.exe
|
||
|
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk" $INSTDIR\uninstall.exe
|
||
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||
15 years ago
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
|
||
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
|
||
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
|
||
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
|
||
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe
|
||
|
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe
|
||
|
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
|
||
|
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
|
||
15 years ago
|
SectionEnd
|
||
|
|
||
|
# Macro for selecting uninstaller sections
|
||
|
!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID
|
||
|
Push $R0
|
||
15 years ago
|
ReadRegStr $R0 HKCU "${REGKEY}\Components" "${SECTION_NAME}"
|
||
15 years ago
|
StrCmp $R0 1 0 next${UNSECTION_ID}
|
||
|
!insertmacro SelectSection "${UNSECTION_ID}"
|
||
|
GoTo done${UNSECTION_ID}
|
||
|
next${UNSECTION_ID}:
|
||
|
!insertmacro UnselectSection "${UNSECTION_ID}"
|
||
|
done${UNSECTION_ID}:
|
||
|
Pop $R0
|
||
|
!macroend
|
||
|
|
||
|
# Uninstaller sections
|
||
|
Section /o -un.Main UNSEC0000
|
||
|
Delete /REBOOTOK $INSTDIR\bitcoin.exe
|
||
14 years ago
|
Delete /REBOOTOK $INSTDIR\libeay32.dll
|
||
15 years ago
|
Delete /REBOOTOK $INSTDIR\license.txt
|
||
|
Delete /REBOOTOK $INSTDIR\readme.txt
|
||
15 years ago
|
RMDir /r /REBOOTOK $INSTDIR\daemon
|
||
|
RMDir /r /REBOOTOK $INSTDIR\locale
|
||
15 years ago
|
RMDir /r /REBOOTOK $INSTDIR\src
|
||
15 years ago
|
DeleteRegValue HKCU "${REGKEY}\Components" Main
|
||
15 years ago
|
SectionEnd
|
||
|
|
||
|
Section -un.post UNSEC0001
|
||
15 years ago
|
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
|
||
15 years ago
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk"
|
||
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk"
|
||
15 years ago
|
Delete /REBOOTOK "$SMSTARTUP\Bitcoin.lnk"
|
||
15 years ago
|
Delete /REBOOTOK $INSTDIR\uninstall.exe
|
||
15 years ago
|
Delete /REBOOTOK $INSTDIR\debug.log
|
||
15 years ago
|
Delete /REBOOTOK $INSTDIR\db.log
|
||
|
DeleteRegValue HKCU "${REGKEY}" StartMenuGroup
|
||
|
DeleteRegValue HKCU "${REGKEY}" Path
|
||
|
DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components"
|
||
|
DeleteRegKey /IfEmpty HKCU "${REGKEY}"
|
||
15 years ago
|
RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
|
||
|
RmDir /REBOOTOK $INSTDIR
|
||
|
Push $R0
|
||
|
StrCpy $R0 $StartMenuGroup 1
|
||
|
StrCmp $R0 ">" no_smgroup
|
||
|
no_smgroup:
|
||
|
Pop $R0
|
||
|
SectionEnd
|
||
|
|
||
|
# Installer functions
|
||
|
Function .onInit
|
||
|
InitPluginsDir
|
||
|
FunctionEnd
|
||
|
|
||
|
# Uninstaller functions
|
||
|
Function un.onInit
|
||
15 years ago
|
ReadRegStr $INSTDIR HKCU "${REGKEY}" Path
|
||
15 years ago
|
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
|
||
|
!insertmacro SELECT_UNSECTION Main ${UNSEC0000}
|
||
|
FunctionEnd
|