Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

OpenCV project wizard for MinGW and Linux

<< < (3/3)

ollydbg:

--- Quote from: MortenMacFly on May 02, 2013, 03:38:48 pm ---
--- Quote from: ollydbg on May 02, 2013, 03:33:45 pm ---So, if member-field "bin" has defined but have an empty value string, we use the sub-folder of "bin", any ideas?

--- End quote ---
Well but what if you toggle a compiler flag and want to have it on ("-Wall") in the one case and off ("") in the other case? This is not covered then as "" will be translated all the time which is not what you want.

As it is now, you can safely just enter "bin" (the fields name) into it and it will work as desired in all cases.

--- End quote ---
I see. Maybe, we can add a special member named "bin" (like the include, lib, obj), I think it is quite common that a bin folder contains executable or dll files under Windows.  :)

MortenMacFly:

--- Quote from: ollydbg on May 02, 2013, 03:48:15 pm ---I see. Maybe, we can add a special member named "bin" (like the include, lib, obj), I think it is quite common that a bin folder contains executable or dll files under Windows.  :)

--- End quote ---
Yes, I agree. I have indeed several GCV's where I put the "bin" folder into the custom fields.

ollydbg:
This patch implement the pre-defined "bin" member field.


--- Code: ---Index: resources/global_uservars.xrc
===================================================================
--- resources/global_uservars.xrc (revision 9011)
+++ resources/global_uservars.xrc (working copy)
@@ -241,6 +241,32 @@
  <flag>wxBOTTOM|wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL</flag>
  <border>5</border>
  </object>
+ <object class="sizeritem">
+ <object class="wxStaticText" name="ID_STATICTEXT_BIN">
+ <label>bin</label>
+ <font>
+ <size>10</size>
+ <weight>bold</weight>
+ <family>swiss</family>
+ <face>Arial</face>
+ </font>
+ </object>
+ <flag>wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxTextCtrl" name="bin" />
+ <flag>wxBOTTOM|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxButton" name="fs5">
+ <label>...</label>
+ <size>20,-1</size>
+ </object>
+ <flag>wxBOTTOM|wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL</flag>
+ <border>5</border>
+ </object>
  <object class="spacer">
  <flag>wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL</flag>
  <border>5</border>
Index: uservarmanager.cpp
===================================================================
--- uservarmanager.cpp (revision 9011)
+++ uservarmanager.cpp (working copy)
@@ -47,6 +47,7 @@
 const wxString cInclude  (_T("include"));
 const wxString cLib      (_T("lib"));
 const wxString cObj      (_T("obj"));
+const wxString cBin      (_T("bin"));
 const wxString cCflags   (_T("cflags"));
 const wxString cLflags   (_T("lflags"));
 const wxString cSets     (_T("/sets/"));
@@ -75,6 +76,7 @@
     wxTextCtrl *m_Include;
     wxTextCtrl *m_Lib;
     wxTextCtrl *m_Obj;
+    wxTextCtrl *m_Bin;
 
     wxTextCtrl *m_Name[7];
     wxTextCtrl *m_Value[7];
@@ -155,7 +157,7 @@
     if (member.IsEmpty() || member.IsSameAs(cBase))
         return base;
 
-    if (member.IsSameAs(cInclude) || member.IsSameAs(cLib) || member.IsSameAs(cObj))
+    if (member.IsSameAs(cInclude) || member.IsSameAs(cLib) || member.IsSameAs(cObj) || member.IsSameAs(cBin))
     {
         wxString ret = m_CfgMan->Read(path + member);
         if (ret.IsEmpty())
@@ -292,6 +294,7 @@
     m_Include = XRCCTRL(*this, "include", wxTextCtrl);
     m_Lib     = XRCCTRL(*this, "lib",     wxTextCtrl);
     m_Obj     = XRCCTRL(*this, "obj",     wxTextCtrl);
+    m_Bin     = XRCCTRL(*this, "bin",     wxTextCtrl);
 
     wxSplitterWindow *splitter = XRCCTRL(*this, "splitter", wxSplitterWindow);
     if (splitter)
@@ -629,6 +632,8 @@
         c = m_Lib;
     else if (id == XRCID("fs4"))
         c = m_Obj;
+    else if (id == XRCID("fs5"))
+        c = m_Bin;
     else
         cbThrow(_T("Encountered invalid button ID"));
 


--- End code ---

ollydbg:
I'm going to commit the patch above as there is not objections for one day or two. ;)
After that, I'm going to commit the project wizard for OpenCV.

ollydbg:

--- Quote from: ollydbg on May 08, 2013, 09:58:32 am ---I'm going to commit the patch above as there is not objections for one day or two. ;)
After that, I'm going to commit the project wizard for OpenCV.

--- End quote ---
Done in rev 9063 and rev9064, thanks.

Navigation

[0] Message Index

[*] Previous page

Go to full version