--- a/ProjectController.py Fri May 06 18:04:40 2016 +0300
+++ b/ProjectController.py Fri May 06 19:14:10 2016 +0300
@@ -141,7 +141,7 @@
self.iec2c_path = os.path.join(base_folder, "matiec", "iec2c"+(".exe" if wx.Platform == '__WXMSW__' else ""))
self.ieclib_path = os.path.join(base_folder, "matiec", "lib")
- self.ieclib_c_path = os.path.join(base_folder, "matiec", "lib", "C")
+ self.ieclib_c_path = self._getMatIecCPath() # Setup debug information
@@ -629,11 +629,43 @@
+ def _getMatIecCPath(self): + os.path.join(base_folder, "matiec", "lib", "C"), + os.path.join(base_folder, "matiec", "lib") ] + filename=os.path.join(p, "iec_types.h") + if (os.path.isfile(filename)): + def _getMatIecOptions(self): + buildpath = self._getBuildPath() + buildcmd = "\"%s\" -h"%(self.iec2c_path) + options =["-f", "-l", "-p"] + # Invoke compiler. Output files are listed to stdout, errors to stderr + status, result, err_result = ProcessLogger(self.logger, buildcmd, + no_stdout=True, no_stderr=True).spin() + buildopt = buildopt + " " + opt def _Compile_ST_to_SoftPLC(self):
self.logger.write(_("Compiling IEC Program into C code...\n"))
buildpath = self._getBuildPath()
- buildcmd = "\"%s\" -f -l -p -I \"%s\" -T \"%s\" \"%s\""%(
+ buildcmd = "\"%s\" %s -I \"%s\" -T \"%s\" \"%s\""%( + self._getMatIecOptions(),