lpcmanager

Create new branche for GOT.
GOT
2016-01-11, agregorcic
2e072699af7b
Parents 22dc415b96c6
Children 0749b6c36b8d
Create new branche for GOT.
  • +24 -3
    LPCManager.py
  • --- a/LPCManager.py Fri Dec 04 15:51:34 2015 +0100
    +++ b/LPCManager.py Mon Jan 11 10:45:48 2016 +0100
    @@ -74,9 +74,10 @@
    features.libraries=[
    ('Native', 'NativeLib.NativeLibrary'),
    - ('LPC', lambda: PLCLibrary)]
    -
    -
    + ('LPC', lambda: PLCLibrary),
    + ('Python', 'py_ext.PythonLibrary'),
    + ('SVGUI', 'svgui.SVGUILibrary')]
    +
    import connectors
    from LPCconnector import LPC_connector_factory
    connectors.connectors["LPC"]=lambda:LPC_connector_factory
    @@ -323,6 +324,11 @@
    "name" : _("Build"),
    "tooltip" : _("Build project into build folder"),
    "method" : "_Build"},
    + {"bitmap" : "Clean",
    + "name" : _("Clean"),
    + "enabled" : False,
    + "tooltip" : _("Clean project build folder"),
    + "method" : "_Clean"},
    {"bitmap" : "Transfer",
    "name" : _("Transfer"),
    "shown" : False,
    @@ -921,6 +927,21 @@
    else:
    return None
    + def _Clean(self):
    + self._CloseView(self._IECCodeView)
    + if os.path.isdir(os.path.join(self._getBuildPath())) and os.path.isfile(os.path.join(self._getBuildPath(), "hmi.py")) and os.path.isfile(os.path.join(self._getBuildPath(), "runtime_2.py")):
    + self.logger.write(_("Cleaning the build directory\n"))
    + #self.logger.write(_(str(os.path.join(self._getBuildPath(), "hmi.py"))))
    + os.remove(os.path.join(self._getBuildPath(), "hmi.py"))
    + os.remove(os.path.join(self._getBuildPath(), "runtime_2.py"))
    + else:
    + self.logger.write_error(_("Build directory already clean\n"))
    + self.ShowMethod("_showIECcode", False)
    + self.EnableMethod("_Clean", False)
    + # kill the builder
    + self._builder = None
    + self.CompareLocalAndRemotePLC()
    +
    def _Transfer(self):
    if self.OnlineMode == "NORMAL":
    ProjectController._Transfer(self)