--- a/LPCManager.py Thu Oct 03 22:59:38 2013 +0200
+++ b/LPCManager.py Thu Feb 27 23:50:45 2014 +0100
@@ -9,7 +9,10 @@
from types import TupleType, StringType, UnicodeType
-CWD = os.path.split(os.path.realpath(__file__))[0]
+_lpcmanager_path = os.path.split(__file__)[0] +_dist_folder = os.path.split(sys.path[0])[0] +_beremiz_folder = os.path.join(_dist_folder, "beremiz") +sys.path.append(_beremiz_folder) return os.path.join(CWD,*args)
@@ -47,35 +50,22 @@
- if os.path.exists("LPC_DEBUG"):
- __builtin__.__dict__["BMZ_DBG"] = True
- __builtin__.__dict__["BMZ_DBG"] = False
-app = wx.PySimpleApp(redirect=BMZ_DBG)
-app.SetAppName('beremiz')
-wx.InitAllImageHandlers()
-_base_folder = os.path.split(sys.path[0])[0]
-sys.path.append(os.path.join(_base_folder, "beremiz"))
+ __builtin__.__dict__["BMZ_DBG"] = os.path.exists("LPC_DEBUG") -from util.TranslationCatalogs import AddCatalog
-AddCatalog(os.path.join(CWD, "locale"))
+ app = wx.PySimpleApp(redirect=BMZ_DBG) + app.SetAppName('beremiz') + wx.InitAllImageHandlers() -if __name__ == '__main__':
- # Import module for internationalization
- #__builtin__.__dict__['_'] = wx.GetTranslation
- __builtin__.__dict__['_'] = lambda x: x
+ from util.misc import InstallLocalRessources + InstallLocalRessources(_beremiz_folder) -_base_path = os.path.split(__file__)[0]
+_lpcmanager_path = os.path.split(__file__)[0] from POULibrary import POULibrary
class PLCLibrary(POULibrary):
def GetLibraryPath(self):
- return os.path.join(_base_path, "pous.xml")
+ return os.path.join(_lpcmanager_path, "pous.xml") ('Native', 'NativeLib.NativeLibrary'),
@@ -88,10 +78,10 @@
from LPCtarget import LPC_target
-targets.targets["LPC"] = {"xsd": os.path.join(_base_path, "LPCtarget", "XSD"),
+targets.targets["LPC"] = {"xsd": os.path.join(_lpcmanager_path, "LPCtarget", "XSD"), "class": lambda: LPC_target,
- "code": os.path.join(_base_path,"LPCtarget","plc_LPC_main.c")}
-targets.toolchains["makefile"] = os.path.join(_base_path, "LPCtarget", "XSD_toolchain_makefile")
+ "code": os.path.join(_lpcmanager_path,"LPCtarget","plc_LPC_main.c")} +targets.toolchains["makefile"] = os.path.join(_lpcmanager_path, "LPCtarget", "XSD_toolchain_makefile") from ProjectController import ProjectController