← Back to team overview

quickly-talk team mailing list archive

Re: No schemas for new projects?

 

Jo,

Thanks for catching this and bringing it up. I'm sure we'll get it fixed. Do you know if this just started happening or has this been going on for a while?

Cheers, Rick

On 03/14/2012 04:31 AM, Jo-Erlend Schinstad wrote:
When you run "quickly create ubuntu-application test-app", you get an error that "env" doesn't exist. This error message is completely unintuitive. The real problem is that schemas are not generated for new projects:

# Compile schema if present
schemapath = os.path.abspath("data/glib-2.0/schemas")
if os.path.exists(schemapath):
    subprocess.call(["glib-compile-schemas", schemapath])

    datadir = os.path.abspath("data")
    if 'XDG_DATA_DIRS' in env:
        env['XDG_DATA_DIRS'] = "%s:%s" % (datadir, env['XDG_DATA_DIRS'])
    else:
        env['XDG_DATA_DIRS'] = datadir

# run the new application if X display
if templatetools.is_X_display() and os.path.isfile(exec_file):
    print _("Launching your newly created project!")
    subprocess.call(['./' + project_name], cwd='bin/', env=env)



So, first you check if schemapath exists. It never does. Then you see if X and exec_file exists, and they do. However, env doesn't exist because it's only being set if schemapath exists. The question is; why isn't schemas generated for new projects?

The code above seems to be copied in several places, by the way. Perhaps it would be better to make it reusable?








Follow ups

References