--- a/LPCManager.py Fri Apr 07 10:46:10 2017 +0200
+++ b/LPCManager.py Tue Apr 11 13:03:50 2017 +0200
@@ -134,7 +134,7 @@
"code": {"plc_MC9_main.c": targets.targets["Xenomai"]["code"]["plc_Xenomai_main.c"],
"plc_MC9_main_retain.c": os.path.join(_lpcmanager_path,
"MC9target", "plc_MC9_main_retain.c")}}
+from BeremizIDE import * from ProjectController import ProjectController
from ConfigTreeNode import ConfigTreeNode
from editors.ProjectNodeEditor import ProjectNodeEditor
@@ -630,6 +630,8 @@
# Firmware update running status
self.firmawreUpadateIsRunning = False
# Bind mouse double click event on URI_location in Beremiz
@@ -676,20 +678,23 @@
build_succeeded = ProjectController._Build(args)
+ self._Clean(building = True) save = self.ProjectTestModified()
self.AppFrame._Refresh(TITLE, FILEMENU)
if self.BuildPath is not None:
mycopytree(self.OrigBuildPath, self.BuildPath)
- build_thread = Thread(target=__Build, args=(self,))
- build_thread.daemon = True
+ build_thread = Thread(target=__Build, args=(self,)) + build_thread.daemon = True wx.CallAfter(self.AppFrame.RefreshAll)
@@ -1182,7 +1187,7 @@
+ def _Clean(self, building = False): self._CloseView(self._IECCodeView)
runtime_list = fnmatch.filter(os.listdir(self._getBuildPath()), 'runtime_*')
if os.path.isdir(os.path.join(self._getBuildPath())) and os.path.isfile(
@@ -1194,7 +1199,8 @@
if os.path.isfile(os.path.join(self._getBuildPath(), "hmi.py")):
os.remove(os.path.join(self._getBuildPath(), "hmi.py"))
- self.logger.write_error(_("Build directory already clean\n"))
+ self.logger.write_error(_("Build directory already clean\n")) self.ShowMethod("_showIECcode", False)
self.EnableMethod("_Clean", False)
@@ -1635,9 +1641,10 @@
if __name__ == '__main__':
- from threading import Thread, Timer, Semaphore
+ from threading import Thread, Timer, Semaphore, Lock wx_eval_lock = Semaphore(0)