diff -r 1cdae505be9e -r c093ec48f2fd plugger.py --- a/plugger.py Fri Oct 16 10:37:53 2009 +0200 +++ b/plugger.py Fri Oct 16 10:50:16 2009 +0200 @@ -658,9 +658,6 @@ else: exe_ext="" -iec2c_path = os.path.join(base_folder, "matiec", "iec2c"+exe_ext) -ieclib_path = os.path.join(base_folder, "matiec", "lib") - # import for project creation timestamping from threading import Timer, Lock, Thread, Semaphore from time import localtime @@ -747,6 +744,9 @@ self._connector = None self.Deleting = False + self.iec2c_path = os.path.join(base_folder, "matiec", "iec2c"+exe_ext) + self.ieclib_path = os.path.join(base_folder, "matiec", "lib") + # Setup debug information self.IECdebug_datas = {} self.IECdebug_lock = Lock() @@ -807,6 +807,12 @@ def GetPlugRoot(self): return self + def GetIECLibPath(self): + return self.ieclib_path + + def GetIEC2cPath(self): + return self.iec2c_path + def GetCurrentLocation(self): return () @@ -1056,8 +1062,8 @@ status, result, err_result = ProcessLogger( self.logger, "\"%s\" -f -I \"%s\" -T \"%s\" \"%s\""%( - iec2c_path, - ieclib_path, + self.iec2c_path, + self.ieclib_path, buildpath, self._getIECcodepath()), no_stdout=True, no_stderr=True).spin() @@ -1107,7 +1113,7 @@ # Keep track of generated C files for later use by self.PlugGenerate_C self.PLCGeneratedCFiles = C_files # compute CFLAGS for plc - self.plcCFLAGS = "\"-I"+ieclib_path+"\"" + self.plcCFLAGS = "\"-I"+self.ieclib_path+"\"" return True def GetBuilder(self): @@ -1274,9 +1280,9 @@ plc_main_code = targets.code("plc_common_main") % { "calls_prototypes":"\n".join([( "int __init_%(s)s(int argc,char **argv);\n"+ - "void __cleanup_%(s)s();\n"+ - "void __retrieve_%(s)s();\n"+ - "void __publish_%(s)s();")%{'s':locstr} for locstr in locstrs]), + "void __cleanup_%(s)s(void);\n"+ + "void __retrieve_%(s)s(void);\n"+ + "void __publish_%(s)s(void);")%{'s':locstr} for locstr in locstrs]), "retrieve_calls":"\n ".join([ "__retrieve_%s();"%locstr for locstr in locstrs]), "publish_calls":"\n ".join([ #Call publish in reverse order