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.
12 def compil(config, builder, logger):
14 if not builder.source_dir.smartcopy(builder.install_dir):
15 raise src.SatException(_("Error when copying %s sources to install dir") % builder.product_info.name)
17 # test lrelease #.pyconf needs in ..._APPLI pre_depend : ['qt']
18 command = "which lrelease"
19 res = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,env=builder.build_environ.environ.environ).communicate()
20 if res[1] != "": #an error occured
21 logger.write("ERROR: %s" % res[1])
22 builder.log(res[1]+"\n")
26 command = "lrelease *.ts"
27 res = subprocess.call(command,
29 cwd=str(builder.install_dir + "resources"),
30 env=builder.build_environ.environ.environ,
31 stdout=logger.logTxtFile,
32 stderr=subprocess.STDOUT)