Merge lp:~mandel/ubuntuone-windows-installer/fix_overlay into lp:ubuntuone-windows-installer/beta

Proposed by Manuel de la Peña
Status: Merged
Approved by: Vincenzo Di Somma
Approved revision: 173
Merged at revision: 128
Proposed branch: lp:~mandel/ubuntuone-windows-installer/fix_overlay
Merge into: lp:ubuntuone-windows-installer/beta
Prerequisite: lp:~mandel/ubuntuone-windows-installer/improve_u1sync_communication
Diff against target: 1663 lines (+1284/-100)
17 files modified
.bzrignore (+8/-0)
build.number (+1/-1)
install/UbuntuOne7.wxs (+756/-1)
main.build (+23/-3)
src/Version.cs (+3/-3)
src/emblems_cache/setup.py (+52/-0)
src/emblems_cache/windows_emblems_cache.py (+111/-0)
src/icons_overlay/icons_overlay.py (+120/-0)
src/icons_overlay/register.py (+20/-0)
src/icons_overlay/setup.py (+50/-0)
src/sync/u1sync/constants.py (+4/-0)
src/sync/u1sync/genericmerge.py (+0/-2)
src/sync/u1sync/icons.py (+117/-81)
src/sync/u1sync/main.py (+10/-2)
src/sync/u1sync/metadata.py (+1/-2)
src/sync/u1sync/scan.py (+0/-4)
src/sync/u1sync/ubuntuone_optparse.py (+8/-1)
To merge this branch: bzr merge lp:~mandel/ubuntuone-windows-installer/fix_overlay
Reviewer Review Type Date Requested Status
Vincenzo Di Somma (community) Approve
John Lenton (community) Approve
Review via email: mp+39907@code.launchpad.net

Description of the change

