Merge lp:~nataliabidart/ubuntuone-windows-installer/stable-3-0-update-2.99.2 into lp:ubuntuone-windows-installer/stable-3-0
- stable-3-0-update-2.99.2
- Merge into stable-3-0
Proposed by
Natalia Bidart
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Natalia Bidart | ||||||||
Approved revision: | 97 | ||||||||
Merged at revision: | 96 | ||||||||
Proposed branch: | lp:~nataliabidart/ubuntuone-windows-installer/stable-3-0-update-2.99.2 | ||||||||
Merge into: | lp:ubuntuone-windows-installer/stable-3-0 | ||||||||
Diff against target: |
1075 lines (+960/-6) 11 files modified
scripts/README (+71/-0) scripts/README_nonelevated.txt (+21/-0) scripts/conf.py (+41/-0) scripts/customlang/ubuntuone_en.lng (+1/-0) scripts/setup.py (+360/-0) scripts/ubuntuone.xml (+396/-0) scripts/ubuntuone_autoupdate.xml (+9/-0) ubuntuone_installer/gui/qt/gui.py (+8/-2) ubuntuone_installer/gui/qt/sync_now_or_later.py (+0/-2) ubuntuone_installer/gui/qt/tests/__init__.py (+33/-0) ubuntuone_installer/gui/qt/tests/test_gui.py (+20/-2) |
||||||||
To merge this branch: | bzr merge lp:~nataliabidart/ubuntuone-windows-installer/stable-3-0-update-2.99.2 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
dobey (community) | Approve | ||
Roberto Alsina (community) | Approve | ||
Review via email:
|
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
dobey (dobey) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added directory 'scripts' |
2 | === added file 'scripts/README' |
3 | --- scripts/README 1970-01-01 00:00:00 +0000 |
4 | +++ scripts/README 2012-01-17 16:56:24 +0000 |
5 | @@ -0,0 +1,71 @@ |
6 | +HOW TO BUILD A BUNDLE |
7 | +--------------------- |
8 | + |
9 | +To build a bundle, assuming you have a windows developer setup, is as |
10 | +simple as: |
11 | + |
12 | +python setup.py fetch prepare py2exe |
13 | + |
14 | +The commands do the following: |
15 | + |
16 | +fetch |
17 | + |
18 | + Use bzr to get trunk of ubuntu-sso-client, ubuntuone-client, |
19 | + ubuntuone-control-panel and ubuntuone-windows-installer. |
20 | + |
21 | + If you want to try building bundles with a branch that's not |
22 | + merged to trunk yet, after you do "fetch" you can go to |
23 | + sources\package-name and merge it there. |
24 | + |
25 | +prepare |
26 | + |
27 | + Copies the "bins" out of the packages, does tweaks to the |
28 | + source code, compiles .ui and .qrc files, and then |
29 | + "installs" everything into the "installed" folder. |
30 | + |
31 | +py2exe |
32 | + |
33 | + creates a dist folder with self-contained .exe files |
34 | + using py2exe |
35 | + |
36 | +After you do this, you will have a fully self-contained set of binaries |
37 | +in the dist/ folder, which you can use for testing. |
38 | + |
39 | +HOW TO BUILD AN INSTALLER |
40 | +------------------------- |
41 | + |
42 | +Update the release numbers in setup.py ubuntuone_autoupdate.xml and |
43 | +ubuntuone.xml. Remember that you have both a build (ex: 203) |
44 | +and a release (ex: 2.0.3) |
45 | + |
46 | +Get the VS2008 runtime "vcredist_x86.exe" and put it in the |
47 | +scripts folder. |
48 | + |
49 | +Get the VistaLib32.dll and VistaLib64.dll and put them in dist. Those |
50 | +DLLs are for allowing the wizard to run non-elevated, and came originally |
51 | +from here: http://www.codeproject.com/KB/vista-security/RunNonElevated.aspx |
52 | + |
53 | +According to their license, README_nonelevated.txt has to be distributed too. |
54 | + |
55 | +In order to build de installer you have to follow this stesp: |
56 | + |
57 | + 1. Customize the auto-updater: |
58 | + |
59 | + The auto-updater is generated by the InstallBuilder product |
60 | + in order to create a customized version (contains product name, |
61 | + author etc...) please execute the following: |
62 | + |
63 | + {$bitrock_installation$}\autoupdate\bin\customize.exe" build ubuntuone_autoupdate.xml windows |
64 | + |
65 | + This command will create the updater which you have to copy to the scripts |
66 | + folder in order to be able to create the installer. |
67 | + |
68 | + It will probably be in ~\Documents\AutoUpdate\output (depends on the windows version) |
69 | + |
70 | + 2. Create the package: |
71 | + |
72 | + |
73 | + {$bitrock_installation$}\bin\builder-cli.exe" build ubuntuone.xml |
74 | + |
75 | + The resulting installer will be in ~\Documents\InstallBuilder\output |
76 | + (depends on the windows version) |
77 | |
78 | === added file 'scripts/README_nonelevated.txt' |
79 | --- scripts/README_nonelevated.txt 1970-01-01 00:00:00 +0000 |
80 | +++ scripts/README_nonelevated.txt 2012-01-17 16:56:24 +0000 |
81 | @@ -0,0 +1,21 @@ |
82 | +THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF |
83 | +ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED |
84 | +TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |
85 | +PARTICULAR PURPOSE. |
86 | + |
87 | +Copyright (C) 2007. WinAbility Software Corporation. All rights reserved. |
88 | + |
89 | +Author: Andrei Belogortseff [ http://www.winability.com ] |
90 | + |
91 | +TERMS OF USE: You are free to use this code in any way you like, |
92 | +for both the commercial and non-commercial purposes, royalty-free, |
93 | +AS LONG AS you agree with the warranty disclaimer above, |
94 | +EXCEPT that you may not remove or modify this or any of the |
95 | +preceeding paragraphs. |
96 | + |
97 | +If you use this code in your own project, an acknowledgement will be appreciated, |
98 | +although it's not required. |
99 | + |
100 | +See the following article for the details: |
101 | + |
102 | +http://www.codeproject.com/useritems/RunNonElevated.asp |
103 | |
104 | === added file 'scripts/conf.py' |
105 | --- scripts/conf.py 1970-01-01 00:00:00 +0000 |
106 | +++ scripts/conf.py 2012-01-17 16:56:24 +0000 |
107 | @@ -0,0 +1,41 @@ |
108 | +# conf.py - Configuration for Ubuntu One Client package windows build |
109 | +# |
110 | +# Copyright 2012 Canonical Ltd. |
111 | +# |
112 | +# This program is free software: you can redistribute it and/or modify it |
113 | +# under the terms of the GNU General Public License version 3, as published |
114 | +# by the Free Software Foundation. |
115 | +# |
116 | +# This program is distributed in the hope that it will be useful, but |
117 | +# WITHOUT ANY WARRANTY; without even the implied warranties of |
118 | +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
119 | +# PURPOSE. See the GNU General Public License for more details. |
120 | +# |
121 | +# You should have received a copy of the GNU General Public License along |
122 | +# with this program. If not, see <http://www.gnu.org/licenses/>. |
123 | +"""Configure what branches make the release.""" |
124 | + |
125 | +# You can add branches that are to be merged into the release by |
126 | +# adding them to the adequate list. |
127 | + |
128 | +U1_CLIENT_BRANCHES = ( |
129 | + "lp:ubuntuone-client", |
130 | +) |
131 | +U1_CONTROL_PANEL_BRANCHES = ( |
132 | + "lp:ubuntuone-control-panel", |
133 | +) |
134 | +UBUNTU_SSO_BRANCHES = ( |
135 | + "lp:ubuntu-sso-client", |
136 | +) |
137 | +U1_WINDOWS_INSTALLER_BRANCHES = ( |
138 | + "lp:ubuntuone-windows-installer", |
139 | + "lp:~ralsina/ubuntuone-windows-installer/register_plus_login" |
140 | +) |
141 | +U1_STORAGE_PROTOCOL_BRANCHES = ( |
142 | + "lp:ubuntuone-storage-protocol", |
143 | +) |
144 | + |
145 | +# If show_cmd is set to True, then the binaries will have cmd windows where |
146 | +# you can see stderr. |
147 | + |
148 | +SHOW_CMD = False |
149 | |
150 | === added directory 'scripts/customlang' |
151 | === added file 'scripts/customlang/ubuntuone_en.lng' |
152 | --- scripts/customlang/ubuntuone_en.lng 1970-01-01 00:00:00 +0000 |
153 | +++ scripts/customlang/ubuntuone_en.lng 2012-01-17 16:56:24 +0000 |
154 | @@ -0,0 +1,1 @@ |
155 | +Installer.Setup.Title=Installing Ubuntu One |
156 | |
157 | === added directory 'scripts/data' |
158 | === added file 'scripts/setup.py' |
159 | --- scripts/setup.py 1970-01-01 00:00:00 +0000 |
160 | +++ scripts/setup.py 2012-01-17 16:56:24 +0000 |
161 | @@ -0,0 +1,360 @@ |
162 | +#!/usr/bin/env python |
163 | +# setup-windows.py - Build system for Ubuntu One Client package |
164 | +# |
165 | +# Copyright 2010-2012 Canonical Ltd. |
166 | +# |
167 | +# This program is free software: you can redistribute it and/or modify it |
168 | +# under the terms of the GNU General Public License version 3, as published |
169 | +# by the Free Software Foundation. |
170 | +# |
171 | +# This program is distributed in the hope that it will be useful, but |
172 | +# WITHOUT ANY WARRANTY; without even the implied warranties of |
173 | +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
174 | +# PURPOSE. See the GNU General Public License for more details. |
175 | +# |
176 | +# You should have received a copy of the GNU General Public License along |
177 | +# with this program. If not, see <http://www.gnu.org/licenses/>. |
178 | +"""setup-windows.py""" |
179 | + |
180 | +import os |
181 | +import shutil |
182 | +import subprocess |
183 | +import sys |
184 | + |
185 | +from distutils import log |
186 | +from distutils.cmd import Command |
187 | +from distutils.core import setup |
188 | + |
189 | +import conf |
190 | + |
191 | +LOG_LEVEL = "DEBUG" |
192 | +LOG_FILE_SIZE = "1000000" |
193 | + |
194 | + |
195 | +# pylint is giving spurious reimport errors |
196 | +# pylint: disable=W0404 |
197 | +# pylint is complaining about parent classes having too many methods |
198 | +# pylint: disable=R0904 |
199 | +# pylint says "too many branches" |
200 | +# pylint: disable=R0912 |
201 | +def get_py2exe_extension(): |
202 | + """Return an extension class of py2exe.""" |
203 | + # pylint: disable=F0401 |
204 | + from py2exe.build_exe import py2exe as build_exe |
205 | + # pylint: enable=F0401 |
206 | + |
207 | + # pylint: disable=E1101 |
208 | + # pylint: disable=W0231 |
209 | + class MediaCollector(build_exe): |
210 | + """Extension that copies lazr missing data.""" |
211 | + |
212 | + def __init__(self, *args, **kwargs): |
213 | + """Create a new instance.""" |
214 | + build_exe.__init__(self, *args, **kwargs) |
215 | + |
216 | + def _add_module_data(self, module_name): |
217 | + """Add the data from a given path.""" |
218 | + # Create the media subdir where the |
219 | + # Python files are collected. |
220 | + media = module_name.replace('.', os.path.sep) |
221 | + full = os.path.join(self.collect_dir, media) |
222 | + if not os.path.exists(full): |
223 | + self.mkpath(full) |
224 | + |
225 | + # Copy the media files to the collection dir. |
226 | + # Also add the copied file to the list of compiled |
227 | + # files so it will be included in zipfile. |
228 | + module = __import__(module_name, None, None, ['']) |
229 | + for path in module.__path__: |
230 | + for file_name in os.listdir(path): |
231 | + file_name = os.path.join(path, file_name) |
232 | + log.info('Copying file %s', file_name) |
233 | + name = os.path.basename(file_name) |
234 | + if not os.path.isdir(file_name): |
235 | + self.copy_file(file_name, os.path.join(full, name)) |
236 | + self.compiled_files.append(os.path.join(media, name)) |
237 | + else: |
238 | + self.copy_tree(file_name, os.path.join(full, name)) |
239 | + |
240 | + def copy_extensions(self, extensions): |
241 | + """Copy the missing extensions.""" |
242 | + build_exe.copy_extensions(self, extensions) |
243 | + for module in [ |
244 | + 'lazr.uri', |
245 | + 'lazr.restfulclient', |
246 | + 'lazr.authentication', |
247 | + 'wadllib', |
248 | + 'ubuntuone.storageprotocol', |
249 | + ]: |
250 | + self._add_module_data(module) |
251 | + |
252 | + # ModuleFinder can't handle runtime changes to __path__, |
253 | + # but win32com uses them |
254 | + try: |
255 | + # py2exe 0.6.4 introduced a replacement modulefinder. |
256 | + # This means we have to add package paths there, not to the built-in |
257 | + # one. If this new modulefinder gets integrated into Python, then |
258 | + # we might be able to revert this some day. |
259 | + # if this doesn't work, try import modulefinder |
260 | + # pylint: disable=F0401 |
261 | + try: |
262 | + import py2exe.mf as modulefinder |
263 | + except ImportError: |
264 | + import modulefinder |
265 | + import win32com |
266 | + # pylint: enable=F0401 |
267 | + for path in win32com.__path__[1:]: |
268 | + modulefinder.AddPackagePath("win32com", path) |
269 | + for extra in ["win32com.shell"]: # ,"win32com.mapi" |
270 | + __import__(extra) |
271 | + modules = sys.modules[extra] |
272 | + for path in modules.__path__[1:]: |
273 | + modulefinder.AddPackagePath(extra, path) |
274 | + except ImportError: |
275 | + # no build path setup, no worries. |
276 | + pass |
277 | + # pylint: enable=E1101 |
278 | + return MediaCollector |
279 | +# pylint: enable=W0404 |
280 | +# pylint: enable=R0904 |
281 | +# pylint: enable=R0912 |
282 | + |
283 | + |
284 | +def branch_and_merge(urls): |
285 | + """Branch and merge all requested branches.""" |
286 | + project_name = urls[0].split(":")[1] |
287 | + print "Getting sources for:", project_name |
288 | + folder_name = os.path.join("sources", project_name) |
289 | + current_folder = os.getcwd() |
290 | + if os.path.isdir(folder_name): # Folder exists |
291 | + shutil.rmtree(folder_name) |
292 | + subprocess.check_call(["bzr", "branch", urls[0], folder_name]) |
293 | + os.chdir(folder_name) |
294 | + for url in urls[1:]: |
295 | + print "Merging:", url |
296 | + subprocess.check_call(["bzr", "merge", url]) |
297 | + subprocess.check_call(["bzr", "commit", "-m", '"merged %s"' % url]) |
298 | + os.chdir(current_folder) |
299 | + |
300 | + |
301 | +# pylint is complaining about parent classes having too many methods |
302 | +# pylint: disable=R0904 |
303 | +class FetchSources(Command): |
304 | + |
305 | + """Branch or pull the sources from all packages.""" |
306 | + |
307 | + user_options = [] |
308 | + |
309 | + def initialize_options(self): |
310 | + pass |
311 | + |
312 | + def finalize_options(self): |
313 | + pass |
314 | + |
315 | + def run(self): |
316 | + """Perform the command.""" |
317 | + # Checkout sources |
318 | + for folder in ["sources", "bin", "installed", "data"]: |
319 | + if not os.path.isdir(folder): |
320 | + os.mkdir(folder) |
321 | + branch_and_merge(conf.U1_CLIENT_BRANCHES) |
322 | + branch_and_merge(conf.U1_CONTROL_PANEL_BRANCHES) |
323 | + branch_and_merge(conf.UBUNTU_SSO_BRANCHES) |
324 | + branch_and_merge(conf.U1_WINDOWS_INSTALLER_BRANCHES) |
325 | + branch_and_merge(conf.U1_STORAGE_PROTOCOL_BRANCHES) |
326 | +# pylint: enable=R0904 |
327 | + |
328 | + |
329 | +# pylint is complaining about parent classes having too many methods |
330 | +# pylint: disable=R0904 |
331 | +class PrepareSources(Command): |
332 | + |
333 | + """Manipulate the sources look as if they were installed.""" |
334 | + |
335 | + user_options = [] |
336 | + |
337 | + def initialize_options(self): |
338 | + pass |
339 | + |
340 | + def finalize_options(self): |
341 | + pass |
342 | + |
343 | + def run(self): |
344 | + """Perform the command.""" |
345 | + # Take binaries |
346 | + shutil.copyfile(os.path.join( |
347 | + "sources", "ubuntuone-client", "bin", "ubuntuone-syncdaemon"), |
348 | + os.path.join("bin", "ubuntuone-syncdaemon")) |
349 | + shutil.copyfile(os.path.join( |
350 | + "sources", "ubuntuone-client", "bin", "u1sdtool"), |
351 | + os.path.join("bin", "u1sdtool")) |
352 | + shutil.copyfile(os.path.join("sources", "ubuntu-sso-client", |
353 | + "bin", "ubuntu-sso-login"), |
354 | + os.path.join("bin", "ubuntu-sso-login")) |
355 | + shutil.copyfile(os.path.join("sources", |
356 | + "ubuntuone-control-panel", "bin", |
357 | + "ubuntuone-control-panel-qt"), |
358 | + os.path.join("bin", "ubuntuone-control-panel-qt")) |
359 | + shutil.copyfile(os.path.join("sources", "ubuntuone-windows-installer", |
360 | + "bin", "ubuntuone-installer-qt"), |
361 | + os.path.join("bin", "ubuntuone-installer-qt")) |
362 | + |
363 | + # Remove "installed" copy |
364 | + try: |
365 | + shutil.rmtree(os.path.join("installed", "Lib")) |
366 | + except OSError: |
367 | + pass |
368 | + |
369 | + # Build UI files, copy packages. |
370 | + dest_dir = os.path.join( |
371 | + "..", "..", "installed", "Lib", "site-packages", "ubuntu_sso") |
372 | + start_dir = os.getcwd() |
373 | + os.chdir(os.path.join("sources", "ubuntu-sso-client")) |
374 | + os.system("python setup.py build") |
375 | + os.system("python setup.py install --prefix=%s" % |
376 | + os.path.join("..", "..", "installed")) |
377 | + shutil.copytree("ubuntu_sso", dest_dir) |
378 | + sso_revno = subprocess.Popen( |
379 | + ["bzr", "revno", "."], |
380 | + stdout=subprocess.PIPE).communicate()[0] |
381 | + os.chdir(start_dir) |
382 | + |
383 | + os.chdir(os.path.join("sources", "ubuntuone-client")) |
384 | + shutil.copy(os.path.join("windows", "clientdefs.py"), |
385 | + os.path.join("ubuntuone", "clientdefs.py")) |
386 | + shutil.copytree("ubuntuone", dest_dir) |
387 | + u1client_revno = subprocess.Popen( |
388 | + ["bzr", "revno", "."], |
389 | + stdout=subprocess.PIPE).communicate()[0] |
390 | + os.chdir(start_dir) |
391 | + |
392 | + os.chdir(os.path.join("sources", "ubuntuone-control-panel")) |
393 | + os.system("python setup.py build") |
394 | + # Copying by hand because the install is borked |
395 | + shutil.copytree(os.path.join("ubuntuone", "controlpanel"), |
396 | + dest_dir) |
397 | + u1cp_revno = subprocess.Popen( |
398 | + ["bzr", "revno", "."], |
399 | + stdout=subprocess.PIPE).communicate()[0] |
400 | + os.chdir(start_dir) |
401 | + |
402 | + os.chdir(os.path.join("sources", "ubuntuone-windows-installer")) |
403 | + os.system("python setup.py build") |
404 | + # Copying by hand because the install is borked |
405 | + shutil.copytree("ubuntuone_installer", dest_dir) |
406 | + u1inst_revno = subprocess.Popen( |
407 | + ["bzr", "revno", "."], |
408 | + stdout=subprocess.PIPE).communicate()[0] |
409 | + os.chdir(start_dir) |
410 | + |
411 | + # Create revno file |
412 | + with open(os.path.join("data", "revnos.txt"), "w+") as revnos: |
413 | + revnos.write("ubuntu-sso-client: %s" |
414 | + "ubuntuone-client: %s" |
415 | + "ubuntuone-control-panel: %s" |
416 | + "ubuntuonw-windows-installer: %s" % |
417 | + (sso_revno, u1client_revno, u1cp_revno, u1inst_revno)) |
418 | + |
419 | + # Copy storage-protocol's pem files |
420 | + shutil.copyfile(os.path.join("sources", |
421 | + "ubuntuone-storage-protocol", "data", |
422 | + "UbuntuOne-Go_Daddy_CA.pem"), |
423 | + os.path.join("data", "UbuntuOne-Go_Daddy_CA.pem")) |
424 | + shutil.copyfile(os.path.join("sources", |
425 | + "ubuntuone-storage-protocol", "data", |
426 | + "UbuntuOne-Go_Daddy_Class_2_CA.pem"), |
427 | + os.path.join("data", "UbuntuOne-Go_Daddy_Class_2_CA.pem")) |
428 | + |
429 | + # Copy syncdaemon config data |
430 | + shutil.copyfile(os.path.join("sources", |
431 | + "ubuntuone-client", "data", |
432 | + "syncdaemon.conf"), |
433 | + os.path.join("data", "syncdaemon.conf")) |
434 | + logging_path = os.path.join("sources", |
435 | + "ubuntuone-client", "data", |
436 | + "logging.conf.in") |
437 | + with open(logging_path, "rb") as logconf: |
438 | + data = logconf.read() |
439 | + data = data.replace("@LOG_LEVEL@", LOG_LEVEL) |
440 | + data = data.replace("@LOG_FILE_SIZE@", LOG_FILE_SIZE) |
441 | + with open(os.path.join("data", "logging.conf"), "wb") as logconf: |
442 | + logconf.write(data) |
443 | +# pylint: enable=R0904 |
444 | + |
445 | + |
446 | +if __name__ == "__main__": |
447 | + |
448 | + # pylint: disable=C0103 |
449 | + # Add the installed copy to the PYTHONPATH |
450 | + sys.path.insert(0, os.path.join("installed", "Lib", "site-packages")) |
451 | + |
452 | + console = [ |
453 | + { |
454 | + 'script': 'bin/u1sdtool', |
455 | + }, |
456 | + ] |
457 | + |
458 | + windows = [ |
459 | + { |
460 | + 'script': 'bin/ubuntuone-syncdaemon', |
461 | + 'icon_resources': [(0, 'ubuntu_one.ico')] |
462 | + }, |
463 | + { |
464 | + 'script': 'bin/ubuntuone-control-panel-qt', |
465 | + 'icon_resources': [(0, 'ubuntu_one.ico')] |
466 | + }, |
467 | + { |
468 | + 'script': 'bin/ubuntu-sso-login', |
469 | + 'icon_resources': [(0, 'ubuntu_one.ico')] |
470 | + }, |
471 | + { |
472 | + 'script': 'bin/ubuntuone-installer-qt', |
473 | + 'icon_resources': [(0, 'ubuntu_one.ico')] |
474 | + }, |
475 | + ] |
476 | + |
477 | + if conf.SHOW_CMD == True: |
478 | + console.extend(windows) |
479 | + windows = [] |
480 | + |
481 | + # Build bundles |
482 | + setup( |
483 | + name='ubuntuone', |
484 | + version='2.0.3', |
485 | + license='GPL v3', |
486 | + author='', |
487 | + author_email='', |
488 | + description='Ubuntu One', |
489 | + url='https://one.ubuntu.com', |
490 | + cmdclass={ |
491 | + 'py2exe': get_py2exe_extension(), |
492 | + 'fetch': FetchSources, |
493 | + 'prepare': PrepareSources, |
494 | + }, |
495 | + console=console, |
496 | + windows=windows, |
497 | + options={ |
498 | + 'py2exe': { |
499 | + 'includes': ['google.protobuf.descriptor', |
500 | + 'sip', |
501 | + 'twisted.web.resource', |
502 | + 'ubuntu_sso.qt', |
503 | + 'ubuntu_sso.qt.gui', |
504 | + 'PyQt4.QtNetwork', |
505 | + 'oauth', |
506 | + 'ubuntuone_installer', |
507 | + 'configglue', |
508 | + 'configglue.app', |
509 | + 'configglue.inischema', |
510 | + 'configglue.pyschema.glue', |
511 | + 'configglue.inischema.glue', |
512 | + 'configglue.inischema.parsers', |
513 | + ], |
514 | + 'excludes': ['fsm'], |
515 | + "dll_excludes": [ |
516 | + "MSVCP90.dll", |
517 | + "MSWSOCK.dll", |
518 | + "mswsock.dll", |
519 | + "powrprof.dll", |
520 | + ], |
521 | + }}) |
522 | |
523 | === added file 'scripts/ubuntu_one.ico' |
524 | Binary files scripts/ubuntu_one.ico 1970-01-01 00:00:00 +0000 and scripts/ubuntu_one.ico 2012-01-17 16:56:24 +0000 differ |
525 | === added file 'scripts/ubuntuone.xml' |
526 | --- scripts/ubuntuone.xml 1970-01-01 00:00:00 +0000 |
527 | +++ scripts/ubuntuone.xml 2012-01-17 16:56:24 +0000 |
528 | @@ -0,0 +1,396 @@ |
529 | +<project> |
530 | + <shortName>ubuntuone</shortName> |
531 | + <fullName>Ubuntu One</fullName> |
532 | + <version>2.0.3</version> |
533 | + <componentList> |
534 | + <component> |
535 | + <name>autoupdater</name> |
536 | + <description>Includes tool to perform updates</description> |
537 | + <canBeEdited>0</canBeEdited> |
538 | + <selected>1</selected> |
539 | + <show>0</show> |
540 | + <folderList> |
541 | + <folder> |
542 | + <destination>${installdir}</destination> |
543 | + <name>autoupdaterwin</name> |
544 | + <platforms>windows</platforms> |
545 | + <distributionFileList> |
546 | + <distributionFile origin="autoupdate-windows.exe"/> |
547 | + </distributionFileList> |
548 | + </folder> |
549 | + </folderList> |
550 | + <postInstallationActionList> |
551 | + <writeFile> |
552 | + <path>${installdir}/update.ini</path> |
553 | + <text>[Update] |
554 | +url = http://one.ubuntu.com/windows/update.xml |
555 | +version_id = 203 |
556 | +check_for_updates = 1 |
557 | +</text> |
558 | + </writeFile> |
559 | + </postInstallationActionList> |
560 | + </component> |
561 | + <component> |
562 | + <name>default</name> |
563 | + <description>Default Component</description> |
564 | + <canBeEdited>1</canBeEdited> |
565 | + <selected>1</selected> |
566 | + <show>1</show> |
567 | + <desktopShortcutList> |
568 | + <shortcut> |
569 | + <comment></comment> |
570 | + <exec></exec> |
571 | + <icon></icon> |
572 | + <name>Ubuntu One</name> |
573 | + <path></path> |
574 | + <platforms>windows</platforms> |
575 | + <runAsAdmin>0</runAsAdmin> |
576 | + <runInTerminal>0</runInTerminal> |
577 | + <windowsExec>${installdir}\dist\ubuntuone-installer-qt.exe</windowsExec> |
578 | + <windowsExecArgs></windowsExecArgs> |
579 | + <windowsIcon>${installdir}/ubuntu_one.ico</windowsIcon> |
580 | + <windowsPath>${windows_folder_desktopdirectory}</windowsPath> |
581 | + </shortcut> |
582 | + </desktopShortcutList> |
583 | + <folderList> |
584 | + <folder> |
585 | + <description>Program Files</description> |
586 | + <destination>${installdir}</destination> |
587 | + <name>programfiles</name> |
588 | + <platforms>all</platforms> |
589 | + <shortcutList> |
590 | + <shortcut> |
591 | + <comment>Uninstall</comment> |
592 | + <exec>${installdir}/${uninstallerName}</exec> |
593 | + <icon></icon> |
594 | + <name>Uninstall ${product_fullname}</name> |
595 | + <path>${installdir}</path> |
596 | + <platforms>all</platforms> |
597 | + <runAsAdmin>1</runAsAdmin> |
598 | + <runInTerminal>0</runInTerminal> |
599 | + <windowsExec>${installdir}/${uninstallerName}.exe --mode win32</windowsExec> |
600 | + <windowsExecArgs></windowsExecArgs> |
601 | + <windowsIcon></windowsIcon> |
602 | + <windowsPath>${installdir}</windowsPath> |
603 | + </shortcut> |
604 | + </shortcutList> |
605 | + </folder> |
606 | + <folder> |
607 | + <description>Program Files</description> |
608 | + <destination>${installdir}</destination> |
609 | + <name>programfileslinux</name> |
610 | + <platforms>linux</platforms> |
611 | + </folder> |
612 | + <folder> |
613 | + <description>Program Files</description> |
614 | + <destination>${installdir}</destination> |
615 | + <name>programfileswindows</name> |
616 | + <platforms>windows</platforms> |
617 | + <distributionFileList> |
618 | + <distributionDirectory> |
619 | + <origin>dist</origin> |
620 | + </distributionDirectory> |
621 | + <distributionDirectory> |
622 | + <origin>data</origin> |
623 | + </distributionDirectory> |
624 | + <distributionFile> |
625 | + <origin>vcredist_x86.exe</origin> |
626 | + </distributionFile> |
627 | + <distributionFile> |
628 | + <origin>ubuntu_one.ico</origin> |
629 | + </distributionFile> |
630 | + </distributionFileList> |
631 | + </folder> |
632 | + <folder> |
633 | + <description>Program Files</description> |
634 | + <destination>${installdir}</destination> |
635 | + <name>programfilesosx</name> |
636 | + <platforms>osx</platforms> |
637 | + </folder> |
638 | + </folderList> |
639 | + <preInstallationActionList> |
640 | + <actionGroup> |
641 | + <actionList> |
642 | + <setInstallerVariable name="installationType" value="upgrade"/> |
643 | + </actionList> |
644 | + |
645 | + <!-- We assume an existing installation if ${installdir}/uninstall.exe exists --> |
646 | + <ruleList> |
647 | + <fileTest condition="exists" path="${installdir}/uninstall.exe"/> |
648 | + </ruleList> |
649 | + </actionGroup> |
650 | + </preInstallationActionList> |
651 | + <startMenuShortcutList> |
652 | + <startMenuShortcut> |
653 | + <comment>Uninstall ${product_fullname}</comment> |
654 | + <name>Uninstall ${product_fullname}</name> |
655 | + <runAsAdmin>0</runAsAdmin> |
656 | + <runInTerminal>0</runInTerminal> |
657 | + <windowsExec>${installdir}/${uninstallerName}.exe</windowsExec> |
658 | + <windowsExecArgs>--mode win32</windowsExecArgs> |
659 | + <windowsIcon></windowsIcon> |
660 | + <windowsPath>${installdir}/</windowsPath> |
661 | + </startMenuShortcut> |
662 | + <startMenuShortcut> |
663 | + <comment>Ubuntu One</comment> |
664 | + <name>Ubuntu One</name> |
665 | + <runAsAdmin>0</runAsAdmin> |
666 | + <runInTerminal>0</runInTerminal> |
667 | + <windowsExec>${installdir}\dist\ubuntuone-installer-qt.exe</windowsExec> |
668 | + <windowsExecArgs></windowsExecArgs> |
669 | + <windowsIcon>${installdir}/ubuntu_one.ico</windowsIcon> |
670 | + <windowsPath>${windows_folder_desktopdirectory}</windowsPath> |
671 | + </startMenuShortcut> |
672 | + <startMenuFileShortcut> |
673 | + <comment></comment> |
674 | + <filePath>${windows_folder_profile}\Ubuntu One</filePath> |
675 | + <name>Ubuntu One Folder</name> |
676 | + <runAsAdmin>0</runAsAdmin> |
677 | + <runInTerminal>0</runInTerminal> |
678 | + <windowsIcon></windowsIcon> |
679 | + </startMenuFileShortcut> |
680 | + </startMenuShortcutList> |
681 | + </component> |
682 | + <component> |
683 | + <name>vcruntime</name> |
684 | + <canBeEdited>1</canBeEdited> |
685 | + <selected>1</selected> |
686 | + <show>1</show> |
687 | + <folderList> |
688 | + <folder> |
689 | + <destination>${installdir}</destination> |
690 | + <name>vcfiles</name> |
691 | + <platforms>all</platforms> |
692 | + <actionList> |
693 | + <runProgram> |
694 | + <abortOnError>0</abortOnError> |
695 | + <program>${installdir}/vcredist_x86.exe</program> |
696 | + <programArguments>/q |
697 | +</programArguments> |
698 | + <progressText>Installing C++ runtime</progressText> |
699 | + <showMessageOnError>0</showMessageOnError> |
700 | + </runProgram> |
701 | + </actionList> |
702 | + <distributionFileList> |
703 | + <distributionFile> |
704 | + <origin>vcredist_x86.exe</origin> |
705 | + </distributionFile> |
706 | + </distributionFileList> |
707 | + </folder> |
708 | + </folderList> |
709 | + </component> |
710 | + </componentList> |
711 | + <initializationActionList> |
712 | + <setInstallerVariable name="msiexec" value=""/> |
713 | + <setInstallerVariable name="msiexec" persist="1" value="msiexec.exe"> |
714 | + <ruleList> |
715 | + <programTest condition="is_in_path" name="msiexec.exe"/> |
716 | + </ruleList> |
717 | + </setInstallerVariable> |
718 | + <setInstallerVariable name="msiexec" persist="1" value="${windows_dir}/system32/msiexec.exe"> |
719 | + <ruleList> |
720 | + <fileTest condition="exists" path="${windows_dir}/system32/msiexec.exe"/> |
721 | + <compareText logic="equals" text="${msiexec}" value=""/> |
722 | + </ruleList> |
723 | + </setInstallerVariable> |
724 | + <actionGroup> |
725 | + <actionList> |
726 | + <getWindowsFileVersionInfo path="${msiexec}" type="version" variable="msi_version"/> |
727 | + <setInstallerVariableFromRegEx name="msi_version" pattern="(^[0-9]+)\.([0-9]+)\..*" substitution="\1.\2" text="${msi_version}"/> |
728 | + </actionList> |
729 | + <ruleList> |
730 | + <compareText logic="does_not_equal" text="${msiexec}" value=""/> |
731 | + </ruleList> |
732 | + </actionGroup> |
733 | + <throwError> |
734 | + <ruleEvaluationLogic>or</ruleEvaluationLogic> |
735 | + <text> |
736 | +You need at least Windows Installer MSI version 3.1. |
737 | +</text> |
738 | + <ruleList> |
739 | + <compareText logic="equals" text="${msiexec}" value=""/> |
740 | + <compareValues logic="less" value1="${msi_version}" value2="3.1"/> |
741 | + </ruleList> |
742 | + </throwError> |
743 | + </initializationActionList> |
744 | + <postInstallationActionList> |
745 | + <registrySet> |
746 | + <key>HKEY_LOCAL_MACHINE\SOFTWARE\${project.fullName}\</key> |
747 | + <name>path-ubuntuone-syncdaemon</name> |
748 | + <type>REG_SZ</type> |
749 | + <value>${installdir}\dist\ubuntuone-syncdaemon.exe</value> |
750 | + </registrySet> |
751 | + <registrySet> |
752 | + <key>HKEY_LOCAL_MACHINE\SOFTWARE\${project.fullName}\</key> |
753 | + <name>path-ubuntu-sso-client</name> |
754 | + <type>REG_SZ</type> |
755 | + <value>${installdir}\dist\ubuntu-sso-login.exe</value> |
756 | + </registrySet> |
757 | + <runProgram> |
758 | + <program>${windows_folder_system}\RunDll32.exe</program> |
759 | + <programArguments>"${installdir}\dist\VistaLib32.dll" RunNonElevated "${installdir}\dist\ubuntuone-installer-qt.exe" --installer &</programArguments> |
760 | + <useMSDOSPath>0</useMSDOSPath> |
761 | + <ruleList> |
762 | + <compareText> |
763 | + <logic>does_not_equal</logic> |
764 | + <text>${installationType}</text> |
765 | + <value>upgrade</value> |
766 | + </compareText> |
767 | + <platformTest> |
768 | + <type>windows-x86</type> |
769 | + </platformTest> |
770 | + </ruleList> |
771 | + </runProgram> |
772 | + <runProgram> |
773 | + <program>${windows_folder_system}\RunDll32.exe</program> |
774 | + <programArguments>"${installdir}\dist\VistaLib64.dll" RunNonElevated "${installdir}\dist\ubuntuone-installer-qt.exe" --installer &</programArguments> |
775 | + <useMSDOSPath>0</useMSDOSPath> |
776 | + <ruleList> |
777 | + <compareText> |
778 | + <logic>does_not_equal</logic> |
779 | + <text>${installationType}</text> |
780 | + <value>upgrade</value> |
781 | + </compareText> |
782 | + <platformTest> |
783 | + <type>windows-x64</type> |
784 | + </platformTest> |
785 | + </ruleList> |
786 | + </runProgram> |
787 | + <showInfo> |
788 | + <text>Please reboot to finish upgrade.</text> |
789 | + <ruleList> |
790 | + <compareText> |
791 | + <logic>equals</logic> |
792 | + <text>${installationType}</text> |
793 | + <value>upgrade</value> |
794 | + </compareText> |
795 | + </ruleList> |
796 | + </showInfo> |
797 | + <createDirectory> |
798 | + <path>${windows_folder_common_appdata}\ubuntuone</path> |
799 | + </createDirectory> |
800 | + <createDirectory> |
801 | + <path>${windows_folder_common_appdata}\ubuntuone-storageprotocol</path> |
802 | + </createDirectory> |
803 | + <copyFile> |
804 | + <destination>${windows_folder_common_appdata}\ubuntuone</destination> |
805 | + <origin>${installdir}\data\syncdaemon.conf</origin> |
806 | + </copyFile> |
807 | + <copyFile> |
808 | + <destination>${windows_folder_common_appdata}\ubuntuone</destination> |
809 | + <origin>${installdir}\data\logging.conf</origin> |
810 | + </copyFile> |
811 | + <copyFile> |
812 | + <destination>${windows_folder_common_appdata}\ubuntuone-storageprotocol</destination> |
813 | + <origin>${installdir}\data\UbuntuOne-Go_Daddy_CA.pem</origin> |
814 | + </copyFile> |
815 | + <copyFile> |
816 | + <destination>${windows_folder_common_appdata}\ubuntuone-storageprotocol</destination> |
817 | + <origin>${installdir}\data\UbuntuOne-Go_Daddy_Class_2_CA.pem</origin> |
818 | + </copyFile> |
819 | + <deleteFile> |
820 | + <path>c:\install.exe</path> |
821 | + </deleteFile> |
822 | + <deleteFile> |
823 | + <path>c:\install.res.1028.dll</path> |
824 | + </deleteFile> |
825 | + <deleteFile> |
826 | + <path>c:\install.res.1031.dll</path> |
827 | + </deleteFile> |
828 | + <deleteFile> |
829 | + <path>c:\install.res.1033.dll</path> |
830 | + </deleteFile> |
831 | + <deleteFile> |
832 | + <path>c:\install.res.1036.dll</path> |
833 | + </deleteFile> |
834 | + <deleteFile> |
835 | + <path>c:\install.res.1040.dll</path> |
836 | + </deleteFile> |
837 | + <deleteFile> |
838 | + <path>c:\install.res.1041.dll</path> |
839 | + </deleteFile> |
840 | + <deleteFile> |
841 | + <path>c:\install.res.1042.dll</path> |
842 | + </deleteFile> |
843 | + <deleteFile> |
844 | + <path>c:\install.res.2052.dll</path> |
845 | + </deleteFile> |
846 | + <deleteFile> |
847 | + <path>c:\install.res.3082.dll</path> |
848 | + </deleteFile> |
849 | + <deleteFile> |
850 | + <path>c:\vcredist.bmp</path> |
851 | + </deleteFile> |
852 | + <deleteFile> |
853 | + <path>c:\globdata.ini</path> |
854 | + </deleteFile> |
855 | + <deleteFile> |
856 | + <path>c:\install.ini</path> |
857 | + </deleteFile> |
858 | + <deleteFile> |
859 | + <path>c:\eula.1028.txt</path> |
860 | + </deleteFile> |
861 | + <deleteFile> |
862 | + <path>c:\eula.1031.txt</path> |
863 | + </deleteFile> |
864 | + <deleteFile> |
865 | + <path>c:\eula.1033.txt</path> |
866 | + </deleteFile> |
867 | + <deleteFile> |
868 | + <path>c:\eula.1036.txt</path> |
869 | + </deleteFile> |
870 | + <deleteFile> |
871 | + <path>c:\eula.1040.txt</path> |
872 | + </deleteFile> |
873 | + <deleteFile> |
874 | + <path>c:\eula.1041.txt</path> |
875 | + </deleteFile> |
876 | + <deleteFile> |
877 | + <path>c:\eula.1042.txt</path> |
878 | + </deleteFile> |
879 | + <deleteFile> |
880 | + <path>c:\eula.2052.txt</path> |
881 | + </deleteFile> |
882 | + <deleteFile> |
883 | + <path>c:\eula.3082.txt</path> |
884 | + </deleteFile> |
885 | + <deleteFile> |
886 | + <path>c:\vc_red.msi</path> |
887 | + </deleteFile> |
888 | + <deleteFile> |
889 | + <path>c:\vc_red.cab</path> |
890 | + </deleteFile> |
891 | + </postInstallationActionList> |
892 | + <compressionAlgorithm>lzma</compressionAlgorithm> |
893 | + <defaultInstallationMode>unattended</defaultInstallationMode> |
894 | + <disableSplashScreen>1</disableSplashScreen> |
895 | + <enableRollback>1</enableRollback> |
896 | + <enableTimestamp>1</enableTimestamp> |
897 | + <installationLogFile>${installdir}/install.log</installationLogFile> |
898 | + <saveRelativePaths>1</saveRelativePaths> |
899 | + <unattendedModeUI>minimal</unattendedModeUI> |
900 | + <vendor>Canonical</vendor> |
901 | + <windowsSoftwareRegistryPrefix>${product_fullname}</windowsSoftwareRegistryPrefix> |
902 | + <customLanguageFileList> |
903 | + <language> |
904 | + <code>en</code> |
905 | + <file>customlang/ubuntuone_en.lng</file> |
906 | + </language> |
907 | + </customLanguageFileList> |
908 | + <parameterList> |
909 | + <directoryParameter> |
910 | + <name>installdir</name> |
911 | + <description>Installer.Parameter.installdir.description</description> |
912 | + <explanation>Installer.Parameter.installdir.explanation</explanation> |
913 | + <value></value> |
914 | + <default>${platform_install_prefix}/${product_shortname}</default> |
915 | + <allowEmptyValue>0</allowEmptyValue> |
916 | + <ask>0</ask> |
917 | + <cliOptionName>prefix</cliOptionName> |
918 | + <mustBeWritable>1</mustBeWritable> |
919 | + <mustExist>0</mustExist> |
920 | + <width>40</width> |
921 | + </directoryParameter> |
922 | + </parameterList> |
923 | +</project> |
924 | + |
925 | |
926 | === added file 'scripts/ubuntuone_autoupdate.xml' |
927 | --- scripts/ubuntuone_autoupdate.xml 1970-01-01 00:00:00 +0000 |
928 | +++ scripts/ubuntuone_autoupdate.xml 2012-01-17 16:56:24 +0000 |
929 | @@ -0,0 +1,9 @@ |
930 | +<autoUpdateProject> |
931 | + <fullName>Ubuntu One</fullName> |
932 | + <shortName>ubuntuone</shortName> |
933 | + <vendor>Canonical</vendor> |
934 | + <version>203</version> |
935 | + <singleInstanceCheck>1</singleInstanceCheck> |
936 | + <requireInstallationByRootUser>0</requireInstallationByRootUser> |
937 | + <requestedExecutionLevel>asInvoker</requestedExecutionLevel> |
938 | +</autoUpdateProject> |
939 | |
940 | === modified file 'ubuntuone_installer/gui/qt/gui.py' |
941 | --- ubuntuone_installer/gui/qt/gui.py 2011-12-13 12:40:25 +0000 |
942 | +++ ubuntuone_installer/gui/qt/gui.py 2012-01-17 16:56:24 +0000 |
943 | @@ -91,8 +91,8 @@ |
944 | SUCCESSFUL_LOGIN = _("Login successful") |
945 | TITLE_STYLE = "<span style=\"font-size:24px\">%s</span>" |
946 | UPDATE_TITLE = _("Updates are available") |
947 | -UPDATE_SOFTWARE = _("There is a new version available. " |
948 | - "Do you want perform an upgrade?") |
949 | +UPDATE_SOFTWARE = _("There is a new version of Ubuntu One available. " |
950 | + "Do you want to perform an upgrade?") |
951 | REMOVE_OLD_BETA_TITLE = _("Remove old Beta") |
952 | REMOVE_OLD_BETA = _("The old Ubuntu One Beta is installed in your system. Do " |
953 | "you want to uninstall it?") |
954 | @@ -155,6 +155,7 @@ |
955 | super(LicensePage, self).__init__(license_ui.Ui_Form(), None, parent) |
956 | self.header.setVisible(False) |
957 | self.ui.textBrowser.setHtml(qt.LICENSE_CONTENT) |
958 | + self.agree_button = None |
959 | |
960 | # Invalid names of Qt-inherited methods |
961 | # pylint: disable=C0103 |
962 | @@ -181,6 +182,11 @@ |
963 | QtGui.QWizard.NextButton, |
964 | QtGui.QWizard.FinishButton]) |
965 | |
966 | + self.agree_button = self.wizard().button(QtGui.QWizard.NextButton) |
967 | + self.agree_button.setDefault(True) |
968 | + self.agree_button.style().unpolish(self.agree_button) |
969 | + self.agree_button.style().polish(self.agree_button) |
970 | + |
971 | def nextId(self): |
972 | """Return next page's ID.""" |
973 | if self._next_id is None: |
974 | |
975 | === modified file 'ubuntuone_installer/gui/qt/sync_now_or_later.py' |
976 | --- ubuntuone_installer/gui/qt/sync_now_or_later.py 2011-09-09 14:33:19 +0000 |
977 | +++ ubuntuone_installer/gui/qt/sync_now_or_later.py 2012-01-17 16:56:24 +0000 |
978 | @@ -1,6 +1,4 @@ |
979 | # -*- coding: utf-8 -*- |
980 | - |
981 | -# Authors: Roberto Alsina <roberto.alsina@canonical.com> |
982 | # |
983 | # Copyright 2011 Canonical Ltd. |
984 | # |
985 | |
986 | === modified file 'ubuntuone_installer/gui/qt/tests/__init__.py' |
987 | --- ubuntuone_installer/gui/qt/tests/__init__.py 2011-11-10 13:57:33 +0000 |
988 | +++ ubuntuone_installer/gui/qt/tests/__init__.py 2012-01-17 16:56:24 +0000 |
989 | @@ -175,6 +175,39 @@ |
990 | return self.buttons.setdefault(button_id, QtGui.QPushButton()) |
991 | |
992 | |
993 | +class FakeWizardButtonStyle(FakeWizard): |
994 | + |
995 | + def __init__(self): |
996 | + super(FakeWizardButtonStyle, self).__init__() |
997 | + self.data = {} |
998 | + |
999 | + # pylint: disable=C0103 |
1000 | + def setDefault(self, value): |
1001 | + """Fake setDefault for button.""" |
1002 | + self.data['default'] = value |
1003 | + |
1004 | + def isDefault(self): |
1005 | + """Fake isDefault.""" |
1006 | + return self.data['default'] |
1007 | + # pylint: enable=C0103 |
1008 | + |
1009 | + def button(self, button_id): |
1010 | + """Fake the functionality of button on QWizard class.""" |
1011 | + return self |
1012 | + |
1013 | + def style(self): |
1014 | + """Fake button style.""" |
1015 | + return self |
1016 | + |
1017 | + def polish(self, button): |
1018 | + """Fake polish.""" |
1019 | + self.data['polish'] = button |
1020 | + |
1021 | + def unpolish(self, button): |
1022 | + """Fake unpolish.""" |
1023 | + self.data['unpolish'] = button |
1024 | + |
1025 | + |
1026 | class FakeWizardPage(object): |
1027 | |
1028 | """A fake wizard page.""" |
1029 | |
1030 | === modified file 'ubuntuone_installer/gui/qt/tests/test_gui.py' |
1031 | --- ubuntuone_installer/gui/qt/tests/test_gui.py 2011-12-13 16:16:56 +0000 |
1032 | +++ ubuntuone_installer/gui/qt/tests/test_gui.py 2012-01-17 16:56:24 +0000 |
1033 | @@ -39,6 +39,7 @@ |
1034 | FakeController, |
1035 | FakeOverlay, |
1036 | FakeSignal, |
1037 | + FakeWizardButtonStyle, |
1038 | FakeWizardPage, |
1039 | NO_OP, |
1040 | ) |
1041 | @@ -224,7 +225,24 @@ |
1042 | self.assertFalse(setup_page.set_up_button.isVisible()) |
1043 | self.assertTrue(setup_page.set_up_button.isDefault()) |
1044 | |
1045 | - def test_execute_uninstall_on_licence_cancel(self): |
1046 | + def test_license_page_agree_button_style(self): |
1047 | + """Check that License Page shows agree button with the proper style.""" |
1048 | + license_page = self.ui.page(self.ui.LICENSE_PAGE) |
1049 | + self.ui.setStartId(self.ui.LICENSE_PAGE) |
1050 | + self.ui.restart() |
1051 | + self.ui.show() |
1052 | + self.addCleanup(self.ui.hide) |
1053 | + self.patch(license_page, "wizard", FakeWizardButtonStyle) |
1054 | + license_page.initializePage() |
1055 | + self.assertTrue(license_page.agree_button.isDefault()) |
1056 | + self.assertTrue('polish' in license_page.agree_button.data) |
1057 | + self.assertTrue('unpolish' in license_page.agree_button.data) |
1058 | + self.assertEqual(license_page.agree_button.data['polish'], |
1059 | + license_page.agree_button) |
1060 | + self.assertEqual(license_page.agree_button.data['unpolish'], |
1061 | + license_page.agree_button) |
1062 | + |
1063 | + def test_execute_uninstall_on_license_cancel(self): |
1064 | """Pressing Disagree button from license page the uninstall is exec.""" |
1065 | self.ui.setStartId(self.ui.LICENSE_PAGE) |
1066 | self.ui.restart() |
1067 | @@ -235,7 +253,7 @@ |
1068 | self.ui.done(result=0) |
1069 | self.assertTrue(self._called) |
1070 | |
1071 | - def test_execute_uninstall_on_licence_cancel_frozen(self): |
1072 | + def test_execute_uninstall_on_license_cancel_frozen(self): |
1073 | """Pressing Disagree button from license page the uninstall is exec.""" |
1074 | self.ui.setStartId(self.ui.LICENSE_PAGE) |
1075 | self.ui.restart() |
+1