1 Name "@PACKAGE_NAME@ (@WINDOWS_BITS@-bit)"
3 RequestExecutionLevel highest
4 SetCompressor
/SOLID lzma
6 # General Symbol Definitions
7 !define REGKEY
"SOFTWARE\$(^Name)"
8 !define VERSION @CLIENT_VERSION_MAJOR@
.@CLIENT_VERSION_MINOR@
.@CLIENT_VERSION_REVISION@
9 !define COMPANY
"@PACKAGE_NAME@ project"
10 !define URL @PACKAGE_URL@
12 # MUI Symbol Definitions
13 !define MUI_ICON
"@abs_top_srcdir@/share/pixmaps/bitcoin.ico"
14 !define MUI_WELCOMEFINISHPAGE_BITMAP
"@abs_top_srcdir@/share/pixmaps/nsis-wizard.bmp"
15 !define MUI_HEADERIMAGE
16 !define MUI_HEADERIMAGE_RIGHT
17 !define MUI_HEADERIMAGE_BITMAP
"@abs_top_srcdir@/share/pixmaps/nsis-header.bmp"
18 !define MUI_FINISHPAGE_NOAUTOCLOSE
19 !define MUI_STARTMENUPAGE_REGISTRY_ROOT
HKLM
20 !define MUI_STARTMENUPAGE_REGISTRY_KEY
${REGKEY}
21 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
22 !define MUI_STARTMENUPAGE_DEFAULTFOLDER
"@PACKAGE_NAME@"
23 !define MUI_FINISHPAGE_RUN
$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
24 !define MUI_UNICON
"${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
25 !define MUI_UNWELCOMEFINISHPAGE_BITMAP
"@abs_top_srcdir@/share/pixmaps/nsis-wizard.bmp"
26 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
31 !if "@WINDOWS_BITS@" ==
"64"
39 !insertmacro MUI_PAGE_WELCOME
40 !insertmacro MUI_PAGE_DIRECTORY
41 !insertmacro MUI_PAGE_STARTMENU Application
$StartMenuGroup
42 !insertmacro MUI_PAGE_INSTFILES
43 !insertmacro MUI_PAGE_FINISH
44 !insertmacro MUI_UNPAGE_CONFIRM
45 !insertmacro MUI_UNPAGE_INSTFILES
48 !insertmacro MUI_LANGUAGE English
50 # Installer attributes
51 OutFile @abs_top_srcdir@
/@PACKAGE_TARNAME@
-${VERSION}-win@WINDOWS_BITS@
-setup
.exe
52 !if "@WINDOWS_BITS@" ==
"64"
53 InstallDir $PROGRAMFILES64\Bitcoin
55 InstallDir $PROGRAMFILES\Bitcoin
61 VIProductVersion
${VERSION}.@CLIENT_VERSION_BUILD@
62 VIAddVersionKey ProductName
"@PACKAGE_NAME@"
63 VIAddVersionKey ProductVersion
"${VERSION}"
64 VIAddVersionKey CompanyName
"${COMPANY}"
65 VIAddVersionKey CompanyWebsite
"${URL}"
66 VIAddVersionKey FileVersion
"${VERSION}"
67 VIAddVersionKey FileDescription
""
68 VIAddVersionKey LegalCopyright
""
69 InstallDirRegKey HKCU "${REGKEY}" Path
70 ShowUninstDetails show
76 File @abs_top_srcdir@
/release
/@BITCOIN_GUI_NAME@@EXEEXT@
77 File /oname=COPYING
.txt @abs_top_srcdir@
/COPYING
78 File /oname=readme
.txt @abs_top_srcdir@
/doc
/README_windows
.txt
79 SetOutPath $INSTDIR\daemon
80 File @abs_top_srcdir@
/release
/@BITCOIN_DAEMON_NAME@@EXEEXT@
81 File @abs_top_srcdir@
/release
/@BITCOIN_CLI_NAME@@EXEEXT@
82 SetOutPath $INSTDIR\doc
83 File /r @abs_top_srcdir@
/doc\
*.*
85 WriteRegStr HKCU "${REGKEY}\Components" Main
1
89 WriteRegStr HKCU "${REGKEY}" Path
$INSTDIR
91 WriteUninstaller $INSTDIR\uninstall
.exe
92 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
93 CreateDirectory $SMPROGRAMS\
$StartMenuGroup
94 CreateShortcut
"$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
95 CreateShortcut
"$SMPROGRAMS\$StartMenuGroup\@PACKAGE_NAME@ (testnet, @WINDOWS_BITS@-bit).lnk" "$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" "-testnet" "$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" 1
96 CreateShortcut
"$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall
.exe
97 !insertmacro MUI_STARTMENU_WRITE_END
98 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName
"$(^Name)"
99 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion
"${VERSION}"
100 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher
"${COMPANY}"
101 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout
"${URL}"
102 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon
$INSTDIR\uninstall
.exe
103 WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString
$INSTDIR\uninstall
.exe
104 WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify
1
105 WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair
1
106 WriteRegStr HKCR "@PACKAGE_TARNAME@" "URL Protocol" ""
107 WriteRegStr HKCR "@PACKAGE_TARNAME@" "" "URL:Bitcoin"
108 WriteRegStr HKCR "@PACKAGE_TARNAME@\DefaultIcon" "" $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
109 WriteRegStr HKCR "@PACKAGE_TARNAME@\shell\open\command" "" '"$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" "%1"'
112 # Macro for selecting uninstaller sections
113 !macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID
115 ReadRegStr $R0 HKCU "${REGKEY}\Components" "${SECTION_NAME}"
116 StrCmp $R0 1 0 next
${UNSECTION_ID}
117 !insertmacro SelectSection
"${UNSECTION_ID}"
118 GoTo done
${UNSECTION_ID}
120 !insertmacro UnselectSection
"${UNSECTION_ID}"
125 # Uninstaller sections
126 Section /o
-un
.Main UNSEC0000
127 Delete /REBOOTOK
$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
128 Delete /REBOOTOK
$INSTDIR\COPYING
.txt
129 Delete /REBOOTOK
$INSTDIR\readme
.txt
130 RMDir /r
/REBOOTOK
$INSTDIR\daemon
131 RMDir /r
/REBOOTOK
$INSTDIR\doc
132 DeleteRegValue HKCU "${REGKEY}\Components" Main
135 Section -un
.post UNSEC0001
136 DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
137 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk"
138 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk"
139 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuGroup\@PACKAGE_NAME@ (testnet, @WINDOWS_BITS@-bit).lnk"
140 Delete /REBOOTOK
"$SMSTARTUP\Bitcoin.lnk"
141 Delete /REBOOTOK
$INSTDIR\uninstall
.exe
142 Delete /REBOOTOK
$INSTDIR\debug
.log
143 Delete /REBOOTOK
$INSTDIR\db
.log
144 DeleteRegValue HKCU "${REGKEY}" StartMenuGroup
145 DeleteRegValue HKCU "${REGKEY}" Path
146 DeleteRegKey /IfEmpty
HKCU "${REGKEY}\Components"
147 DeleteRegKey /IfEmpty
HKCU "${REGKEY}"
148 DeleteRegKey HKCR "@PACKAGE_TARNAME@"
149 RmDir
/REBOOTOK
$SMPROGRAMS\
$StartMenuGroup
150 RmDir
/REBOOTOK
$INSTDIR
152 StrCpy $R0 $StartMenuGroup 1
153 StrCmp $R0 ">" no_smgroup
158 # Installer functions
161 !if "@WINDOWS_BITS@" ==
"64"
163 ; disable registry redirection (enable access to 64-bit portion of registry)
166 MessageBox MB_OK|
MB_ICONSTOP "Cannot install 64-bit version on a 32-bit system."
172 # Uninstaller functions
174 ReadRegStr $INSTDIR HKCU "${REGKEY}" Path
175 !insertmacro MUI_STARTMENU_GETFOLDER Application
$StartMenuGroup
176 !insertmacro SELECT_UNSECTION Main
${UNSEC0000}