# HG changeset patch # User Andrey Skvortsov # Date 1477321373 -10800 # Node ID f526fd97a7b0b953847bdcfaf234890568e3aac5 # Parent 3ebc08f75fef626d487decc4b8cce5ced9c5b096 add $(Beremiz installation)/mingw/bin in PATH on Windows platform This fixes issue if multiple gcc installation are found in user's PATH. Now gcc from Beremiz is used by default. diff -r 3ebc08f75fef -r f526fd97a7b0 Beremiz.py --- a/Beremiz.py Fri Oct 21 13:06:31 2016 +0300 +++ b/Beremiz.py Mon Oct 24 18:02:53 2016 +0300 @@ -465,9 +465,20 @@ self._init_coll_ConnectionStatusBar_Fields(self.ConnectionStatusBar) self.SetStatusBar(self.ConnectionStatusBar) + def __init_execute_path(self): + if os.name == 'nt': + # on windows, desktop shortcut launches Beremiz.py + # with working dir set to mingw/bin. + # then we prefix CWD to PATH in order to ensure that + # commands invoked by build process by default are + # found here. + os.environ["PATH"] = os.getcwd()+';'+os.environ["PATH"] + + def __init__(self, parent, projectOpen=None, buildpath=None, ctr=None, debug=True): # Add beremiz's icon in top left corner of the frame self.icon = wx.Icon(Bpath("images", "brz.ico"), wx.BITMAP_TYPE_ICO) + self.__init_execute_path() IDEFrame.__init__(self, parent, debug) self.Log = LogPseudoFile(self.LogConsole,self.SelectTab) diff -r 3ebc08f75fef -r f526fd97a7b0 targets/toolchain_makefile.py --- a/targets/toolchain_makefile.py Fri Oct 21 13:06:31 2016 +0300 +++ b/targets/toolchain_makefile.py Mon Oct 24 18:02:53 2016 +0300 @@ -30,15 +30,6 @@ includes_re = re.compile('\s*#include\s*["<]([^">]*)[">].*') - -if os.name == 'nt': - # on windows, desktop shortcut launches Beremiz.py - # with working dir set to mingw/bin. - # then we prefix CWD to PATH in order to ensure that - # commands invoked from Makefiles will first resolve - # to here. - os.environ["PATH"] = os.getcwd()+';'+os.environ["PATH"] - class toolchain_makefile(): def __init__(self, CTRInstance): self.CTRInstance = CTRInstance