Research
Timechain
Search Donate
Sponsors
Cake Wallet, private Bitcoin and Monero walletSideShift.ai, no-signup crypto exchangeOrangeRock, non-custodial bitcoin spot and perps tradingBraiins Hashpower, buy and sell Bitcoin hashrateeCash.com
Bitcoin v0.2.0 · 2009-12-16

setup.nsi

150 lines · plain text · GitHub · MIT license (license.txt)
1# Auto-generated by EclipseNSIS Script Wizard2# 3.10.2009 19:00:2834Name Bitcoin56RequestExecutionLevel highest78# General Symbol Definitions9!define REGKEY "SOFTWARE\$(^Name)"10!define VERSION 0.2.011!define COMPANY "Bitcoin project"12!define URL http://www.bitcoin.org/1314# MUI Symbol Definitions15!define MUI_ICON "src\rc\bitcoin.ico"16!define MUI_FINISHPAGE_NOAUTOCLOSE17!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM18!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}19!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup20!define MUI_STARTMENUPAGE_DEFAULTFOLDER Bitcoin21!define MUI_FINISHPAGE_RUN $INSTDIR\bitcoin.exe22!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"23!define MUI_UNFINISHPAGE_NOAUTOCLOSE2425# Included files26!include Sections.nsh27!include MUI2.nsh2829# Variables30Var StartMenuGroup3132# Installer pages33!insertmacro MUI_PAGE_WELCOME34!insertmacro MUI_PAGE_DIRECTORY35!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup36!insertmacro MUI_PAGE_INSTFILES37!insertmacro MUI_PAGE_FINISH38!insertmacro MUI_UNPAGE_CONFIRM39!insertmacro MUI_UNPAGE_INSTFILES4041# Installer languages42!insertmacro MUI_LANGUAGE English4344# Installer attributes45OutFile bitcoin-0.2.0-win32-setup.exe46InstallDir $PROGRAMFILES\Bitcoin47CRCCheck on48XPStyle on49ShowInstDetails show50VIProductVersion 0.2.0.051VIAddVersionKey ProductName Bitcoin52VIAddVersionKey ProductVersion "${VERSION}"53VIAddVersionKey CompanyName "${COMPANY}"54VIAddVersionKey CompanyWebsite "${URL}"55VIAddVersionKey FileVersion "${VERSION}"56VIAddVersionKey FileDescription ""57VIAddVersionKey LegalCopyright ""58InstallDirRegKey HKCU "${REGKEY}" Path59ShowUninstDetails show6061# Installer sections62Section -Main SEC000063    SetOutPath $INSTDIR64    SetOverwrite on65    File bitcoin.exe66    File libeay32.dll67    File mingwm10.dll68    File license.txt69    File readme.txt70    SetOutPath $INSTDIR\src71    File /r src\*.*72    SetOutPath $INSTDIR73    WriteRegStr HKCU "${REGKEY}\Components" Main 174SectionEnd7576Section -post SEC000177    WriteRegStr HKCU "${REGKEY}" Path $INSTDIR78    SetOutPath $INSTDIR79    WriteUninstaller $INSTDIR\uninstall.exe80    !insertmacro MUI_STARTMENU_WRITE_BEGIN Application81    CreateDirectory $SMPROGRAMS\$StartMenuGroup82    CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk" $INSTDIR\bitcoin.exe83    CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk" $INSTDIR\uninstall.exe84    !insertmacro MUI_STARTMENU_WRITE_END85    WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"86    WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"87    WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"88    WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"89    WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe90    WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe91    WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 192    WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 193SectionEnd9495# Macro for selecting uninstaller sections96!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID97    Push $R098    ReadRegStr $R0 HKCU "${REGKEY}\Components" "${SECTION_NAME}"99    StrCmp $R0 1 0 next${UNSECTION_ID}100    !insertmacro SelectSection "${UNSECTION_ID}"101    GoTo done${UNSECTION_ID}102next${UNSECTION_ID}:103    !insertmacro UnselectSection "${UNSECTION_ID}"104done${UNSECTION_ID}:105    Pop $R0106!macroend107108# Uninstaller sections109Section /o -un.Main UNSEC0000110    Delete /REBOOTOK $INSTDIR\bitcoin.exe111    Delete /REBOOTOK $INSTDIR\libeay32.dll112    Delete /REBOOTOK $INSTDIR\mingwm10.dll113    Delete /REBOOTOK $INSTDIR\license.txt114    Delete /REBOOTOK $INSTDIR\readme.txt115    RMDir /r /REBOOTOK $INSTDIR\src116    DeleteRegValue HKCU "${REGKEY}\Components" Main117SectionEnd118119Section -un.post UNSEC0001120    DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"121    Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk"122    Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk"123    Delete /REBOOTOK "$SMSTARTUP\Bitcoin.lnk"124    Delete /REBOOTOK $INSTDIR\uninstall.exe125    Delete /REBOOTOK $INSTDIR\debug.log126    Delete /REBOOTOK $INSTDIR\db.log127    DeleteRegValue HKCU "${REGKEY}" StartMenuGroup128    DeleteRegValue HKCU "${REGKEY}" Path129    DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components"130    DeleteRegKey /IfEmpty HKCU "${REGKEY}"131    RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup132    RmDir /REBOOTOK $INSTDIR133    Push $R0134    StrCpy $R0 $StartMenuGroup 1135    StrCmp $R0 ">" no_smgroup136no_smgroup:137    Pop $R0138SectionEnd139140# Installer functions141Function .onInit142    InitPluginsDir143FunctionEnd144145# Uninstaller functions146Function un.onInit147    ReadRegStr $INSTDIR HKCU "${REGKEY}" Path148    !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup149    !insertmacro SELECT_UNSECTION Main ${UNSEC0000}150FunctionEnd

Click a line number to link to it; use #L10-L20 for a range. "=" next to a version means the file is identical there.

0:000:00