3 import os, glob, subprocess, shlex
5 components = ('core', 'dbus', 'declarative', 'gui', 'network', 'plugins',
6 'script', 'scripttools', 'sql', 'svg', 'test', 'uitools', 'xml')
12 for root, subdirs, files in os.walk(sdir):
14 if sfile.endswith(('.cpp', '.h', '.js', '.qs', '.qml', '.ui')):
15 lfiles.append('%s/%s' % (root, sfile))
19 cfiles.extend(list_files('src/%s' % c))
21 for t in glob.glob('src/tools/*'):
22 tfiles.extend(list_files(t))
24 for t in glob.glob('translations/qt*.ts'):
26 files = ' '.join(tfiles)
28 files = ' '.join(cfiles)
29 command = 'fastdev/bin/lupdate -locations relative -no-ui-lines -no-obsolete %s -ts %s' % (files, t)
30 command = shlex.split(command)
31 pipe = subprocess.Popen(command, stderr=subprocess.PIPE)
33 if pipe.returncode != 0:
34 raise(Exception(pipe.communicate()[1].strip()))