Bitcoin r202 (last Satoshi commit) · 2010-12-15
setup.nsi
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.3.1911!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.3.19-win32-setup.exe46InstallDir $PROGRAMFILES\Bitcoin47CRCCheck on48XPStyle on49ShowInstDetails show50VIProductVersion 0.3.19.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\daemon71 File /r daemon\*.*72 SetOutPath $INSTDIR\locale73 File /r locale\*.*74 SetOutPath $INSTDIR\src75 File /r src\*.*76 SetOutPath $INSTDIR77 WriteRegStr HKCU "${REGKEY}\Components" Main 178SectionEnd7980Section -post SEC000181 WriteRegStr HKCU "${REGKEY}" Path $INSTDIR82 SetOutPath $INSTDIR83 WriteUninstaller $INSTDIR\uninstall.exe84 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application85 CreateDirectory $SMPROGRAMS\$StartMenuGroup86 CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk" $INSTDIR\bitcoin.exe87 CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk" $INSTDIR\uninstall.exe88 !insertmacro MUI_STARTMENU_WRITE_END89 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"90 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"91 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"92 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"93 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe94 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe95 WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 196 WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 197SectionEnd9899# Macro for selecting uninstaller sections100!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID101 Push $R0102 ReadRegStr $R0 HKCU "${REGKEY}\Components" "${SECTION_NAME}"103 StrCmp $R0 1 0 next${UNSECTION_ID}104 !insertmacro SelectSection "${UNSECTION_ID}"105 GoTo done${UNSECTION_ID}106next${UNSECTION_ID}:107 !insertmacro UnselectSection "${UNSECTION_ID}"108done${UNSECTION_ID}:109 Pop $R0110!macroend111112# Uninstaller sections113Section /o -un.Main UNSEC0000114 Delete /REBOOTOK $INSTDIR\bitcoin.exe115 Delete /REBOOTOK $INSTDIR\libeay32.dll116 Delete /REBOOTOK $INSTDIR\mingwm10.dll117 Delete /REBOOTOK $INSTDIR\license.txt118 Delete /REBOOTOK $INSTDIR\readme.txt119 RMDir /r /REBOOTOK $INSTDIR\daemon120 RMDir /r /REBOOTOK $INSTDIR\locale121 RMDir /r /REBOOTOK $INSTDIR\src122 DeleteRegValue HKCU "${REGKEY}\Components" Main123SectionEnd124125Section -un.post UNSEC0001126 DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"127 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk"128 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk"129 Delete /REBOOTOK "$SMSTARTUP\Bitcoin.lnk"130 Delete /REBOOTOK $INSTDIR\uninstall.exe131 Delete /REBOOTOK $INSTDIR\debug.log132 Delete /REBOOTOK $INSTDIR\db.log133 DeleteRegValue HKCU "${REGKEY}" StartMenuGroup134 DeleteRegValue HKCU "${REGKEY}" Path135 DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components"136 DeleteRegKey /IfEmpty HKCU "${REGKEY}"137 RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup138 RmDir /REBOOTOK $INSTDIR139 Push $R0140 StrCpy $R0 $StartMenuGroup 1141 StrCmp $R0 ">" no_smgroup142no_smgroup:143 Pop $R0144SectionEnd145146# Installer functions147Function .onInit148 InitPluginsDir149FunctionEnd150151# Uninstaller functions152Function un.onInit153 ReadRegStr $INSTDIR HKCU "${REGKEY}" Path154 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup155 !insertmacro SELECT_UNSECTION Main ${UNSEC0000}156FunctionEnd
Click a line number to link to it; use #L10-L20 for a range. "=" next to a version means the file is identical there.
