4 # This script is used to build the application module.
5 # First, it copies the content of the sources directory to the install directory.
6 # Then it runs 'lrelease' to build the resources.
13 def compil(config, builder, logger):
15 if not builder.source_dir.smartcopy(builder.install_dir):
16 raise src.SatException(
17 _("Error when copying %s sources to install dir")
18 % builder.product_info.name
21 # test lrelease #.pyconf needs in ..._APPLI pre_depend : ['qt']
22 command = "which lrelease"
23 res = subprocess.Popen(
26 stdout=subprocess.PIPE,
27 stderr=subprocess.PIPE,
28 env=builder.build_environ.environ.environ,
30 if res[1] != "": # an error occured
31 logger.write("ERROR: %s" % res[1])
32 builder.log(res[1] + "\n")
36 command = "lrelease *.ts"
37 res = subprocess.call(
40 cwd=str(builder.install_dir + "resources"),
41 env=builder.build_environ.environ.environ,
42 stdout=logger.logTxtFile,
43 stderr=subprocess.STDOUT,