Beispiel #1
0
import subprocess
import sys

import internal.apportutils

from internal import quicklyutils, pandoramacros, naming, vc
from quickly import configurationhandler, templatetools, tools

import gettext
from gettext import gettext as _
# set domain text
gettext.textdomain('quickly')

# get project version and template version if no argument given
if len(sys.argv) < 3:
    (project_version, template_version) = templatetools.get_project_and_template_versions("pandora-build")
else:
    project_version = sys.argv[1]
    template_version = sys.argv[2]

root_project_path = tools.get_root_project_path()
print "root path: ", root_project_path
os.chdir(root_project_path)

if not configurationhandler.project_config:
    configurationhandler.loadConfig()

project_name = configurationhandler.project_config['project']
project_type = configurationhandler.project_config['project-type']
pandora_version = configurationhandler.project_config['pandora-version']
Beispiel #2
0

templatetools.handle_additional_parameters(sys.argv, help, usage=usage)

if not configurationhandler.project_config:
    configurationhandler.loadConfig()
mainfile = "data/ui/" + templatetools.get_camel_case_name(
    configurationhandler.project_config['project']).lower() + "window.ui"
files = []
for ui_file in glob.glob("data/ui/*.ui"):
    if ui_file.lower() != mainfile:
        files.insert(0, ui_file)
    else:
        files.append(ui_file)

(project_version, template_version
 ) = templatetools.get_project_and_template_versions("git-python-gtk")
if project_version < '11.12':  # GTK+ 3 changeover
    glade_cmd = 'GLADE_CATALOG_PATH=./data/ui glade-gtk2'
else:
    glade_cmd = 'GLADE_CATALOG_SEARCH_PATH=./data/ui glade'

cmd = glade_cmd + " " + " ".join(files)

#run glade with env variables pointing to catalogue xml files
if templatetools.in_verbose_mode():
    subprocess.Popen(cmd, shell=True)
else:
    nullfile = file("/dev/null")
    subprocess.Popen(cmd, shell=True, stderr=nullfile)
and windows in your project. Note that you *must* open Glade
in this manner for quickly to work. If you try to open Glade
directly, and the open the UI files, Glade will throw errors
and won't open the files.""")
templatetools.handle_additional_parameters(sys.argv, help, usage=usage)

if not configurationhandler.project_config:
    configurationhandler.loadConfig()
mainfile = "data/ui/" + templatetools.get_camel_case_name(configurationhandler.project_config['project']).lower() + "window.ui"
files = []
for ui_file in glob.glob("data/ui/*.ui"):
    if ui_file.lower() != mainfile:
        files.insert(0, ui_file)
    else:
        files.append(ui_file)

(project_version, template_version) = templatetools.get_project_and_template_versions("git-python-gtk")
if project_version < '11.12': # GTK+ 3 changeover
    glade_cmd = 'GLADE_CATALOG_PATH=./data/ui glade-gtk2'
else:
    glade_cmd = 'GLADE_CATALOG_SEARCH_PATH=./data/ui glade'

cmd = glade_cmd + " " + " ".join(files)

#run glade with env variables pointing to catalogue xml files
if templatetools.in_verbose_mode():
    subprocess.Popen(cmd, shell=True)
else:
    nullfile=file("/dev/null") 
    subprocess.Popen(cmd, shell=True, stderr=nullfile)
Beispiel #4
0
while i < len(sys.argv):
    arg = sys.argv[i]
    if arg.startswith('-'):
        if arg == '--internal':
            internal_run = True
        else:
            cmd = commands.get_command('upgrade', 'git-python-gtk')
            templatetools.usage_error(_("Unknown option: %s."  % arg), cmd=cmd)
    else:
        if project_version is None:
            project_version = arg
        elif template_version is None:
            template_version = arg
    i += 1

(project_version_inspected, template_version_inspected) = templatetools.get_project_and_template_versions("git-python-gtk")
if project_version is None:
    project_version = project_version_inspected
if template_version is None:
    template_version = template_version_inspected

if not configurationhandler.project_config:
    configurationhandler.loadConfig()

project_name = configurationhandler.project_config['project']
python_name = templatetools.python_name(project_name)
project_sentence_name, project_camel_case_name = \
    templatetools.conventional_names(project_name)

substitutions = (("project_name",project_name),
                 ("project_camel_case_name",project_camel_case_name),
Beispiel #5
0
    arg = sys.argv[i]
    if arg.startswith('-'):
        if arg == '--internal':
            internal_run = True
        else:
            cmd = commands.get_command('upgrade', 'ubuntu-application')
            templatetools.usage_error(_("Unknown option: %s." % arg), cmd=cmd)
    else:
        if project_version is None:
            project_version = arg
        elif template_version is None:
            template_version = arg
    i += 1

(project_version_inspected, template_version_inspected
 ) = templatetools.get_project_and_template_versions("ubuntu-application")
if project_version is None:
    project_version = project_version_inspected
if template_version is None:
    template_version = template_version_inspected

if not configurationhandler.project_config:
    configurationhandler.loadConfig()

project_name = configurationhandler.project_config['project']
python_name = templatetools.python_name(project_name)
project_sentence_name, project_camel_case_name = \
    templatetools.conventional_names(project_name)

substitutions = (("project_name", project_name), ("project_camel_case_name",
                                                  project_camel_case_name),
import subprocess
import sys

import internal.apportutils

from internal import quicklyutils
from quickly import configurationhandler, templatetools

import gettext
from gettext import gettext as _
# set domain text
gettext.textdomain('quickly')

# get project version and template version if no argument given
if len(sys.argv) < 3:
    (project_version, template_version) = templatetools.get_project_and_template_versions("ubuntu-application")
else:
    project_version = sys.argv[1]
    template_version = sys.argv[2]

if not configurationhandler.project_config:
    configurationhandler.loadConfig()

project_name = configurationhandler.project_config['project']
python_name = templatetools.python_name(project_name)
project_sentence_name, project_camel_case_name = \
    templatetools.conventional_names(project_name)

substitutions = (("project_name",project_name),
                 ("project_camel_case_name",project_camel_case_name),
                 ("project_sentence_name",project_sentence_name),