Fix the icon overlays.

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) :
review: Approve
Revision history for this message
Vincenzo Di Somma (vds) :
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-10-20 23:09:36 +0000
3+++ .bzrignore 2010-11-02 22:22:53 +0000
4@@ -30,6 +30,8 @@
5 src/Canonical.UbuntuOne.ProcessDispatcher/obj
6 src/Canonical.UbuntuOne.ProcessDispatcher.Tests/obj
7 src/Canonical.UbuntuOne.ProcessDispatcher.Tests/bin
8+src/Canonical.UbuntuOne.ShellExtension/bin
9+src/Canonical.UbuntuOne.ShellExtension/obj
10 src/ServiceTestApp/bin
11 src/ServiceTestApp/obj
12 src/UbuntuOneClient/bin
13@@ -46,3 +48,9 @@
14 utils/UbuntuOne.msi
15 build.number
16 *.user
17+src/sync/build
18+src/sync/dist
19+src/emblems_cache/build
20+src/emblems_cache/dist
21+src/icons_overlay/build
22+src/icons_overlay/dist
23
24=== modified file 'build.number'
25--- build.number 2010-10-12 10:06:34 +0000
26+++ build.number 2010-11-02 22:22:53 +0000
27@@ -1,1 +1,1 @@
28-1.0.611.8185
29\ No newline at end of file
30+1.0.623.7177
31\ No newline at end of file
32
33=== added file 'data/new.ico'
34Binary files data/new.ico 1970-01-01 00:00:00 +0000 and data/new.ico 2010-11-02 22:22:53 +0000 differ
35=== modified file 'install/UbuntuOne7.wxs'
36--- install/UbuntuOne7.wxs 2010-10-20 23:32:43 +0000
37+++ install/UbuntuOne7.wxs 2010-11-02 22:22:53 +0000
38@@ -42,6 +42,24 @@
39
40 <Directory Id="TARGETDIR"
41 Name="SourceDir">
42+ <Component Id="IsPresentUbuntuOneIconOverlayKey" Guid="1f83ee90-e6c5-11df-9492-0800200c9a66">
43+ <RegistryValue Root="HKLM"
44+ Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\IsPresentUbuntuOneIconOverlay"
45+ Value="{4FC554DF-F0EE-4A4F-966C-9C49CCF14D59}"
46+ Type="string"/>
47+ </Component>
48+ <Component Id="IsNewUbuntuOneIconOverlayKey" Guid="1f83ee91-e6c5-11df-9492-0800200c9a66">
49+ <RegistryValue Root="HKLM"
50+ Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\IsNewUbuntuOneIconOverlay"
51+ Value="{a9694f20-ddbe-11df-85ca-0800200c9a66}"
52+ Type="string"/>
53+ </Component>
54+ <Component Id="IsConflictUbuntuOneIconOverlayKey" Guid="1f83ee92-e6c5-11df-9492-0800200c9a66">
55+ <RegistryValue Root="HKLM"
56+ Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\IsConflictUbuntuOneIconOverlay"
57+ Value="{3dc7f120-ded8-11df-85ca-0800200c9a66}"
58+ Type="string"/>
59+ </Component>
60 <Directory Id="ProgramMenuFolder"
61 Name="Programs" >
62 <Directory Id="ApplicationProgramsFolder" Name="Ubuntu One">
63@@ -714,6 +732,646 @@
64 KeyPath="yes"/>
65 </Component>
66 </Directory>
67+ <Directory Id="EmblemsCacheDir"
68+ Name="EmblemsCache">
69+ <Component Id="EmblemsCacheAutostart"
70+ Guid="ccbf8b90-e2d9-11df-85ca-0800200c9a66">
71+ <RegistryValue Id="EmblemsCache.rst"
72+ Root="HKCU"
73+ Key="Software\Microsoft\Windows\CurrentVersion\Run"
74+ Name="Ubuntu One Emblems Cache"
75+ Value="[EmblemsCacheDir]windows_emblems_cache.exe"
76+ Type="string"/>
77+ <Condition>UBUNTUONECLIENT_EMBLEMSCACHE_START_VIA_REGISTRY</Condition>
78+ </Component>
79+ <Component Id="EmblemsCTypesComponent"
80+ Guid="77e33900-e2a7-11df-85ca-0800200c9a66">
81+ <File Id="emblems_ctypes.pyd"
82+ Name="_ctypes.pyd"
83+ DiskId="1"
84+ Source="build_results\emblems_cache\_ctypes.pyd"
85+ KeyPath="yes"/>
86+ </Component>
87+ <Component Id="EmblemsHashLibComponent"
88+ Guid="b3a11b60-e2a7-11df-85ca-0800200c9a66">
89+ <File Id="emblems_hashlib.pyd"
90+ Name="_hashlib.pyd"
91+ DiskId="1"
92+ Source="build_results\emblems_cache\_hashlib.pyd"
93+ KeyPath="yes"/>
94+ </Component>
95+ <Component Id="EmblemsMultiprocessingComponent"
96+ Guid="f957c960-e2a7-11df-85ca-0800200c9a66">
97+ <File Id="emblems_multiprocessing.pyd"
98+ Name="_multiprocessing.pyd"
99+ DiskId="1"
100+ Source="build_results\emblems_cache\_multiprocessing.pyd"
101+ KeyPath="yes"/>
102+ </Component>
103+ <Component Id="EmblemsSocketComponent"
104+ Guid="31861c60-e2a8-11df-85ca-0800200c9a66">
105+ <File Id="emblems_socket.pyd"
106+ Name="_socket.pyd"
107+ DiskId="1"
108+ Source="build_results\emblems_cache\_socket.pyd"
109+ KeyPath="yes"/>
110+ </Component>
111+ <Component Id="EmblemsSSLComponent"
112+ Guid="895c12a0-e2a8-11df-85ca-0800200c9a66">
113+ <File Id="emblems_ssl.pyd"
114+ Name="_ssl.pyd"
115+ DiskId="1"
116+ Source="build_results\emblems_cache\_ssl.pyd"
117+ KeyPath="yes"/>
118+ </Component>
119+ <Component Id="EmblemsSysLoaderComponent"
120+ Guid="99e32eb0-e2a8-11df-85ca-0800200c9a66">
121+ <File Id="emblems_win32sysloader.pyd"
122+ Name="_win32sysloader.pyd"
123+ DiskId="1"
124+ Source="build_results\emblems_cache\_win32sysloader.pyd"
125+ KeyPath="yes"/>
126+ </Component>
127+ <Component Id="EmblemsCoreDebugComponent"
128+ Guid="bc431420-e2a8-11df-85ca-0800200c9a66">
129+ <File Id="emblems_API_MS_Win_Core_Debug_L1_1_0.dll"
130+ Name="API-MS-Win-Core-Debug-L1-1-0.dll"
131+ DiskId="1"
132+ Source="build_results\emblems_cache\API-MS-Win-Core-Debug-L1-1-0.dll"
133+ KeyPath="yes"/>
134+ </Component>
135+ <Component Id="EmblemsDelayLoadComponent"
136+ Guid="e5df1630-e2a8-11df-85ca-0800200c9a66">
137+ <File Id="emblems_API_MS_Win_Core_DelayLoad_L1_1_0.dll"
138+ Name="API-MS-Win-Core-DelayLoad-L1-1-0.dll"
139+ DiskId="1"
140+ Source="build_results\emblems_cache\API-MS-Win-Core-DelayLoad-L1-1-0.dll"
141+ KeyPath="yes"/>
142+ </Component>
143+ <Component Id="EmblemsErrorHandlingComponent"
144+ Guid="19241630-e2a9-11df-85ca-0800200c9a66">
145+ <File Id="emblems_API_MS_Win_Core_ErrorHandling_L1_1_0.dll"
146+ Name="API-MS-Win-Core-ErrorHandling-L1-1-0.dll"
147+ DiskId="1"
148+ Source="build_results\emblems_cache\API-MS-Win-Core-ErrorHandling-L1-1-0.dll"
149+ KeyPath="yes"/>
150+ </Component>
151+ <Component Id="EmblemsHandleComponent"
152+ Guid="5b4a2360-e2a9-11df-85ca-0800200c9a66">
153+ <File Id="emblems_API_MS_Win_Core_Handle_L1_1_0.dll"
154+ Name="API-MS-Win-Core-Handle-L1-1-0.dll"
155+ DiskId="1"
156+ Source="build_results\emblems_cache\API-MS-Win-Core-Handle-L1-1-0.dll"
157+ KeyPath="yes"/>
158+ </Component>
159+ <Component Id="EmblemsInterlockedComponent"
160+ Guid="77faa6b0-e2a9-11df-85ca-0800200c9a66">
161+ <File Id="emblems_API_MS_Win_Core_Interlocked_L1_1_0.dll"
162+ Name="API-MS-Win-Core-Interlocked-L1-1-0.dll"
163+ DiskId="1"
164+ Source="build_results\emblems_cache\API-MS-Win-Core-Interlocked-L1-1-0.dll"
165+ KeyPath="yes"/>
166+ </Component>
167+ <Component Id="EmblemsIOComponent"
168+ Guid="e6d0d3c0-e2a9-11df-85ca-0800200c9a66">
169+ <File Id="emblems_API_MS_Win_Core_IO_L1_1_0.dll"
170+ Name="API-MS-Win-Core-IO-L1-1-0.dll"
171+ DiskId="1"
172+ Source="build_results\emblems_cache\API-MS-Win-Core-IO-L1-1-0.dll"
173+ KeyPath="yes"/>
174+ </Component>
175+ <Component Id="EmblemsLibraryLoaderComponent"
176+ Guid="d0fe7920-e2aa-11df-85ca-0800200c9a66">
177+ <File Id="emblems_API_MS_Win_Core_LibraryLoader_L1_1_0.dll"
178+ Name="API-MS-Win-Core-LibraryLoader-L1-1-0.dll"
179+ DiskId="1"
180+ Source="build_results\emblems_cache\API-MS-Win-Core-LibraryLoader-L1-1-0.dll"
181+ KeyPath="yes"/>
182+ </Component>
183+ <Component Id="EmblemsLocalizationComponent"
184+ Guid="0d578a10-e2ab-11df-85ca-0800200c9a66">
185+ <File Id="emblems_API_MS_Win_Core_Localization_L1_1_0.dll"
186+ Name="API-MS-Win-Core-Localization-L1-1-0.dll"
187+ DiskId="1"
188+ Source="build_results\emblems_cache\API-MS-Win-Core-Localization-L1-1-0.dll"
189+ KeyPath="yes"/>
190+ </Component>
191+ <Component Id="EmblemsLocaRegistryComponent"
192+ Guid="256141a0-e2ab-11df-85ca-0800200c9a66">
193+ <File Id="emblems_API_MS_Win_Core_LocalRegistry_L1_1_0.dll"
194+ Name="API-MS-Win-Core-LocalRegistry-L1-1-0.dll"
195+ DiskId="1"
196+ Source="build_results\emblems_cache\API-MS-Win-Core-LocalRegistry-L1-1-0.dll"
197+ KeyPath="yes"/>
198+ </Component>
199+ <Component Id="EmblemsMemoryComponent"
200+ Guid="640294e0-e2ab-11df-85ca-0800200c9a66">
201+ <File Id="emblems_API_MS_Win_Core_Memory_L1_1_0.dll"
202+ Name="API-MS-Win-Core-Memory-L1-1-0.dll"
203+ DiskId="1"
204+ Source="build_results\emblems_cache\API-MS-Win-Core-Memory-L1-1-0.dll"
205+ KeyPath="yes"/>
206+ </Component>
207+ <Component Id="EmblemsMiscComponent"
208+ Guid="9dde70d0-e2ab-11df-85ca-0800200c9a66">
209+ <File Id="emblems_API_MS_Win_Core_Misc_L1_1_0.dll"
210+ Name="API-MS-Win-Core-Misc-L1-1-0.dll"
211+ DiskId="1"
212+ Source="build_results\emblems_cache\API-MS-Win-Core-Misc-L1-1-0.dll"
213+ KeyPath="yes"/>
214+ </Component>
215+ <Component Id="EmblemsProcessEnvironmentComponent"
216+ Guid="c8e351b0-e2ab-11df-85ca-0800200c9a66">
217+ <File Id="emblems_API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll"
218+ Name="API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll"
219+ DiskId="1"
220+ Source="build_results\emblems_cache\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll"
221+ KeyPath="yes"/>
222+ </Component>
223+ <Component Id="EmblemsProcessThreadComponent"
224+ Guid="eba52d40-e2ab-11df-85ca-0800200c9a66">
225+ <File Id="emblems_API_MS_Win_Core_ProcessThreads_L1_1_0.dll"
226+ Name="API-MS-Win-Core-ProcessThreads-L1-1-0.dll"
227+ DiskId="1"
228+ Source="build_results\emblems_cache\API-MS-Win-Core-ProcessThreads-L1-1-0.dll"
229+ KeyPath="yes"/>
230+ </Component>
231+ <Component Id="EmblemsProfileComponent"
232+ Guid="2213f5f0-e2ac-11df-85ca-0800200c9a66">
233+ <File Id="emblems_API_MS_Win_Core_Profile_L1_1_0.dll"
234+ Name="API-MS-Win-Core-Profile-L1-1-0.dll"
235+ DiskId="1"
236+ Source="build_results\emblems_cache\API-MS-Win-Core-Profile-L1-1-0.dll"
237+ KeyPath="yes"/>
238+ </Component>
239+ <Component Id="EmblemsStringComponent"
240+ Guid="737edb30-e2ac-11df-85ca-0800200c9a66">
241+ <File Id="emblems_API_MS_Win_Core_String_L1_1_0.dll"
242+ Name="API-MS-Win-Core-String-L1-1-0.dll"
243+ DiskId="1"
244+ Source="build_results\emblems_cache\API-MS-Win-Core-String-L1-1-0.dll"
245+ KeyPath="yes"/>
246+ </Component>
247+ <Component Id="EmblemsSynchComponent"
248+ Guid="207f2fb0-e2ad-11df-85ca-0800200c9a66">
249+ <File Id="emblems_API_MS_Win_Core_Synch_L1_1_0.dll"
250+ Name="API-MS-Win-Core-Synch-L1-1-0.dll"
251+ DiskId="1"
252+ Source="build_results\emblems_cache\API-MS-Win-Core-Synch-L1-1-0.dll"
253+ KeyPath="yes"/>
254+ </Component>
255+ <Component Id="EmblemsSysInfoComponent"
256+ Guid="2cd57350-e2ad-11df-85ca-0800200c9a66">
257+ <File Id="emblems_API_MS_Win_Core_SysInfo_L1_1_0.dll"
258+ Name="API-MS-Win-Core-SysInfo-L1-1-0.dll"
259+ DiskId="1"
260+ Source="build_results\emblems_cache\API-MS-Win-Core-SysInfo-L1-1-0.dll"
261+ KeyPath="yes"/>
262+ </Component>
263+ <Component Id="EmblemsSecurityComponent"
264+ Guid="a851b1b0-e2ad-11df-85ca-0800200c9a66">
265+ <File Id="emblems_API_MS_Win_Security_Base_L1_1_0.dll"
266+ Name="API-MS-Win-Security-Base-L1-1-0.dll"
267+ DiskId="1"
268+ Source="build_results\emblems_cache\API-MS-Win-Security-Base-L1-1-0.dll"
269+ KeyPath="yes"/>
270+ </Component>
271+ <Component Id="EmblemsBz2Component"
272+ Guid="da6bed50-e2ad-11df-85ca-0800200c9a66">
273+ <File Id="emblems_bz2.pyd"
274+ Name="bz2.pyd"
275+ DiskId="1"
276+ Source="build_results\emblems_cache\bz2.pyd"
277+ KeyPath="yes"/>
278+ </Component>
279+ <Component Id="EmblemsKernelBaseComponent"
280+ Guid="151bbb10-e2ae-11df-85ca-0800200c9a66">
281+ <File Id="emblems_KERNELBASE.dll"
282+ Name="KERNELBASE.dll"
283+ DiskId="1"
284+ Source="build_results\emblems_cache\KERNELBASE.dll"
285+ KeyPath="yes"/>
286+ </Component>
287+ <Component Id="EmblemsLibraryComponent"
288+ Guid="5b0d7640-e2ae-11df-85ca-0800200c9a66">
289+ <File Id="emblems_library.zip"
290+ Name="library.zip"
291+ DiskId="1"
292+ Source="build_results\emblems_cache\library.zip"
293+ KeyPath="yes"/>
294+ </Component>
295+ <Component Id="EmblemsMPRComponent"
296+ Guid="6e6d2dc0-e2ae-11df-85ca-0800200c9a66">
297+ <File Id="emblems_MPR.dll"
298+ Name="MPR.dll"
299+ DiskId="1"
300+ Source="build_results\emblems_cache\MPR.dll"
301+ KeyPath="yes"/>
302+ </Component>
303+ <Component Id="EmblemsMWSOCKComponent"
304+ Guid="a143b480-e2ae-11df-85ca-0800200c9a66">
305+ <File Id="emblems_MSWSOCK.dll"
306+ Name="MSWSOCK.dll"
307+ DiskId="1"
308+ Source="build_results\emblems_cache\MSWSOCK.dll"
309+ KeyPath="yes"/>
310+ </Component>
311+ <Component Id="EmblemsPOWRPROFComponent"
312+ Guid="c7530d60-e2ae-11df-85ca-0800200c9a66">
313+ <File Id="emblems_POWRPROF.dll"
314+ Name="POWRPROF.dll"
315+ DiskId="1"
316+ Source="build_results\emblems_cache\POWRPROF.dll"
317+ KeyPath="yes"/>
318+ </Component>
319+ <Component Id="EmblemsPyexpatComponent"
320+ Guid="e472cd40-e2ae-11df-85ca-0800200c9a66">
321+ <File Id="emblems_pyexpat.pyd"
322+ Name="pyexpat.pyd"
323+ DiskId="1"
324+ Source="build_results\emblems_cache\pyexpat.pyd"
325+ KeyPath="yes"/>
326+ </Component>
327+ <Component Id="EmblemsPythonDllComponent"
328+ Guid="99c47ef0-e2af-11df-85ca-0800200c9a66">
329+ <File Id="emblems_python26.dll"
330+ Name="python26.dll"
331+ DiskId="1"
332+ Source="build_results\emblems_cache\python26.dll"
333+ KeyPath="yes"/>
334+ </Component>
335+ <Component Id="EmblemsPyWinTypesComponent"
336+ Guid="b828a5b0-e2af-11df-85ca-0800200c9a66">
337+ <File Id="emblems_pywintypes26.dll"
338+ Name="pywintypes26.dll"
339+ DiskId="1"
340+ Source="build_results\emblems_cache\pywintypes26.dll"
341+ KeyPath="yes"/>
342+ </Component>
343+ <Component Id="EmblemsSelectComponent"
344+ Guid="d8e08070-e2af-11df-85ca-0800200c9a66">
345+ <File Id="emblems_select.pyd"
346+ Name="select.pyd"
347+ DiskId="1"
348+ Source="build_results\emblems_cache\select.pyd"
349+ KeyPath="yes"/>
350+ </Component>
351+ <Component Id="EmblemsUnicodeDataComponent"
352+ Guid="073cf0c0-e2b0-11df-85ca-0800200c9a66">
353+ <File Id="emblems_unicodedata.pyd"
354+ Name="unicodedata.pyd"
355+ DiskId="1"
356+ Source="build_results\emblems_cache\unicodedata.pyd"
357+ KeyPath="yes"/>
358+ </Component>
359+ <Component Id="EmblemsW9xopenComponent"
360+ Guid="236d2080-e2b0-11df-85ca-0800200c9a66">
361+ <File Id="emblems_w9xpopen.exe"
362+ Name="w9xpopen.exe"
363+ DiskId="1"
364+ Source="build_results\emblems_cache\w9xpopen.exe"
365+ KeyPath="yes"/>
366+ </Component>
367+ <Component Id="EmblemsWin32ApiComponent"
368+ Guid="5676ec40-e2b0-11df-85ca-0800200c9a66">
369+ <File Id="emblems_win32api.pyd"
370+ Name="win32api.pyd"
371+ DiskId="1"
372+ Source="build_results\emblems_cache\win32api.pyd"
373+ KeyPath="yes"/>
374+ </Component>
375+ <Component Id="EmblemsWin32EventComponent"
376+ Guid="7331f6e0-e2b0-11df-85ca-0800200c9a66">
377+ <File Id="emblems_win32event.pyd"
378+ Name="win32event.pyd"
379+ DiskId="1"
380+ Source="build_results\emblems_cache\win32event.pyd"
381+ KeyPath="yes"/>
382+ </Component>
383+ <Component Id="EmblemsWin32FileComponent"
384+ Guid="9c2dc150-e2b0-11df-85ca-0800200c9a66">
385+ <File Id="emblems_win32file.pyd"
386+ Name="win32file.pyd"
387+ DiskId="1"
388+ Source="build_results\emblems_cache\win32file.pyd"
389+ KeyPath="yes"/>
390+ </Component>
391+ <Component Id="EmblemsWin32PipeComponent"
392+ Guid="cbdeec30-e2b0-11df-85ca-0800200c9a66">
393+ <File Id="emblems_win32pipe.pyd"
394+ Name="win32pipe.pyd"
395+ DiskId="1"
396+ Source="build_results\emblems_cache\win32pipe.pyd"
397+ KeyPath="yes"/>
398+ </Component>
399+ <Component Id="EmblemsWnetComponent"
400+ Guid="e94e79c0-e2b0-11df-85ca-0800200c9a66">
401+ <File Id="emblems_win32wnet.pyd"
402+ Name="win32wnet.pyd"
403+ DiskId="1"
404+ Source="build_results\emblems_cache\win32wnet.pyd"
405+ KeyPath="yes"/>
406+ </Component>
407+ <Component Id="EmblemsAppComponent"
408+ Guid="06b072c0-e2b1-11df-85ca-0800200c9a66">
409+ <File Id="windows_emblems_cache.exe"
410+ Name="windows_emblems_cache.exe"
411+ DiskId="1"
412+ Source="build_results\emblems_cache\windows_emblems_cache.exe"
413+ KeyPath="yes"/>
414+ </Component>
415+ </Directory>
416+ <Directory Id="IconsOverlayDir"
417+ Name="IconsOverlay">
418+ <Component Id="IconsOverlaySysLoaderComponent"
419+ Guid="26ce6810-e68e-11df-9492-0800200c9a66">
420+ <File Id="icons_overlay_win32sysloader.pyd"
421+ Name="_win32sysloader.pyd"
422+ DiskId="1"
423+ Source="build_results\icons_overlay\_win32sysloader.pyd"
424+ KeyPath="yes"/>
425+ </Component>
426+ <Component Id="IconsOverlayWinCoreDebugComponent"
427+ Guid="3c8a10f0-e68e-11df-9492-0800200c9a66">
428+ <File Id="icons_overlay_API_MS_Win_Core_Debug_L1_1_0.dll"
429+ Name="API-MS-Win-Core-Debug-L1-1-0.dll"
430+ DiskId="1"
431+ Source="build_results\icons_overlay\API-MS-Win-Core-Debug-L1-1-0.dll"
432+ KeyPath="yes"/>
433+ </Component>
434+ <Component Id="IconsOverlayWinCoreDelayLoadComponent"
435+ Guid="3c8a10f1-e68e-11df-9492-0800200c9a66">
436+ <File Id="icons_overlay_API_MS_Win_Core_DelayLoad_L1_1_0.dll"
437+ Name="API-MS-Win-Core-DelayLoad-L1-1-0.dll"
438+ DiskId="1"
439+ Source="build_results\icons_overlay\API-MS-Win-Core-DelayLoad-L1-1-0.dll"
440+ KeyPath="yes"/>
441+ </Component>
442+ <Component Id="IconsOverlayWinCoreErrorHandlingComponent"
443+ Guid="3c8a10f2-e68e-11df-9492-0800200c9a66">
444+ <File Id="icons_overlay_API_MS_Win_Core_ErrorHandling_L1_1_0.dll"
445+ Name="API-MS-Win-Core-ErrorHandling-L1-1-0.dll"
446+ DiskId="1"
447+ Source="build_results\icons_overlay\API-MS-Win-Core-ErrorHandling-L1-1-0.dll"
448+ KeyPath="yes"/>
449+ </Component>
450+ <Component Id="IconsOverlayWinCoreHandleComponent"
451+ Guid="3c8a10f4-e68e-11df-9492-0800200c9a66">
452+ <File Id="icons_overlay_API_MS_Win_Core_Handle_L1_1_0.dll"
453+ Name="API-MS-Win-Core-Handle-L1-1-0.dll"
454+ DiskId="1"
455+ Source="build_results\icons_overlay\API-MS-Win-Core-Handle-L1-1-0.dll"
456+ KeyPath="yes"/>
457+ </Component>
458+ <Component Id="IconsOverlayWinCoreInterlockedComponent"
459+ Guid="3c8a10f5-e68e-11df-9492-0800200c9a66">
460+ <File Id="icons_overlay_API_MS_Win_Core_Interlocked_L1_1_0.dll"
461+ Name="API-MS-Win-Core-Interlocked-L1-1-0.dll"
462+ DiskId="1"
463+ Source="build_results\icons_overlay\API-MS-Win-Core-Interlocked-L1-1-0.dll"
464+ KeyPath="yes"/>
465+ </Component>
466+ <Component Id="IconsOverlayWinCoreIOComponent"
467+ Guid="3c8a10f6-e68e-11df-9492-0800200c9a66">
468+ <File Id="icons_overlay_API_MS_Win_Core_IO_L1_1_0.dll"
469+ Name="API-MS-Win-Core-IO-L1-1-0.dll"
470+ DiskId="1"
471+ Source="build_results\icons_overlay\API-MS-Win-Core-IO-L1-1-0.dll"
472+ KeyPath="yes"/>
473+ </Component>
474+ <Component Id="IconsOverlayWinCoreLibraryLoaderComponent"
475+ Guid="3c8a10f7-e68e-11df-9492-0800200c9a66">
476+ <File Id="icons_overlay_API_MS_Win_Core_LibraryLoader_L1_1_0.dll"
477+ Name="API-MS-Win-Core-LibraryLoader-L1-1-0.dll"
478+ DiskId="1"
479+ Source="build_results\icons_overlay\API-MS-Win-Core-LibraryLoader-L1-1-0.dll"
480+ KeyPath="yes"/>
481+ </Component>
482+ <Component Id="IconsOverlayWinCoreLocalizationComponent"
483+ Guid="9c1eaf60-e690-11df-9492-0800200c9a66">
484+ <File Id="icons_overlay_API_MS_Win_Core_LocalRegistry_L1_1_0.dll"
485+ Name="API-MS-Win-Core-LocalRegistry-L1-1-0.dll"
486+ DiskId="1"
487+ Source="build_results\icons_overlay\API-MS-Win-Core-LocalRegistry-L1-1-0.dll"
488+ KeyPath="yes"/>
489+ </Component>
490+ <Component Id="IconsOverlayWinCoreMemoryComponent"
491+ Guid="9c1eaf61-e690-11df-9492-0800200c9a66">
492+ <File Id="icons_overlay_API_MS_Win_Core_Memory_L1_1_0.dll"
493+ Name="API-MS-Win-Core-Memory-L1-1-0.dll"
494+ DiskId="1"
495+ Source="build_results\icons_overlay\API-MS-Win-Core-Memory-L1-1-0.dll"
496+ KeyPath="yes"/>
497+ </Component>
498+ <Component Id="IconsOverlayWinCoreMiscComponent"
499+ Guid="9c1eaf62-e690-11df-9492-0800200c9a66">
500+ <File Id="icons_overlay_API_MS_Win_Core_Misc_L1_1_0.dll"
501+ Name="API-MS-Win-Core-Misc-L1-1-0.dll"
502+ DiskId="1"
503+ Source="build_results\icons_overlay\API-MS-Win-Core-Misc-L1-1-0.dll"
504+ KeyPath="yes"/>
505+ </Component>
506+ <Component Id="IconsOverlayWinCoreProcessEnvironmentComponent"
507+ Guid="9c1eaf63-e690-11df-9492-0800200c9a66">
508+ <File Id="icons_overlay_API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll"
509+ Name="API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll"
510+ DiskId="1"
511+ Source="build_results\icons_overlay\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll"
512+ KeyPath="yes"/>
513+ </Component>
514+ <Component Id="IconsOverlayWinCoreProcessThreadsComponent"
515+ Guid="9c1eaf64-e690-11df-9492-0800200c9a66">
516+ <File Id="icons_overlay_API_MS_Win_Core_ProcessThreads_L1_1_0.dll"
517+ Name="API-MS-Win-Core-ProcessThreads-L1-1-0.dll"
518+ DiskId="1"
519+ Source="build_results\icons_overlay\API-MS-Win-Core-ProcessThreads-L1-1-0.dll"
520+ KeyPath="yes"/>
521+ </Component>
522+ <Component Id="IconsOverlayWinCoreProfileComponent"
523+ Guid="9c1eaf65-e690-11df-9492-0800200c9a66">
524+ <File Id="icons_overlay_API_MS_Win_Core_Profile_L1_1_0.dll"
525+ Name="API-MS-Win-Core-Profile-L1-1-0.dll"
526+ DiskId="1"
527+ Source="build_results\icons_overlay\API-MS-Win-Core-Profile-L1-1-0.dll"
528+ KeyPath="yes"/>
529+ </Component>
530+ <Component Id="IconsOverlayWinCoreStringComponent"
531+ Guid="9c1eaf66-e690-11df-9492-0800200c9a66">
532+ <File Id="icons_overlay_API_MS_Win_Core_String_L1_1_0.dll"
533+ Name="API-MS-Win-Core-String-L1-1-0.dll"
534+ DiskId="1"
535+ Source="build_results\icons_overlay\API-MS-Win-Core-String-L1-1-0.dll"
536+ KeyPath="yes"/>
537+ </Component>
538+ <Component Id="IconsOverlayWinCoreSynchComponent"
539+ Guid="9c1eaf67-e690-11df-9492-0800200c9a66">
540+ <File Id="icons_overlay_API_MS_Win_Core_Synch_L1_1_0.dll"
541+ Name="API-MS-Win-Core-Synch-L1-1-0.dll"
542+ DiskId="1"
543+ Source="build_results\icons_overlay\API-MS-Win-Core-Synch-L1-1-0.dll"
544+ KeyPath="yes"/>
545+ </Component>
546+ <Component Id="IconsOverlayWinCoreSysInfoComponent"
547+ Guid="9c1eaf68-e690-11df-9492-0800200c9a66">
548+ <File Id="icons_overlay_API_MS_Win_Core_SysInfo_L1_1_0.dll"
549+ Name="API-MS-Win-Core-SysInfo-L1-1-0.dll"
550+ DiskId="1"
551+ Source="build_results\icons_overlay\API-MS-Win-Core-SysInfo-L1-1-0.dll"
552+ KeyPath="yes"/>
553+ </Component>
554+ <Component Id="IconsOverlayWinCoreSecurityBaseComponent"
555+ Guid="9c1eaf69-e690-11df-9492-0800200c9a66">
556+ <File Id="icons_overlay_API_MS_Win_Security_Base_L1_1_0.dll"
557+ Name="API-MS-Win-Security-Base-L1-1-0.dll"
558+ DiskId="1"
559+ Source="build_results\icons_overlay\API-MS-Win-Security-Base-L1-1-0.dll"
560+ KeyPath="yes"/>
561+ </Component>
562+ <Component Id="IconsOverlayBz2Component"
563+ Guid="9c1ed670-e690-11df-9492-0800200c9a66">
564+ <File Id="icons_overlay_bz2.pyd"
565+ Name="bz2.pyd"
566+ DiskId="1"
567+ Source="build_results\icons_overlay\bz2.pyd"
568+ KeyPath="yes"/>
569+ </Component>
570+ <Component Id="IconsOverlayKernelComponent"
571+ Guid="9c1ed671-e690-11df-9492-0800200c9a66">
572+ <File Id="icons_overlay_KERNELBASE.dll"
573+ Name="KERNELBASE.dll"
574+ DiskId="1"
575+ Source="build_results\icons_overlay\KERNELBASE.dll"
576+ KeyPath="yes"/>
577+ </Component>
578+ <Component Id="IconsOverlayLibraryComponent"
579+ Guid="9c1ed673-e690-11df-9492-0800200c9a66">
580+ <File Id="icons_overlay_library.zip"
581+ Name="library.zip"
582+ DiskId="1"
583+ Source="build_results\icons_overlay\library.zip"
584+ KeyPath="yes"/>
585+ </Component>
586+ <Component Id="IconsOverlayMswsockComponent"
587+ Guid="9c1ed674-e690-11df-9492-0800200c9a66">
588+ <File Id="icons_overlay_MSWSOCK.dll"
589+ Name="MSWSOCK.dll"
590+ DiskId="1"
591+ Source="build_results\icons_overlay\MSWSOCK.dll"
592+ KeyPath="yes"/>
593+ </Component>
594+ <Component Id="IconsOverlayPowrprofComponent"
595+ Guid="9c1ed675-e690-11df-9492-0800200c9a66">
596+ <File Id="icons_overlay_POWRPROF.dll"
597+ Name="POWRPROF.dll"
598+ DiskId="1"
599+ Source="build_results\icons_overlay\POWRPROF.dll"
600+ KeyPath="yes"/>
601+ </Component>
602+ <Component Id="IconsOverlayPythonComponent"
603+ Guid="9c1ed676-e690-11df-9492-0800200c9a66">
604+ <File Id="icons_overlay_python26.dll"
605+ Name="python26.dll"
606+ DiskId="1"
607+ Source="build_results\icons_overlay\python26.dll"
608+ KeyPath="yes"/>
609+ </Component>
610+ <Component Id="IconsOverlayPython26Component"
611+ Guid="9c1ed677-e690-11df-9492-0800200c9a66">
612+ <File Id="icons_overlay_pythoncom26.dll"
613+ Name="pythoncom26.dll"
614+ DiskId="1"
615+ Source="build_results\icons_overlay\pythoncom26.dll"
616+ KeyPath="yes"/>
617+ </Component>
618+ <Component Id="IconsOverlayPyWintypes26Component"
619+ Guid="9c1ed678-e690-11df-9492-0800200c9a66">
620+ <File Id="icons_overlay_pywintypes26.dll"
621+ Name="pywintypes26.dll"
622+ DiskId="1"
623+ Source="build_results\icons_overlay\pywintypes26.dll"
624+ KeyPath="yes"/>
625+ </Component>
626+ <Component Id="IconsOverlayRegisterComponent"
627+ Guid="9c1ed679-e690-11df-9492-0800200c9a66">
628+ <File Id="icons_overlay_register.exe"
629+ Name="register.exe"
630+ DiskId="1"
631+ Source="build_results\icons_overlay\register.exe"
632+ KeyPath="yes"/>
633+ </Component>
634+ <Component Id="IconsOverlaySelectComponent"
635+ Guid="9c1ed67a-e690-11df-9492-0800200c9a66">
636+ <File Id="icons_overlay_select.pyd"
637+ Name="select.pyd"
638+ DiskId="1"
639+ Source="build_results\icons_overlay\select.pyd"
640+ KeyPath="yes"/>
641+ </Component>
642+ <Component Id="IconsOverlayUnicodedataComponent"
643+ Guid="9c1ed67b-e690-11df-9492-0800200c9a66">
644+ <File Id="icons_overlay_unicodedata.pyd"
645+ Name="unicodedata.pyd"
646+ DiskId="1"
647+ Source="build_results\icons_overlay\unicodedata.pyd"
648+ KeyPath="yes"/>
649+ </Component>
650+ <Component Id="IconsOverlayWx9popnComponent"
651+ Guid="9c1ed67c-e690-11df-9492-0800200c9a66">
652+ <File Id="icons_overlay_w9xpopen.exe"
653+ Name="w9xpopen.exe"
654+ DiskId="1"
655+ Source="build_results\icons_overlay\w9xpopen.exe"
656+ KeyPath="yes"/>
657+ </Component>
658+ <Component Id="IconsOverlayWin32ApiComponent"
659+ Guid="ac07cf01-e696-11df-9492-0800200c9a66">
660+ <File Id="icons_overlay_win32api.pyd"
661+ Name="win32api.pyd"
662+ DiskId="1"
663+ Source="build_results\icons_overlay\win32api.pyd"
664+ KeyPath="yes"/>
665+ </Component>
666+ <Component Id="IconsOverlayWin32EventComponent"
667+ Guid="99db8510-e6af-11df-9492-0800200c9a66">
668+ <File Id="icons_overlay_win32event.pyd"
669+ Name="win32event.pyd"
670+ DiskId="1"
671+ Source="build_results\icons_overlay\win32event.pyd"
672+ KeyPath="yes"/>
673+ </Component>
674+ <Component Id="IconsOverlayWin32FileComponent"
675+ Guid="99db8512-e6af-11df-9492-0800200c9a66">
676+ <File Id="icons_overlay_win32file.pyd"
677+ Name="win32file.pyd"
678+ DiskId="1"
679+ Source="build_results\icons_overlay\win32file.pyd"
680+ KeyPath="yes"/>
681+ </Component>
682+ <Component Id="IconsOverlayWin32PipeComponent"
683+ Guid="99db8513-e6af-11df-9492-0800200c9a66">
684+ <File Id="icons_overlay_win32pipe.pyd"
685+ Name="win32pipe.pyd"
686+ DiskId="1"
687+ Source="build_results\icons_overlay\win32pipe.pyd"
688+ KeyPath="yes"/>
689+ </Component>
690+ <Component Id="IconsOverlayWin32ProcessComponent"
691+ Guid="99db8514-e6af-11df-9492-0800200c9a66">
692+ <File Id="icons_overlay_win32process.pyd"
693+ Name="win32process.pyd"
694+ DiskId="1"
695+ Source="build_results\icons_overlay\win32process.pyd"
696+ KeyPath="yes"/>
697+ </Component>
698+ <Component Id="IconsOverlayWin32PGuiComponent"
699+ Guid="99db8523-e6af-11df-9492-0800200c9a66">
700+ <File Id="icons_overlay_winxpgui.pyd"
701+ Name="winxpgui.pyd"
702+ DiskId="1"
703+ Source="build_results\icons_overlay\winxpgui.pyd"
704+ KeyPath="yes"/>
705+ </Component>
706+ </Directory>
707 </Directory>
708 </Directory>
709 </Directory>
710@@ -730,6 +1388,9 @@
711 <ComponentRef Id="UbuntuOneGoDaddyClass2CAComponent" />
712 <ComponentRef Id="AddedIconComponent" />
713 <ComponentRef Id="ConflictIconComponent" />
714+ <ComponentRef Id="IsPresentUbuntuOneIconOverlayKey" />
715+ <ComponentRef Id="IsNewUbuntuOneIconOverlayKey" />
716+ <ComponentRef Id="IsConflictUbuntuOneIconOverlayKey" />
717 <!-- Client components -->
718 <ComponentRef Id="PhoenixLib" />
719 <ComponentRef Id="AvalonLib" />
720@@ -808,8 +1469,89 @@
721 <ComponentRef Id="UbuntuSSO" />
722 <ComponentRef Id="UbuntuSSOViews" />
723 <ComponentRef Id="Newtonsoft.Json" />
724+ <!-- Cache process -->
725+ <ComponentRef Id="EmblemsCTypesComponent" />
726+ <ComponentRef Id="EmblemsHashLibComponent" />
727+ <ComponentRef Id="EmblemsMultiprocessingComponent" />
728+ <ComponentRef Id="EmblemsSocketComponent" />
729+ <ComponentRef Id="EmblemsSSLComponent" />
730+ <ComponentRef Id="EmblemsSysLoaderComponent" />
731+ <ComponentRef Id="EmblemsCoreDebugComponent" />
732+ <ComponentRef Id="EmblemsDelayLoadComponent" />
733+ <ComponentRef Id="EmblemsErrorHandlingComponent" />
734+ <ComponentRef Id="EmblemsHandleComponent" />
735+ <ComponentRef Id="EmblemsInterlockedComponent" />
736+ <ComponentRef Id="EmblemsIOComponent" />
737+ <ComponentRef Id="EmblemsLibraryLoaderComponent" />
738+ <ComponentRef Id="EmblemsLocalizationComponent" />
739+ <ComponentRef Id="EmblemsLocaRegistryComponent" />
740+ <ComponentRef Id="EmblemsMemoryComponent" />
741+ <ComponentRef Id="EmblemsMiscComponent" />
742+ <ComponentRef Id="EmblemsProcessEnvironmentComponent" />
743+ <ComponentRef Id="EmblemsProcessThreadComponent" />
744+ <ComponentRef Id="EmblemsProfileComponent" />
745+ <ComponentRef Id="EmblemsStringComponent" />
746+ <ComponentRef Id="EmblemsSynchComponent" />
747+ <ComponentRef Id="EmblemsSysInfoComponent" />
748+ <ComponentRef Id="EmblemsSecurityComponent" />
749+ <ComponentRef Id="EmblemsBz2Component" />
750+ <ComponentRef Id="EmblemsKernelBaseComponent" />
751+ <ComponentRef Id="EmblemsLibraryComponent" />
752+ <ComponentRef Id="EmblemsMPRComponent" />
753+ <ComponentRef Id="EmblemsMWSOCKComponent" />
754+ <ComponentRef Id="EmblemsPOWRPROFComponent" />
755+ <ComponentRef Id="EmblemsPyexpatComponent" />
756+ <ComponentRef Id="EmblemsPythonDllComponent" />
757+ <ComponentRef Id="EmblemsPyWinTypesComponent" />
758+ <ComponentRef Id="EmblemsSelectComponent" />
759+ <ComponentRef Id="EmblemsUnicodeDataComponent" />
760+ <ComponentRef Id="EmblemsW9xopenComponent" />
761+ <ComponentRef Id="EmblemsWin32ApiComponent" />
762+ <ComponentRef Id="EmblemsWin32EventComponent" />
763+ <ComponentRef Id="EmblemsWin32FileComponent" />
764+ <ComponentRef Id="EmblemsWin32PipeComponent" />
765+ <ComponentRef Id="EmblemsWnetComponent" />
766+ <ComponentRef Id="EmblemsAppComponent" />
767+ <ComponentRef Id="EmblemsCacheAutostart" />
768+ <!-- emblems -->
769+ <ComponentRef Id="IconsOverlaySysLoaderComponent" />
770+ <ComponentRef Id="IconsOverlayWinCoreDebugComponent" />
771+ <ComponentRef Id="IconsOverlayWinCoreDelayLoadComponent" />
772+ <ComponentRef Id="IconsOverlayWinCoreErrorHandlingComponent" />
773+ <ComponentRef Id="IconsOverlayWinCoreHandleComponent" />
774+ <ComponentRef Id="IconsOverlayWinCoreInterlockedComponent" />
775+ <ComponentRef Id="IconsOverlayWinCoreIOComponent" />
776+ <ComponentRef Id="IconsOverlayWinCoreLibraryLoaderComponent" />
777+ <ComponentRef Id="IconsOverlayWinCoreLocalizationComponent" />
778+ <ComponentRef Id="IconsOverlayWinCoreMemoryComponent" />
779+ <ComponentRef Id="IconsOverlayWinCoreMiscComponent" />
780+ <ComponentRef Id="IconsOverlayWinCoreProcessEnvironmentComponent" />
781+ <ComponentRef Id="IconsOverlayWinCoreProcessThreadsComponent" />
782+ <ComponentRef Id="IconsOverlayWinCoreProfileComponent" />
783+ <ComponentRef Id="IconsOverlayWinCoreStringComponent" />
784+ <ComponentRef Id="IconsOverlayWinCoreSynchComponent" />
785+ <ComponentRef Id="IconsOverlayWinCoreSysInfoComponent" />
786+ <ComponentRef Id="IconsOverlayWinCoreSecurityBaseComponent" />
787+ <ComponentRef Id="IconsOverlayBz2Component" />
788+ <ComponentRef Id="IconsOverlayKernelComponent" />
789+ <ComponentRef Id="IconsOverlayLibraryComponent" />
790+ <ComponentRef Id="IconsOverlayMswsockComponent" />
791+ <ComponentRef Id="IconsOverlayPowrprofComponent" />
792+ <ComponentRef Id="IconsOverlayPythonComponent" />
793+ <ComponentRef Id="IconsOverlayPython26Component" />
794+ <ComponentRef Id="IconsOverlayPyWintypes26Component" />
795+ <ComponentRef Id="IconsOverlayRegisterComponent" />
796+ <ComponentRef Id="IconsOverlaySelectComponent" />
797+ <ComponentRef Id="IconsOverlayUnicodedataComponent" />
798+ <ComponentRef Id="IconsOverlayWx9popnComponent" />
799+ <ComponentRef Id="IconsOverlayWin32ApiComponent" />
800+ <ComponentRef Id="IconsOverlayWin32EventComponent" />
801+ <ComponentRef Id="IconsOverlayWin32FileComponent" />
802+ <ComponentRef Id="IconsOverlayWin32PipeComponent" />
803+ <ComponentRef Id="IconsOverlayWin32ProcessComponent" />
804+ <ComponentRef Id="IconsOverlayWin32PGuiComponent" />
805 </Feature>
806-
807+
808 <UI Id="WixUI_Minimal_No_License">
809 <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
810 <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
811@@ -854,5 +1596,18 @@
812 <WixVariable Id="WixUINewIco" Value="path\new.ico" />
813 <WixVariable Id="WixUIUpIco" Value="path\up.ico" /> -->
814
815+ <CustomAction Id="RegisterEmblems"
816+ FileKey="icons_overlay_register.exe"
817+ ExeCommand=""
818+ Impersonate="no"
819+ Execute="deferred"
820+ Return="ignore"/>
821+
822+ <InstallExecuteSequence>
823+
824+ <Custom Action="RegisterEmblems"
825+ After="InstallFiles" />
826+</InstallExecuteSequence>
827+
828 </Product>
829 </Wix>
830\ No newline at end of file
831
832=== modified file 'main.build'
833--- main.build 2010-10-20 23:23:31 +0000
834+++ main.build 2010-11-02 22:22:53 +0000
835@@ -225,10 +225,18 @@
836
837 <exec basedir="${python_path}"
838 managed="true"
839- workingdir="src"
840+ workingdir="src/sync"
841 program="python.exe"
842 commandline="setup.py py2exe --packages=ubuntuone.storageprotocol" />
843
844+ <!-- pack the program used to cache the overlays info. -->
845+
846+ <exec basedir="${python_path}"
847+ managed="true"
848+ workingdir="src/emblems_cache"
849+ program="python.exe"
850+ commandline="setup.py py2exe --packages=pkg_resources" />
851+
852 </target>
853
854 <target name="installer"
855@@ -277,10 +285,10 @@
856 <include name="*.config" />
857 </fileset>
858 </copy>
859-
860+
861 <!-- copy the results of the package_python to the install dir -->
862 <copy todir="${build_results}/u1sync" flatten="true">
863- <fileset basedir="src/dist">
864+ <fileset basedir="src/sync/dist">
865 <include name="*.*" />
866 </fileset>
867 </copy>
868@@ -291,6 +299,18 @@
869 </fileset>
870 </copy>
871
872+ <copy todir="${build_results}/emblems_cache" flatten="true">
873+ <fileset basedir="src/emblems_cache/dist">
874+ <include name="*.*" />
875+ </fileset>
876+ </copy>
877+
878+ <copy todir="${build_results}/icons_overlay" flatten="true">
879+ <fileset basedir="src/icons_overlay/dist">
880+ <include name="*.*" />
881+ </fileset>
882+ </copy>
883+
884 <!-- copy the correct views lib -->
885
886 <copy todir="${build_results}/Client" flatten="true">
887
888=== modified file 'src/Version.cs'
889--- src/Version.cs 2010-10-12 10:06:34 +0000
890+++ src/Version.cs 2010-11-02 22:22:53 +0000
891@@ -3,13 +3,13 @@
892 //------------------------------------------------------------------------------
893 // <auto-generated>
894 // This code was generated by a tool.
895-// Runtime Version:2.0.50727.4952
896+// Runtime Version:4.0.30319.1
897 //
898 // Changes to this file may cause incorrect behavior and will be lost if
899 // the code is regenerated.
900 // </auto-generated>
901 //------------------------------------------------------------------------------
902
903-[assembly: AssemblyVersionAttribute("1.0.611.8185")]
904-[assembly: AssemblyFileVersionAttribute("1.0.611.8185")]
905+[assembly: AssemblyVersionAttribute("1.0.623.7177")]
906+[assembly: AssemblyFileVersionAttribute("1.0.623.7177")]
907
908
909=== added directory 'src/emblems_cache'
910=== added file 'src/emblems_cache/setup.py'
911--- src/emblems_cache/setup.py 1970-01-01 00:00:00 +0000
912+++ src/emblems_cache/setup.py 2010-11-02 22:22:53 +0000
913@@ -0,0 +1,52 @@
914+#!/usr/bin/env python
915+# Copyright (C) 2010 Canonical - All Rights Reserved
916+
917+""" """
918+import sys
919+from glob import glob
920+
921+# ModuleFinder can't handle runtime changes to __path__, but win32com uses them
922+try:
923+ # py2exe 0.6.4 introduced a replacement modulefinder.
924+ # This means we have to add package paths there, not to the built-in
925+ # one. If this new modulefinder gets integrated into Python, then
926+ # we might be able to revert this some day.
927+ # if this doesn't work, try import modulefinder
928+ try:
929+ import py2exe.mf as modulefinder
930+ except ImportError:
931+ import modulefinder
932+ import win32com
933+ for p in win32com.__path__[1:]:
934+ modulefinder.AddPackagePath("win32com", p)
935+ for extra in ["win32com.shell" ,"win32com.api", "win32event", "win32pipe", "win32file"]:
936+ __import__(extra)
937+ m = sys.modules[extra]
938+ for p in m.__path__[1:]:
939+ modulefinder.AddPackagePath(extra, p)
940+except ImportError:
941+ # no build path setup, no worries.
942+ pass
943+
944+from distutils.core import setup
945+import py2exe
946+
947+if __name__ == '__main__':
948+
949+ setup(
950+ options = {
951+ "py2exe": {
952+ "compressed": 1,
953+ "optimize": 2}},
954+ name='emblems_cache',
955+ version='0.0.1',
956+ author = "Canonical Online Services Hackers",
957+ description="""Cache utility used to allow a better performance wen
958+ working with windows emblems.""",
959+ data_files = [("Microsoft.VC90.CRT", glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))],
960+ license='GPLv3',
961+ console=['windows_emblems_cache.py'],
962+ requires=[
963+ 'python (>= 2.5)',
964+ ],
965+ )
966
967=== added file 'src/emblems_cache/windows_emblems_cache.py'
968--- src/emblems_cache/windows_emblems_cache.py 1970-01-01 00:00:00 +0000
969+++ src/emblems_cache/windows_emblems_cache.py 2010-11-02 22:22:53 +0000
970@@ -0,0 +1,111 @@
971+# u1syn.windows_emblems_cache
972+#
973+# u1sync metadata routines
974+#
975+# Author: Manuel de la Pena <manuel.delapena@canonical.com>
976+#
977+# Copyright 2010 Canonical Ltd.
978+#
979+# This program is free software: you can redistribute it and/or modify it
980+# under the terms of the GNU General Public License version 3, as published
981+# by the Free Software Foundation.
982+#
983+# This program is distributed in the hope that it will be useful, but
984+# WITHOUT ANY WARRANTY; without even the implied warranties of
985+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
986+# PURPOSE. See the GNU General Public License for more details.
987+#
988+# You should have received a copy of the GNU General Public License along
989+# with this program. If not, see <http://www.gnu.org/licenses/>.
990+import json
991+from itertools import count
992+from multiprocessing import Process, freeze_support
993+import win32event, win32pipe, win32file, pywintypes, winerror
994+
995+from u1sync.constants import (WAS_MODIFIED_MESSAGE,
996+ WAS_ADDED_MESSAGE,
997+ IS_IN_ROOT)
998+from u1sync.icons import FileTracker
999+
1000+class IconsOverlayCacheService(object):
1001+ """Represents the object that caches the embles state."""
1002+
1003+ pipe_name = r'\\.\pipe\ubuntuone_emblems'
1004+
1005+
1006+ def __init__(self, tracker):
1007+ self._tracker = tracker
1008+
1009+ def _process_request(self, message, pipe_handle):
1010+ """Process the message from the emblems client."""
1011+ print message["type"]
1012+ reply = {}
1013+ if(message["type"] == WAS_MODIFIED_MESSAGE):
1014+ reply["type"] = WAS_MODIFIED_MESSAGE
1015+ reply["reply"] = self._tracker.file_was_modified(
1016+ message["request"])
1017+ if(message["type"] == WAS_ADDED_MESSAGE):
1018+ reply["type"] = WAS_MODIFIED_MESSAGE
1019+ reply["reply"] = self._tracker.file_was_added(
1020+ message["request"])
1021+ if(message["type"] == IS_IN_ROOT):
1022+ reply["type"] = IS_IN_ROOT,
1023+ reply["reply"] = self._tracker.file_is_in_ubuntuone_root(
1024+ message["request"])
1025+ print reply
1026+ win32file.WriteFile(pipe_handle, json.dumps(reply), None)
1027+ win32file.FlushFileBuffers(pipe_handle)
1028+
1029+ def run(self):
1030+ """Start the pipe server for communication in a thread."""
1031+ open_mode = win32pipe.PIPE_ACCESS_DUPLEX | win32file.FILE_FLAG_OVERLAPPED
1032+ pipe_mode = win32pipe.PIPE_TYPE_MESSAGE
1033+
1034+ sa = pywintypes.SECURITY_ATTRIBUTES()
1035+ sa.SetSecurityDescriptorDacl(1, None, 0)
1036+
1037+ pipe_handle = win32pipe.CreateNamedPipe(
1038+ self.pipe_name, open_mode, pipe_mode,
1039+ win32pipe.PIPE_UNLIMITED_INSTANCES,
1040+ 0, 0, 6000, sa
1041+ )
1042+
1043+ overlapped = pywintypes.OVERLAPPED()
1044+ overlapped.hEvent = win32event.CreateEvent(None, 0, 0, None)
1045+
1046+ while 1:
1047+ try:
1048+ hr = win32pipe.ConnectNamedPipe(pipe_handle, overlapped)
1049+ except:
1050+ # Error connecting pipe
1051+ pipe_handle.Close()
1052+ break
1053+
1054+ if hr == winerror.ERROR_PIPE_CONNECTED:
1055+ # Client is fast, and already connected - signal event
1056+ win32event.SetEvent(overlapped.hEvent)
1057+ rc = win32event.WaitForSingleObject(
1058+ overlapped.hEvent, win32event.INFINITE
1059+ )
1060+ if rc == win32event.WAIT_OBJECT_0:
1061+ try:
1062+ hr, data = win32file.ReadFile(pipe_handle, 3000)
1063+ message = json.loads(data)
1064+ self._process_request(message, pipe_handle)
1065+ win32pipe.DisconnectNamedPipe(pipe_handle)
1066+ except win32file.error:
1067+ continue
1068+
1069+if __name__ == '__main__':
1070+ freeze_support()
1071+ tracker = FileTracker()
1072+ # creat diff threads to listen to messages form the emblems
1073+ for thread_number in count(0):
1074+ cache_service = IconsOverlayCacheService(tracker)
1075+ listening_thread = Process(target=cache_service.run, name='Emblems thread %i' % thread_number)
1076+ listening_thread.start()
1077+ if thread_number == 15:
1078+ break
1079+ # listen with an other object
1080+ main_cache = IconsOverlayCacheService(tracker)
1081+ main_cache.run()
1082\ No newline at end of file
1083
1084=== added directory 'src/icons_overlay'
1085=== added file 'src/icons_overlay/icons_overlay.py'
1086--- src/icons_overlay/icons_overlay.py 1970-01-01 00:00:00 +0000
1087+++ src/icons_overlay/icons_overlay.py 2010-11-02 22:22:53 +0000
1088@@ -0,0 +1,120 @@
1089+import os
1090+import json
1091+from win32com.shell import shell, shellcon
1092+import winerror, win32file, win32pipe
1093+
1094+pipe_name = r'\\.\pipe\ubuntuone_emblems'
1095+
1096+def create_pipe_handle():
1097+ hPipe = win32file.CreateFile(
1098+ pipe_name, # pipe name
1099+ win32file.GENERIC_READ | # read and write access
1100+ win32file.GENERIC_WRITE,
1101+ 0, # no sharing
1102+ None, # default security attributes
1103+ win32file.OPEN_EXISTING, # opens existing pipe
1104+ 0, # default attributes
1105+ None) # no template file
1106+ # set the handler state
1107+ success = win32pipe.SetNamedPipeHandleState(
1108+ hPipe, # pipe handle
1109+ win32pipe.PIPE_READMODE_MESSAGE, # new pipe mode
1110+ None, # don't set maximum bytes
1111+ None) # don't set maximum time
1112+ return hPipe
1113+
1114+def send_message(message):
1115+ """Send message over the pipe."""
1116+ pipe_handle = create_pipe_handle()
1117+ if pipe_handle:
1118+ # create the overlapped to be used
1119+ win32file.WriteFile(pipe_handle, json.dumps(message), None)
1120+ win32file.FlushFileBuffers(pipe_handle)
1121+ rc, message = win32file.ReadFile(pipe_handle, 3000)
1122+ if rc == 0:
1123+ reply = json.loads(message)
1124+ return reply["reply"]
1125+ return False
1126+
1127+def file_was_added(fname):
1128+ """Request status of the file to the cache."""
1129+ # create the message to be sent to the cache
1130+ message = {"type": "added",
1131+ "request": fname}
1132+ return send_message(message)
1133+
1134+def file_was_modified(fname):
1135+ """Request status of the file to the cache."""
1136+ # create the message to be sent to the cache
1137+ message = {"type": "modified",
1138+ "request": fname}
1139+ return send_message(message)
1140+
1141+def file_is_in_ubuntuone_root(fname):
1142+ """Request if the file is in the ubuntu one root."""
1143+ message = {"type":"in_root",
1144+ "request":fname}
1145+ return send_message(message)
1146+
1147+class IsPresentUbuntuOneIconOverlay:
1148+
1149+ _reg_clsid_ = '{4FC554DF-F0EE-4A4F-966C-9C49CCF14D59}'
1150+ _reg_progid_ = 'TJG.IsPresentUbuntuOneIconOverlay'
1151+ _reg_desc_ = 'Icon Overlay Handler to indicate Python packages'
1152+ _public_methods_ = ['GetOverlayInfo', 'GetPriority', 'IsMemberOf']
1153+ _com_interfaces_ = [shell.IID_IShellIconOverlayIdentifier]
1154+
1155+ def __init__(self):
1156+ self.cache = {}
1157+
1158+ def GetOverlayInfo(self):
1159+ return (r'C:\Users\Mandel\Documents\Projects\ubuntuone\net\fix_overlay\data\added.ico', 0, shellcon.ISIOI_ICONFILE)
1160+
1161+ def GetPriority(self):
1162+ return 50
1163+
1164+ def IsMemberOf(self, fname, attributes):
1165+ if file_was_added(fname) and\
1166+ not file_was_modified(fname):
1167+ return winerror.S_OK
1168+ return winerror.E_FAIL
1169+
1170+class IsNewUbuntuOneIconOverlay:
1171+
1172+ _reg_clsid_ = '{a9694f20-ddbe-11df-85ca-0800200c9a66}'
1173+ _reg_progid_ = 'TJG.IsNewUbuntuOneIconOverlay'
1174+ _reg_desc_ = 'Icon Overlay Handler to indicate Python packages'
1175+ _public_methods_ = ['GetOverlayInfo', 'GetPriority', 'IsMemberOf']
1176+ _com_interfaces_ = [shell.IID_IShellIconOverlayIdentifier]
1177+
1178+ def GetOverlayInfo(self):
1179+ return (r'C:\Users\Mandel\Documents\Projects\ubuntuone\net\fix_overlay\data\new.ico', 0, shellcon.ISIOI_ICONFILE)
1180+
1181+ def GetPriority(self):
1182+ return 50
1183+
1184+ def IsMemberOf(self, fname, attributes):
1185+ if file_is_in_ubuntuone_root(fname) and\
1186+ not file_was_added(fname):
1187+ return winerror.S_OK
1188+ return winerror.E_FAIL
1189+
1190+class IsConflictUbuntuOneIconOverlay:
1191+
1192+ _reg_clsid_ = '{3dc7f120-ded8-11df-85ca-0800200c9a66}'
1193+ _reg_progid_ = 'TJG.IsConflictUbuntuOneIconOverlay'
1194+ _reg_desc_ = 'Icon Overlay Handler to indicate Python packages'
1195+ _public_methods_ = ['GetOverlayInfo', 'GetPriority', 'IsMemberOf']
1196+ _com_interfaces_ = [shell.IID_IShellIconOverlayIdentifier]
1197+
1198+ def GetOverlayInfo(self):
1199+ return (r'C:\Users\Mandel\Documents\Projects\ubuntuone\net\fix_overlay\data\conflict.ico', 0, shellcon.ISIOI_ICONFILE)
1200+
1201+ def GetPriority(self):
1202+ return 50
1203+
1204+ def IsMemberOf(self, fname, attributes):
1205+ if file_was_added(fname) and\
1206+ file_was_modified(fname):
1207+ return winerror.S_OK
1208+ return winerror.E_FAIL
1209\ No newline at end of file
1210
1211=== added file 'src/icons_overlay/register.py'
1212--- src/icons_overlay/register.py 1970-01-01 00:00:00 +0000
1213+++ src/icons_overlay/register.py 2010-11-02 22:22:53 +0000
1214@@ -0,0 +1,20 @@
1215+"""
1216+Register the windows shell extensions that will allow to
1217+show icon overlays for ubuntu one.
1218+"""
1219+import _winreg
1220+import win32api
1221+import win32con
1222+import win32com.server.register
1223+import sys
1224+from icons_overlay import (IsPresentUbuntuOneIconOverlay,
1225+ IsNewUbuntuOneIconOverlay,
1226+ IsConflictUbuntuOneIconOverlay)
1227+
1228+# added files
1229+win32com.server.register.UseCommandLine (IsPresentUbuntuOneIconOverlay)
1230+# new files
1231+win32com.server.register.UseCommandLine (IsNewUbuntuOneIconOverlay)
1232+# conflict
1233+win32com.server.register.UseCommandLine (IsConflictUbuntuOneIconOverlay)
1234+sys.exit(0)
1235\ No newline at end of file
1236
1237=== added file 'src/icons_overlay/setup.py'
1238--- src/icons_overlay/setup.py 1970-01-01 00:00:00 +0000
1239+++ src/icons_overlay/setup.py 2010-11-02 22:22:53 +0000
1240@@ -0,0 +1,50 @@
1241+#!/usr/bin/env python
1242+# Copyright (C) 2010 Canonical - All Rights Reserved
1243+
1244+""" """
1245+import sys
1246+from glob import glob
1247+
1248+# ModuleFinder can't handle runtime changes to __path__, but win32com uses them
1249+try:
1250+ # py2exe 0.6.4 introduced a replacement modulefinder.
1251+ # This means we have to add package paths there, not to the built-in
1252+ # one. If this new modulefinder gets integrated into Python, then
1253+ # we might be able to revert this some day.
1254+ # if this doesn't work, try import modulefinder
1255+ try:
1256+ import py2exe.mf as modulefinder
1257+ except ImportError:
1258+ import modulefinder
1259+ import win32com
1260+ for p in win32com.__path__[1:]:
1261+ modulefinder.AddPackagePath("win32com", p)
1262+ for extra in ["win32com.shell" ,"win32com.api"]:
1263+ __import__(extra)
1264+ m = sys.modules[extra]
1265+ for p in m.__path__[1:]:
1266+ modulefinder.AddPackagePath(extra, p)
1267+except ImportError:
1268+ # no build path setup, no worries.
1269+ pass
1270+
1271+from distutils.core import setup
1272+import py2exe
1273+
1274+if __name__ == '__main__':
1275+
1276+ setup(
1277+ options = {
1278+ "py2exe": {
1279+ "compressed": 1,
1280+ "optimize": 2}},
1281+ name='u1ovelay_register',
1282+ version='0.0.1',
1283+ author = "Canonical Online Services Hackers",
1284+ description="""Icon overlays used by ubuntuone""",
1285+ data_files = [("Microsoft.VC90.CRT", glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))],
1286+ license='GPLv3',
1287+ console=['register.py'],
1288+ requires=[
1289+ 'python (>= 2.5)'],
1290+ )
1291
1292=== added directory 'src/sync'
1293=== renamed file 'src/setup.py' => 'src/sync/setup.py'
1294=== renamed directory 'src/u1sync' => 'src/sync/u1sync'
1295=== modified file 'src/sync/u1sync/constants.py'
1296--- src/u1sync/constants.py 2010-08-25 22:44:43 +0000
1297+++ src/sync/u1sync/constants.py 2010-11-02 22:22:53 +0000
1298@@ -28,3 +28,7 @@
1299 SPECIAL_FILE_RE = re.compile(".*\\.("
1300 "(u1)?partial|part|"
1301 "(u1)?conflict(\\.[0-9]+)?)$")
1302+
1303+WAS_MODIFIED_MESSAGE = "modified"
1304+WAS_ADDED_MESSAGE = "added"
1305+IS_IN_ROOT = "in_root"
1306\ No newline at end of file
1307
1308=== modified file 'src/sync/u1sync/genericmerge.py'
1309--- src/u1sync/genericmerge.py 2010-08-26 14:50:11 +0000
1310+++ src/sync/u1sync/genericmerge.py 2010-11-02 22:22:53 +0000
1311@@ -55,8 +55,6 @@
1312 type_str = "DIR "
1313 else:
1314 type_str = "FILE"
1315- print "%s%-36s %s %s %s" % (indent, tree.uuid, type_str, name,
1316- tree.content_hash)
1317 if tree.node_type == DIRECTORY and tree.children is not None:
1318 for name in sorted(tree.children.keys()):
1319 subtree = tree.children[name]
1320
1321=== modified file 'src/sync/u1sync/icons.py'
1322--- src/u1sync/icons.py 2010-10-20 11:18:55 +0000
1323+++ src/sync/u1sync/icons.py 2010-11-02 22:22:53 +0000
1324@@ -1,6 +1,5 @@
1325 # Ubuntu One windows Ion overlays
1326 #
1327-# Author: Tim Cole <tim.cole@canonical.com>
1328 #
1329 # Copyright 2009 Canonical Ltd.
1330 #
1331@@ -16,88 +15,125 @@
1332 # You should have received a copy of the GNU General Public License along
1333 # with this program. If not, see <http://www.gnu.org/licenses/>.
1334 import os
1335-from win32com.shell import shell, shellcon
1336-import winerror
1337-import _winreg
1338-import win32api
1339-import win32con
1340-import win32com.server.register
1341-from u1sync import metadata
1342+import hashlib
1343+import shutil
1344+from metadata import read
1345 from u1sync.constants import METADATA_DIR_NAME
1346+
1347+def calculate_hash(path):
1348+ if not path.startswith("\\\\?\\"):
1349+ path = "\\\\?\\" + path
1350+ sum = hashlib.sha1()
1351
1352-UBUNTU_ONE_ICON_REG_PATH = r"Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\UbuntuOneIconOverlay"
1353-def get_icon_root_location():
1354- # First open the registry hive
1355- hive = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
1356- key = _winreg.OpenKey(hive, "Software\Canonical\UbuntuOne")
1357- for i in range(0, _winreg.QueryInfoKey(key)[1]):
1358- name, value, val_type = _winreg.EnumValue(key, i)
1359- # Common AppData will always be present unless the user played with regedit
1360- if name == "InstallationPath":
1361- return os.path.join(value, "icons")
1362-
1363-def file_is_in_ubuntuone_root(path):
1364- absolute_path = os.path.abspath(path)
1365- while True:
1366- metadir = os.path.join(absolute_path, METADATA_DIR_NAME)
1367- if os.path.exists(metadir):
1368- return True
1369- if absolute_path == "C:\\":
1370- return False
1371- absolute_path = os.path.split(absolute_path)[0]
1372- return True
1373-
1374-def get_metadata_dir(path):
1375- # we need to find the metadata
1376- absolute_path = os.path.abspath(path)
1377- while True:
1378- metadir = os.path.join(absolute_path, METADATA_DIR_NAME)
1379- if os.path.exists(metadir):
1380- return metadir
1381- if absolute_path == "C:\\":
1382- None
1383- absolute_path = os.path.split(absolute_path)[0]
1384- return None
1385-
1386-def file_was_modified(path):
1387- absolute_path = os.path.abspath(path)
1388- metadir = get_metadata_dir(path)
1389- modified_files = open(os.path.join(metadir, "modified.data"), "rb")
1390- modified_data = modified_files.read()
1391- index = modified_data.find(absolute_path)
1392- return index >= 0
1393+ class HashStream(object):
1394+ """Stream that computes hashes."""
1395+ def write(self, bytes):
1396+ """Accumulate bytes."""
1397+ sum.update(bytes)
1398+
1399+ with open(path, "rb") as stream:
1400+ shutil.copyfileobj(stream, HashStream())
1401+ return "sha1:%s" % sum.hexdigest()
1402+
1403+class FileTracker(object):
1404+ """Track the operations on files"""
1405+
1406+ def __init__(self):
1407+ self.root_cache = {}
1408+ self.added_cache = {}
1409+ self.modified_cache = {}
1410+
1411+ def file_is_in_ubuntuone_root(self, path):
1412+ if not path.startswith("\\\\?\\"):
1413+ path = "\\\\?\\" + path
1414+ if path in self.root_cache:
1415+ return self.root_cache[path]
1416+
1417+ while True:
1418+ metadir = os.path.join(path, METADATA_DIR_NAME)
1419+ if os.path.exists(metadir):
1420+ self.root_cache[path] = True
1421+ return self.root_cache[path]
1422+ if path == "\\\\?\\C:\\":
1423+ self.root_cache[path] = False
1424+ return self.root_cache[path]
1425+ path = os.path.split(path)[0]
1426
1427-class UbuntuOneIconOverlay:
1428- _reg_clsid_ = '{a9a25b70-d766-11df-937b-0800200c9a66}'
1429- _reg_progid_ = 'TJG.PythonPackagesOverlayHandler'
1430- _reg_desc_ = 'Icon Overlay Handler to indicate Python packages'
1431- _public_methods_ = ['GetOverlayInfo', 'GetPriority', 'IsMemberOf']
1432- _com_interfaces_ = [shell.IID_IShellIconOverlayIdentifier]
1433-
1434- def GetOverlayInfo(self):
1435- icon_path = os.path.join(get_icon_root_location(), "ubuntu-logo-32x32.ico")
1436- return (icon_path, 0, shellcon.ISIOI_ICONFILE)
1437-
1438- def GetPriority(self):
1439- return 50
1440-
1441- def IsMemberOf(self, fname, attributes):
1442- if os.path.exists (os.path.join (fname, METADATA_DIR_NAME)):
1443- return winerror.S_OK
1444- return winerror.E_FAIL
1445-
1446-def icon_overlays_are_registered():
1447- # First open the registry hive
1448- hive = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
1449- # Then open the registry key where we stored the overlays
1450- try:
1451- key = _winreg.OpenKey(hive, UBUNTU_ONE_ICON_REG_PATH)
1452+ def get_metadata_dir(self, path):
1453+ # we need to find the metadata
1454+ if not path.startswith("\\\\?\\"):
1455+ path = "\\\\?\\" + path
1456+ while True:
1457+ metadir = os.path.join(path, METADATA_DIR_NAME)
1458+ if os.path.exists(metadir):
1459+ return metadir
1460+ if path == "\\\\?\\C:\\":
1461+ None
1462+ path = os.path.split(path)[0]
1463+ return None
1464+
1465+ def file_was_modified(self, path):
1466+ if not path.startswith("\\\\?\\"):
1467+ path = "\\\\?\\" + path
1468+ modified_time = os.path.getmtime(path)
1469+ if path in self.modified_cache and\
1470+ self.modified_cache[path][1] == modified_time:
1471+ return self.modified_cache[path][0]
1472+ if self.file_is_in_ubuntuone_root(path):
1473+ if not os.path.isdir(path):
1474+ metadata_dir = self.get_metadata_dir(path)
1475+ data = read(metadata_dir).local_tree
1476+ metadata_dir = os.path.split(metadata_dir)[0]
1477+ path_copy = path.replace(metadata_dir + "\\","")
1478+ while True:
1479+ sep_position = path_copy.find("\\")
1480+ if sep_position > 0:
1481+ partial_path = path_copy[:sep_position]
1482+ else:
1483+ partial_path = path_copy
1484+ if partial_path == path_copy:
1485+ self.modified_cache[path] = [
1486+ data == calculate_hash(path),
1487+ modified_time]
1488+ return data == calculate_hash(path)
1489+ if partial_path in data.children:
1490+ path_copy = path_copy[path_copy.find("\\") + 1:]
1491+ data = data.children[partial_path]
1492+ else:
1493+ self.modified_cache[path] = [
1494+ True,
1495+ modified_time]
1496+ return True
1497+ else:
1498+ is_modified = False
1499+ for child in os.listdir(path):
1500+ is_modified = is_modified or\
1501+ self.file_was_modified(
1502+ os.path.join(path, child))
1503+ return is_modified
1504 return True
1505- except:
1506+
1507+ def file_was_added(self, path):
1508+ if not path.startswith("\\\\?\\"):
1509+ path = "\\\\?\\" + path
1510+ if self.file_is_in_ubuntuone_root(path):
1511+ metadata_dir = self.get_metadata_dir(path)
1512+ data = read(metadata_dir).local_tree
1513+ metadata_dir = os.path.split(metadata_dir)[0]
1514+ path = path.replace(metadata_dir + "\\","")
1515+ while True:
1516+ sep_position = path.find("\\")
1517+ if sep_position > 0:
1518+ partial_path = path[:sep_position]
1519+ else:
1520+ partial_path = path
1521+ if partial_path == path and\
1522+ partial_path in data.children:
1523+ return True
1524+ if partial_path in data.children:
1525+ path = path[path.find("\\") + 1:]
1526+ data = data.children[partial_path]
1527+ else:
1528+ return False
1529 return False
1530-
1531-def register_icon_overlays():
1532- win32com.server.register.UseCommandLine (UbuntuOneIconOverlay)
1533- key = win32api.RegCreateKey (win32con.HKEY_LOCAL_MACHINE, UBUNTU_ONE_ICON_REG_PATH)
1534- win32api.RegSetValue (key, None, win32con.REG_SZ, UbuntuOneIconOverlay._reg_clsid_)
1535-
1536\ No newline at end of file
1537+
1538\ No newline at end of file
1539
1540=== modified file 'src/sync/u1sync/main.py'
1541--- src/u1sync/main.py 2010-11-02 22:22:52 +0000
1542+++ src/sync/u1sync/main.py 2010-11-02 22:22:53 +0000
1543@@ -47,6 +47,7 @@
1544 from u1sync import metadata
1545 from u1sync.constants import METADATA_DIR_NAME
1546 from u1sync.ubuntuone_optparse import UbuntuOneOptionsParser
1547+from u1sync.icons import file_was_added, file_was_modified
1548
1549 # pylint: disable-msg=W0212
1550 NODE_TYPE_ENUM = dircontent_pb2._NODETYPE
1551@@ -209,7 +210,6 @@
1552 status = " [not accepted]"
1553 else:
1554 status = ""
1555- print "%s %s (from %s) [%s]%s" % (id, name, user, access, status)
1556
1557 def do_diff(client, share_spec, directory, quiet, subtree_path,
1558 ignore_symlinks=True):
1559@@ -323,6 +323,12 @@
1560 finally:
1561 reactor.callWhenRunning(reactor.stop)
1562
1563+ # test if the user wants to know f a path was added or modified
1564+ if options_parser.options.was_added:
1565+ return file_was_added(options_parser.options.was_added)
1566+ if options_parser.options.was_modified:
1567+ return file_was_modified(options_parser.options.was_modified)
1568+
1569 queue = Queue()
1570 reactor.callInThread(capture_exception, queue, run_client)
1571 reactor.run(installSignalHandlers=False)
1572@@ -333,7 +339,9 @@
1573 def main(argv):
1574 """Top-level main function."""
1575 try:
1576- do_main(argv, UbuntuOneOptionsParser())
1577+ result = do_main(argv, UbuntuOneOptionsParser())
1578+ if result is not None:
1579+ print result
1580 except AuthenticationError, e:
1581 send_error("Authentication failed: %s" % e, e)
1582 print "Authentication failed: %s" % e
1583
1584=== modified file 'src/sync/u1sync/metadata.py'
1585--- src/u1sync/metadata.py 2010-10-19 10:35:43 +0000
1586+++ src/sync/u1sync/metadata.py 2010-11-02 22:22:53 +0000
1587@@ -22,7 +22,7 @@
1588 from __future__ import with_statement
1589
1590 import os
1591-import cPickle as pickle
1592+import pickle
1593 from errno import ENOENT
1594 from contextlib import contextmanager
1595 from ubuntuone.storageprotocol.dircontent_pb2 import DIRECTORY
1596@@ -43,7 +43,6 @@
1597
1598 def read(metadata_dir):
1599 """Read metadata for a mirror rooted at directory."""
1600- send_notification("Reading", "Reading metadata.", "info")
1601 index_file = os.path.join(metadata_dir, "local-index")
1602 share_uuid_file = os.path.join(metadata_dir, "share-uuid")
1603 root_uuid_file = os.path.join(metadata_dir, "root-uuid")
1604
1605=== modified file 'src/sync/u1sync/scan.py'
1606--- src/u1sync/scan.py 2010-10-19 10:35:43 +0000
1607+++ src/sync/u1sync/scan.py 2010-11-02 22:22:53 +0000
1608@@ -36,13 +36,10 @@
1609
1610 def scan_directory(path, display_path="", quiet=False):
1611 """Scans a local directory and builds an in-memory tree from it."""
1612- if display_path != "" and not quiet:
1613- print display_path
1614
1615 link_target = None
1616 child_names = None
1617 try:
1618- print "Path is " + str(path)
1619 if sys.platform == "win32":
1620 if path.endswith(".lnk") or path.endswith(".url"):
1621 import win32com.client
1622@@ -50,7 +47,6 @@
1623 pythoncom.CoInitialize()
1624 shell = win32com.client.Dispatch("WScript.Shell")
1625 shortcut = shell.CreateShortCut(path)
1626- print(shortcut.Targetpath)
1627 link_target = shortcut.Targetpath
1628 else:
1629 link_target = None
1630
1631=== modified file 'src/sync/u1sync/ubuntuone_optparse.py'
1632--- src/u1sync/ubuntuone_optparse.py 2010-09-27 17:33:52 +0000
1633+++ src/sync/u1sync/ubuntuone_optparse.py 2010-11-02 22:22:53 +0000
1634@@ -102,6 +102,12 @@
1635 self.add_option("--subtree", dest="subtree", metavar="PATH",
1636 default=None,
1637 help="Mirror a subset of the share or volume")
1638+ self.add_option("--was-added", dest="was_added", metavar="PATH",
1639+ default=None,
1640+ help="Returns if the metadata know about the path.")
1641+ self.add_option("--was-modified", dest="was_modified", metavar="PATH",
1642+ default=None,
1643+ help="Returns if the file has been locally modified")
1644
1645 def get_options(self, arguments):
1646 """Parses the arguments to from the command line."""
1647@@ -128,7 +134,6 @@
1648
1649 def _get_directory(self):
1650 """Gets the directory to be used according to the paramenters."""
1651- print self._args
1652 if self.options.mode == "sync" or self.options.mode == "init" or \
1653 self.options.mode == "diff":
1654 if len(self._args) > 2:
1655@@ -183,6 +188,8 @@
1656
1657 def _validate_oauth(self):
1658 """Validates that the oatuh was passed."""
1659+ if self.options.was_modified or self.options.was_added:
1660+ return
1661 if self.options.oauth is None:
1662 self.error("--oauth is currently compulsery.")
1663 else:

Subscribers

People subscribed via source and target branches

to all changes: