32
32
gettext.textdomain('quickly')
34
# get project version and template version if no argument given
36
(project_version, template_version) = templatetools.get_project_and_template_versions("ubuntu-application")
37
if len(sys.argv) == 2: # we have been given project but not template version
38
project_version = sys.argv[1]
40
project_version = sys.argv[1]
41
template_version = sys.argv[2]
34
options = ["--internal",]
37
templatetools.print_usage('quickly upgrade')
39
print _("""Tells Quickly that you have manually upgraded your project to
40
the latest framework.""")
42
templatetools.handle_additional_parameters(sys.argv, help, usage=usage)
46
project_version = None
47
template_version = None
48
while i < len(sys.argv):
50
if arg.startswith('-'):
51
if arg == '--internal':
54
cmd = commands.get_command('upgrade', 'ubuntu-application')
55
templatetools.usage_error(_("Unknown option: %s." % arg), cmd=cmd)
57
if project_version is None:
59
elif template_version is None:
60
template_version = arg
63
(project_version_inspected, template_version_inspected) = templatetools.get_project_and_template_versions("ubuntu-application")
64
if project_version is None:
65
project_version = project_version_inspected
66
if template_version is None:
67
template_version = template_version_inspected
43
69
if not configurationhandler.project_config:
44
70
configurationhandler.loadConfig()
245
### This is where we upgraded the default projects to GTK3, PyGI, and GSettings.
246
### Warn the user that this happened and they should upgrade manually to fix.
247
if project_version < '11.12' and internal_run:
248
print _("""WARNING: Your project is out of date. Newly created projects use
249
GTK+ 3, PyGI, and GSettings. See https://wiki.ubuntu.com/Quickly/GTK3 for
250
porting information and when you have finished porting your code, run
251
'quickly upgrade' to get rid of this message.""")
254
templatetools.update_version_in_project_file(template_version, 'ubuntu-application')