]>
Commit | Line | Data |
---|---|---|
661f8780 | 1 | # Auto-generated by EclipseNSIS Script Wizard\r |
2 | # 3.10.2009 19:00:28\r | |
3 | \r | |
4 | Name Bitcoin\r | |
5 | \r | |
a0c17c03 | 6 | RequestExecutionLevel highest\r |
7 | \r | |
661f8780 | 8 | # General Symbol Definitions\r |
9 | !define REGKEY "SOFTWARE\$(^Name)"\r | |
08fee752 | 10 | !define VERSION 0.3.10\r |
661f8780 | 11 | !define COMPANY "Bitcoin project"\r |
e39bc50e | 12 | !define URL http://www.bitcoin.org/\r |
661f8780 | 13 | \r |
14 | # MUI Symbol Definitions\r | |
e39bc50e | 15 | !define MUI_ICON "src\rc\bitcoin.ico"\r |
661f8780 | 16 | !define MUI_FINISHPAGE_NOAUTOCLOSE\r |
17 | !define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM\r | |
18 | !define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}\r | |
19 | !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup\r | |
20 | !define MUI_STARTMENUPAGE_DEFAULTFOLDER Bitcoin\r | |
21 | !define MUI_FINISHPAGE_RUN $INSTDIR\bitcoin.exe\r | |
22 | !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"\r | |
23 | !define MUI_UNFINISHPAGE_NOAUTOCLOSE\r | |
24 | \r | |
25 | # Included files\r | |
26 | !include Sections.nsh\r | |
27 | !include MUI2.nsh\r | |
28 | \r | |
29 | # Variables\r | |
30 | Var StartMenuGroup\r | |
31 | \r | |
32 | # Installer pages\r | |
33 | !insertmacro MUI_PAGE_WELCOME\r | |
34 | !insertmacro MUI_PAGE_DIRECTORY\r | |
35 | !insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup\r | |
36 | !insertmacro MUI_PAGE_INSTFILES\r | |
37 | !insertmacro MUI_PAGE_FINISH\r | |
38 | !insertmacro MUI_UNPAGE_CONFIRM\r | |
39 | !insertmacro MUI_UNPAGE_INSTFILES\r | |
40 | \r | |
41 | # Installer languages\r | |
42 | !insertmacro MUI_LANGUAGE English\r | |
43 | \r | |
44 | # Installer attributes\r | |
08fee752 | 45 | OutFile bitcoin-0.3.10-win32-setup.exe\r |
661f8780 | 46 | InstallDir $PROGRAMFILES\Bitcoin\r |
47 | CRCCheck on\r | |
48 | XPStyle on\r | |
49 | ShowInstDetails show\r | |
08fee752 | 50 | VIProductVersion 0.3.10.0\r |
661f8780 | 51 | VIAddVersionKey ProductName Bitcoin\r |
52 | VIAddVersionKey ProductVersion "${VERSION}"\r | |
53 | VIAddVersionKey CompanyName "${COMPANY}"\r | |
54 | VIAddVersionKey CompanyWebsite "${URL}"\r | |
55 | VIAddVersionKey FileVersion "${VERSION}"\r | |
56 | VIAddVersionKey FileDescription ""\r | |
57 | VIAddVersionKey LegalCopyright ""\r | |
0cc05617 | 58 | InstallDirRegKey HKCU "${REGKEY}" Path\r |
661f8780 | 59 | ShowUninstDetails show\r |
60 | \r | |
61 | # Installer sections\r | |
62 | Section -Main SEC0000\r | |
63 | SetOutPath $INSTDIR\r | |
64 | SetOverwrite on\r | |
65 | File bitcoin.exe\r | |
66 | File libeay32.dll\r | |
67 | File mingwm10.dll\r | |
e39bc50e | 68 | File license.txt\r |
69 | File readme.txt\r | |
445520bf | 70 | SetOutPath $INSTDIR\daemon\r |
71 | File /r daemon\*.*\r | |
72 | SetOutPath $INSTDIR\locale\r | |
73 | File /r locale\*.*\r | |
e39bc50e | 74 | SetOutPath $INSTDIR\src\r |
75 | File /r src\*.*\r | |
76 | SetOutPath $INSTDIR\r | |
0cc05617 | 77 | WriteRegStr HKCU "${REGKEY}\Components" Main 1\r |
661f8780 | 78 | SectionEnd\r |
79 | \r | |
80 | Section -post SEC0001\r | |
0cc05617 | 81 | WriteRegStr HKCU "${REGKEY}" Path $INSTDIR\r |
661f8780 | 82 | SetOutPath $INSTDIR\r |
83 | WriteUninstaller $INSTDIR\uninstall.exe\r | |
84 | !insertmacro MUI_STARTMENU_WRITE_BEGIN Application\r | |
0cc05617 | 85 | CreateDirectory $SMPROGRAMS\$StartMenuGroup\r |
661f8780 | 86 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk" $INSTDIR\bitcoin.exe\r |
87 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk" $INSTDIR\uninstall.exe\r | |
88 | !insertmacro MUI_STARTMENU_WRITE_END\r | |
0cc05617 | 89 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"\r |
90 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"\r | |
91 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"\r | |
92 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"\r | |
93 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe\r | |
94 | WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe\r | |
95 | WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1\r | |
96 | WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1\r | |
661f8780 | 97 | SectionEnd\r |
98 | \r | |
99 | # Macro for selecting uninstaller sections\r | |
100 | !macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID\r | |
101 | Push $R0\r | |
0cc05617 | 102 | ReadRegStr $R0 HKCU "${REGKEY}\Components" "${SECTION_NAME}"\r |
661f8780 | 103 | StrCmp $R0 1 0 next${UNSECTION_ID}\r |
104 | !insertmacro SelectSection "${UNSECTION_ID}"\r | |
105 | GoTo done${UNSECTION_ID}\r | |
106 | next${UNSECTION_ID}:\r | |
107 | !insertmacro UnselectSection "${UNSECTION_ID}"\r | |
108 | done${UNSECTION_ID}:\r | |
109 | Pop $R0\r | |
110 | !macroend\r | |
111 | \r | |
112 | # Uninstaller sections\r | |
113 | Section /o -un.Main UNSEC0000\r | |
661f8780 | 114 | Delete /REBOOTOK $INSTDIR\bitcoin.exe\r |
e39bc50e | 115 | Delete /REBOOTOK $INSTDIR\libeay32.dll\r |
116 | Delete /REBOOTOK $INSTDIR\mingwm10.dll\r | |
117 | Delete /REBOOTOK $INSTDIR\license.txt\r | |
118 | Delete /REBOOTOK $INSTDIR\readme.txt\r | |
445520bf | 119 | RMDir /r /REBOOTOK $INSTDIR\daemon\r |
120 | RMDir /r /REBOOTOK $INSTDIR\locale\r | |
e39bc50e | 121 | RMDir /r /REBOOTOK $INSTDIR\src\r |
0cc05617 | 122 | DeleteRegValue HKCU "${REGKEY}\Components" Main\r |
661f8780 | 123 | SectionEnd\r |
124 | \r | |
125 | Section -un.post UNSEC0001\r | |
0cc05617 | 126 | DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"\r |
661f8780 | 127 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk"\r |
128 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk"\r | |
a0c17c03 | 129 | Delete /REBOOTOK "$SMSTARTUP\Bitcoin.lnk"\r |
661f8780 | 130 | Delete /REBOOTOK $INSTDIR\uninstall.exe\r |
e39bc50e | 131 | Delete /REBOOTOK $INSTDIR\debug.log\r |
0cc05617 | 132 | Delete /REBOOTOK $INSTDIR\db.log\r |
133 | DeleteRegValue HKCU "${REGKEY}" StartMenuGroup\r | |
134 | DeleteRegValue HKCU "${REGKEY}" Path\r | |
135 | DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components"\r | |
136 | DeleteRegKey /IfEmpty HKCU "${REGKEY}"\r | |
661f8780 | 137 | RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup\r |
138 | RmDir /REBOOTOK $INSTDIR\r | |
139 | Push $R0\r | |
140 | StrCpy $R0 $StartMenuGroup 1\r | |
141 | StrCmp $R0 ">" no_smgroup\r | |
142 | no_smgroup:\r | |
143 | Pop $R0\r | |
144 | SectionEnd\r | |
145 | \r | |
146 | # Installer functions\r | |
147 | Function .onInit\r | |
148 | InitPluginsDir\r | |
149 | FunctionEnd\r | |
150 | \r | |
151 | # Uninstaller functions\r | |
152 | Function un.onInit\r | |
0cc05617 | 153 | ReadRegStr $INSTDIR HKCU "${REGKEY}" Path\r |
661f8780 | 154 | !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup\r |
155 | !insertmacro SELECT_UNSECTION Main ${UNSEC0000}\r | |
156 | FunctionEnd\r |