# HG changeset patch # User Edouard Tisserant # Date 1566288491 -7200 # Node ID b5402859dfad33fbdc4eb0e1f93ce7330ece9df6 # Parent 4d5c5e5871abcaf151031241c88d60c1f7cef7c9 Swap CTN code gen and Libraries code generation order. In general library part of an extension needs to be computed before CTN part. diff -r 4d5c5e5871ab -r b5402859dfad ProjectController.py --- a/ProjectController.py Tue Aug 20 10:01:18 2019 +0200 +++ b/ProjectController.py Tue Aug 20 10:08:11 2019 +0200 @@ -1163,6 +1163,19 @@ def _Generate_runtime(self): buildpath = self._getBuildPath() + # CTN code gen is expected AFTER Libraries code gen, + # at least SVGHMI relies on it. + + # Generate C code and compilation params from liraries + try: + LibCFilesAndCFLAGS, LibLDFLAGS, LibExtraFiles = self.GetLibrariesCCode( + buildpath) + except Exception: + self.logger.write_error( + _("Runtime library extensions C code generation failed !\n")) + self.logger.write_error(traceback.format_exc()) + return False + # Generate C code and compilation params from confnode hierarchy try: CTNLocationCFilesAndCFLAGS, CTNLDFLAGS, CTNExtraFiles = self._Generate_C( @@ -1174,16 +1187,6 @@ self.logger.write_error(traceback.format_exc()) return False - # Generate C code and compilation params from liraries - try: - LibCFilesAndCFLAGS, LibLDFLAGS, LibExtraFiles = self.GetLibrariesCCode( - buildpath) - except Exception: - self.logger.write_error( - _("Runtime library extensions C code generation failed !\n")) - self.logger.write_error(traceback.format_exc()) - return False - self.LocationCFilesAndCFLAGS = LibCFilesAndCFLAGS + \ CTNLocationCFilesAndCFLAGS self.LDFLAGS = CTNLDFLAGS + LibLDFLAGS