Merge lp:~mandel/ubuntuone-windows-installer/add_env_set_up into lp:ubuntuone-windows-installer/beta
- add_env_set_up
- Merge into beta
Proposed by
Manuel de la Peña
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Rick McBride | ||||||||
Approved revision: | 87 | ||||||||
Merged at revision: | 88 | ||||||||
Proposed branch: | lp:~mandel/ubuntuone-windows-installer/add_env_set_up | ||||||||
Merge into: | lp:ubuntuone-windows-installer/beta | ||||||||
Prerequisite: | lp:~mandel/ubuntuone-windows-installer/implement_sso_service_calls | ||||||||
Diff against target: |
2185 lines (+1750/-25) 14 files modified
.bzrignore (+2/-2) install/UbuntuOneXP.wxs (+844/-0) main.build (+37/-16) src/Canonical.Ubuntu.SSO/DPAPIDataProtector.cs (+41/-0) src/Canonical.Ubuntu.SSO/Keyring.cs (+56/-1) src/Canonical.Ubuntu.SSO/RegistryKeyWrapper.cs (+46/-0) src/Canonical.Ubuntu.SSO/SSOCredentialsProvider.cs (+3/-0) src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs (+0/-2) src/Canonical.UbuntuOne.ProcessDispatcher/objects.xml (+3/-3) src/UbuntuOneClient.Tests/ProgramFixture.cs (+1/-0) src/UbuntuOneClient/objects.xml (+40/-1) utils/BaseDirectory.py (+173/-0) utils/env_setup.bat (+236/-0) utils/logger.py (+268/-0) |
||||||||
To merge this branch: | bzr merge lp:~mandel/ubuntuone-windows-installer/add_env_set_up | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Rick McBride (community) | Approve | ||
John Lenton (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
Fixes wix project for windows XP as well as provides an script that will allow to set up the devel environment.
To post a comment you must log in.
- 87. By Manuel de la Peña
-
Fixed issue when downloading easy_install, missing url.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
John Lenton (chipaca) : | # |
review:
Approve
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Rick McBride (rmcbride) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2010-09-30 09:36:24 +0000 | |||
3 | +++ .bzrignore 2010-09-30 09:36:24 +0000 | |||
4 | @@ -1,6 +1,6 @@ | |||
5 | 1 | 1 | ||
8 | 2 | install/UbuntuOne.wixobj | 2 | *.wixobj |
9 | 3 | install/UbuntuOne.wixpdb | 3 | *.wixpdb |
10 | 4 | install/build_results | 4 | install/build_results |
11 | 5 | src/UbuntuOne.5.1.ReSharper.user | 5 | src/UbuntuOne.5.1.ReSharper.user |
12 | 6 | src/UbuntuOne.sln.cache | 6 | src/UbuntuOne.sln.cache |
13 | 7 | 7 | ||
14 | === renamed file 'install/UbuntuOne.wxs' => 'install/UbuntuOne7.wxs' | |||
15 | === added file 'install/UbuntuOneXP.wxs' | |||
16 | --- install/UbuntuOneXP.wxs 1970-01-01 00:00:00 +0000 | |||
17 | +++ install/UbuntuOneXP.wxs 2010-09-30 09:36:24 +0000 | |||
18 | @@ -0,0 +1,844 @@ | |||
19 | 1 | <?xml version="1.0" encoding="windows-1252"?> | ||
20 | 2 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> | ||
21 | 3 | <!-- | ||
22 | 4 | This file contains the wix installer definition that will be used to install Ubuntu One | ||
23 | 5 | on windows machines. The installer ensures that all the required dependencies that the | ||
24 | 6 | application requires are present in the system allowing the user to forget about dependecies | ||
25 | 7 | --> | ||
26 | 8 | <Product Name="Ubuntu One" | ||
27 | 9 | Id="13b7ee30-849c-11df-8395-0800200c9a66" | ||
28 | 10 | UpgradeCode="1f5dcd90-849c-11df-8395-0800200c9a66" | ||
29 | 11 | Language="1033" | ||
30 | 12 | Codepage="1252" | ||
31 | 13 | Version="1.0.0" | ||
32 | 14 | Manufacturer="Canonical Ltd."> | ||
33 | 15 | |||
34 | 16 | <Package Id="*" | ||
35 | 17 | Keywords="Installer" | ||
36 | 18 | Description="Ubuntu One is the personal cloud service that | ||
37 | 19 | simplifies your digital life. Imagine buying music and getting | ||
38 | 20 | it delivered to the computers of your choice. Or synchronizing your | ||
39 | 21 | files and notes and accessing them from anywhere. | ||
40 | 22 | Or consolidating your computer and mobile phone contacts and safely | ||
41 | 23 | sharing documents and pictures with them" | ||
42 | 24 | Comments="UbuntuOne is a registered trademark of Canonical Ltd." | ||
43 | 25 | Manufacturer="Canonical Ltd." | ||
44 | 26 | InstallerVersion="350" | ||
45 | 27 | Languages="1033" | ||
46 | 28 | Compressed="yes" | ||
47 | 29 | SummaryCodepage="1252" /> | ||
48 | 30 | |||
49 | 31 | <Media Id="1" | ||
50 | 32 | Cabinet="UbuntuOne.cab" | ||
51 | 33 | EmbedCab="yes" /> | ||
52 | 34 | |||
53 | 35 | <Property Id="UBUNTUONECLIENT_START_VIA_REGISTRY">1</Property> | ||
54 | 36 | |||
55 | 37 | <Directory Id="TARGETDIR" | ||
56 | 38 | Name="SourceDir"> | ||
57 | 39 | <Directory Id="ProgramMenuFolder" | ||
58 | 40 | Name="Programs" /> | ||
59 | 41 | <Directory Id="DesktopFolder" | ||
60 | 42 | Name="Desktop" /> | ||
61 | 43 | <Directory Id="CommonAppDataFolder" | ||
62 | 44 | Name="CommonAppDataFolder"> | ||
63 | 45 | <Directory Id="StoreageProtocol" | ||
64 | 46 | Name="ubuntuone-storageprotocol"> | ||
65 | 47 | <Component Id="UbuntuOneGoDaddyCAComponent" | ||
66 | 48 | Guid="84f40170-b5a1-11df-8d81-0800200c9a66"> | ||
67 | 49 | <File Id="UbuntuOne_Go_Daddy_CA" | ||
68 | 50 | Name="UbuntuOne-Go_Daddy_CA.pem" | ||
69 | 51 | DiskId="1" | ||
70 | 52 | Source="build_results\data\UbuntuOne-Go_Daddy_CA.pem" | ||
71 | 53 | KeyPath="yes"/> | ||
72 | 54 | </Component> | ||
73 | 55 | <Component Id="UbuntuOneGoDaddyClass2CAComponent" | ||
74 | 56 | Guid="89d14680-b5a1-11df-8d81-0800200c9a66"> | ||
75 | 57 | <File Id="UbuntuOne_Go_Daddy_Class_2_CA" | ||
76 | 58 | Name="UbuntuOne-Go_Daddy_Class_2_CA.pem" | ||
77 | 59 | DiskId="1" | ||
78 | 60 | Source="build_results\data\UbuntuOne-Go_Daddy_Class_2_CA.pem" | ||
79 | 61 | KeyPath="yes"/> | ||
80 | 62 | </Component> | ||
81 | 63 | </Directory> | ||
82 | 64 | </Directory> | ||
83 | 65 | <Directory Id="ProgramFilesFolder" | ||
84 | 66 | Name="ProgramFilesFolder"> | ||
85 | 67 | <Directory Id="Canonical" | ||
86 | 68 | Name="Canonical"> | ||
87 | 69 | <Directory Id="U1Installdir" | ||
88 | 70 | Name="UbuntuOne"> | ||
89 | 71 | <Directory Id="DaemonDir" | ||
90 | 72 | Name="Daemon"> | ||
91 | 73 | <Component Id="DaemonCommonLibComponent" | ||
92 | 74 | Guid="a609b650-94b5-11df-981c-0800200c9a66"> | ||
93 | 75 | <File Id="Canonical.UbuntuOne.Common.dll" | ||
94 | 76 | Name="Canonical.UbuntuOne.Common.dll" | ||
95 | 77 | DiskId="1" | ||
96 | 78 | Source="build_results\Daemon\Canonical.UbuntuOne.Common.dll" | ||
97 | 79 | KeyPath="yes"/> | ||
98 | 80 | </Component> | ||
99 | 81 | <Component Id="DaemonCommonPdbComponent" | ||
100 | 82 | Guid="c4ddb5e0-94b5-11df-981c-0800200c9a66"> | ||
101 | 83 | <File Id="Canonical.UbuntuOne.Common.pdb" | ||
102 | 84 | Name="Canonical.UbuntuOne.Common.pdb" | ||
103 | 85 | DiskId="1" | ||
104 | 86 | Source="build_results\Daemon\Canonical.UbuntuOne.Common.pdb" | ||
105 | 87 | KeyPath="yes"/> | ||
106 | 88 | </Component> | ||
107 | 89 | <Component Id="DaemonProgramComponent" | ||
108 | 90 | Guid="f2d91a70-94b5-11df-981c-0800200c9a66"> | ||
109 | 91 | <File Id="Canonical.UbuntuOne.ProcessDispatcher.exe" | ||
110 | 92 | Name="Canonical.UbuntuOne.ProcessDispatcher.exe" | ||
111 | 93 | DiskId="1" | ||
112 | 94 | Source="build_results\Daemon\Canonical.UbuntuOne.ProcessDispatcher.exe" | ||
113 | 95 | KeyPath="yes"/> | ||
114 | 96 | <!-- Install, start and stop service using the msi --> | ||
115 | 97 | <ServiceInstall Id="ProcessDispatcher.exe" | ||
116 | 98 | Name="UbuntuOne" | ||
117 | 99 | DisplayName="Ubuntu One Sync Daemon" | ||
118 | 100 | Type="ownProcess" | ||
119 | 101 | Interactive="no" | ||
120 | 102 | Start="auto" | ||
121 | 103 | Vital="yes" | ||
122 | 104 | ErrorControl="ignore" | ||
123 | 105 | Description="Provides a central process that manages the Ubuntu One sync daemon." /> | ||
124 | 106 | <ServiceControl Id="ProcessDispatcherControl" | ||
125 | 107 | Name="UbuntuOne" | ||
126 | 108 | Start="install" | ||
127 | 109 | Stop="uninstall" | ||
128 | 110 | Remove="uninstall" | ||
129 | 111 | Wait="yes" /> | ||
130 | 112 | </Component> | ||
131 | 113 | <Component Id="DaemonProgramComponentConfig" | ||
132 | 114 | Guid="6ac2f100-94bb-11df-981c-0800200c9a66"> | ||
133 | 115 | <File Id="Canonical.UbuntuOne.ProcessDispatcher.exe.config" | ||
134 | 116 | Name="Canonical.UbuntuOne.ProcessDispatcher.exe.config" | ||
135 | 117 | DiskId="1" | ||
136 | 118 | Source="build_results\Daemon\Canonical.UbuntuOne.ProcessDispatcher.exe.config" | ||
137 | 119 | KeyPath="yes"/> | ||
138 | 120 | </Component> | ||
139 | 121 | <Component Id="DaemonProgramPdbComponent" | ||
140 | 122 | Guid="052b3280-94b6-11df-981c-0800200c9a66"> | ||
141 | 123 | <File Id="Canonical.UbuntuOne.ProcessDispatcher.pdb" | ||
142 | 124 | Name="Canonical.UbuntuOne.ProcessDispatcher.pdb" | ||
143 | 125 | DiskId="1" | ||
144 | 126 | Source="build_results\Daemon\Canonical.UbuntuOne.ProcessDispatcher.pdb" | ||
145 | 127 | KeyPath="yes"/> | ||
146 | 128 | </Component> | ||
147 | 129 | <Component Id="CommonLoggingComponent" | ||
148 | 130 | Guid="24d7ded0-94b6-11df-981c-0800200c9a66"> | ||
149 | 131 | <File Id="Common.Logging.dll" | ||
150 | 132 | Name="Common.Logging.dll" | ||
151 | 133 | DiskId="1" | ||
152 | 134 | Source="build_results\Daemon\Common.Logging.dll" | ||
153 | 135 | KeyPath="yes"/> | ||
154 | 136 | </Component> | ||
155 | 137 | <Component Id="CommonLoggingLog4NetComponent" | ||
156 | 138 | Guid="6ac0e8b0-967d-11df-981c-0800200c9a66"> | ||
157 | 139 | <File Id="Common.Logging.Log4Net.dll" | ||
158 | 140 | Name="Common.Logging.Log4Net.dll" | ||
159 | 141 | DiskId="1" | ||
160 | 142 | Source="build_results\Daemon\Common.Logging.Log4Net.dll" | ||
161 | 143 | KeyPath="yes"/> | ||
162 | 144 | </Component> | ||
163 | 145 | <Component Id="DotUpdaterLib" | ||
164 | 146 | Guid="af217c90-967d-11df-981c-0800200c9a66"> | ||
165 | 147 | <File Id="DotUpdater.dll" | ||
166 | 148 | Name="DotUpdater.dll" | ||
167 | 149 | DiskId="1" | ||
168 | 150 | Source="build_results\Daemon\DotUpdater.dll" | ||
169 | 151 | KeyPath="yes"/> | ||
170 | 152 | </Component> | ||
171 | 153 | <Component Id="Log4NetComponent" | ||
172 | 154 | Guid="0eafc310-94b7-11df-981c-0800200c9a66"> | ||
173 | 155 | <File Id="log4net.dll" | ||
174 | 156 | Name="log4net.dll" | ||
175 | 157 | DiskId="1" | ||
176 | 158 | Source="build_results\Daemon\log4net.dll" | ||
177 | 159 | KeyPath="yes"/> | ||
178 | 160 | </Component> | ||
179 | 161 | <Component Id="SpringAopComponent" | ||
180 | 162 | Guid="5431cc80-94b7-11df-981c-0800200c9a66"> | ||
181 | 163 | <File Id="Spring.Aop.dll" | ||
182 | 164 | Name="Spring.Aop.dll" | ||
183 | 165 | DiskId="1" | ||
184 | 166 | Source="build_results\Daemon\Spring.Aop.dll" | ||
185 | 167 | KeyPath="yes"/> | ||
186 | 168 | </Component> | ||
187 | 169 | <Component Id="SpringAopConfigComponent" | ||
188 | 170 | Guid="668e92f0-94b7-11df-981c-0800200c9a66"> | ||
189 | 171 | <File Id="Spring.Aop.xml" | ||
190 | 172 | Name="Spring.Aop.xml" | ||
191 | 173 | DiskId="1" | ||
192 | 174 | Source="build_results\Daemon\Spring.Aop.xml" | ||
193 | 175 | KeyPath="yes"/> | ||
194 | 176 | </Component> | ||
195 | 177 | <Component Id="SpringCoreComponent" | ||
196 | 178 | Guid="7780a5d0-94b7-11df-981c-0800200c9a66"> | ||
197 | 179 | <File Id="Spring.Core.dll" | ||
198 | 180 | Name="Spring.Core.dll" | ||
199 | 181 | DiskId="1" | ||
200 | 182 | Source="build_results\Daemon\Spring.Core.dll" | ||
201 | 183 | KeyPath="yes"/> | ||
202 | 184 | </Component> | ||
203 | 185 | <Component Id="SpringCoreConfigComponent" | ||
204 | 186 | Guid="8149fd00-94b7-11df-981c-0800200c9a66"> | ||
205 | 187 | <File Id="Spring.Core.xml" | ||
206 | 188 | Name="Spring.Core.xml" | ||
207 | 189 | DiskId="1" | ||
208 | 190 | Source="build_results\Daemon\Spring.Core.xml" | ||
209 | 191 | KeyPath="yes"/> | ||
210 | 192 | </Component> | ||
211 | 193 | <Component Id="SpringServicesComponent" | ||
212 | 194 | Guid="fd27e7a0-98ce-11df-981c-0800200c9a66"> | ||
213 | 195 | <File Id="Spring.Services.dll" | ||
214 | 196 | Name="Spring.Services.dll" | ||
215 | 197 | DiskId="1" | ||
216 | 198 | Source="build_results\Daemon\Spring.Services.dll" | ||
217 | 199 | KeyPath="yes"/> | ||
218 | 200 | </Component> | ||
219 | 201 | <Component Id="SpringServicesConfigComponent" | ||
220 | 202 | Guid="33b757b0-98cf-11df-981c-0800200c9a66"> | ||
221 | 203 | <File Id="Spring.Services.xml" | ||
222 | 204 | Name="Spring.Services.xml" | ||
223 | 205 | DiskId="1" | ||
224 | 206 | Source="build_results\Daemon\Spring.Services.xml" | ||
225 | 207 | KeyPath="yes"/> | ||
226 | 208 | </Component> | ||
227 | 209 | <Component Id="SpringDataComponent" | ||
228 | 210 | Guid="e1736390-aac1-11df-94e2-0800200c9a66"> | ||
229 | 211 | <File Id="Spring.Data.dll" | ||
230 | 212 | Name="Spring.Data.dll" | ||
231 | 213 | DiskId="1" | ||
232 | 214 | Source="build_results\Daemon\Spring.Data.dll" | ||
233 | 215 | KeyPath="yes"/> | ||
234 | 216 | </Component> | ||
235 | 217 | <Component Id="SymstemDataSQLiteComponent" | ||
236 | 218 | Guid="43573410-aac2-11df-94e2-0800200c9a66"> | ||
237 | 219 | <File Id="System.Data.SQLite.DLL" | ||
238 | 220 | Name="System.Data.SQLite.DLL" | ||
239 | 221 | DiskId="1" | ||
240 | 222 | Source="build_results\Daemon\System.Data.SQLite.DLL" | ||
241 | 223 | KeyPath="yes"/> | ||
242 | 224 | </Component> | ||
243 | 225 | <Directory Id="DaemonConfigDir" | ||
244 | 226 | Name="Config"> | ||
245 | 227 | <Component Id="DaemonConfigLog4Net" | ||
246 | 228 | Guid="306252c0-967e-11df-981c-0800200c9a66"> | ||
247 | 229 | <File Id="log4net.config" | ||
248 | 230 | Name="log4net.config" | ||
249 | 231 | DiskId="1" | ||
250 | 232 | Source="build_results\Daemon\Config\log4net.config" | ||
251 | 233 | KeyPath="yes"/> | ||
252 | 234 | </Component> | ||
253 | 235 | <Component Id="ServiceModelBehavioursConfig" | ||
254 | 236 | Guid="5f9a6390-98cf-11df-981c-0800200c9a66"> | ||
255 | 237 | <File Id="serviceModel.behaviours.config" | ||
256 | 238 | Name="serviceModel.behaviours.config" | ||
257 | 239 | DiskId="1" | ||
258 | 240 | Source="build_results\Daemon\Config\serviceModel.behaviours.config" | ||
259 | 241 | KeyPath="yes"/> | ||
260 | 242 | </Component> | ||
261 | 243 | <Component Id="ServiceModelBindingsConfig" | ||
262 | 244 | Guid="65aca630-98cf-11df-981c-0800200c9a66"> | ||
263 | 245 | <File Id="serviceModel.bindings.config" | ||
264 | 246 | Name="serviceModel.bindings.config" | ||
265 | 247 | DiskId="1" | ||
266 | 248 | Source="build_results\Daemon\Config\serviceModel.bindings.config" | ||
267 | 249 | KeyPath="yes"/> | ||
268 | 250 | </Component> | ||
269 | 251 | <Component Id="ServiceModelServicesConfig" | ||
270 | 252 | Guid="6a7e5280-98cf-11df-981c-0800200c9a66"> | ||
271 | 253 | <File Id="serviceModel.services.config" | ||
272 | 254 | Name="serviceModel.services.config" | ||
273 | 255 | DiskId="1" | ||
274 | 256 | Source="build_results\Daemon\Config\serviceModel.services.config" | ||
275 | 257 | KeyPath="yes"/> | ||
276 | 258 | </Component> | ||
277 | 259 | </Directory> | ||
278 | 260 | </Directory> | ||
279 | 261 | <Directory Id="ClientDir" | ||
280 | 262 | Name="Client"> | ||
281 | 263 | <!-- Auto-start via Registry --> | ||
282 | 264 | <Component Id="UbuntuOneClietnAutostart" | ||
283 | 265 | Guid="e3b224c0-9fa4-11df-981c-0800200c9a66"> | ||
284 | 266 | <RegistryValue Id="UbunntuOneClient.rst" | ||
285 | 267 | Root="HKCU" | ||
286 | 268 | Key="Software\Microsoft\Windows\CurrentVersion\Run" | ||
287 | 269 | Name="Ubuntu One Client" | ||
288 | 270 | Value="[ClientDir]UbuntuOneClient.exe" | ||
289 | 271 | Type="string"/> | ||
290 | 272 | <Condition>UBUNTUONECLIENT_START_VIA_REGISTRY</Condition> | ||
291 | 273 | </Component> | ||
292 | 274 | <Component Id="AvalonLib" | ||
293 | 275 | Guid="99106520-9f9b-11df-981c-0800200c9a66"> | ||
294 | 276 | <File Id="AvalonLibrary.dll" | ||
295 | 277 | Name="AvalonLibrary.dll" | ||
296 | 278 | DiskId="1" | ||
297 | 279 | Source="build_results\Client\AvalonLibrary.dll" | ||
298 | 280 | KeyPath="yes"/> | ||
299 | 281 | </Component> | ||
300 | 282 | <Component Id="UbuntuSSO" | ||
301 | 283 | Guid="c3de3ad0-c8f8-11df-bd3b-0800200c9a66"> | ||
302 | 284 | <File Id="Canonical.Ubuntu.SSO.dll" | ||
303 | 285 | Name="Canonical.Ubuntu.SSO.dll" | ||
304 | 286 | DiskId="1" | ||
305 | 287 | Source="build_results\Client\Canonical.Ubuntu.SSO.dll" | ||
306 | 288 | KeyPath="yes"/> | ||
307 | 289 | </Component> | ||
308 | 290 | <Component Id="UbuntuSSOViews" | ||
309 | 291 | Guid="f12d0bb0-c8f8-11df-bd3b-0800200c9a66"> | ||
310 | 292 | <File Id="Canonical.Ubuntu.SSO.Views.dll" | ||
311 | 293 | Name="Canonical.Ubuntu.SSO.Views.dll" | ||
312 | 294 | DiskId="1" | ||
313 | 295 | Source="build_results\Client\Canonical.Ubuntu.SSO.Views.dll" | ||
314 | 296 | KeyPath="yes"/> | ||
315 | 297 | </Component> | ||
316 | 298 | <Component Id="Newtonsoft.Json" | ||
317 | 299 | Guid="1a3ad780-c8f9-11df-bd3b-0800200c9a66"> | ||
318 | 300 | <File Id="Newtonsoft.Json.dll" | ||
319 | 301 | Name="Newtonsoft.Json.dll" | ||
320 | 302 | DiskId="1" | ||
321 | 303 | Source="build_results\Client\Newtonsoft.Json.dll" | ||
322 | 304 | KeyPath="yes"/> | ||
323 | 305 | </Component> | ||
324 | 306 | <Component Id="UbuntuOneClientLib" | ||
325 | 307 | Guid="98ceabc0-9f9c-11df-981c-0800200c9a66"> | ||
326 | 308 | <File Id="Canonical.UbuntuOne.Client.dll" | ||
327 | 309 | Name="Canonical.UbuntuOne.Client.dll" | ||
328 | 310 | DiskId="1" | ||
329 | 311 | Source="build_results\Client\Canonical.UbuntuOne.Client.dll" | ||
330 | 312 | KeyPath="yes"/> | ||
331 | 313 | </Component> | ||
332 | 314 | <Component Id="UbuntuOneClientLibPdb" | ||
333 | 315 | Guid="af68a6b0-9f9c-11df-981c-0800200c9a66"> | ||
334 | 316 | <File Id="Canonical.UbuntuOne.Client.pdb" | ||
335 | 317 | Name="Canonical.UbuntuOne.Client.pdb" | ||
336 | 318 | DiskId="1" | ||
337 | 319 | Source="build_results\Client\Canonical.UbuntuOne.Client.pdb" | ||
338 | 320 | KeyPath="yes"/> | ||
339 | 321 | </Component> | ||
340 | 322 | <Component Id="UbuntuOneClientViewsLib" | ||
341 | 323 | Guid="ae68f9e0-9fb0-11df-981c-0800200c9a66"> | ||
342 | 324 | <File Id="Canonical.UbuntuOne.Client.Views.dll" | ||
343 | 325 | Name="Canonical.UbuntuOne.Client.Views.dll" | ||
344 | 326 | DiskId="1" | ||
345 | 327 | Source="build_results\Client\Canonical.UbuntuOne.Client.Views.dll" | ||
346 | 328 | KeyPath="yes"/> | ||
347 | 329 | </Component> | ||
348 | 330 | <Component Id="UbuntuOneClientViewsLibPdb" | ||
349 | 331 | Guid="b4d54360-9fb0-11df-981c-0800200c9a66"> | ||
350 | 332 | <File Id="Canonical.UbuntuOne.Client.Views.pdb" | ||
351 | 333 | Name="Canonical.UbuntuOne.Client.Views.pdb" | ||
352 | 334 | DiskId="1" | ||
353 | 335 | Source="build_results\Client\Canonical.UbuntuOne.Client.Views.pdb" | ||
354 | 336 | KeyPath="yes"/> | ||
355 | 337 | </Component> | ||
356 | 338 | <Component Id="UbuntuOneCommonLib" | ||
357 | 339 | Guid="cadc1620-9f9c-11df-981c-0800200c9a66"> | ||
358 | 340 | <File Id="Canonical.UbuntuOne.Common.dll_client" | ||
359 | 341 | Name="Canonical.UbuntuOne.Common.dll" | ||
360 | 342 | DiskId="1" | ||
361 | 343 | Source="build_results\Client\Canonical.UbuntuOne.Common.dll" | ||
362 | 344 | KeyPath="yes"/> | ||
363 | 345 | </Component> | ||
364 | 346 | <Component Id="UbuntuOneCommonLibPdb" | ||
365 | 347 | Guid="eca5af00-9f9c-11df-981c-0800200c9a66"> | ||
366 | 348 | <File Id="Canonical.UbuntuOne.Common.pdb_client" | ||
367 | 349 | Name="Canonical.UbuntuOne.Common.pdb" | ||
368 | 350 | DiskId="1" | ||
369 | 351 | Source="build_results\Client\Canonical.UbuntuOne.Common.pdb" | ||
370 | 352 | KeyPath="yes"/> | ||
371 | 353 | </Component> | ||
372 | 354 | <Component Id="CommonLoggingComponentClient" | ||
373 | 355 | Guid="12de88e0-9f9d-11df-981c-0800200c9a66"> | ||
374 | 356 | <File Id="Common.Logging.dll_client" | ||
375 | 357 | Name="Common.Logging.dll" | ||
376 | 358 | DiskId="1" | ||
377 | 359 | Source="build_results\Client\Common.Logging.dll" | ||
378 | 360 | KeyPath="yes"/> | ||
379 | 361 | </Component> | ||
380 | 362 | <Component Id="CommonLoggingLog4NetComponentClient" | ||
381 | 363 | Guid="1a06f670-9f9d-11df-981c-0800200c9a66"> | ||
382 | 364 | <File Id="Common.Logging.Log4Net.dll_client" | ||
383 | 365 | Name="Common.Logging.Log4Net.dll" | ||
384 | 366 | DiskId="1" | ||
385 | 367 | Source="build_results\Client\Common.Logging.Log4Net.dll" | ||
386 | 368 | KeyPath="yes"/> | ||
387 | 369 | </Component> | ||
388 | 370 | <Component Id="DotUpdaterLibClient" | ||
389 | 371 | Guid="31a4a5c0-9f9d-11df-981c-0800200c9a66"> | ||
390 | 372 | <File Id="DotUpdater.dll_client" | ||
391 | 373 | Name="DotUpdater.dll" | ||
392 | 374 | DiskId="1" | ||
393 | 375 | Source="build_results\Client\DotUpdater.dll" | ||
394 | 376 | KeyPath="yes"/> | ||
395 | 377 | </Component> | ||
396 | 378 | <Component Id="Log4NetComponentClient" | ||
397 | 379 | Guid="5d2630b0-9f9d-11df-981c-0800200c9a66"> | ||
398 | 380 | <File Id="log4net.dll_client" | ||
399 | 381 | Name="log4net.dll" | ||
400 | 382 | DiskId="1" | ||
401 | 383 | Source="build_results\Client\log4net.dll" | ||
402 | 384 | KeyPath="yes"/> | ||
403 | 385 | </Component> | ||
404 | 386 | <Component Id="SpringAopComponentClient" | ||
405 | 387 | Guid="8fbaf380-9f9d-11df-981c-0800200c9a66"> | ||
406 | 388 | <File Id="Spring.Aop.dll_client" | ||
407 | 389 | Name="Spring.Aop.dll" | ||
408 | 390 | DiskId="1" | ||
409 | 391 | Source="build_results\Client\Spring.Aop.dll" | ||
410 | 392 | KeyPath="yes"/> | ||
411 | 393 | </Component> | ||
412 | 394 | <Component Id="SpringAopConfigComponentClient" | ||
413 | 395 | Guid="94fffb10-9f9d-11df-981c-0800200c9a66"> | ||
414 | 396 | <File Id="Spring.Aop.xml_client" | ||
415 | 397 | Name="Spring.Aop.xml" | ||
416 | 398 | DiskId="1" | ||
417 | 399 | Source="build_results\Client\Spring.Aop.xml" | ||
418 | 400 | KeyPath="yes"/> | ||
419 | 401 | </Component> | ||
420 | 402 | <Component Id="SpringCoreComponentClient" | ||
421 | 403 | Guid="9a6a16d0-9f9d-11df-981c-0800200c9a66"> | ||
422 | 404 | <File Id="Spring.Core.dll_client" | ||
423 | 405 | Name="Spring.Core.dll" | ||
424 | 406 | DiskId="1" | ||
425 | 407 | Source="build_results\Client\Spring.Core.dll" | ||
426 | 408 | KeyPath="yes"/> | ||
427 | 409 | </Component> | ||
428 | 410 | <Component Id="SpringCoreConfigComponentClient" | ||
429 | 411 | Guid="9fa7cb60-9f9d-11df-981c-0800200c9a66"> | ||
430 | 412 | <File Id="Spring.Core.xml_client" | ||
431 | 413 | Name="Spring.Core.xml" | ||
432 | 414 | DiskId="1" | ||
433 | 415 | Source="build_results\Client\Spring.Core.xml" | ||
434 | 416 | KeyPath="yes"/> | ||
435 | 417 | </Component> | ||
436 | 418 | <Component Id="UbuntuOneClient" | ||
437 | 419 | Guid="bb893ee0-9f9d-11df-981c-0800200c9a66"> | ||
438 | 420 | <File Id="UbuntuOneClient.exe" | ||
439 | 421 | Name="UbuntuOneClient.exe" | ||
440 | 422 | DiskId="1" | ||
441 | 423 | Source="build_results\Client\UbuntuOneClient.exe" | ||
442 | 424 | KeyPath="yes"/> | ||
443 | 425 | </Component> | ||
444 | 426 | <Component Id="UbuntuOneClientConfig" | ||
445 | 427 | Guid="da9e3f10-9f9d-11df-981c-0800200c9a66"> | ||
446 | 428 | <File Id="UbuntuOneClient.exe.config" | ||
447 | 429 | Name="UbuntuOneClient.exe.config" | ||
448 | 430 | DiskId="1" | ||
449 | 431 | Source="build_results\Client\UbuntuOneClient.exe.config" | ||
450 | 432 | KeyPath="yes"/> | ||
451 | 433 | </Component> | ||
452 | 434 | <Component Id="UbuntuOneClientPdb" | ||
453 | 435 | Guid="fad020f0-9f9d-11df-981c-0800200c9a66"> | ||
454 | 436 | <File Id="UbuntuOneClient.pdb" | ||
455 | 437 | Name="UbuntuOneClient.pdb" | ||
456 | 438 | DiskId="1" | ||
457 | 439 | Source="build_results\Client\UbuntuOneClient.pdb" | ||
458 | 440 | KeyPath="yes"/> | ||
459 | 441 | </Component> | ||
460 | 442 | <Directory Id="ClientConfigDir" | ||
461 | 443 | Name="Config"> | ||
462 | 444 | <Component Id="ClientConfigLog4Net" | ||
463 | 445 | Guid="40cf49a0-9f9e-11df-981c-0800200c9a66"> | ||
464 | 446 | <File Id="log4net.config_client" | ||
465 | 447 | Name="log4net.config" | ||
466 | 448 | DiskId="1" | ||
467 | 449 | Source="build_results\Client\Config\log4net.config" | ||
468 | 450 | KeyPath="yes"/> | ||
469 | 451 | </Component> | ||
470 | 452 | </Directory> | ||
471 | 453 | <Directory Id="U1SyncExecutable" | ||
472 | 454 | Name="U1Sync"> | ||
473 | 455 | <Component Id="CTypesComponent" | ||
474 | 456 | Guid="cc878310-b1ee-11df-94e2-0800200c9a66"> | ||
475 | 457 | <File Id="_ctypes.pyd" | ||
476 | 458 | Name="_ctypes.pyd" | ||
477 | 459 | DiskId="1" | ||
478 | 460 | Source="build_results\u1sync\_ctypes.pyd" | ||
479 | 461 | KeyPath="yes"/> | ||
480 | 462 | </Component> | ||
481 | 463 | <Component Id="HLibComponent" | ||
482 | 464 | Guid="15848270-b1ef-11df-94e2-0800200c9a66"> | ||
483 | 465 | <File Id="_hashlib.pyd" | ||
484 | 466 | Name="_hashlib.pyd" | ||
485 | 467 | DiskId="1" | ||
486 | 468 | Source="build_results\u1sync\_hashlib.pyd" | ||
487 | 469 | KeyPath="yes"/> | ||
488 | 470 | </Component> | ||
489 | 471 | <Component Id="SocketComponent" | ||
490 | 472 | Guid="37e5a060-b1ef-11df-94e2-0800200c9a66"> | ||
491 | 473 | <File Id="_socket.pyd" | ||
492 | 474 | Name="_socket.pyd" | ||
493 | 475 | DiskId="1" | ||
494 | 476 | Source="build_results\u1sync\_socket.pyd" | ||
495 | 477 | KeyPath="yes"/> | ||
496 | 478 | </Component> | ||
497 | 479 | <Component Id="SSLComponent" | ||
498 | 480 | Guid="5df98d20-b1ef-11df-94e2-0800200c9a66"> | ||
499 | 481 | <File Id="_ssl.pyd" | ||
500 | 482 | Name="_ssl.pyd" | ||
501 | 483 | DiskId="1" | ||
502 | 484 | Source="build_results\u1sync\_ssl.pyd" | ||
503 | 485 | KeyPath="yes"/> | ||
504 | 486 | </Component> | ||
505 | 487 | <Component Id="SysLoaderComponent" | ||
506 | 488 | Guid="85d149f0-b1ef-11df-94e2-0800200c9a66"> | ||
507 | 489 | <File Id="_win32sysloader.pyd" | ||
508 | 490 | Name="_win32sysloader.pyd" | ||
509 | 491 | DiskId="1" | ||
510 | 492 | Source="build_results\u1sync\_win32sysloader.pyd" | ||
511 | 493 | KeyPath="yes"/> | ||
512 | 494 | </Component> | ||
513 | 495 | <Component Id="Bz2Component" | ||
514 | 496 | Guid="252ce1e0-b1f0-11df-94e2-0800200c9a66"> | ||
515 | 497 | <File Id="bz2.pyd" | ||
516 | 498 | Name="bz2.pyd" | ||
517 | 499 | DiskId="1" | ||
518 | 500 | Source="build_results\u1sync\bz2.pyd" | ||
519 | 501 | KeyPath="yes"/> | ||
520 | 502 | </Component> | ||
521 | 503 | <Component Id="Libeay32Component" | ||
522 | 504 | Guid="252d08e9-b1f0-11df-94e2-0800200c9a66"> | ||
523 | 505 | <File Id="LIBEAY32.dll" | ||
524 | 506 | Name="LIBEAY32.dll" | ||
525 | 507 | DiskId="1" | ||
526 | 508 | Source="build_results\u1sync\LIBEAY32.dll" | ||
527 | 509 | KeyPath="yes"/> | ||
528 | 510 | </Component> | ||
529 | 511 | <Component Id="LibraryComponent" | ||
530 | 512 | Guid="252d08ea-b1f0-11df-94e2-0800200c9a66"> | ||
531 | 513 | <File Id="library.zip" | ||
532 | 514 | Name="library.zip" | ||
533 | 515 | DiskId="1" | ||
534 | 516 | Source="build_results\u1sync\library.zip" | ||
535 | 517 | KeyPath="yes"/> | ||
536 | 518 | </Component> | ||
537 | 519 | <Component Id="U1SyncMainComponent" | ||
538 | 520 | Guid="252d08eb-b1f0-11df-94e2-0800200c9a66"> | ||
539 | 521 | <File Id="main.exe" | ||
540 | 522 | Name="main.exe" | ||
541 | 523 | DiskId="1" | ||
542 | 524 | Source="build_results\u1sync\main.exe" | ||
543 | 525 | KeyPath="yes"/> | ||
544 | 526 | </Component> | ||
545 | 527 | <Component Id="OpenSSLCryptoComponent" | ||
546 | 528 | Guid="bb15b4b1-b1f5-11df-94e2-0800200c9a66"> | ||
547 | 529 | <File Id="OpenSSL.crypto.pyd" | ||
548 | 530 | Name="OpenSSL.crypto.pyd" | ||
549 | 531 | DiskId="1" | ||
550 | 532 | Source="build_results\u1sync\OpenSSL.crypto.pyd" | ||
551 | 533 | KeyPath="yes"/> | ||
552 | 534 | </Component> | ||
553 | 535 | <Component Id="OpenSSLRandComponent" | ||
554 | 536 | Guid="bb15b4b2-b1f5-11df-94e2-0800200c9a66"> | ||
555 | 537 | <File Id="OpenSSL.rand.pyd" | ||
556 | 538 | Name="OpenSSL.rand.pyd" | ||
557 | 539 | DiskId="1" | ||
558 | 540 | Source="build_results\u1sync\OpenSSL.rand.pyd" | ||
559 | 541 | KeyPath="yes"/> | ||
560 | 542 | </Component> | ||
561 | 543 | <Component Id="OpenSSLSSLComponent" | ||
562 | 544 | Guid="bb15b4b3-b1f5-11df-94e2-0800200c9a66"> | ||
563 | 545 | <File Id="OpenSSL.SSL.pyd" | ||
564 | 546 | Name="OpenSSL.SSL.pyd" | ||
565 | 547 | DiskId="1" | ||
566 | 548 | Source="build_results\u1sync\OpenSSL.SSL.pyd" | ||
567 | 549 | KeyPath="yes"/> | ||
568 | 550 | </Component> | ||
569 | 551 | <Component Id="PoyexpactComponent" | ||
570 | 552 | Guid="bb15b4b5-b1f5-11df-94e2-0800200c9a66"> | ||
571 | 553 | <File Id="pyexpat.pyd" | ||
572 | 554 | Name="pyexpat.pyd" | ||
573 | 555 | DiskId="1" | ||
574 | 556 | Source="build_results\u1sync\pyexpat.pyd" | ||
575 | 557 | KeyPath="yes"/> | ||
576 | 558 | </Component> | ||
577 | 559 | <Component Id="Python26Component" | ||
578 | 560 | Guid="bb15dbc0-b1f5-11df-94e2-0800200c9a66"> | ||
579 | 561 | <File Id="python26.dll" | ||
580 | 562 | Name="python26.dll" | ||
581 | 563 | DiskId="1" | ||
582 | 564 | Source="build_results\u1sync\python26.dll" | ||
583 | 565 | KeyPath="yes"/> | ||
584 | 566 | </Component> | ||
585 | 567 | <Component Id="PythonCom26Component" | ||
586 | 568 | Guid="bb15dbc1-b1f5-11df-94e2-0800200c9a66"> | ||
587 | 569 | <File Id="pythoncom26.dll" | ||
588 | 570 | Name="pythoncom26.dll" | ||
589 | 571 | DiskId="1" | ||
590 | 572 | Source="build_results\u1sync\pythoncom26.dll" | ||
591 | 573 | KeyPath="yes"/> | ||
592 | 574 | </Component> | ||
593 | 575 | <Component Id="PyWinTypeComponent" | ||
594 | 576 | Guid="bb15dbc2-b1f5-11df-94e2-0800200c9a66"> | ||
595 | 577 | <File Id="pywintypes26.dll" | ||
596 | 578 | Name="pywintypes26.dll" | ||
597 | 579 | DiskId="1" | ||
598 | 580 | Source="build_results\u1sync\pywintypes26.dll" | ||
599 | 581 | KeyPath="yes"/> | ||
600 | 582 | </Component> | ||
601 | 583 | <Component Id="SelectComponent" | ||
602 | 584 | Guid="bb15dbc3-b1f5-11df-94e2-0800200c9a66"> | ||
603 | 585 | <File Id="select.pyd" | ||
604 | 586 | Name="select.pyd" | ||
605 | 587 | DiskId="1" | ||
606 | 588 | Source="build_results\u1sync\select.pyd" | ||
607 | 589 | KeyPath="yes"/> | ||
608 | 590 | </Component> | ||
609 | 591 | <Component Id="Ssleay32Component" | ||
610 | 592 | Guid="bb15dbc4-b1f5-11df-94e2-0800200c9a66"> | ||
611 | 593 | <File Id="SSLEAY32.dll" | ||
612 | 594 | Name="SSLEAY32.dll" | ||
613 | 595 | DiskId="1" | ||
614 | 596 | Source="build_results\u1sync\SSLEAY32.dll" | ||
615 | 597 | KeyPath="yes"/> | ||
616 | 598 | </Component> | ||
617 | 599 | <Component Id="TwistedComponent" | ||
618 | 600 | Guid="bb15dbc5-b1f5-11df-94e2-0800200c9a66"> | ||
619 | 601 | <File Id="twisted.python._initgroups.pyd" | ||
620 | 602 | Name="twisted.python._initgroups.pyd" | ||
621 | 603 | DiskId="1" | ||
622 | 604 | Source="build_results\u1sync\twisted.python._initgroups.pyd" | ||
623 | 605 | KeyPath="yes"/> | ||
624 | 606 | </Component> | ||
625 | 607 | <Component Id="UnicodeDataComponent" | ||
626 | 608 | Guid="bb15dbc6-b1f5-11df-94e2-0800200c9a66"> | ||
627 | 609 | <File Id="unicodedata.pyd" | ||
628 | 610 | Name="unicodedata.pyd" | ||
629 | 611 | DiskId="1" | ||
630 | 612 | Source="build_results\u1sync\unicodedata.pyd" | ||
631 | 613 | KeyPath="yes"/> | ||
632 | 614 | </Component> | ||
633 | 615 | <Component Id="W9xpopenComponent" | ||
634 | 616 | Guid="bb15dbc7-b1f5-11df-94e2-0800200c9a66"> | ||
635 | 617 | <File Id="w9xpopen.exe" | ||
636 | 618 | Name="w9xpopen.exe" | ||
637 | 619 | DiskId="1" | ||
638 | 620 | Source="build_results\u1sync\w9xpopen.exe" | ||
639 | 621 | KeyPath="yes"/> | ||
640 | 622 | </Component> | ||
641 | 623 | <Component Id="Win32ApiComponent" | ||
642 | 624 | Guid="bb15dbc8-b1f5-11df-94e2-0800200c9a66"> | ||
643 | 625 | <File Id="win32api.pyd" | ||
644 | 626 | Name="win32api.pyd" | ||
645 | 627 | DiskId="1" | ||
646 | 628 | Source="build_results\u1sync\win32api.pyd" | ||
647 | 629 | KeyPath="yes"/> | ||
648 | 630 | </Component> | ||
649 | 631 | <Component Id="Win32EventComponent" | ||
650 | 632 | Guid="bb15dbca-b1f5-11df-94e2-0800200c9a66"> | ||
651 | 633 | <File Id="win32event.pyd" | ||
652 | 634 | Name="win32event.pyd" | ||
653 | 635 | DiskId="1" | ||
654 | 636 | Source="build_results\u1sync\win32event.pyd" | ||
655 | 637 | KeyPath="yes"/> | ||
656 | 638 | </Component> | ||
657 | 639 | <Component Id="Win32EventLogComponent" | ||
658 | 640 | Guid="bb15dbcb-b1f5-11df-94e2-0800200c9a66"> | ||
659 | 641 | <File Id="win32evtlog.pyd" | ||
660 | 642 | Name="win32evtlog.pyd" | ||
661 | 643 | DiskId="1" | ||
662 | 644 | Source="build_results\u1sync\win32evtlog.pyd" | ||
663 | 645 | KeyPath="yes"/> | ||
664 | 646 | </Component> | ||
665 | 647 | <Component Id="Win32FileComponent" | ||
666 | 648 | Guid="bb15dbcc-b1f5-11df-94e2-0800200c9a66"> | ||
667 | 649 | <File Id="win32file.pyd" | ||
668 | 650 | Name="win32file.pyd" | ||
669 | 651 | DiskId="1" | ||
670 | 652 | Source="build_results\u1sync\win32file.pyd" | ||
671 | 653 | KeyPath="yes"/> | ||
672 | 654 | </Component> | ||
673 | 655 | <Component Id="Win32PipeComponent" | ||
674 | 656 | Guid="bb15dbcd-b1f5-11df-94e2-0800200c9a66"> | ||
675 | 657 | <File Id="win32pipe.pyd" | ||
676 | 658 | Name="win32pipe.pyd" | ||
677 | 659 | DiskId="1" | ||
678 | 660 | Source="build_results\u1sync\win32pipe.pyd" | ||
679 | 661 | KeyPath="yes"/> | ||
680 | 662 | </Component> | ||
681 | 663 | <Component Id="Win32ProcessComponent" | ||
682 | 664 | Guid="bb15dbce-b1f5-11df-94e2-0800200c9a66"> | ||
683 | 665 | <File Id="win32process.pyd" | ||
684 | 666 | Name="win32process.pyd" | ||
685 | 667 | DiskId="1" | ||
686 | 668 | Source="build_results\u1sync\win32process.pyd" | ||
687 | 669 | KeyPath="yes"/> | ||
688 | 670 | </Component> | ||
689 | 671 | <Component Id="Win32SecurityComponent" | ||
690 | 672 | Guid="bb15dbcf-b1f5-11df-94e2-0800200c9a66"> | ||
691 | 673 | <File Id="win32security.pyd" | ||
692 | 674 | Name="win32security.pyd" | ||
693 | 675 | DiskId="1" | ||
694 | 676 | Source="build_results\u1sync\win32security.pyd" | ||
695 | 677 | KeyPath="yes"/> | ||
696 | 678 | </Component> | ||
697 | 679 | <Component Id="Win32UIComponent" | ||
698 | 680 | Guid="bb15dbd0-b1f5-11df-94e2-0800200c9a66"> | ||
699 | 681 | <File Id="win32ui.pyd" | ||
700 | 682 | Name="win32ui.pyd" | ||
701 | 683 | DiskId="1" | ||
702 | 684 | Source="build_results\u1sync\win32ui.pyd" | ||
703 | 685 | KeyPath="yes"/> | ||
704 | 686 | </Component> | ||
705 | 687 | <Component Id="Win32WnetComponent" | ||
706 | 688 | Guid="bb15dbd1-b1f5-11df-94e2-0800200c9a66"> | ||
707 | 689 | <File Id="win32wnet.pyd" | ||
708 | 690 | Name="win32wnet.pyd" | ||
709 | 691 | DiskId="1" | ||
710 | 692 | Source="build_results\u1sync\win32wnet.pyd" | ||
711 | 693 | KeyPath="yes"/> | ||
712 | 694 | </Component> | ||
713 | 695 | <Component Id="ZopeInterfaceComponent" | ||
714 | 696 | Guid="bb15dbd3-b1f5-11df-94e2-0800200c9a66"> | ||
715 | 697 | <File Id="zope.interface._zope_interface_coptimizations.pyd" | ||
716 | 698 | Name="zope.interface._zope_interface_coptimizations.pyd" | ||
717 | 699 | DiskId="1" | ||
718 | 700 | Source="build_results\u1sync\zope.interface._zope_interface_coptimizations.pyd" | ||
719 | 701 | KeyPath="yes"/> | ||
720 | 702 | </Component> | ||
721 | 703 | </Directory> | ||
722 | 704 | </Directory> | ||
723 | 705 | </Directory> | ||
724 | 706 | </Directory> | ||
725 | 707 | </Directory> | ||
726 | 708 | </Directory> | ||
727 | 709 | |||
728 | 710 | <!-- Provide the different features to be installed --> | ||
729 | 711 | <Feature Id="UbuntuOneCore" | ||
730 | 712 | Level="1" | ||
731 | 713 | Title="Ubuntu One" | ||
732 | 714 | Description="Ubuntu One is the personal cloud service that simplifies your digital life."> | ||
733 | 715 | <!-- common data --> | ||
734 | 716 | <ComponentRef Id="UbuntuOneGoDaddyCAComponent" /> | ||
735 | 717 | <ComponentRef Id="UbuntuOneGoDaddyClass2CAComponent" /> | ||
736 | 718 | <!-- Daemon components --> | ||
737 | 719 | <ComponentRef Id="DaemonCommonLibComponent" /> | ||
738 | 720 | <ComponentRef Id="DaemonCommonPdbComponent" /> | ||
739 | 721 | <ComponentRef Id="CommonLoggingComponent" /> | ||
740 | 722 | <ComponentRef Id="CommonLoggingLog4NetComponent" /> | ||
741 | 723 | <ComponentRef Id="DotUpdaterLib" /> | ||
742 | 724 | <ComponentRef Id="Log4NetComponent" /> | ||
743 | 725 | <ComponentRef Id="SpringAopComponent" /> | ||
744 | 726 | <ComponentRef Id="SpringAopConfigComponent" /> | ||
745 | 727 | <ComponentRef Id="SpringCoreComponent" /> | ||
746 | 728 | <ComponentRef Id="SpringCoreConfigComponent" /> | ||
747 | 729 | <ComponentRef Id="SpringServicesComponent" /> | ||
748 | 730 | <ComponentRef Id="SpringServicesConfigComponent" /> | ||
749 | 731 | <ComponentRef Id="DaemonProgramComponent" /> | ||
750 | 732 | <ComponentRef Id="DaemonProgramComponentConfig" /> | ||
751 | 733 | <ComponentRef Id="DaemonProgramPdbComponent" /> | ||
752 | 734 | <ComponentRef Id="DaemonConfigLog4Net" /> | ||
753 | 735 | <ComponentRef Id="ServiceModelBehavioursConfig" /> | ||
754 | 736 | <ComponentRef Id="ServiceModelBindingsConfig" /> | ||
755 | 737 | <ComponentRef Id="ServiceModelServicesConfig" /> | ||
756 | 738 | <ComponentRef Id="SpringDataComponent" /> | ||
757 | 739 | <ComponentRef Id="SymstemDataSQLiteComponent" /> | ||
758 | 740 | <!-- Client components --> | ||
759 | 741 | <ComponentRef Id="AvalonLib" /> | ||
760 | 742 | <ComponentRef Id="UbuntuOneClientLib" /> | ||
761 | 743 | <ComponentRef Id="UbuntuOneClientLibPdb" /> | ||
762 | 744 | <ComponentRef Id="UbuntuOneClientViewsLib" /> | ||
763 | 745 | <ComponentRef Id="UbuntuOneClientViewsLibPdb" /> | ||
764 | 746 | <ComponentRef Id="UbuntuOneCommonLib" /> | ||
765 | 747 | <ComponentRef Id="UbuntuOneCommonLibPdb" /> | ||
766 | 748 | <ComponentRef Id="CommonLoggingComponentClient" /> | ||
767 | 749 | <ComponentRef Id="CommonLoggingLog4NetComponentClient" /> | ||
768 | 750 | <ComponentRef Id="DotUpdaterLibClient" /> | ||
769 | 751 | <ComponentRef Id="Log4NetComponentClient" /> | ||
770 | 752 | <ComponentRef Id="SpringAopComponentClient" /> | ||
771 | 753 | <ComponentRef Id="SpringAopConfigComponentClient" /> | ||
772 | 754 | <ComponentRef Id="SpringCoreComponentClient" /> | ||
773 | 755 | <ComponentRef Id="SpringCoreConfigComponentClient" /> | ||
774 | 756 | <ComponentRef Id="UbuntuOneClient" /> | ||
775 | 757 | <ComponentRef Id="UbuntuOneClientConfig" /> | ||
776 | 758 | <ComponentRef Id="UbuntuOneClientPdb" /> | ||
777 | 759 | <ComponentRef Id="ClientConfigLog4Net" /> | ||
778 | 760 | <!-- Client auto start --> | ||
779 | 761 | <ComponentRef Id="UbuntuOneClietnAutostart" /> | ||
780 | 762 | <!-- U1Sync pacakge --> | ||
781 | 763 | <ComponentRef Id="CTypesComponent" /> | ||
782 | 764 | <ComponentRef Id="HLibComponent" /> | ||
783 | 765 | <ComponentRef Id="SocketComponent" /> | ||
784 | 766 | <ComponentRef Id="SSLComponent" /> | ||
785 | 767 | <ComponentRef Id="SysLoaderComponent" /> | ||
786 | 768 | <ComponentRef Id="Bz2Component" /> | ||
787 | 769 | <ComponentRef Id="Libeay32Component" /> | ||
788 | 770 | <ComponentRef Id="LibraryComponent" /> | ||
789 | 771 | <ComponentRef Id="U1SyncMainComponent" /> | ||
790 | 772 | <ComponentRef Id="OpenSSLCryptoComponent" /> | ||
791 | 773 | <ComponentRef Id="OpenSSLRandComponent" /> | ||
792 | 774 | <ComponentRef Id="OpenSSLSSLComponent" /> | ||
793 | 775 | <ComponentRef Id="PoyexpactComponent" /> | ||
794 | 776 | <ComponentRef Id="Python26Component" /> | ||
795 | 777 | <ComponentRef Id="PythonCom26Component" /> | ||
796 | 778 | <ComponentRef Id="PyWinTypeComponent" /> | ||
797 | 779 | <ComponentRef Id="SelectComponent" /> | ||
798 | 780 | <ComponentRef Id="Ssleay32Component" /> | ||
799 | 781 | <ComponentRef Id="TwistedComponent" /> | ||
800 | 782 | <ComponentRef Id="UnicodeDataComponent" /> | ||
801 | 783 | <ComponentRef Id="W9xpopenComponent" /> | ||
802 | 784 | <ComponentRef Id="Win32ApiComponent" /> | ||
803 | 785 | <ComponentRef Id="Win32EventComponent" /> | ||
804 | 786 | <ComponentRef Id="Win32EventLogComponent" /> | ||
805 | 787 | <ComponentRef Id="Win32FileComponent" /> | ||
806 | 788 | <ComponentRef Id="Win32PipeComponent" /> | ||
807 | 789 | <ComponentRef Id="Win32ProcessComponent" /> | ||
808 | 790 | <ComponentRef Id="Win32SecurityComponent" /> | ||
809 | 791 | <ComponentRef Id="Win32UIComponent" /> | ||
810 | 792 | <ComponentRef Id="Win32WnetComponent" /> | ||
811 | 793 | <ComponentRef Id="ZopeInterfaceComponent" /> | ||
812 | 794 | <ComponentRef Id="UbuntuSSO" /> | ||
813 | 795 | <ComponentRef Id="UbuntuSSOViews" /> | ||
814 | 796 | <ComponentRef Id="Newtonsoft.Json" /> | ||
815 | 797 | </Feature> | ||
816 | 798 | |||
817 | 799 | <UI Id="WixUI_Minimal_No_License"> | ||
818 | 800 | <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /> | ||
819 | 801 | <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /> | ||
820 | 802 | <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /> | ||
821 | 803 | |||
822 | 804 | <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /> | ||
823 | 805 | <Property Id="WixUI_Mode" Value="Minimal" /> | ||
824 | 806 | |||
825 | 807 | <DialogRef Id="ErrorDlg" /> | ||
826 | 808 | <DialogRef Id="FatalError" /> | ||
827 | 809 | <DialogRef Id="FilesInUse" /> | ||
828 | 810 | <DialogRef Id="MsiRMFilesInUse" /> | ||
829 | 811 | <DialogRef Id="PrepareDlg" /> | ||
830 | 812 | <DialogRef Id="ProgressDlg" /> | ||
831 | 813 | <DialogRef Id="ResumeDlg" /> | ||
832 | 814 | <DialogRef Id="UserExit" /> | ||
833 | 815 | <DialogRef Id="WelcomeDlg" /> | ||
834 | 816 | |||
835 | 817 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish> | ||
836 | 818 | |||
837 | 819 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish> | ||
838 | 820 | |||
839 | 821 | <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="PrepareDlg">1</Publish> | ||
840 | 822 | |||
841 | 823 | <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> | ||
842 | 824 | <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> | ||
843 | 825 | <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish> | ||
844 | 826 | |||
845 | 827 | <Property Id="ARPNOMODIFY" Value="1" /> | ||
846 | 828 | </UI> | ||
847 | 829 | |||
848 | 830 | <UIRef Id="WixUI_Common" /> | ||
849 | 831 | <UIRef Id="WixUI_Minimal_No_License"/> | ||
850 | 832 | <UIRef Id="WixUI_ErrorProgressText" /> | ||
851 | 833 | |||
852 | 834 | <!-- UI settings, to be defined by the design team --> | ||
853 | 835 | |||
854 | 836 | <!-- <WixVariable Id="WixUIBannerBmp" Value="path\banner.bmp" /> | ||
855 | 837 | <WixVariable Id="WixUIDialogBmp" Value="path\dialog.bmp" /> | ||
856 | 838 | <WixVariable Id="WixUIExclamationIco" Value="path\exclamation.ico" /> | ||
857 | 839 | <WixVariable Id="WixUIInfoIco" Value="path\information.ico" /> | ||
858 | 840 | <WixVariable Id="WixUINewIco" Value="path\new.ico" /> | ||
859 | 841 | <WixVariable Id="WixUIUpIco" Value="path\up.ico" /> --> | ||
860 | 842 | |||
861 | 843 | </Product> | ||
862 | 844 | </Wix> | ||
863 | 0 | \ No newline at end of file | 845 | \ No newline at end of file |
864 | 1 | 846 | ||
865 | === modified file 'main.build' | |||
866 | --- main.build 2010-09-30 09:36:24 +0000 | |||
867 | +++ main.build 2010-09-30 09:36:24 +0000 | |||
868 | @@ -16,7 +16,9 @@ | |||
869 | 16 | <property name="python_path" value="C:\Python26" /> | 16 | <property name="python_path" value="C:\Python26" /> |
870 | 17 | <!-- property that allows to pass the location to be used to update the package. --> | 17 | <!-- property that allows to pass the location to be used to update the package. --> |
871 | 18 | <property name="upload_path" value="http://s3.amazonaws.com/u1wintest/" /> | 18 | <property name="upload_path" value="http://s3.amazonaws.com/u1wintest/" /> |
873 | 19 | 19 | <!-- get the os in which we are building --> | |
874 | 20 | <property name="os" value="${operating-system::to-string(environment::get-operating-system())}" /> | ||
875 | 21 | |||
876 | 20 | <target name="clean" | 22 | <target name="clean" |
877 | 21 | description="Removes all the different results of the last comilation if they exist"> | 23 | description="Removes all the different results of the last comilation if they exist"> |
878 | 22 | <!-- delete all the different results from the previous build --> | 24 | <!-- delete all the different results from the previous build --> |
879 | @@ -282,21 +284,40 @@ | |||
880 | 282 | </fileset> | 284 | </fileset> |
881 | 283 | </copy> | 285 | </copy> |
882 | 284 | 286 | ||
898 | 285 | <!-- wix compiler --> | 287 | <if test="${string::contains(os, 'Microsoft Windows NT 6.1')}"> |
899 | 286 | <exec basedir="tools/Wix/bin" | 288 | <echo message="Building installer on Windows 7" /> |
900 | 287 | managed="true" | 289 | <!-- wix compiler --> |
901 | 288 | workingdir="install" | 290 | <exec basedir="tools/Wix/bin" |
902 | 289 | program="candle.exe" | 291 | managed="true" |
903 | 290 | commandline="-ext WixUIExtension -ext WixUtilExtension UbuntuOne.wxs"/> | 292 | workingdir="install" |
904 | 291 | 293 | program="candle.exe" | |
905 | 292 | <!-- wix linker --> | 294 | commandline="-ext WixUIExtension -ext WixUtilExtension UbuntuOne7.wxs"/> |
906 | 293 | <exec basedir="tools/Wix/bin" | 295 | |
907 | 294 | managed="true" | 296 | <!-- wix linker --> |
908 | 295 | workingdir="install" | 297 | <exec basedir="tools/Wix/bin" |
909 | 296 | program="light.exe" | 298 | managed="true" |
910 | 297 | commandline="-out UbuntuOne.msi -ext WixUIExtension -ext WixUtilExtension UbuntuOne.wixobj"/> | 299 | workingdir="install" |
911 | 298 | 300 | program="light.exe" | |
912 | 299 | 301 | commandline="-out UbuntuOne.msi -ext WixUIExtension -ext WixUtilExtension UbuntuOne7.wixobj"/> | |
913 | 302 | </if> | ||
914 | 303 | |||
915 | 304 | <if test="${string::contains(os, 'Microsoft Windows NT 5.1')}"> | ||
916 | 305 | <echo message="Building installer on Windows XP" /> | ||
917 | 306 | <!-- wix compiler --> | ||
918 | 307 | <exec basedir="tools/Wix/bin" | ||
919 | 308 | managed="true" | ||
920 | 309 | workingdir="install" | ||
921 | 310 | program="candle.exe" | ||
922 | 311 | commandline="-ext WixUIExtension -ext WixUtilExtension UbuntuOneXP.wxs"/> | ||
923 | 312 | |||
924 | 313 | <!-- wix linker --> | ||
925 | 314 | <exec basedir="tools/Wix/bin" | ||
926 | 315 | managed="true" | ||
927 | 316 | workingdir="install" | ||
928 | 317 | program="light.exe" | ||
929 | 318 | commandline="-out UbuntuOne.msi -ext WixUIExtension -ext WixUtilExtension UbuntuOneXP.wixobj"/> | ||
930 | 319 | </if> | ||
931 | 320 | |||
932 | 300 | </target> | 321 | </target> |
933 | 301 | 322 | ||
934 | 302 | <target name="bootstrapper" | 323 | <target name="bootstrapper" |
935 | 303 | 324 | ||
936 | === modified file 'src/Canonical.Ubuntu.SSO/DPAPIDataProtector.cs' | |||
937 | --- src/Canonical.Ubuntu.SSO/DPAPIDataProtector.cs 2010-09-30 09:36:24 +0000 | |||
938 | +++ src/Canonical.Ubuntu.SSO/DPAPIDataProtector.cs 2010-09-30 09:36:24 +0000 | |||
939 | @@ -20,6 +20,7 @@ | |||
940 | 20 | 20 | ||
941 | 21 | using System.Security.Cryptography; | 21 | using System.Security.Cryptography; |
942 | 22 | using System.Text; | 22 | using System.Text; |
943 | 23 | using log4net; | ||
944 | 23 | 24 | ||
945 | 24 | namespace Canonical.Ubuntu.SSO | 25 | namespace Canonical.Ubuntu.SSO |
946 | 25 | { | 26 | { |
947 | @@ -28,6 +29,40 @@ | |||
948 | 28 | /// </summary> | 29 | /// </summary> |
949 | 29 | public class DPAPIDataProtector : IDataProtector | 30 | public class DPAPIDataProtector : IDataProtector |
950 | 30 | { | 31 | { |
951 | 32 | #region Variables | ||
952 | 33 | |||
953 | 34 | private ILog _logger; | ||
954 | 35 | private readonly object _loggerLock = new object(); | ||
955 | 36 | |||
956 | 37 | #endregion | ||
957 | 38 | |||
958 | 39 | #region DI properties | ||
959 | 40 | |||
960 | 41 | /// <summary> | ||
961 | 42 | /// Gets and sets the logger that will be used to log the operation of the | ||
962 | 43 | /// class. | ||
963 | 44 | /// </summary> | ||
964 | 45 | public ILog Logger | ||
965 | 46 | { | ||
966 | 47 | get | ||
967 | 48 | { | ||
968 | 49 | if (_logger == null) | ||
969 | 50 | { | ||
970 | 51 | lock (_loggerLock) | ||
971 | 52 | { | ||
972 | 53 | _logger = LogManager.GetLogger(typeof(Keyring)); | ||
973 | 54 | } | ||
974 | 55 | } | ||
975 | 56 | return _logger; | ||
976 | 57 | } | ||
977 | 58 | set | ||
978 | 59 | { | ||
979 | 60 | _logger = value; | ||
980 | 61 | } | ||
981 | 62 | } | ||
982 | 63 | |||
983 | 64 | #endregion | ||
984 | 65 | |||
985 | 31 | #region Implementation of IDataProtector | 66 | #region Implementation of IDataProtector |
986 | 32 | 67 | ||
987 | 33 | /// <summary> | 68 | /// <summary> |
988 | @@ -39,6 +74,8 @@ | |||
989 | 39 | /// <returns>A string representing the encrypted data.</returns> | 74 | /// <returns>A string representing the encrypted data.</returns> |
990 | 40 | public byte[] Protect(string userData, byte[] optionalEntropy, DataProtectionScope scope) | 75 | public byte[] Protect(string userData, byte[] optionalEntropy, DataProtectionScope scope) |
991 | 41 | { | 76 | { |
992 | 77 | // we do not use [DebugLogged] because it will compromise the security of the secrets in the logs | ||
993 | 78 | Logger.DebugFormat("> ProtectData(\"****\", {0}, {1})", optionalEntropy, scope); | ||
994 | 42 | if(userData != null) | 79 | if(userData != null) |
995 | 43 | { | 80 | { |
996 | 44 | var userDataBytes = Encoding.UTF8.GetBytes(userData); | 81 | var userDataBytes = Encoding.UTF8.GetBytes(userData); |
997 | @@ -46,6 +83,7 @@ | |||
998 | 46 | 83 | ||
999 | 47 | return encryptedBytes; | 84 | return encryptedBytes; |
1000 | 48 | } | 85 | } |
1001 | 86 | Logger.Info("User data is NULL"); | ||
1002 | 49 | return null; | 87 | return null; |
1003 | 50 | } | 88 | } |
1004 | 51 | 89 | ||
1005 | @@ -58,11 +96,14 @@ | |||
1006 | 58 | /// <returns>A string representing the unprotected data.</returns> | 96 | /// <returns>A string representing the unprotected data.</returns> |
1007 | 59 | public string Unprotect(byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope) | 97 | public string Unprotect(byte[] encryptedData, byte[] optionalEntropy, DataProtectionScope scope) |
1008 | 60 | { | 98 | { |
1009 | 99 | // we do not use [DebugLogged] because it will compromise the security of the secrets in the logs | ||
1010 | 100 | Logger.DebugFormat("> Unprotect({0}, {1}, {2})", encryptedData, optionalEntropy, scope); | ||
1011 | 61 | if (encryptedData != null) | 101 | if (encryptedData != null) |
1012 | 62 | { | 102 | { |
1013 | 63 | var userDataBytes = ProtectedData.Unprotect(encryptedData, optionalEntropy, scope); | 103 | var userDataBytes = ProtectedData.Unprotect(encryptedData, optionalEntropy, scope); |
1014 | 64 | return Encoding.UTF8.GetString(userDataBytes); | 104 | return Encoding.UTF8.GetString(userDataBytes); |
1015 | 65 | } | 105 | } |
1016 | 106 | Logger.Info("Encrypted data is NULL"); | ||
1017 | 66 | return null; | 107 | return null; |
1018 | 67 | } | 108 | } |
1019 | 68 | 109 | ||
1020 | 69 | 110 | ||
1021 | === modified file 'src/Canonical.Ubuntu.SSO/Keyring.cs' | |||
1022 | --- src/Canonical.Ubuntu.SSO/Keyring.cs 2010-09-30 09:36:24 +0000 | |||
1023 | +++ src/Canonical.Ubuntu.SSO/Keyring.cs 2010-09-30 09:36:24 +0000 | |||
1024 | @@ -21,6 +21,7 @@ | |||
1025 | 21 | using System.Linq; | 21 | using System.Linq; |
1026 | 22 | using System.Security.Cryptography; | 22 | using System.Security.Cryptography; |
1027 | 23 | using System.Text; | 23 | using System.Text; |
1028 | 24 | using Canonical.UbuntuOne.Common.Aop; | ||
1029 | 24 | using Canonical.UbuntuOne.Common.Validation; | 25 | using Canonical.UbuntuOne.Common.Validation; |
1030 | 25 | using log4net; | 26 | using log4net; |
1031 | 26 | using Microsoft.Win32; | 27 | using Microsoft.Win32; |
1032 | @@ -39,7 +40,7 @@ | |||
1033 | 39 | private const int KeyringMaxNameLength = 255; | 40 | private const int KeyringMaxNameLength = 255; |
1034 | 40 | private ILog _logger; | 41 | private ILog _logger; |
1035 | 41 | private readonly object _loggerLock = new object(); | 42 | private readonly object _loggerLock = new object(); |
1037 | 42 | private bool _keyringsRootExists = false; | 43 | private bool _keyringsRootExists; |
1038 | 43 | 44 | ||
1039 | 44 | #endregion | 45 | #endregion |
1040 | 45 | 46 | ||
1041 | @@ -108,6 +109,12 @@ | |||
1042 | 108 | 109 | ||
1043 | 109 | #region Helpers | 110 | #region Helpers |
1044 | 110 | 111 | ||
1045 | 112 | /// <summary> | ||
1046 | 113 | /// Determines if the root used to store the keyrings does exist in the current user | ||
1047 | 114 | /// registry key. | ||
1048 | 115 | /// </summary> | ||
1049 | 116 | /// <returns>A boolean flag that states if the root of the keyrings exists.</returns> | ||
1050 | 117 | [DebugLogged] | ||
1051 | 111 | private bool KeyringsRootExists() | 118 | private bool KeyringsRootExists() |
1052 | 112 | { | 119 | { |
1053 | 113 | if (!_keyringsRootExists) | 120 | if (!_keyringsRootExists) |
1054 | @@ -133,6 +140,12 @@ | |||
1055 | 133 | return _keyringsRootExists; | 140 | return _keyringsRootExists; |
1056 | 134 | } | 141 | } |
1057 | 135 | 142 | ||
1058 | 143 | /// <summary> | ||
1059 | 144 | /// States if a keyring with the given name exists in the ssytem. | ||
1060 | 145 | /// </summary> | ||
1061 | 146 | /// <param name="keyring">The name of the keyring we are looking for.</param> | ||
1062 | 147 | /// <returns>A flag stating if the keyring does exist.</returns> | ||
1063 | 148 | [DebugLogged] | ||
1064 | 136 | private bool KeyringExist(string keyring) | 149 | private bool KeyringExist(string keyring) |
1065 | 137 | { | 150 | { |
1066 | 138 | // open the root keyring and then the subkeyring to ensure that the | 151 | // open the root keyring and then the subkeyring to ensure that the |
1067 | @@ -149,12 +162,22 @@ | |||
1068 | 149 | } | 162 | } |
1069 | 150 | } | 163 | } |
1070 | 151 | 164 | ||
1071 | 165 | /// <summary> | ||
1072 | 166 | /// Creates the root path used by the keyrings. | ||
1073 | 167 | /// </summary> | ||
1074 | 168 | /// <returns>The registry key that represents the root path of the keyrings.</returns> | ||
1075 | 169 | [DebugLogged] | ||
1076 | 152 | private IRegistryKey CreateKeyringRootPath() | 170 | private IRegistryKey CreateKeyringRootPath() |
1077 | 153 | { | 171 | { |
1078 | 154 | // create a key with the root path to be used | 172 | // create a key with the root path to be used |
1079 | 155 | return UserRegistry.CreateSubKey(RootPath); | 173 | return UserRegistry.CreateSubKey(RootPath); |
1080 | 156 | } | 174 | } |
1081 | 157 | 175 | ||
1082 | 176 | /// <summary> | ||
1083 | 177 | /// Creates a keyring with the given name. | ||
1084 | 178 | /// </summary> | ||
1085 | 179 | /// <param name="keyring">The registry key that is used to store the data in the keyring.</param> | ||
1086 | 180 | [DebugLogged] | ||
1087 | 158 | private void CreateKeyring(string keyring) | 181 | private void CreateKeyring(string keyring) |
1088 | 159 | { | 182 | { |
1089 | 160 | using(var rootKey = (KeyringsRootExists())? | 183 | using(var rootKey = (KeyringsRootExists())? |
1090 | @@ -165,6 +188,12 @@ | |||
1091 | 165 | } | 188 | } |
1092 | 166 | } | 189 | } |
1093 | 167 | 190 | ||
1094 | 191 | /// <summary> | ||
1095 | 192 | /// Allows to open a keyring with the given name. | ||
1096 | 193 | /// </summary> | ||
1097 | 194 | /// <param name="keyring">The name of the keyring to open.</param> | ||
1098 | 195 | /// <returns>A keyring key that is used to manage the keyring.</returns> | ||
1099 | 196 | [DebugLogged] | ||
1100 | 168 | private IRegistryKey OpenKeyring(string keyring) | 197 | private IRegistryKey OpenKeyring(string keyring) |
1101 | 169 | { | 198 | { |
1102 | 170 | using(var rootKey = UserRegistry.OpenSubKey(RootPath,RegistryKeyPermissionCheck.ReadWriteSubTree)) | 199 | using(var rootKey = UserRegistry.OpenSubKey(RootPath,RegistryKeyPermissionCheck.ReadWriteSubTree)) |
1103 | @@ -173,8 +202,17 @@ | |||
1104 | 173 | } | 202 | } |
1105 | 174 | } | 203 | } |
1106 | 175 | 204 | ||
1107 | 205 | /// <summary> | ||
1108 | 206 | /// Allows to save a value in the keyring with the given name. | ||
1109 | 207 | /// </summary> | ||
1110 | 208 | /// <param name="keyringName">The name of the keyring in which the secret will be stored.</param> | ||
1111 | 209 | /// <param name="applicationName">The name of the application that is storing the secret.</param> | ||
1112 | 210 | /// <param name="secret">The secret to be stored.</param> | ||
1113 | 176 | private void SaveValue(string keyringName, string applicationName, string secret) | 211 | private void SaveValue(string keyringName, string applicationName, string secret) |
1114 | 177 | { | 212 | { |
1115 | 213 | // we do not use the [DebugLogged] because we will be printing the secret and therefore | ||
1116 | 214 | // expose private data, instead with used the normal logging | ||
1117 | 215 | Logger.DebugFormat("> SaveValue({0}, {1}, \"******\")", keyringName, applicationName); | ||
1118 | 178 | using(var keyring = OpenKeyring(keyringName)) | 216 | using(var keyring = OpenKeyring(keyringName)) |
1119 | 179 | { | 217 | { |
1120 | 180 | var encryptedSecret = DataProtector.Protect(secret, Encoding.UTF8.GetBytes(Entropy), | 218 | var encryptedSecret = DataProtector.Protect(secret, Encoding.UTF8.GetBytes(Entropy), |
1121 | @@ -183,11 +221,21 @@ | |||
1122 | 183 | } | 221 | } |
1123 | 184 | } | 222 | } |
1124 | 185 | 223 | ||
1125 | 224 | /// <summary> | ||
1126 | 225 | /// Allows to retrieve a value from a given keyring. | ||
1127 | 226 | /// </summary> | ||
1128 | 227 | /// <param name="keyringName">The name of the keyring from which the value will be read.</param> | ||
1129 | 228 | /// <param name="applicationName">The anme of the application whose secret we want to read.</param> | ||
1130 | 229 | /// <returns>The secret that was read.</returns> | ||
1131 | 186 | private string GetValue(string keyringName, string applicationName) | 230 | private string GetValue(string keyringName, string applicationName) |
1132 | 187 | { | 231 | { |
1133 | 232 | // we do not user [DbugLogged] because it will be printing the secret and therefore | ||
1134 | 233 | // expose private data. insetead we use normal logging | ||
1135 | 234 | Logger.DebugFormat("> GetValue({0}, {1})", keyringName, applicationName); | ||
1136 | 188 | using (var keyring = OpenKeyring(keyringName)) | 235 | using (var keyring = OpenKeyring(keyringName)) |
1137 | 189 | { | 236 | { |
1138 | 190 | var secret = keyring.GetValue(applicationName) as byte[]; | 237 | var secret = keyring.GetValue(applicationName) as byte[]; |
1139 | 238 | Logger.Debug("< GetValue(\"******\")"); | ||
1140 | 191 | return DataProtector.Unprotect(secret, Encoding.UTF8.GetBytes(Entropy), DataProtectionScope.CurrentUser); | 239 | return DataProtector.Unprotect(secret, Encoding.UTF8.GetBytes(Entropy), DataProtectionScope.CurrentUser); |
1141 | 192 | } | 240 | } |
1142 | 193 | } | 241 | } |
1143 | @@ -203,6 +251,7 @@ | |||
1144 | 203 | /// <param name="keyringName">The name of the keyring where the secret will be stored.</param> | 251 | /// <param name="keyringName">The name of the keyring where the secret will be stored.</param> |
1145 | 204 | /// <param name="applicationName">The name of the application whose secret will be stored.</param> | 252 | /// <param name="applicationName">The name of the application whose secret will be stored.</param> |
1146 | 205 | /// <param name="secret">The secret to store in the keyring.</param> | 253 | /// <param name="secret">The secret to store in the keyring.</param> |
1147 | 254 | [DebugLogged] | ||
1148 | 206 | public void CreateSecret(string keyringName, string applicationName, string secret) | 255 | public void CreateSecret(string keyringName, string applicationName, string secret) |
1149 | 207 | { | 256 | { |
1150 | 208 | ValidateArgs.Begin() | 257 | ValidateArgs.Begin() |
1151 | @@ -214,6 +263,7 @@ | |||
1152 | 214 | 263 | ||
1153 | 215 | if (!KeyringExist(keyringName)) | 264 | if (!KeyringExist(keyringName)) |
1154 | 216 | { | 265 | { |
1155 | 266 | Logger.InfoFormat("Keyring '{0}' does not exist.", keyringName); | ||
1156 | 217 | CreateKeyring(keyringName); | 267 | CreateKeyring(keyringName); |
1157 | 218 | Logger.InfoFormat("Creating keyring with name {0}", keyringName); | 268 | Logger.InfoFormat("Creating keyring with name {0}", keyringName); |
1158 | 219 | } | 269 | } |
1159 | @@ -226,6 +276,7 @@ | |||
1160 | 226 | /// <param name="keyringName">The name of the keyring where the secret was stored.</param> | 276 | /// <param name="keyringName">The name of the keyring where the secret was stored.</param> |
1161 | 227 | /// <param name="applicationName">the name of the application that stored the secret.</param> | 277 | /// <param name="applicationName">the name of the application that stored the secret.</param> |
1162 | 228 | /// <returns>An empty string if the secret does not exist, the secret otherwhise.</returns> | 278 | /// <returns>An empty string if the secret does not exist, the secret otherwhise.</returns> |
1163 | 279 | [DebugLogged] | ||
1164 | 229 | public string GetSecretByName(string keyringName, string applicationName) | 280 | public string GetSecretByName(string keyringName, string applicationName) |
1165 | 230 | { | 281 | { |
1166 | 231 | ValidateArgs.Begin() | 282 | ValidateArgs.Begin() |
1167 | @@ -241,6 +292,7 @@ | |||
1168 | 241 | /// Gets a lists with all the names of the available keyrings. | 292 | /// Gets a lists with all the names of the available keyrings. |
1169 | 242 | /// </summary> | 293 | /// </summary> |
1170 | 243 | /// <returns>An enumerable with all the names of the different keyrings.</returns> | 294 | /// <returns>An enumerable with all the names of the different keyrings.</returns> |
1171 | 295 | [DebugLogged] | ||
1172 | 244 | public IEnumerable<string> GetKeyrings() | 296 | public IEnumerable<string> GetKeyrings() |
1173 | 245 | { | 297 | { |
1174 | 246 | if(KeyringsRootExists()) | 298 | if(KeyringsRootExists()) |
1175 | @@ -250,6 +302,7 @@ | |||
1176 | 250 | return keyringRoot.GetSubKeyNames(); | 302 | return keyringRoot.GetSubKeyNames(); |
1177 | 251 | } | 303 | } |
1178 | 252 | } | 304 | } |
1179 | 305 | Logger.Info("Keyrings root does not exist."); | ||
1180 | 253 | return new string[0]; | 306 | return new string[0]; |
1181 | 254 | } | 307 | } |
1182 | 255 | 308 | ||
1183 | @@ -258,6 +311,7 @@ | |||
1184 | 258 | /// </summary> | 311 | /// </summary> |
1185 | 259 | /// <param name="keyringName">The name of the keyring that is queried.</param> | 312 | /// <param name="keyringName">The name of the keyring that is queried.</param> |
1186 | 260 | /// <returns>An enumerable with all the applications in the keyring.</returns> | 313 | /// <returns>An enumerable with all the applications in the keyring.</returns> |
1187 | 314 | [DebugLogged] | ||
1188 | 261 | public IEnumerable<string> GetApplications(string keyringName) | 315 | public IEnumerable<string> GetApplications(string keyringName) |
1189 | 262 | { | 316 | { |
1190 | 263 | ValidateArgs.Begin() | 317 | ValidateArgs.Begin() |
1191 | @@ -274,6 +328,7 @@ | |||
1192 | 274 | } | 328 | } |
1193 | 275 | } | 329 | } |
1194 | 276 | } | 330 | } |
1195 | 331 | Logger.InfoFormat("Keyring '{0}' does not exist.", keyringName); | ||
1196 | 277 | return new string[0]; | 332 | return new string[0]; |
1197 | 278 | } | 333 | } |
1198 | 279 | 334 | ||
1199 | 280 | 335 | ||
1200 | === modified file 'src/Canonical.Ubuntu.SSO/RegistryKeyWrapper.cs' | |||
1201 | --- src/Canonical.Ubuntu.SSO/RegistryKeyWrapper.cs 2010-09-30 09:36:24 +0000 | |||
1202 | +++ src/Canonical.Ubuntu.SSO/RegistryKeyWrapper.cs 2010-09-30 09:36:24 +0000 | |||
1203 | @@ -19,6 +19,8 @@ | |||
1204 | 19 | */ | 19 | */ |
1205 | 20 | 20 | ||
1206 | 21 | using System; | 21 | using System; |
1207 | 22 | using Canonical.UbuntuOne.Common.Aop; | ||
1208 | 23 | using log4net; | ||
1209 | 22 | using Microsoft.Win32; | 24 | using Microsoft.Win32; |
1210 | 23 | 25 | ||
1211 | 24 | namespace Canonical.Ubuntu.SSO | 26 | namespace Canonical.Ubuntu.SSO |
1212 | @@ -32,6 +34,35 @@ | |||
1213 | 32 | #region Variables | 34 | #region Variables |
1214 | 33 | 35 | ||
1215 | 34 | private readonly RegistryKey _key; | 36 | private readonly RegistryKey _key; |
1216 | 37 | private ILog _logger; | ||
1217 | 38 | private readonly object _loggerLock = new object(); | ||
1218 | 39 | |||
1219 | 40 | #endregion | ||
1220 | 41 | |||
1221 | 42 | #region DI properties | ||
1222 | 43 | |||
1223 | 44 | /// <summary> | ||
1224 | 45 | /// Gets and sets the logger that will be used to log the operation of the | ||
1225 | 46 | /// class. | ||
1226 | 47 | /// </summary> | ||
1227 | 48 | public ILog Logger | ||
1228 | 49 | { | ||
1229 | 50 | get | ||
1230 | 51 | { | ||
1231 | 52 | if (_logger == null) | ||
1232 | 53 | { | ||
1233 | 54 | lock (_loggerLock) | ||
1234 | 55 | { | ||
1235 | 56 | _logger = LogManager.GetLogger(typeof(Keyring)); | ||
1236 | 57 | } | ||
1237 | 58 | } | ||
1238 | 59 | return _logger; | ||
1239 | 60 | } | ||
1240 | 61 | set | ||
1241 | 62 | { | ||
1242 | 63 | _logger = value; | ||
1243 | 64 | } | ||
1244 | 65 | } | ||
1245 | 35 | 66 | ||
1246 | 36 | #endregion | 67 | #endregion |
1247 | 37 | 68 | ||
1248 | @@ -112,6 +143,7 @@ | |||
1249 | 112 | /// </summary> | 143 | /// </summary> |
1250 | 113 | /// <param name="name">The name or path of the subkey to create or open. </param> | 144 | /// <param name="name">The name or path of the subkey to create or open. </param> |
1251 | 114 | /// <returns>A sub key to work with.</returns> | 145 | /// <returns>A sub key to work with.</returns> |
1252 | 146 | [DebugLogged] | ||
1253 | 115 | public IRegistryKey CreateSubKey(string name) | 147 | public IRegistryKey CreateSubKey(string name) |
1254 | 116 | { | 148 | { |
1255 | 117 | return new RegistryKeyWrapper(_key.CreateSubKey(name)); | 149 | return new RegistryKeyWrapper(_key.CreateSubKey(name)); |
1256 | @@ -125,6 +157,7 @@ | |||
1257 | 125 | /// <param name="permissionCheck">One of the RegistryKeyPermissionCheck values that | 157 | /// <param name="permissionCheck">One of the RegistryKeyPermissionCheck values that |
1258 | 126 | /// specifies whether the key is opened for read or read/write access.</param> | 158 | /// specifies whether the key is opened for read or read/write access.</param> |
1259 | 127 | /// <returns>A subkey to work with.</returns> | 159 | /// <returns>A subkey to work with.</returns> |
1260 | 160 | [DebugLogged] | ||
1261 | 128 | public IRegistryKey CreateSubKey(string subkey, RegistryKeyPermissionCheck permissionCheck) | 161 | public IRegistryKey CreateSubKey(string subkey, RegistryKeyPermissionCheck permissionCheck) |
1262 | 129 | { | 162 | { |
1263 | 130 | return new RegistryKeyWrapper(_key.CreateSubKey(subkey, permissionCheck)); | 163 | return new RegistryKeyWrapper(_key.CreateSubKey(subkey, permissionCheck)); |
1264 | @@ -134,6 +167,7 @@ | |||
1265 | 134 | /// Deletes the specified subkey. The string subkey is not case-sensitive. | 167 | /// Deletes the specified subkey. The string subkey is not case-sensitive. |
1266 | 135 | /// </summary> | 168 | /// </summary> |
1267 | 136 | /// <param name="subkey">The name of the subkey to delete. </param> | 169 | /// <param name="subkey">The name of the subkey to delete. </param> |
1268 | 170 | [DebugLogged] | ||
1269 | 137 | public void DeleteSubKey(string subkey) | 171 | public void DeleteSubKey(string subkey) |
1270 | 138 | { | 172 | { |
1271 | 139 | _key.DeleteSubKey(subkey); | 173 | _key.DeleteSubKey(subkey); |
1272 | @@ -143,6 +177,7 @@ | |||
1273 | 143 | /// Deletes the specified value from this key. | 177 | /// Deletes the specified value from this key. |
1274 | 144 | /// </summary> | 178 | /// </summary> |
1275 | 145 | /// <param name="name">The name of the value to delete.</param> | 179 | /// <param name="name">The name of the value to delete.</param> |
1276 | 180 | [DebugLogged] | ||
1277 | 146 | public void DeleteValue(string name) | 181 | public void DeleteValue(string name) |
1278 | 147 | { | 182 | { |
1279 | 148 | _key.DeleteValue(name); | 183 | _key.DeleteValue(name); |
1280 | @@ -152,6 +187,7 @@ | |||
1281 | 152 | /// Writes all the attributes of the specified open registry | 187 | /// Writes all the attributes of the specified open registry |
1282 | 153 | /// key into the registry. | 188 | /// key into the registry. |
1283 | 154 | /// </summary> | 189 | /// </summary> |
1284 | 190 | [DebugLogged] | ||
1285 | 155 | public void Flush() | 191 | public void Flush() |
1286 | 156 | { | 192 | { |
1287 | 157 | _key.Flush(); | 193 | _key.Flush(); |
1288 | @@ -162,6 +198,7 @@ | |||
1289 | 162 | /// </summary> | 198 | /// </summary> |
1290 | 163 | /// <returns>An array of strings that contains the names of the | 199 | /// <returns>An array of strings that contains the names of the |
1291 | 164 | /// subkeys for the current key.</returns> | 200 | /// subkeys for the current key.</returns> |
1292 | 201 | [DebugLogged] | ||
1293 | 165 | public string[] GetSubKeyNames() | 202 | public string[] GetSubKeyNames() |
1294 | 166 | { | 203 | { |
1295 | 167 | return _key.GetSubKeyNames(); | 204 | return _key.GetSubKeyNames(); |
1296 | @@ -175,6 +212,8 @@ | |||
1297 | 175 | /// <returns>The value associated with name, or null if name is not found.</returns> | 212 | /// <returns>The value associated with name, or null if name is not found.</returns> |
1298 | 176 | public object GetValue(string name) | 213 | public object GetValue(string name) |
1299 | 177 | { | 214 | { |
1300 | 215 | // use norml logging because otherwhise it will expose user data | ||
1301 | 216 | Logger.DebugFormat("> GetValue({0})", name); | ||
1302 | 178 | return _key.GetValue(name); | 217 | return _key.GetValue(name); |
1303 | 179 | } | 218 | } |
1304 | 180 | 219 | ||
1305 | @@ -188,6 +227,7 @@ | |||
1306 | 188 | /// environment variables left unexpanded, or defaultValue if name is not found.</returns> | 227 | /// environment variables left unexpanded, or defaultValue if name is not found.</returns> |
1307 | 189 | public object GetValue(string name, object defaultValue) | 228 | public object GetValue(string name, object defaultValue) |
1308 | 190 | { | 229 | { |
1309 | 230 | Logger.DebugFormat("> GetValue({0}, {1})", name, defaultValue); | ||
1310 | 191 | return _key.GetValue(name, defaultValue); | 231 | return _key.GetValue(name, defaultValue); |
1311 | 192 | } | 232 | } |
1312 | 193 | 233 | ||
1313 | @@ -197,6 +237,7 @@ | |||
1314 | 197 | /// <param name="name">The name of the value whose registry data type is to be retrieved. </param> | 237 | /// <param name="name">The name of the value whose registry data type is to be retrieved. </param> |
1315 | 198 | /// <returns>A RegistryValueKind value representing the registry | 238 | /// <returns>A RegistryValueKind value representing the registry |
1316 | 199 | /// data type of the value associated with name.</returns> | 239 | /// data type of the value associated with name.</returns> |
1317 | 240 | [DebugLogged] | ||
1318 | 200 | public RegistryValueKind GetValueKind(string name) | 241 | public RegistryValueKind GetValueKind(string name) |
1319 | 201 | { | 242 | { |
1320 | 202 | return _key.GetValueKind(name); | 243 | return _key.GetValueKind(name); |
1321 | @@ -208,6 +249,7 @@ | |||
1322 | 208 | /// </summary> | 249 | /// </summary> |
1323 | 209 | /// <returns>An array of strings that contains | 250 | /// <returns>An array of strings that contains |
1324 | 210 | /// the value names for the current key.</returns> | 251 | /// the value names for the current key.</returns> |
1325 | 252 | [DebugLogged] | ||
1326 | 211 | public string[] GetValueNames() | 253 | public string[] GetValueNames() |
1327 | 212 | { | 254 | { |
1328 | 213 | return _key.GetValueNames(); | 255 | return _key.GetValueNames(); |
1329 | @@ -218,6 +260,7 @@ | |||
1330 | 218 | /// </summary> | 260 | /// </summary> |
1331 | 219 | /// <param name="name">The name or path of the subkey to open read-only. </param> | 261 | /// <param name="name">The name or path of the subkey to open read-only. </param> |
1332 | 220 | /// <returns>The subkey requested, or null if the operation failed.</returns> | 262 | /// <returns>The subkey requested, or null if the operation failed.</returns> |
1333 | 263 | [DebugLogged] | ||
1334 | 221 | public IRegistryKey OpenSubKey(string name) | 264 | public IRegistryKey OpenSubKey(string name) |
1335 | 222 | { | 265 | { |
1336 | 223 | return new RegistryKeyWrapper(_key.OpenSubKey(name)); | 266 | return new RegistryKeyWrapper(_key.OpenSubKey(name)); |
1337 | @@ -230,6 +273,7 @@ | |||
1338 | 230 | /// <param name="permissionCheck">One of the RegistryKeyPermissionCheck values | 273 | /// <param name="permissionCheck">One of the RegistryKeyPermissionCheck values |
1339 | 231 | /// that specifies whether the key is opened for read or read/write access.</param> | 274 | /// that specifies whether the key is opened for read or read/write access.</param> |
1340 | 232 | /// <returns></returns> | 275 | /// <returns></returns> |
1341 | 276 | [DebugLogged] | ||
1342 | 233 | public IRegistryKey OpenSubKey(string name, RegistryKeyPermissionCheck permissionCheck) | 277 | public IRegistryKey OpenSubKey(string name, RegistryKeyPermissionCheck permissionCheck) |
1343 | 234 | { | 278 | { |
1344 | 235 | return new RegistryKeyWrapper(_key.OpenSubKey(name, permissionCheck)); | 279 | return new RegistryKeyWrapper(_key.OpenSubKey(name, permissionCheck)); |
1345 | @@ -242,6 +286,7 @@ | |||
1346 | 242 | /// <param name="value">The data to be stored.</param> | 286 | /// <param name="value">The data to be stored.</param> |
1347 | 243 | public void SetValue(string name, object value) | 287 | public void SetValue(string name, object value) |
1348 | 244 | { | 288 | { |
1349 | 289 | Logger.DebugFormat("> SetValue({0}, \"******\")", name); | ||
1350 | 245 | _key.SetValue(name, value); | 290 | _key.SetValue(name, value); |
1351 | 246 | } | 291 | } |
1352 | 247 | 292 | ||
1353 | @@ -253,6 +298,7 @@ | |||
1354 | 253 | /// <param name="valueKind">The registry data type to use when storing the data</param> | 298 | /// <param name="valueKind">The registry data type to use when storing the data</param> |
1355 | 254 | public void SetValue(string name, object value, RegistryValueKind valueKind) | 299 | public void SetValue(string name, object value, RegistryValueKind valueKind) |
1356 | 255 | { | 300 | { |
1357 | 301 | Logger.DebugFormat("> SetValue({0}, \"******\", {1})", name, valueKind); | ||
1358 | 256 | _key.SetValue(name, value, valueKind); | 302 | _key.SetValue(name, value, valueKind); |
1359 | 257 | } | 303 | } |
1360 | 258 | 304 | ||
1361 | 259 | 305 | ||
1362 | === modified file 'src/Canonical.Ubuntu.SSO/SSOCredentialsProvider.cs' | |||
1363 | --- src/Canonical.Ubuntu.SSO/SSOCredentialsProvider.cs 2010-09-30 09:36:24 +0000 | |||
1364 | +++ src/Canonical.Ubuntu.SSO/SSOCredentialsProvider.cs 2010-09-30 09:36:24 +0000 | |||
1365 | @@ -19,6 +19,7 @@ | |||
1366 | 19 | */ | 19 | */ |
1367 | 20 | using System; | 20 | using System; |
1368 | 21 | using System.Collections.Generic; | 21 | using System.Collections.Generic; |
1369 | 22 | using Canonical.UbuntuOne.Common.Aop; | ||
1370 | 22 | 23 | ||
1371 | 23 | namespace Canonical.Ubuntu.SSO | 24 | namespace Canonical.Ubuntu.SSO |
1372 | 24 | { | 25 | { |
1373 | @@ -52,6 +53,7 @@ | |||
1374 | 52 | /// The result of this action will be notified through the use of the event handlers | 53 | /// The result of this action will be notified through the use of the event handlers |
1375 | 53 | /// due to the fact that the call to the sso webservice is async. | 54 | /// due to the fact that the call to the sso webservice is async. |
1376 | 54 | /// </summary> | 55 | /// </summary> |
1377 | 56 | [DebugLogged] | ||
1378 | 55 | public void LoginToGetCredentials() | 57 | public void LoginToGetCredentials() |
1379 | 56 | { | 58 | { |
1380 | 57 | // try to get the credentials from the keyring | 59 | // try to get the credentials from the keyring |
1381 | @@ -68,6 +70,7 @@ | |||
1382 | 68 | /// The result of this action will be notified through the use of the event handlers | 70 | /// The result of this action will be notified through the use of the event handlers |
1383 | 69 | /// due to the fact that the call to the sso webservice is async. | 71 | /// due to the fact that the call to the sso webservice is async. |
1384 | 70 | /// </summary> | 72 | /// </summary> |
1385 | 73 | [DebugLogged] | ||
1386 | 71 | public void LoginOrRegisterToGetCredentials() | 74 | public void LoginOrRegisterToGetCredentials() |
1387 | 72 | { | 75 | { |
1388 | 73 | } | 76 | } |
1389 | 74 | 77 | ||
1390 | === modified file 'src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs' | |||
1391 | --- src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs 2010-09-30 09:36:24 +0000 | |||
1392 | +++ src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs 2010-09-30 09:36:24 +0000 | |||
1393 | @@ -19,8 +19,6 @@ | |||
1394 | 19 | using System.Diagnostics; | 19 | using System.Diagnostics; |
1395 | 20 | using System.IO; | 20 | using System.IO; |
1396 | 21 | using System.Net; | 21 | using System.Net; |
1397 | 22 | using System.Text; | ||
1398 | 23 | using System.Text.RegularExpressions; | ||
1399 | 24 | using System.Web; | 22 | using System.Web; |
1400 | 25 | using System.Windows; | 23 | using System.Windows; |
1401 | 26 | using Canonical.Ubuntu.SSO; | 24 | using Canonical.Ubuntu.SSO; |
1402 | 27 | 25 | ||
1403 | === modified file 'src/Canonical.UbuntuOne.ProcessDispatcher/objects.xml' | |||
1404 | --- src/Canonical.UbuntuOne.ProcessDispatcher/objects.xml 2010-07-26 15:56:11 +0000 | |||
1405 | +++ src/Canonical.UbuntuOne.ProcessDispatcher/objects.xml 2010-09-30 09:36:24 +0000 | |||
1406 | @@ -1,9 +1,9 @@ | |||
1407 | 1 | <?xml version="1.0" encoding="utf-8" ?> | 1 | <?xml version="1.0" encoding="utf-8" ?> |
1408 | 2 | <objects xmlns="http://www.springframework.net"> | 2 | <objects xmlns="http://www.springframework.net"> |
1409 | 3 | 3 | ||
1413 | 4 | <!-- ###################################################################################################### --> | 4 | <!-- ####################################################################################################### --> |
1414 | 5 | <!-- Set up the aop code that will inject debugging logs when the solution has been deply in alpha and beta --> | 5 | <!-- Set up the aop code that will inject debugging logs when the solution has been deploy in alpha and beta --> |
1415 | 6 | <!-- ###################################################################################################### --> | 6 | <!-- ####################################################################################################### --> |
1416 | 7 | 7 | ||
1417 | 8 | <!-- Pointcut used for debugging method calls --> | 8 | <!-- Pointcut used for debugging method calls --> |
1418 | 9 | 9 | ||
1419 | 10 | 10 | ||
1420 | === modified file 'src/UbuntuOneClient.Tests/ProgramFixture.cs' | |||
1421 | --- src/UbuntuOneClient.Tests/ProgramFixture.cs 2010-08-10 10:04:31 +0000 | |||
1422 | +++ src/UbuntuOneClient.Tests/ProgramFixture.cs 2010-09-30 09:36:24 +0000 | |||
1423 | @@ -125,6 +125,7 @@ | |||
1424 | 125 | [Test] | 125 | [Test] |
1425 | 126 | public void StartApplicationWithCheckUpdatesExceptionTest() | 126 | public void StartApplicationWithCheckUpdatesExceptionTest() |
1426 | 127 | { | 127 | { |
1427 | 128 | Assert.Ignore("RhinoMocks does not support multithreaded tests and therefore this test will not be reliable"); | ||
1428 | 128 | using (_mocks.Record()) | 129 | using (_mocks.Record()) |
1429 | 129 | { | 130 | { |
1430 | 130 | _app.ShutdownMode = ShutdownMode.OnExplicitShutdown; | 131 | _app.ShutdownMode = ShutdownMode.OnExplicitShutdown; |
1431 | 131 | 132 | ||
1432 | === modified file 'src/UbuntuOneClient/objects.xml' | |||
1433 | --- src/UbuntuOneClient/objects.xml 2010-08-19 16:54:57 +0000 | |||
1434 | +++ src/UbuntuOneClient/objects.xml 2010-09-30 09:36:24 +0000 | |||
1435 | @@ -1,6 +1,45 @@ | |||
1436 | 1 | <?xml version="1.0" encoding="utf-8" ?> | 1 | <?xml version="1.0" encoding="utf-8" ?> |
1437 | 2 | <objects xmlns="http://www.springframework.net"> | 2 | <objects xmlns="http://www.springframework.net"> |
1439 | 3 | <!-- Define window that will be used as the start point of the app --> | 3 | |
1440 | 4 | <!-- ####################################################################################################### --> | ||
1441 | 5 | <!-- Set up the aop code that will inject debugging logs when the solution has been deploy in alpha and beta --> | ||
1442 | 6 | <!-- ####################################################################################################### --> | ||
1443 | 7 | |||
1444 | 8 | <!-- Pointcut used for debugging method calls --> | ||
1445 | 9 | |||
1446 | 10 | <!-- Provides logging before a method has been called --> | ||
1447 | 11 | <object id="LogBeforeCall" | ||
1448 | 12 | type="Spring.Aop.Support.AttributeMatchMethodPointcutAdvisor, Spring.Aop" > | ||
1449 | 13 | <property name="advice"> | ||
1450 | 14 | <object type="Canonical.UbuntuOne.Common.Aop.DebugLogBeforeCallInterceptor, Canonical.UbuntuOne.Common" /> | ||
1451 | 15 | </property> | ||
1452 | 16 | <property name="attribute" | ||
1453 | 17 | value="Canonical.UbuntuOne.Common.Aop.DebugLoggedAttribute, Canonical.UbuntuOne.Common" /> | ||
1454 | 18 | </object> | ||
1455 | 19 | |||
1456 | 20 | <!-- Provides logging fater a method has been called --> | ||
1457 | 21 | <object id="LofAfterCall" | ||
1458 | 22 | type="Spring.Aop.Support.AttributeMatchMethodPointcutAdvisor, Spring.Aop" > | ||
1459 | 23 | <property name="advice"> | ||
1460 | 24 | <object type="Canonical.UbuntuOne.Common.Aop.DebugLogAfterCallInterceptor, Canonical.UbuntuOne.Common" /> | ||
1461 | 25 | </property> | ||
1462 | 26 | <property name="attribute" | ||
1463 | 27 | value="Canonical.UbuntuOne.Common.Aop.DebugLoggedAttribute, Canonical.UbuntuOne.Common" /> | ||
1464 | 28 | </object> | ||
1465 | 29 | |||
1466 | 30 | <object id="LofAfterThrow" | ||
1467 | 31 | type="Spring.Aop.Support.AttributeMatchMethodPointcutAdvisor, Spring.Aop" > | ||
1468 | 32 | <property name="advice"> | ||
1469 | 33 | <object type="Canonical.UbuntuOne.Common.Aop.DebugLogAfterThrowInterceptor, Canonical.UbuntuOne.Common" /> | ||
1470 | 34 | </property> | ||
1471 | 35 | <property name="attribute" | ||
1472 | 36 | value="Canonical.UbuntuOne.Common.Aop.DebugLoggedAttribute, Canonical.UbuntuOne.Common" /> | ||
1473 | 37 | </object> | ||
1474 | 38 | |||
1475 | 39 | <!-- ############################################################### --> | ||
1476 | 40 | <!-- Define window that will be used as the start point of the app --> | ||
1477 | 41 | <!-- ############################################################### --> | ||
1478 | 42 | |||
1479 | 4 | <object id="Updater" | 43 | <object id="Updater" |
1480 | 5 | type="Canonical.UbuntuOne.Common.Update.Updater, Canonical.UbuntuOne.Common" | 44 | type="Canonical.UbuntuOne.Common.Update.Updater, Canonical.UbuntuOne.Common" |
1481 | 6 | autowire="autodetect"> | 45 | autowire="autodetect"> |
1482 | 7 | 46 | ||
1483 | === added file 'utils/BaseDirectory.py' | |||
1484 | --- utils/BaseDirectory.py 1970-01-01 00:00:00 +0000 | |||
1485 | +++ utils/BaseDirectory.py 2010-09-30 09:36:24 +0000 | |||
1486 | @@ -0,0 +1,173 @@ | |||
1487 | 1 | """ | ||
1488 | 2 | This module is based on a rox module (LGPL): | ||
1489 | 3 | |||
1490 | 4 | http://cvs.sourceforge.net/viewcvs.py/rox/ROX-Lib2/python/rox/basedir.py?rev=1.9&view=log | ||
1491 | 5 | |||
1492 | 6 | The freedesktop.org Base Directory specification provides a way for | ||
1493 | 7 | applications to locate shared data and configuration: | ||
1494 | 8 | |||
1495 | 9 | http://standards.freedesktop.org/basedir-spec/ | ||
1496 | 10 | |||
1497 | 11 | (based on version 0.6) | ||
1498 | 12 | |||
1499 | 13 | This module can be used to load and save from and to these directories. | ||
1500 | 14 | |||
1501 | 15 | Typical usage: | ||
1502 | 16 | |||
1503 | 17 | from rox import basedir | ||
1504 | 18 | |||
1505 | 19 | for dir in basedir.load_config_paths('mydomain.org', 'MyProg', 'Options'): | ||
1506 | 20 | print "Load settings from", dir | ||
1507 | 21 | |||
1508 | 22 | dir = basedir.save_config_path('mydomain.org', 'MyProg') | ||
1509 | 23 | print >>file(os.path.join(dir, 'Options'), 'w'), "foo=2" | ||
1510 | 24 | |||
1511 | 25 | Note: see the rox.Options module for a higher-level API for managing options. | ||
1512 | 26 | """ | ||
1513 | 27 | |||
1514 | 28 | from __future__ import generators | ||
1515 | 29 | import os | ||
1516 | 30 | import sys | ||
1517 | 31 | |||
1518 | 32 | # we must chech which os we are using to ensure that the correct | ||
1519 | 33 | # paths are set | ||
1520 | 34 | if sys.platform == "win32": | ||
1521 | 35 | |||
1522 | 36 | def get_special_folders(): | ||
1523 | 37 | |||
1524 | 38 | # Routine to grab all the Windows Shell Folder locations from the registry. If successful, returns dictionary | ||
1525 | 39 | # of shell folder locations indexed on Windows keyword for each; otherwise, returns an empty dictionary. | ||
1526 | 40 | import _winreg | ||
1527 | 41 | special_folders = {} | ||
1528 | 42 | |||
1529 | 43 | # First open the registry hive | ||
1530 | 44 | try: | ||
1531 | 45 | Hive = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER) | ||
1532 | 46 | except WindowsError: | ||
1533 | 47 | print "Can't connect to registry hive HKEY_CURRENT_USER." | ||
1534 | 48 | return special_folders | ||
1535 | 49 | |||
1536 | 50 | # Then open the registry key where Windows stores the Shell Folder locations | ||
1537 | 51 | try: | ||
1538 | 52 | Key = _winreg.OpenKey(Hive, "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders") | ||
1539 | 53 | except WindowsError: | ||
1540 | 54 | print "Can't open registry key Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders." | ||
1541 | 55 | _winreg.CloseKey(Hive) | ||
1542 | 56 | return special_folders | ||
1543 | 57 | |||
1544 | 58 | # Nothing failed above, so enumerate through all the Shell Folder values and return in a dictionary | ||
1545 | 59 | # This relies on error at end of | ||
1546 | 60 | try: | ||
1547 | 61 | #i = 0 | ||
1548 | 62 | #while 1: | ||
1549 | 63 | for i in range(0, _winreg.QueryInfoKey(Key)[1]): | ||
1550 | 64 | name, value, val_type = _winreg.EnumValue(Key, i) | ||
1551 | 65 | special_folders[name] = value | ||
1552 | 66 | i += 1 | ||
1553 | 67 | _winreg.CloseKey(Key) # Only use with for loop | ||
1554 | 68 | _winreg.CloseKey(Hive) # Only use with for loop | ||
1555 | 69 | return special_folders # Only use with for loop | ||
1556 | 70 | except WindowsError: | ||
1557 | 71 | # In case of failure before read completed, don't return partial results | ||
1558 | 72 | _winreg.CloseKey(Key) | ||
1559 | 73 | _winreg.CloseKey(Hive) | ||
1560 | 74 | special_folders = {} | ||
1561 | 75 | |||
1562 | 76 | special_folders = get_special_folders() | ||
1563 | 77 | |||
1564 | 78 | home_path = special_folders['Personal'] | ||
1565 | 79 | app_local_data_path = special_folders['Local AppData'] | ||
1566 | 80 | app_global_data_path = special_folders['AppData'] | ||
1567 | 81 | app_roaming_data_path = special_folders['Cache'] | ||
1568 | 82 | |||
1569 | 83 | # use the non romain app data | ||
1570 | 84 | xdg_data_home = os.environ.get('XDG_DATA_HOME', | ||
1571 | 85 | os.path.join(app_local_data_path, 'xdg')) | ||
1572 | 86 | |||
1573 | 87 | # we will use ; as the spearator because is the char used | ||
1574 | 88 | # in the windows env variables | ||
1575 | 89 | xdg_data_dirs = os.environ.get('XDG_DATA_DIRS', | ||
1576 | 90 | '{0};{1};{2}'.format(app_local_data_path, | ||
1577 | 91 | app_global_data_path, app_roaming_data_path)).split(';') | ||
1578 | 92 | |||
1579 | 93 | # we will return the roaming data wich is as close as we get in windows | ||
1580 | 94 | # regarding caching. | ||
1581 | 95 | xdg_cache_home = os.environ.get('XDG_CACHE_HOME', | ||
1582 | 96 | app_roaming_data_path) | ||
1583 | 97 | |||
1584 | 98 | # point to the not roaming app data for the user | ||
1585 | 99 | xdg_config_home = os.environ.get('XDG_CONFIG_HOME', | ||
1586 | 100 | app_local_data_path) | ||
1587 | 101 | |||
1588 | 102 | xdg_config_dirs = [xdg_config_home] + \ | ||
1589 | 103 | os.environ.get('XDG_CONFIG_DIRS', | ||
1590 | 104 | os.path.join(app_global_data_path, 'xdg')).split(':') | ||
1591 | 105 | |||
1592 | 106 | else: | ||
1593 | 107 | _home = os.environ.get('HOME', '/') | ||
1594 | 108 | xdg_data_home = os.environ.get('XDG_DATA_HOME', | ||
1595 | 109 | os.path.join(_home, '.local', 'share')) | ||
1596 | 110 | |||
1597 | 111 | xdg_data_dirs = [xdg_data_home] + \ | ||
1598 | 112 | os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':') | ||
1599 | 113 | |||
1600 | 114 | xdg_config_home = os.environ.get('XDG_CONFIG_HOME', | ||
1601 | 115 | os.path.join(_home, '.config')) | ||
1602 | 116 | |||
1603 | 117 | xdg_config_dirs = [xdg_config_home] + \ | ||
1604 | 118 | os.environ.get('XDG_CONFIG_DIRS', '/etc/xdg').split(':') | ||
1605 | 119 | |||
1606 | 120 | xdg_cache_home = os.environ.get('XDG_CACHE_HOME', | ||
1607 | 121 | os.path.join(_home, '.cache')) | ||
1608 | 122 | |||
1609 | 123 | xdg_data_dirs = filter(lambda x: x, xdg_data_dirs) | ||
1610 | 124 | xdg_config_dirs = filter(lambda x: x, xdg_config_dirs) | ||
1611 | 125 | |||
1612 | 126 | def save_config_path(*resource): | ||
1613 | 127 | """Ensure $XDG_CONFIG_HOME/<resource>/ exists, and return its path. | ||
1614 | 128 | 'resource' should normally be the name of your application. Use this | ||
1615 | 129 | when SAVING configuration settings. Use the xdg_config_dirs variable | ||
1616 | 130 | for loading.""" | ||
1617 | 131 | resource = os.path.join(*resource) | ||
1618 | 132 | assert not resource.startswith('/') | ||
1619 | 133 | path = os.path.join(xdg_config_home, resource) | ||
1620 | 134 | if not os.path.isdir(path): | ||
1621 | 135 | os.makedirs(path, 0700) | ||
1622 | 136 | return path | ||
1623 | 137 | |||
1624 | 138 | def save_data_path(*resource): | ||
1625 | 139 | """Ensure $XDG_DATA_HOME/<resource>/ exists, and return its path. | ||
1626 | 140 | 'resource' is the name of some shared resource. Use this when updating | ||
1627 | 141 | a shared (between programs) database. Use the xdg_data_dirs variable | ||
1628 | 142 | for loading.""" | ||
1629 | 143 | resource = os.path.join(*resource) | ||
1630 | 144 | assert not resource.startswith('/') | ||
1631 | 145 | path = os.path.join(xdg_data_home, resource) | ||
1632 | 146 | if not os.path.isdir(path): | ||
1633 | 147 | os.makedirs(path) | ||
1634 | 148 | return path | ||
1635 | 149 | |||
1636 | 150 | def load_config_paths(*resource): | ||
1637 | 151 | """Returns an iterator which gives each directory named 'resource' in the | ||
1638 | 152 | configuration search path. Information provided by earlier directories should | ||
1639 | 153 | take precedence over later ones (ie, the user's config dir comes first).""" | ||
1640 | 154 | resource = os.path.join(*resource) | ||
1641 | 155 | for config_dir in xdg_config_dirs: | ||
1642 | 156 | path = os.path.join(config_dir, resource) | ||
1643 | 157 | if os.path.exists(path): yield path | ||
1644 | 158 | |||
1645 | 159 | def load_first_config(*resource): | ||
1646 | 160 | """Returns the first result from load_config_paths, or None if there is nothing | ||
1647 | 161 | to load.""" | ||
1648 | 162 | for x in load_config_paths(*resource): | ||
1649 | 163 | return x | ||
1650 | 164 | return None | ||
1651 | 165 | |||
1652 | 166 | def load_data_paths(*resource): | ||
1653 | 167 | """Returns an iterator which gives each directory named 'resource' in the | ||
1654 | 168 | shared data search path. Information provided by earlier directories should | ||
1655 | 169 | take precedence over later ones.""" | ||
1656 | 170 | resource = os.path.join(*resource) | ||
1657 | 171 | for data_dir in xdg_data_dirs: | ||
1658 | 172 | path = os.path.join(data_dir, resource) | ||
1659 | 173 | if os.path.exists(path): yield path | ||
1660 | 0 | 174 | ||
1661 | === added file 'utils/env_setup.bat' | |||
1662 | --- utils/env_setup.bat 1970-01-01 00:00:00 +0000 | |||
1663 | +++ utils/env_setup.bat 2010-09-30 09:36:24 +0000 | |||
1664 | @@ -0,0 +1,236 @@ | |||
1665 | 1 | @ECHO off | ||
1666 | 2 | :: Tell the user what the batch does. | ||
1667 | 3 | ECHO. | ||
1668 | 4 | ECHO This batch will set up your enviroment do that you can build the Windows Ubuntu One port. | ||
1669 | 5 | ECHO. | ||
1670 | 6 | ECHO The following actions will be taken: | ||
1671 | 7 | ECHO 1. Download and install python 2.6. | ||
1672 | 8 | ECHO 2. Install easy_install for windows. | ||
1673 | 9 | ECHO 3. Install python required libraries. | ||
1674 | 10 | ECHO 4. Install py2exe. | ||
1675 | 11 | ECHO 5. Install bazaar. | ||
1676 | 12 | ECHO 6. Install Ubuntu One Protocol | ||
1677 | 13 | ECHO. | ||
1678 | 14 | ECHO Quering OS architecture | ||
1679 | 15 | :: Get the first 3 chars of process identifier | ||
1680 | 16 | SET ARCH=%processor_identifier:~0,3% | ||
1681 | 17 | IF NOT %ARCH% == x86 GOTO :X64 | ||
1682 | 18 | :: set the paths for the x86 packages | ||
1683 | 19 | ECHO Setting Install Congi for arch %ARCH% | ||
1684 | 20 | SET PYWIN32INSTALLER=pywin32-214.win32-py2.6.exe | ||
1685 | 21 | SET PYTHONDOWNLOAD=http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi | ||
1686 | 22 | SET EASYINSTALLDOWNLOAD=http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11.win32-py2.6.exe#md5=1509752c3c2e64b5d0f9589aafe053dc | ||
1687 | 23 | SET PY2EXEDOWNLOAD=http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.6.exe/download | ||
1688 | 24 | SET PROTOCDOWNLOAD=http://protobuf.googlecode.com/files/protoc-2.3.0-win32.zip | ||
1689 | 25 | SET PROTOBUFDOWNLOAD=http://protobuf.googlecode.com/files/protobuf-2.3.0.zip | ||
1690 | 26 | SET PYOPENSSLDOWNLOAD=http://pypi.python.org/packages/2.6/p/pyOpenSSL/pyOpenSSL-0.10.winxp32-py2.6.msi#md5=90920217fb35d76524cab66c8c135cc8 | ||
1691 | 27 | SET TWISTEDDOWNLOAD=http://tmrc.mit.edu/mirror/twisted/Twisted/10.1/Twisted-10.1.0.winxp32-py2.6.msi | ||
1692 | 28 | SET BZRDOWNLOAD=http://launchpad.net/bzr/2.2/2.2.0/+download/bzr-2.2.0.win32-py2.6.exe | ||
1693 | 29 | GOTO :STARTINSTALLATION | ||
1694 | 30 | :X64 | ||
1695 | 31 | SET PYWIN32INSTALLER=pywin32-214.win-amd64-py2.6.exe | ||
1696 | 32 | SET PYTHONDOWNLOAD=http://www.python.org/ftp/python/2.6.6/python-2.6.6.amd64.msi | ||
1697 | 33 | SET EASYINSTALLDOWNLOAD=http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11.win32-py2.6.exe#md5=1509752c3c2e64b5d0f9589aafe053dc | ||
1698 | 34 | SET PY2EXEDOWNLOAD=http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win64-py2.6.amd64.exe/download | ||
1699 | 35 | SET PROTOCDOWNLOAD=http://protobuf.googlecode.com/files/protoc-2.3.0-win32.zip | ||
1700 | 36 | SET PROTOBUFDOWNLOAD=http://protobuf.googlecode.com/files/protobuf-2.3.0.zip | ||
1701 | 37 | SET PYOPENSSLDOWNLOAD=http://pypi.python.org/packages/2.6/p/pyOpenSSL/pyOpenSSL-0.10.winxp32-py2.6.msi#md5=90920217fb35d76524cab66c8c135cc8 | ||
1702 | 38 | SET TWISTEDDOWNLOAD=http://tmrc.mit.edu/mirror/twisted/Twisted/10.1/Twisted-10.1.0.winxp32-py2.6.msi | ||
1703 | 39 | SET BZRDOWNLOAD=http://launchpad.net/bzr/2.2/2.2.0/+download/bzr-2.2.0.win32-py2.6.exe | ||
1704 | 40 | ECHO 64 | ||
1705 | 41 | :STARTINSTALLATION | ||
1706 | 42 | ECHO Starting installation | ||
1707 | 43 | |||
1708 | 44 | :: ============================================================================ | ||
1709 | 45 | :: Set up temp directory | ||
1710 | 46 | :: ============================================================================ | ||
1711 | 47 | ECHO. | ||
1712 | 48 | SET TEMPFILE=%TEMP%\ENV_SET_UP | ||
1713 | 49 | ECHO The file that will be used to store the downloaded data is: | ||
1714 | 50 | ECHO %TEMPFILE% | ||
1715 | 51 | :: If the dir does not exist we have not problem and continue | ||
1716 | 52 | :: otherwhise delete the dir and create it so that we do not | ||
1717 | 53 | :: have old data present | ||
1718 | 54 | IF NOT EXIST %TEMPFILE% GOTO :NOTEMPDIR | ||
1719 | 55 | :: Ask user if he wants to delete the dir, he might not want to | ||
1720 | 56 | CHOICE /C YN /M "The dir is already present. Do you want to delete it" | ||
1721 | 57 | IF ERRORLEVEL 1 GOTO :DELETEDIR | ||
1722 | 58 | :: User does not want to delete, we are not that smart!! bye! | ||
1723 | 59 | ECHO Please delete the dir manually | ||
1724 | 60 | ECHO Leaving installation | ||
1725 | 61 | EXIT | ||
1726 | 62 | :DELETEDIR | ||
1727 | 63 | RD /s /Q %TEMPFILE% | ||
1728 | 64 | :NOTEMPDIR | ||
1729 | 65 | MD %TEMPFILE% | ||
1730 | 66 | |||
1731 | 67 | :: ============================================================================ | ||
1732 | 68 | :: Set up python | ||
1733 | 69 | :: ============================================================================ | ||
1734 | 70 | |||
1735 | 71 | SET PYTHONPATH="" | ||
1736 | 72 | ECHO Checking if python2.6 is in the system | ||
1737 | 73 | :GETPYTHONPATH | ||
1738 | 74 | :: This is very anoying, FOR /F will work differently depending on the output | ||
1739 | 75 | :: of reg which is not consistent between os (xp, 7) we have to choose the tokens | ||
1740 | 76 | :: according to the os | ||
1741 | 77 | SET PYTHONPATHTOKENS=3 | ||
1742 | 78 | VER | FIND "XP" > nul | ||
1743 | 79 | IF %ERRORLEVEL% == 0 SET PYTHONPATHTOKENS=4 | ||
1744 | 80 | FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('REG QUERY HKLM\Software\Python\PythonCore\2.6\InstallPath /ve') DO @SET PYTHONPATH=%%A | ||
1745 | 81 | IF NOT %PYTHONPATH% == "" GOTO :PYTHONPRESENT | ||
1746 | 82 | :: donload python and install it | ||
1747 | 83 | ECHO Download python 2.6 | ||
1748 | 84 | wget.exe -v --output-document=%TEMPFILE%\python.msi %PYTHONDOWNLOAD% | ||
1749 | 85 | ECHO Installing python... | ||
1750 | 86 | START /wait msiexec.exe /i %TEMPFILE%\python.msi | ||
1751 | 87 | :: Set the location of python | ||
1752 | 88 | GOTO :GETPYTHONPATH | ||
1753 | 89 | :PYTHONPRESENT | ||
1754 | 90 | :: Let user know we did find python 2.6 | ||
1755 | 91 | ECHO Python is present! | ||
1756 | 92 | ECHO Python dir is %PYTHONPATH% | ||
1757 | 93 | |||
1758 | 94 | :: ============================================================================ | ||
1759 | 95 | :: Setup pywin32 extensions | ||
1760 | 96 | :: ============================================================================ | ||
1761 | 97 | |||
1762 | 98 | :: This should be downloaded, but I have issues with wget and sourceforge | ||
1763 | 99 | ECHO Installing pywin32 python extensions | ||
1764 | 100 | START /wait %PYWIN32INSTALLER% | ||
1765 | 101 | |||
1766 | 102 | :: ============================================================================ | ||
1767 | 103 | :: Set up easy_install | ||
1768 | 104 | :: ============================================================================ | ||
1769 | 105 | |||
1770 | 106 | ECHO Checking if easy_install is in the system | ||
1771 | 107 | IF EXIST %PYTHONPATH%\Scripts\easy_install.exe GOTO :EASYINSTALLPRESENT | ||
1772 | 108 | ECHO Download easy_install for Windows | ||
1773 | 109 | wget.exe -v --output-document=%TEMPFILE%\easy_install.exe %EASYINSTALLDOWNLOAD% | ||
1774 | 110 | ECHO Installing easy_install... | ||
1775 | 111 | START /wait %TEMPFILE%\easy_install.exe %EASYINSTALLDOWNLOAD% | ||
1776 | 112 | :EASYINSTALLPRESENT | ||
1777 | 113 | :: set the easy_install path, this is not superb since if the user changed | ||
1778 | 114 | :: the path of python, we have problems | ||
1779 | 115 | SET EASYINSTALLPATH=%PYTHONPATH%\Scripts\easy_install.exe | ||
1780 | 116 | ECHO easy_install is present! | ||
1781 | 117 | ECHO Python dir is %EASYINSTALLPATH% | ||
1782 | 118 | |||
1783 | 119 | :: ============================================================================ | ||
1784 | 120 | :: Set up dependencies | ||
1785 | 121 | :: ============================================================================ | ||
1786 | 122 | |||
1787 | 123 | |||
1788 | 124 | ECHO The following dependencies will be installed using easy_install | ||
1789 | 125 | ECHO 1. zope.interface | ||
1790 | 126 | ECHO 2. oauth | ||
1791 | 127 | ECHO 4. boto | ||
1792 | 128 | ECHO 5. lazr.authentication | ||
1793 | 129 | ECHO 6. lazr.restfulclient | ||
1794 | 130 | ECHO 7. lazr.uri | ||
1795 | 131 | ECHO Installing dependencies | ||
1796 | 132 | %EASYINSTALLPATH% -Z -U zope.interface oauth boto lazr.authentication lazr.restfulclient lazr.uri | ||
1797 | 133 | ECHO. | ||
1798 | 134 | ECHO Python dependencies have been installed | ||
1799 | 135 | ECHO. | ||
1800 | 136 | |||
1801 | 137 | :: ============================================================================ | ||
1802 | 138 | :: Set up depedencies that cannot be install with easy_install | ||
1803 | 139 | ::============================================================================= | ||
1804 | 140 | |||
1805 | 141 | :: Install py2exe using an msi, the easy_install pacakage fails in systems such | ||
1806 | 142 | :: as XP | ||
1807 | 143 | ECHO Downloading py2exe for Windows | ||
1808 | 144 | wget.exe -v --output-document=%TEMPFILE%\py2exe.exe "%PY2EXEDOWNLOAD%" | ||
1809 | 145 | ECHO Installing py2exe | ||
1810 | 146 | %TEMPFILE%\py2exe.exe | ||
1811 | 147 | |||
1812 | 148 | :: It is of extreme importance to install protoc before, otherwhise the protobuf | ||
1813 | 149 | :: module for python will not be correctly generated | ||
1814 | 150 | ECHO Downloading protobuf compiler for python | ||
1815 | 151 | wget.exe -v --output-document=%TEMPFILE%\protoc_compiler.zip %PROTOCDOWNLOAD% | ||
1816 | 152 | ECHO Extracting protobuf compiler | ||
1817 | 153 | IF NOT EXIST "%ProgramFiles%\Protoc" MD "%ProgramFiles%\Protoc" | ||
1818 | 154 | unzip -o %TEMPFILE%\protoc_compiler.zip -d "%ProgramFiles%\Protoc" | ||
1819 | 155 | |||
1820 | 156 | |||
1821 | 157 | :: distutils does not work with the pacakage correctly and we have to unxip ourselves | ||
1822 | 158 | ECHO Downloading Protobuf for Windows | ||
1823 | 159 | wget.exe -v --output-document=%TEMPFILE%\protoc.zip %PROTOBUFDOWNLOAD% | ||
1824 | 160 | unzip -o %TEMPFILE%\protoc.zip -d %TEMPFILE%\Protoc | ||
1825 | 161 | :: distutils.spawn.find_executable is used to find protoc but it does not do a | ||
1826 | 162 | :: a very good job on windows, although we have installer protoc in the | ||
1827 | 163 | :: %ProgramFiles% we are going to copy it to the current location so that | ||
1828 | 164 | :: python can find it... lame! | ||
1829 | 165 | COPY /B "%ProgramFiles%\Protoc\protoc.exe" %TEMPFILE%\Protoc\protobuf-2.3.0\python | ||
1830 | 166 | ECHO Installing Protobuf for Windows | ||
1831 | 167 | START /B "%PYTHONPATH%\pycdthon.exe" /D%TEMPFILE%\Protoc\protobuf-2.3.0\python setup.py install | ||
1832 | 168 | :: The setup.py from google creates an egg, but py2exe does notlike that, lets extract it | ||
1833 | 169 | unzip -o %PYTHONPATH%\Lib\site-packages\protobuf-2.3.0-py2.6.egg -d %PYTHONPATH%\Lib\site-packages | ||
1834 | 170 | |||
1835 | 171 | :: The msi does not add an entry in the reg therefore we always install :( | ||
1836 | 172 | ECHO Downloading pyOpenSSl for Windows | ||
1837 | 173 | wget.exe -v --output-document=%TEMPFILE%\pyOpenSSL.msi %PYOPENSSLDOWNLOAD% | ||
1838 | 174 | ECHO Installing pyOpenSSL | ||
1839 | 175 | START /wait msiexec.exe /i %TEMPFILE%\pyOpenSSL.msi | ||
1840 | 176 | |||
1841 | 177 | :: Twisted cannot be installer with easy_install on windows | ||
1842 | 178 | ECHO Downloading twisted for Windows | ||
1843 | 179 | wget.exe -v --output-document=%TEMPFILE%\twisted.msi %TWISTEDDOWNLOAD% | ||
1844 | 180 | ECHO Installing twisted | ||
1845 | 181 | START /wait msiexec.exe /i %TEMPFILE%\twisted.msi | ||
1846 | 182 | |||
1847 | 183 | :: Install xdg.BaseDirectory for Windows | ||
1848 | 184 | ECHO Installing xdg.BaseDirectory | ||
1849 | 185 | IF NOT EXIST %PYTHONPATH%\Lib\site-packages\xdg MD %PYTHONPATH%\Lib\site-packages\xdg | ||
1850 | 186 | COPY BaseDirectory.py %PYTHONPATH%\Lib\site-packages\xdg | ||
1851 | 187 | ECHO. 2>%PYTHONPATH%\Lib\site-packages\xdg\__init__.py | ||
1852 | 188 | |||
1853 | 189 | :: ============================================================================ | ||
1854 | 190 | :: Set up bazaar | ||
1855 | 191 | :: ============================================================================ | ||
1856 | 192 | |||
1857 | 193 | ECHO Checking if bzr is in the system | ||
1858 | 194 | :GETBZRPATH | ||
1859 | 195 | SET BZRPATH = "" | ||
1860 | 196 | :: This is tricky since the Program Files dir has a space and does provide | ||
1861 | 197 | :: a problem because the delimeters are not correctly set, well is batch :( | ||
1862 | 198 | FOR /F "tokens=3-6" %%A IN ('REG QUERY HKLM\Software\Bazaar /v InstallPath') DO @SET BZRPATH=%%A %%B | ||
1863 | 199 | IF NOT BZRPATH == "" GOTO :BZRPRESENT | ||
1864 | 200 | ECHO Downloading bazaar | ||
1865 | 201 | wget.exe -v --output-document=%TEMPFILE%\bazaar.exe %BZRDOWNLOAD% | ||
1866 | 202 | ECHO Installing bazaar | ||
1867 | 203 | %TEMPFILE%\bazaar.exe | ||
1868 | 204 | :: get the path from reg | ||
1869 | 205 | GOTO :GETBZRPATH | ||
1870 | 206 | :BZRPRESENT | ||
1871 | 207 | ECHO bzr is present! | ||
1872 | 208 | ECHO bzr path is %BZRPATH% | ||
1873 | 209 | |||
1874 | 210 | |||
1875 | 211 | :: ============================================================================ | ||
1876 | 212 | :: Set up ubuntuone-storage-protocol | ||
1877 | 213 | :: ============================================================================ | ||
1878 | 214 | |||
1879 | 215 | ECHO Branching ubuntuone-storage-protocol | ||
1880 | 216 | "%BZRPATH%\bzr.exe" branch lp:ubuntuone-storage-protocol %TEMPFILE%\ubuntuone-storage-protocol | ||
1881 | 217 | :: distutils.spawn.find_executable is used to find protoc but it does not do a | ||
1882 | 218 | :: a very good job on windows, although we have installer protoc in the | ||
1883 | 219 | :: %ProgramFiles% we are going to copy it to the current location so that | ||
1884 | 220 | :: python can find it... lame! | ||
1885 | 221 | COPY /B "%ProgramFiles%\Protoc\protoc.exe" %TEMPFILE%\ubuntuone-storage-protocol | ||
1886 | 222 | ECHO Installing ubuntuone-storage-protocol from source | ||
1887 | 223 | :: Use start, otherwhise we will not be able to set the execution dir and | ||
1888 | 224 | :: setup.py will complain about not being able to find the correct dirs | ||
1889 | 225 | :: to install | ||
1890 | 226 | START /B "%PYTHONPATH%\python.exe" /D%TEMPFILE%\ubuntuone-storage-protocol\ setup.py install | ||
1891 | 227 | :: ubuntuone.logger is in not pacakage, we just copy it from the utils dir | ||
1892 | 228 | COPY logger.py %PYTHONPATH%\Lib\site-packages\ubuntuone | ||
1893 | 229 | |||
1894 | 230 | :: ============================================================================ | ||
1895 | 231 | :: Clean up the downloaded data | ||
1896 | 232 | :: ============================================================================ | ||
1897 | 233 | |||
1898 | 234 | ECHO Cleaning Temp files | ||
1899 | 235 | RD /s /Q %TEMPFILE% | ||
1900 | 236 | ECHO Installation completed!! | ||
1901 | 0 | \ No newline at end of file | 237 | \ No newline at end of file |
1902 | 1 | 238 | ||
1903 | === added file 'utils/logger.py' | |||
1904 | --- utils/logger.py 1970-01-01 00:00:00 +0000 | |||
1905 | +++ utils/logger.py 2010-09-30 09:36:24 +0000 | |||
1906 | @@ -0,0 +1,268 @@ | |||
1907 | 1 | # ubuntuone.syncdaemon.logger - logging utilities | ||
1908 | 2 | # | ||
1909 | 3 | # Author: Guillermo Gonzalez <guillermo.gonzalez@canonical.com> | ||
1910 | 4 | # | ||
1911 | 5 | # Copyright 2010 Canonical Ltd. | ||
1912 | 6 | # | ||
1913 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
1914 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
1915 | 9 | # by the Free Software Foundation. | ||
1916 | 10 | # | ||
1917 | 11 | # This program is distributed in the hope that it will be useful, but | ||
1918 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1919 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1920 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
1921 | 15 | # | ||
1922 | 16 | # You should have received a copy of the GNU General Public License along | ||
1923 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1924 | 18 | """Ubuntuone client logging utilities and config. """ | ||
1925 | 19 | from __future__ import with_statement | ||
1926 | 20 | |||
1927 | 21 | import contextlib | ||
1928 | 22 | import logging | ||
1929 | 23 | import sys | ||
1930 | 24 | import os | ||
1931 | 25 | import re | ||
1932 | 26 | import weakref | ||
1933 | 27 | import functools | ||
1934 | 28 | import xdg.BaseDirectory | ||
1935 | 29 | |||
1936 | 30 | from logging.handlers import TimedRotatingFileHandler | ||
1937 | 31 | |||
1938 | 32 | # extra levels | ||
1939 | 33 | # be more verbose than logging.DEBUG(10) | ||
1940 | 34 | TRACE = 5 | ||
1941 | 35 | # info that we almost always want to log (logging.ERROR - 1) | ||
1942 | 36 | NOTE = logging.ERROR - 1 | ||
1943 | 37 | |||
1944 | 38 | # map names to the extra levels | ||
1945 | 39 | levels = {'TRACE':TRACE, 'NOTE':NOTE} | ||
1946 | 40 | for k, v in levels.items(): | ||
1947 | 41 | logging.addLevelName(v, k) | ||
1948 | 42 | |||
1949 | 43 | |||
1950 | 44 | class Logger(logging.Logger): | ||
1951 | 45 | """Logger that support out custom levels.""" | ||
1952 | 46 | |||
1953 | 47 | def note(self, msg, *args, **kwargs): | ||
1954 | 48 | """log at NOTE level""" | ||
1955 | 49 | if self.isEnabledFor(NOTE): | ||
1956 | 50 | self._log(NOTE, msg, args, **kwargs) | ||
1957 | 51 | |||
1958 | 52 | def trace(self, msg, *args, **kwargs): | ||
1959 | 53 | """log at TRACE level""" | ||
1960 | 54 | if self.isEnabledFor(TRACE): | ||
1961 | 55 | self._log(TRACE, msg, args, **kwargs) | ||
1962 | 56 | |||
1963 | 57 | |||
1964 | 58 | class DayRotatingFileHandler(TimedRotatingFileHandler): | ||
1965 | 59 | """A mix of TimedRotatingFileHandler and RotatingFileHandler configured for | ||
1966 | 60 | daily rotation but that uses the suffix and extMatch of Hourly rotation, in | ||
1967 | 61 | order to allow seconds based rotation on each startup. | ||
1968 | 62 | The log file is also rotated when the specified size is reached. | ||
1969 | 63 | """ | ||
1970 | 64 | |||
1971 | 65 | def __init__(self, *args, **kwargs): | ||
1972 | 66 | """ create the instance and override the suffix and extMatch. | ||
1973 | 67 | Also accepts a maxBytes keyword arg to rotate the file when it reachs | ||
1974 | 68 | maxBytes. | ||
1975 | 69 | """ | ||
1976 | 70 | kwargs['when'] = 'D' | ||
1977 | 71 | kwargs['backupCount'] = LOGBACKUP | ||
1978 | 72 | # check if we are in 2.5, only for PQM | ||
1979 | 73 | if sys.version_info[:2] >= (2, 6): | ||
1980 | 74 | kwargs['delay'] = 1 | ||
1981 | 75 | if 'maxBytes' in kwargs: | ||
1982 | 76 | self.maxBytes = kwargs.pop('maxBytes') | ||
1983 | 77 | else: | ||
1984 | 78 | self.maxBytes = 0 | ||
1985 | 79 | TimedRotatingFileHandler.__init__(self, *args, **kwargs) | ||
1986 | 80 | # override suffix | ||
1987 | 81 | self.suffix = "%Y-%m-%d_%H-%M-%S" | ||
1988 | 82 | self.extMatch = re.compile(r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}$") | ||
1989 | 83 | |||
1990 | 84 | def shouldRollover(self, record): | ||
1991 | 85 | """ | ||
1992 | 86 | Determine if rollover should occur. | ||
1993 | 87 | |||
1994 | 88 | Basically, see if TimedRotatingFileHandler.shouldRollover and if it's | ||
1995 | 89 | False see if the supplied record would cause the file to exceed | ||
1996 | 90 | the size limit we have. | ||
1997 | 91 | |||
1998 | 92 | The size based rotation are from logging.handlers.RotatingFileHandler | ||
1999 | 93 | """ | ||
2000 | 94 | if TimedRotatingFileHandler.shouldRollover(self, record): | ||
2001 | 95 | return 1 | ||
2002 | 96 | else: | ||
2003 | 97 | # check the size | ||
2004 | 98 | if self.stream is None: # delay was set... | ||
2005 | 99 | self.stream = self._open() | ||
2006 | 100 | if self.maxBytes > 0: # are we rolling over? | ||
2007 | 101 | msg = "%s\n" % self.format(record) | ||
2008 | 102 | self.stream.seek(0, 2) #due to non-posix-compliant Windows feature | ||
2009 | 103 | if self.stream.tell() + len(msg) >= self.maxBytes: | ||
2010 | 104 | return 1 | ||
2011 | 105 | return 0 | ||
2012 | 106 | |||
2013 | 107 | |||
2014 | 108 | class MultiFilter(logging.Filter): | ||
2015 | 109 | """Our own logging.Filter. | ||
2016 | 110 | |||
2017 | 111 | To allow filter by multiple names in a single handler or logger. | ||
2018 | 112 | |||
2019 | 113 | """ | ||
2020 | 114 | |||
2021 | 115 | def __init__(self, names=None): | ||
2022 | 116 | logging.Filter.__init__(self) | ||
2023 | 117 | self.names = names or [] | ||
2024 | 118 | self.filters = [] | ||
2025 | 119 | for name in self.names: | ||
2026 | 120 | self.filters.append(logging.Filter(name)) | ||
2027 | 121 | |||
2028 | 122 | def filter(self, record): | ||
2029 | 123 | """Determine if the specified record is to be logged. | ||
2030 | 124 | |||
2031 | 125 | This work a bit different from the standard logging.Filter, the | ||
2032 | 126 | record is logged if at least one filter allows it. | ||
2033 | 127 | If there are no filters, the record is allowed. | ||
2034 | 128 | |||
2035 | 129 | """ | ||
2036 | 130 | if not self.filters: | ||
2037 | 131 | # no filters, allow the record | ||
2038 | 132 | return True | ||
2039 | 133 | for f in self.filters: | ||
2040 | 134 | if f.filter(record): | ||
2041 | 135 | return True | ||
2042 | 136 | return False | ||
2043 | 137 | |||
2044 | 138 | |||
2045 | 139 | class DebugCapture(logging.Handler): | ||
2046 | 140 | """ | ||
2047 | 141 | A context manager to capture debug logs. | ||
2048 | 142 | """ | ||
2049 | 143 | |||
2050 | 144 | def __init__(self, logger, raise_unhandled=False, on_error=True): | ||
2051 | 145 | """Creates the instance. | ||
2052 | 146 | |||
2053 | 147 | @param logger: the logger to wrap | ||
2054 | 148 | @param raise_unhandled: raise unhandled errors (which are alse logged) | ||
2055 | 149 | @param on_error: if it's True (default) the captured debug info is | ||
2056 | 150 | dumped if a record with log level >= ERROR is logged. | ||
2057 | 151 | """ | ||
2058 | 152 | logging.Handler.__init__(self, logging.DEBUG) | ||
2059 | 153 | self.on_error = on_error | ||
2060 | 154 | self.dirty = False | ||
2061 | 155 | self.raise_unhandled = raise_unhandled | ||
2062 | 156 | self.records = [] | ||
2063 | 157 | # insert myself as the handler for the logger | ||
2064 | 158 | self.logger = weakref.proxy(logger) | ||
2065 | 159 | # store the logger log level | ||
2066 | 160 | self.old_level = logger.level | ||
2067 | 161 | # remove us from the Handler list and dict | ||
2068 | 162 | self.close() | ||
2069 | 163 | |||
2070 | 164 | def emit_debug(self): | ||
2071 | 165 | """emit stored records to the original logger handler(s)""" | ||
2072 | 166 | enable_debug = self.enable_debug | ||
2073 | 167 | for record in self.records: | ||
2074 | 168 | for slave in self.slaves: | ||
2075 | 169 | with enable_debug(slave): | ||
2076 | 170 | slave.handle(record) | ||
2077 | 171 | |||
2078 | 172 | @contextlib.contextmanager | ||
2079 | 173 | def enable_debug(self, obj): | ||
2080 | 174 | """context manager that temporarily changes the level attribute of obj | ||
2081 | 175 | to logging.DEBUG. | ||
2082 | 176 | """ | ||
2083 | 177 | old_level = obj.level | ||
2084 | 178 | obj.level = logging.DEBUG | ||
2085 | 179 | yield obj | ||
2086 | 180 | obj.level = old_level | ||
2087 | 181 | |||
2088 | 182 | def clear(self): | ||
2089 | 183 | """cleanup the captured records""" | ||
2090 | 184 | self.records = [] | ||
2091 | 185 | |||
2092 | 186 | def install(self): | ||
2093 | 187 | """Install the debug capture in the logger""" | ||
2094 | 188 | self.slaves = self.logger.handlers | ||
2095 | 189 | self.logger.handlers = [self] | ||
2096 | 190 | # set the logger level in DEBUG | ||
2097 | 191 | self.logger.setLevel(logging.DEBUG) | ||
2098 | 192 | |||
2099 | 193 | def uninstall(self): | ||
2100 | 194 | """restore the logger original handlers""" | ||
2101 | 195 | # restore the logger | ||
2102 | 196 | self.logger.handlers = self.slaves | ||
2103 | 197 | self.logger.setLevel(self.old_level) | ||
2104 | 198 | self.clear() | ||
2105 | 199 | self.dirty = False | ||
2106 | 200 | self.slaves = [] | ||
2107 | 201 | |||
2108 | 202 | def emit(self, record): | ||
2109 | 203 | """A emit() that append the record to the record list""" | ||
2110 | 204 | self.records.append(record) | ||
2111 | 205 | |||
2112 | 206 | def handle(self, record): | ||
2113 | 207 | """ handle a record """ | ||
2114 | 208 | # if its a DEBUG level record then intercept otherwise | ||
2115 | 209 | # pass through to the original logger handler(s) | ||
2116 | 210 | if self.old_level <= logging.DEBUG: | ||
2117 | 211 | return sum(slave.handle(record) for slave in self.slaves) | ||
2118 | 212 | if record.levelno == logging.DEBUG: | ||
2119 | 213 | return logging.Handler.handle(self, record) | ||
2120 | 214 | elif self.on_error and record.levelno >= logging.ERROR and \ | ||
2121 | 215 | record.levelno != NOTE: | ||
2122 | 216 | # if it's >= ERROR keep it, but mark the dirty falg | ||
2123 | 217 | self.dirty = True | ||
2124 | 218 | return logging.Handler.handle(self, record) | ||
2125 | 219 | else: | ||
2126 | 220 | return sum(slave.handle(record) for slave in self.slaves) | ||
2127 | 221 | |||
2128 | 222 | def __enter__(self): | ||
2129 | 223 | """ContextManager API""" | ||
2130 | 224 | self.install() | ||
2131 | 225 | return self | ||
2132 | 226 | |||
2133 | 227 | def __exit__(self, exc_type, exc_value, traceback): | ||
2134 | 228 | """ContextManager API""" | ||
2135 | 229 | if exc_type is not None: | ||
2136 | 230 | self.emit_debug() | ||
2137 | 231 | self.on_error = False | ||
2138 | 232 | self.logger.error('unhandled exception', exc_info=(exc_type, | ||
2139 | 233 | exc_value, traceback)) | ||
2140 | 234 | elif self.dirty: | ||
2141 | 235 | # emit all debug messages collected after the error | ||
2142 | 236 | self.emit_debug() | ||
2143 | 237 | self.uninstall() | ||
2144 | 238 | if self.raise_unhandled and exc_type is not None: | ||
2145 | 239 | raise exc_type, exc_value, traceback | ||
2146 | 240 | else: | ||
2147 | 241 | return True | ||
2148 | 242 | |||
2149 | 243 | |||
2150 | 244 | ### configure the thing ### | ||
2151 | 245 | # define the location of the log folder | ||
2152 | 246 | home = xdg.BaseDirectory.xdg_cache_home | ||
2153 | 247 | LOGFOLDER = os.path.join(home, 'ubuntuone','log') | ||
2154 | 248 | if not os.path.exists(LOGFOLDER): | ||
2155 | 249 | os.makedirs(LOGFOLDER) | ||
2156 | 250 | |||
2157 | 251 | LOGBACKUP = 5 # the number of log files to keep around | ||
2158 | 252 | |||
2159 | 253 | basic_formatter = logging.Formatter(fmt="%(asctime)s - %(name)s - " \ | ||
2160 | 254 | "%(levelname)s - %(message)s") | ||
2161 | 255 | debug_formatter = logging.Formatter(fmt="%(asctime)s %(name)s %(module)s " \ | ||
2162 | 256 | "%(lineno)s %(funcName)s %(message)s") | ||
2163 | 257 | |||
2164 | 258 | # a constant to change the default DEBUG level value | ||
2165 | 259 | _DEBUG_LOG_LEVEL = logging.DEBUG | ||
2166 | 260 | |||
2167 | 261 | |||
2168 | 262 | # partial config of the handler to rotate when the file size is 1MB | ||
2169 | 263 | CustomRotatingFileHandler = functools.partial(DayRotatingFileHandler, | ||
2170 | 264 | maxBytes=1048576) | ||
2171 | 265 | |||
2172 | 266 | # use our logger as the default Logger class | ||
2173 | 267 | logging.setLoggerClass(Logger) | ||
2174 | 268 | |||
2175 | 0 | 269 | ||
2176 | === added file 'utils/pywin32-214.win-amd64-py2.6.exe' | |||
2177 | 1 | Binary files utils/pywin32-214.win-amd64-py2.6.exe 1970-01-01 00:00:00 +0000 and utils/pywin32-214.win-amd64-py2.6.exe 2010-09-30 09:36:24 +0000 differ | 270 | Binary files utils/pywin32-214.win-amd64-py2.6.exe 1970-01-01 00:00:00 +0000 and utils/pywin32-214.win-amd64-py2.6.exe 2010-09-30 09:36:24 +0000 differ |
2178 | === added file 'utils/pywin32-214.win32-py2.6.exe' | |||
2179 | 2 | Binary files utils/pywin32-214.win32-py2.6.exe 1970-01-01 00:00:00 +0000 and utils/pywin32-214.win32-py2.6.exe 2010-09-30 09:36:24 +0000 differ | 271 | Binary files utils/pywin32-214.win32-py2.6.exe 1970-01-01 00:00:00 +0000 and utils/pywin32-214.win32-py2.6.exe 2010-09-30 09:36:24 +0000 differ |
2180 | === added file 'utils/unzip.exe' | |||
2181 | 3 | Binary files utils/unzip.exe 1970-01-01 00:00:00 +0000 and utils/unzip.exe 2010-09-30 09:36:24 +0000 differ | 272 | Binary files utils/unzip.exe 1970-01-01 00:00:00 +0000 and utils/unzip.exe 2010-09-30 09:36:24 +0000 differ |
2182 | === added file 'utils/unzip32.dll' | |||
2183 | 4 | Binary files utils/unzip32.dll 1970-01-01 00:00:00 +0000 and utils/unzip32.dll 2010-09-30 09:36:24 +0000 differ | 273 | Binary files utils/unzip32.dll 1970-01-01 00:00:00 +0000 and utils/unzip32.dll 2010-09-30 09:36:24 +0000 differ |
2184 | === added file 'utils/wget.exe' | |||
2185 | 5 | Binary files utils/wget.exe 1970-01-01 00:00:00 +0000 and utils/wget.exe 2010-09-30 09:36:24 +0000 differ | 274 | Binary files utils/wget.exe 1970-01-01 00:00:00 +0000 and utils/wget.exe 2010-09-30 09:36:24 +0000 differ |