ProjectController.py
changeset 2631 b5402859dfad
parent 2621 af09744a468e
child 2632 534387caf43d
equal deleted inserted replaced
2630:4d5c5e5871ab 2631:b5402859dfad
  1161         return True
  1161         return True
  1162 
  1162 
  1163     def _Generate_runtime(self):
  1163     def _Generate_runtime(self):
  1164         buildpath = self._getBuildPath()
  1164         buildpath = self._getBuildPath()
  1165 
  1165 
       
  1166         # CTN code gen is expected AFTER Libraries code gen,
       
  1167         # at least SVGHMI relies on it.
       
  1168 
       
  1169         # Generate C code and compilation params from liraries
       
  1170         try:
       
  1171             LibCFilesAndCFLAGS, LibLDFLAGS, LibExtraFiles = self.GetLibrariesCCode(
       
  1172                 buildpath)
       
  1173         except Exception:
       
  1174             self.logger.write_error(
       
  1175                 _("Runtime library extensions C code generation failed !\n"))
       
  1176             self.logger.write_error(traceback.format_exc())
       
  1177             return False
       
  1178 
  1166         # Generate C code and compilation params from confnode hierarchy
  1179         # Generate C code and compilation params from confnode hierarchy
  1167         try:
  1180         try:
  1168             CTNLocationCFilesAndCFLAGS, CTNLDFLAGS, CTNExtraFiles = self._Generate_C(
  1181             CTNLocationCFilesAndCFLAGS, CTNLDFLAGS, CTNExtraFiles = self._Generate_C(
  1169                 buildpath,
  1182                 buildpath,
  1170                 self.PLCGeneratedLocatedVars)
  1183                 self.PLCGeneratedLocatedVars)
  1171         except Exception:
  1184         except Exception:
  1172             self.logger.write_error(
  1185             self.logger.write_error(
  1173                 _("Runtime IO extensions C code generation failed !\n"))
  1186                 _("Runtime IO extensions C code generation failed !\n"))
  1174             self.logger.write_error(traceback.format_exc())
       
  1175             return False
       
  1176 
       
  1177         # Generate C code and compilation params from liraries
       
  1178         try:
       
  1179             LibCFilesAndCFLAGS, LibLDFLAGS, LibExtraFiles = self.GetLibrariesCCode(
       
  1180                 buildpath)
       
  1181         except Exception:
       
  1182             self.logger.write_error(
       
  1183                 _("Runtime library extensions C code generation failed !\n"))
       
  1184             self.logger.write_error(traceback.format_exc())
  1187             self.logger.write_error(traceback.format_exc())
  1185             return False
  1188             return False
  1186 
  1189 
  1187         self.LocationCFilesAndCFLAGS = LibCFilesAndCFLAGS + \
  1190         self.LocationCFilesAndCFLAGS = LibCFilesAndCFLAGS + \
  1188             CTNLocationCFilesAndCFLAGS
  1191             CTNLocationCFilesAndCFLAGS