2009-10-03 19:02:59 +02:00
|
|
|
Name Bitcoin
|
|
|
|
|
2009-10-30 01:45:35 +01:00
|
|
|
RequestExecutionLevel highest
|
2011-07-11 09:11:15 +02:00
|
|
|
SetCompressor /SOLID lzma
|
2009-10-30 01:45:35 +01:00
|
|
|
|
2009-10-03 19:02:59 +02:00
|
|
|
# General Symbol Definitions
|
|
|
|
!define REGKEY "SOFTWARE\$(^Name)"
|
2012-02-07 17:22:09 +01:00
|
|
|
!define VERSION 0.6.0
|
2009-10-03 19:02:59 +02:00
|
|
|
!define COMPANY "Bitcoin project"
|
2009-12-13 01:13:16 +01:00
|
|
|
!define URL http://www.bitcoin.org/
|
2009-10-03 19:02:59 +02:00
|
|
|
|
|
|
|
# MUI Symbol Definitions
|
2011-05-21 13:45:49 +02:00
|
|
|
!define MUI_ICON "../share/pixmaps/bitcoin.ico"
|
2011-07-11 09:09:07 +02:00
|
|
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp"
|
|
|
|
!define MUI_HEADERIMAGE
|
|
|
|
!define MUI_HEADERIMAGE_RIGHT
|
|
|
|
!define MUI_HEADERIMAGE_BITMAP "../share/pixmaps/nsis-header.bmp"
|
2009-10-03 19:02:59 +02:00
|
|
|
!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
|
2011-10-08 23:29:47 +02:00
|
|
|
!define MUI_FINISHPAGE_RUN $INSTDIR\bitcoin-qt.exe
|
2009-10-03 19:02:59 +02:00
|
|
|
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
2011-07-11 09:09:07 +02:00
|
|
|
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp"
|
2009-10-03 19:02:59 +02:00
|
|
|
!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
|
2012-02-07 17:22:09 +01:00
|
|
|
OutFile bitcoin-0.6.0-win32-setup.exe
|
2009-10-03 19:02:59 +02:00
|
|
|
InstallDir $PROGRAMFILES\Bitcoin
|
|
|
|
CRCCheck on
|
|
|
|
XPStyle on
|
2011-07-12 08:18:57 +02:00
|
|
|
BrandingText " "
|
2009-10-03 19:02:59 +02:00
|
|
|
ShowInstDetails show
|
2012-02-07 17:22:09 +01:00
|
|
|
VIProductVersion 0.6.0.0
|
2009-10-03 19:02:59 +02:00
|
|
|
VIAddVersionKey ProductName Bitcoin
|
|
|
|
VIAddVersionKey ProductVersion "${VERSION}"
|
|
|
|
VIAddVersionKey CompanyName "${COMPANY}"
|
|
|
|
VIAddVersionKey CompanyWebsite "${URL}"
|
|
|
|
VIAddVersionKey FileVersion "${VERSION}"
|
|
|
|
VIAddVersionKey FileDescription ""
|
|
|
|
VIAddVersionKey LegalCopyright ""
|
2009-10-04 13:38:29 +02:00
|
|
|
InstallDirRegKey HKCU "${REGKEY}" Path
|
2009-10-03 19:02:59 +02:00
|
|
|
ShowUninstDetails show
|
|
|
|
|
|
|
|
# Installer sections
|
|
|
|
Section -Main SEC0000
|
|
|
|
SetOutPath $INSTDIR
|
|
|
|
SetOverwrite on
|
2011-10-17 17:29:45 +02:00
|
|
|
File ../release/bitcoin-qt.exe
|
2011-05-21 13:45:49 +02:00
|
|
|
File /oname=license.txt ../COPYING
|
|
|
|
File /oname=readme.txt ../doc/README_windows.txt
|
2010-06-22 18:28:15 +02:00
|
|
|
SetOutPath $INSTDIR\daemon
|
2011-05-21 13:45:49 +02:00
|
|
|
File ../src/bitcoind.exe
|
2009-12-13 01:13:16 +01:00
|
|
|
SetOutPath $INSTDIR\src
|
2011-05-21 13:45:49 +02:00
|
|
|
File /r /x *.exe /x *.o ../src\*.*
|
2009-12-13 01:13:16 +01:00
|
|
|
SetOutPath $INSTDIR
|
2009-10-04 13:38:29 +02:00
|
|
|
WriteRegStr HKCU "${REGKEY}\Components" Main 1
|
2012-03-26 18:33:35 +02:00
|
|
|
|
|
|
|
# Remove old wxwidgets-based-bitcoin executable and locales:
|
|
|
|
Delete /REBOOTOK $INSTDIR\bitcoin.exe
|
|
|
|
RMDir /r /REBOOTOK $INSTDIR\locale
|
2009-10-03 19:02:59 +02:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section -post SEC0001
|
2009-10-04 13:38:29 +02:00
|
|
|
WriteRegStr HKCU "${REGKEY}" Path $INSTDIR
|
2009-10-03 19:02:59 +02:00
|
|
|
SetOutPath $INSTDIR
|
|
|
|
WriteUninstaller $INSTDIR\uninstall.exe
|
|
|
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
2009-10-04 13:38:29 +02:00
|
|
|
CreateDirectory $SMPROGRAMS\$StartMenuGroup
|
2011-10-08 23:29:47 +02:00
|
|
|
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk" $INSTDIR\bitcoin-qt.exe
|
2009-10-03 19:02:59 +02:00
|
|
|
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk" $INSTDIR\uninstall.exe
|
|
|
|
!insertmacro MUI_STARTMENU_WRITE_END
|
2009-10-04 13:38:29 +02:00
|
|
|
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
|
2012-03-26 18:18:24 +02:00
|
|
|
|
|
|
|
# bitcoin: URI handling disabled for 0.6.0
|
|
|
|
# WriteRegStr HKCR "bitcoin" "URL Protocol" ""
|
|
|
|
# WriteRegStr HKCR "bitcoin" "" "URL:Bitcoin"
|
|
|
|
# WriteRegStr HKCR "bitcoin\DefaultIcon" "" $INSTDIR\bitcoin-qt.exe
|
|
|
|
# WriteRegStr HKCR "bitcoin\shell\open\command" "" '"$INSTDIR\bitcoin-qt.exe" "$$1"'
|
2009-10-03 19:02:59 +02:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
# Macro for selecting uninstaller sections
|
|
|
|
!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID
|
|
|
|
Push $R0
|
2009-10-04 13:38:29 +02:00
|
|
|
ReadRegStr $R0 HKCU "${REGKEY}\Components" "${SECTION_NAME}"
|
2009-10-03 19:02:59 +02:00
|
|
|
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
|
2011-10-08 23:29:47 +02:00
|
|
|
Delete /REBOOTOK $INSTDIR\bitcoin-qt.exe
|
2009-12-13 01:13:16 +01:00
|
|
|
Delete /REBOOTOK $INSTDIR\license.txt
|
|
|
|
Delete /REBOOTOK $INSTDIR\readme.txt
|
2010-06-22 18:28:15 +02:00
|
|
|
RMDir /r /REBOOTOK $INSTDIR\daemon
|
2009-12-13 01:13:16 +01:00
|
|
|
RMDir /r /REBOOTOK $INSTDIR\src
|
2009-10-04 13:38:29 +02:00
|
|
|
DeleteRegValue HKCU "${REGKEY}\Components" Main
|
2009-10-03 19:02:59 +02:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section -un.post UNSEC0001
|
2009-10-04 13:38:29 +02:00
|
|
|
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
|
2009-10-03 19:02:59 +02:00
|
|
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk"
|
|
|
|
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk"
|
2009-10-30 01:45:35 +01:00
|
|
|
Delete /REBOOTOK "$SMSTARTUP\Bitcoin.lnk"
|
2009-10-03 19:02:59 +02:00
|
|
|
Delete /REBOOTOK $INSTDIR\uninstall.exe
|
2009-12-13 01:13:16 +01:00
|
|
|
Delete /REBOOTOK $INSTDIR\debug.log
|
2009-10-04 13:38:29 +02:00
|
|
|
Delete /REBOOTOK $INSTDIR\db.log
|
|
|
|
DeleteRegValue HKCU "${REGKEY}" StartMenuGroup
|
|
|
|
DeleteRegValue HKCU "${REGKEY}" Path
|
|
|
|
DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components"
|
|
|
|
DeleteRegKey /IfEmpty HKCU "${REGKEY}"
|
2011-12-24 05:27:12 +01:00
|
|
|
DeleteRegKey HKCR "bitcoin"
|
2009-10-03 19:02:59 +02:00
|
|
|
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
|
2009-10-04 13:38:29 +02:00
|
|
|
ReadRegStr $INSTDIR HKCU "${REGKEY}" Path
|
2009-10-03 19:02:59 +02:00
|
|
|
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
|
|
|
|
!insertmacro SELECT_UNSECTION Main ${UNSEC0000}
|
|
|
|
FunctionEnd
|