diff --git a/bazaar/Py/Py.h b/bazaar/Py/Py.h index 673ea9fde..6f176dcc1 100644 --- a/bazaar/Py/Py.h +++ b/bazaar/Py/Py.h @@ -1,10 +1,17 @@ #ifndef _Python_Python_h #define _Python_Python_h +//this drops any auto linking/inclusion of python/python_d libs +//use this when we use those boost python prelinked dlls +//which link to python27.dll even in debug mode + +#define MS_NO_COREDLL 1 +#define Py_ENABLE_SHARED 1 + #ifdef flagBOOSTPY - #ifdef _DEBUG - #define BOOST_DEBUG_PYTHON 1 - #endif +// #ifdef _DEBUG +// #define BOOST_DEBUG_PYTHON 1 +// #endif #include #else #include diff --git a/bazaar/Py/Py.upp b/bazaar/Py/Py.upp index a50929efa..13ac9d0e8 100644 --- a/bazaar/Py/Py.upp +++ b/bazaar/Py/Py.upp @@ -1,6 +1,12 @@ uses Core; +library(MSC BOOSTPY) python27; + +library(MSC !BOOSTPY !DEBUG) python27; + +library(MSC !BOOSTPY DEBUG) python27_d; + file Py.h, init.icpp, diff --git a/bazaar/Py/install.txt b/bazaar/Py/install.txt index 5bd78b81c..14e73e874 100644 --- a/bazaar/Py/install.txt +++ b/bazaar/Py/install.txt @@ -75,4 +75,29 @@ SIDENOTE: _Py_NoneStruct reference errors when linking result due to Py_ENABLE_SHARED beeing undefined in pyport.h BOOST: -Py package is prepared to be used with Boost Python, just add BOOSTPY to your compile configuration \ No newline at end of file +Py package is prepared to be used with Boost Python, just add BOOSTPY to your compile configuration + +Boost Installation: +esiest way is to download the boostpro installer +http://www.boostpro.com/download/ +selct during installation MSC9 derivates (or respective your compiler) and, best, all the variants, shared, multi threaded, etc. +enhance your build method paths +PATH: C:\Prpgram Files\boost\boost_1_46_1\bin and C:\Prpgram Files\boost\boost_1_46_1\lib +INCLUDE C:\Prpgram Files\boost\boost_1_46_1 +LIB: C:\Prpgram Files\boost\boost_1_46_1\lib + +BOOST CAVEAT +see point 8 at +http://www.boost.org/doc/libs/1_46_1/libs/python/doc/building.html +the boost libraries from boostpro come with release and debug variants linked to python27.dll both +(the debug should theoretically be linked to python27_d) +when compiling release, all is fine, but compiling debug can render the executable unusable, +since it loads both python27.dll through the boost.python lib, and the python27_d.dll through +the pragma comment(lib,) which results in mixed inits and crashes/access violations. +not even the BOOST_DEBUG_PYTHON define seems to help here, since it seems to be provided +during build of the boost python libs to instruct them proper linkage. + +thats why it is the esiest way to control manually, which lib is going to be included manually. +#define MS_NO_COREDLL 1 +#define Py_ENABLE_SHARED 1 +are to disable the pragma comment(lib,) stuff so we manually can specify the libs while preserving all shared stuff. \ No newline at end of file diff --git a/bazaar/PyConsoleCtrl/PyConsoleCtrl.cpp b/bazaar/PyConsoleCtrl/PyConsoleCtrl.cpp index df6a1d7cf..2b448584d 100644 --- a/bazaar/PyConsoleCtrl/PyConsoleCtrl.cpp +++ b/bazaar/PyConsoleCtrl/PyConsoleCtrl.cpp @@ -73,6 +73,7 @@ PyConsoleCtrl::PyConsoleCtrl() savelog <<= THISBACK(SaveLog); clearlog <<= THISBACK(ClearLog); + clonex.SetLabel("AutoCl"); clonex.Set(1); PyCon::SetStream(log); diff --git a/bazaar/PyConsoleCtrl/PyConsoleCtrl.lay b/bazaar/PyConsoleCtrl/PyConsoleCtrl.lay index 780ec7ab5..37f4edadd 100644 --- a/bazaar/PyConsoleCtrl/PyConsoleCtrl.lay +++ b/bazaar/PyConsoleCtrl/PyConsoleCtrl.lay @@ -1,13 +1,13 @@ LAYOUT(PyConsoleCtrlLay, 600, 400) ITEM(Button, exec, SetLabel(t_("Exec")).RightPosZ(0, 56).BottomPosZ(0, 20)) - ITEM(Button, load, SetLabel(t_("Load")).LeftPosZ(0, 56).BottomPosZ(0, 20)) - ITEM(Button, save, SetLabel(t_("Save")).LeftPosZ(56, 56).BottomPosZ(0, 20)) - ITEM(Button, clear, SetLabel(t_("Clear")).LeftPosZ(112, 56).BottomPosZ(0, 20)) - ITEM(Button, savelog, SetLabel(t_("Save Log")).LeftPosZ(196, 56).BottomPosZ(0, 20)) - ITEM(Button, clearlog, SetLabel(t_("Clear Log")).LeftPosZ(252, 56).BottomPosZ(0, 20)) + ITEM(Button, load, SetLabel(t_("Load")).LeftPosZ(0, 28).BottomPosZ(0, 20)) + ITEM(Button, save, SetLabel(t_("Save")).LeftPosZ(28, 28).BottomPosZ(0, 20)) + ITEM(Button, clear, SetLabel(t_("Clear")).LeftPosZ(56, 28).BottomPosZ(0, 20)) + ITEM(Button, savelog, SetLabel(t_("Save Log")).LeftPosZ(92, 48).BottomPosZ(0, 20)) + ITEM(Button, clearlog, SetLabel(t_("Clear Log")).LeftPosZ(140, 48).BottomPosZ(0, 20)) ITEM(EditString, ex, SetEditable(false).WantFocus(false).RightPosZ(56, 56).BottomPosZ(1, 19)) - ITEM(StaticText, dv___7, SetText(t_("exit:")).SetAlign(ALIGN_RIGHT).RightPosZ(112, 24).BottomPosZ(0, 20)) + ITEM(StaticText, dv___7, SetText(t_("exit#:")).SetAlign(ALIGN_RIGHT).RightPosZ(112, 48).BottomPosZ(0, 20)) ITEM(Splitter, spl, LeftPosZ(0, 600).TopPosZ(0, 380)) - ITEM(Option, clonex, SetLabel(t_("Clear On Exec")).LeftPosZ(308, 88).BottomPosZ(4, 16)) + ITEM(ButtonOption, clonex, LeftPosZ(188, 48).BottomPosZ(0, 20)) END_LAYOUT