Author Topic: Compiler settings issue  (Read 12587 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
Compiler settings issue
« on: October 11, 2009, 01:48:56 pm »
Since the addition of the 'Compiler output to be ignored' not everything fits anymore on the dialog (at least no longer on my laptop). Not all fields related to this addition are visible, but the advanced options/settings button is also no longer visible :-(

So part of the dialog is visible together with the cancel/ok buttons;


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiler settings issue
« Reply #1 on: October 11, 2009, 10:28:34 pm »
I think we should discuss the usage of wxScrollingdialog (or something similar) again.
See http://forums.codeblocks.org/index.php/topic,10124.0.html.

A complete change of the settings dialogs layout was also discussed there, but I'm not sure if something like this can be done in the next time.
Or is anybody seriously working on this.

I attach a patch against current trunk (r5862) that uses wxScrolingdialog instead of wxDialog in the most places (most likely more than absolutely ecause we also have some really small dialogs).
I did not touch anything in wxsmith and wxsmithcontribitems, to avoid breaking anything.

wxs- and xrc-files are left originally, because otherwise the xml-loader crashes and wxSmith can no longer read the files. [...]
...although this is a serious show-stopper to me. We should really think about whether the benefits are worth that costs. For me this drawback makes it quite useless (unfortunately). I would vote for leaving it as a proof-of-concept in the patch tracker.

...or do you (all devs) seriously thinking to apply this into trunk?

The xrc-files are no problem.
They get loaded as normally, and can be used as before, even if the loaded dialog is inherited from wxScrollingDialog (otherwise the most of our dialogs would fail).
I left them untouched, because the xml-loader don't know wxScrollingDialog and can not load the resources correctly.

The only real problem is with wxSmith, because it directly changes the source and headerfiles, and every change (to use wxScrollingialog) will be changed back to wxDialog.

I think it should be possible to add wxScrollingdialog to the wxSmithContribItems, so it can be used with wxSmith also, still not with the xrc-loader (without patching it), but this should not be a problem as written before.

EDIT:

I forgot the patch, here it is:

[attachment deleted by admin]
« Last Edit: October 11, 2009, 10:32:48 pm by jens »

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Compiler settings issue
« Reply #2 on: October 13, 2009, 02:13:12 am »
I personally support using wxScrollingdialog. I have already applied this patch in my working copy for several months. Works quite well!
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Compiler settings issue
« Reply #3 on: October 20, 2009, 03:13:26 pm »
I think we should discuss the usage of wxScrollingdialog (or something similar) again.
[...]
I forgot the patch, here it is:
For the record: I tried on Windows and it does no harm  so far.

I'd vote to apply it in the scintilla and debugger branch as a first step as these branches are used by several people. If it works we can merge only these modifications them into trunk. Alternatively an own branch may make sense, but please based on either the scintilla or (preferable) the debugger branch so that people will use it. Hence I believe this will not be used by as many people as the existing branches.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
Re: Compiler settings issue
« Reply #4 on: October 21, 2009, 07:05:22 am »
great, I would say : apply in the special development branches, and bring it rather soon back to trunk, since now on certain machines things are broken, in the way, one can not access all fields, or even reach the ok button.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiler settings issue
« Reply #5 on: October 21, 2009, 07:23:49 am »
great, I would say : apply in the special development branches, and bring it rather soon back to trunk, since now on certain machines things are broken, in the way, one can not access all fields, or even reach the ok button.

I will apply it later to new-scintilla- and debugger/propgrid-branch.

I'm a little busy right now and still "play" with symbols-browser loading speedup, the patch for this problem has priority, but I will commit it to trunk most likely during this day.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Compiler settings issue
« Reply #6 on: October 21, 2009, 10:17:53 am »
I'm a little busy right now and still "play" with symbols-browser loading speedup, the patch for this problem has priority, but I will commit it to trunk most likely during this day.
I told you already: Absolutely no objections for this one. I also think this is more important and will have great benefit.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiler settings issue
« Reply #7 on: October 22, 2009, 01:36:23 pm »
I just committed the changes to debugger/propgrid- and scintilla-testbranch.

Dialogs used by the wxSmith-contrib-items are unchanged, all other are changed.

I did not change wxSmith to know (and use, if wanted) wxScrollingdialog, so all wxs-files are unchanged, and if they are used, the appropriate source and header-files have to be fixed.
I will try to do this later.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiler settings issue
« Reply #8 on: October 22, 2009, 01:43:11 pm »
And don't forget to rebuild the whole project, or at least remove the devel and output subfolder and delete the *.gch-files in src/include.
When using automake-system, run make clean, ./bootstrap (changed Makefile.am's) and ./configure [...] before a new call to make.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Compiler settings issue
« Reply #9 on: October 22, 2009, 01:56:49 pm »
I just committed the changes to debugger/propgrid-
This does not work (so far). As you also changed wxPropGrid which is built as a library you'll need to include the sources for wxScrollingDialog, too. Otherwise the linker complains. I wonder how you managed to compile this...?!

I am not sure what is better:
Compiling wxScrollingDialog into wxPropGrid (and loosing sync with wxPropGrid sources therefore :-() or removing it from this component. Why did you modify this library?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiler settings issue
« Reply #10 on: October 22, 2009, 02:34:16 pm »
I just committed the changes to debugger/propgrid-
This does not work (so far). As you also changed wxPropGrid which is built as a library you'll need to include the sources for wxScrollingDialog, too. Otherwise the linker complains. I wonder how you managed to compile this...?!
Maybe some linux magic, I compiled from inside C::B and with automake, both works without problems.

I am not sure what is better:
Compiling wxScrollingDialog into wxPropGrid (and loosing sync with wxPropGrid sources therefore :-() or removing it from this component. Why did you modify this library?
I think it's better to remove wxScrollingdialog from wxPropGrid, we do not really need it here.

Maybe we should build wxScrollingdialog as library, to make it usable in any of our sources, without problems.

Moving the include-statements out of the wxSmith-controlled area is not really necessary in my opinion, because we have to edit the files manually in any case after changing dialogs with wxSmith, unless it knows wxScrollingDialog.

I will test the sources on also windows next time (before comitting them, I normally do so, just not today) ,to avoid such problems.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Compiler settings issue
« Reply #11 on: October 22, 2009, 02:55:46 pm »
Moving the include-statements out of the wxSmith-controlled area is not really necessary in my opinion, because we have to edit the files manually in any case after changing dialogs with wxSmith, unless it knows wxScrollingDialog.
True, but it's a little easier then. As the portions are being auto-generated you can safely leave the include statement wxSmith created and would only need to modify the base classes name. This is a temporary work-around until wxSmith supports wScrollingDialog natively. At that time we (obviously) need to modify the wxSmith resources and remove the include statement which would appear twice otherwise.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Compiler settings issue
« Reply #12 on: October 25, 2009, 11:22:54 pm »
Patch to scintilla branch needed for building under Windows without Precompilied Headers.

Note: the [#include "wxscintilla/include/wx/wxscintilla.h"] was commented out because it could not be found. And, it worked without it.

Tim S.

Code
Index: src/plugins/contrib/codesnippets/editor/editproperties.h
===================================================================
--- src/plugins/contrib/codesnippets/editor/editproperties.h (revision 5883)
+++ src/plugins/contrib/codesnippets/editor/editproperties.h (working copy)
@@ -1,6 +1,7 @@
 #ifndef EDITPROPERTIES_H
 #define EDITPROPERTIES_H
 
+#include <scrollingdialog.h>
 
 class ScbEditor;
 //----------------------------------------------------------------------------
Index: src/plugins/contrib/codesnippets/codesnippetswindow.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetswindow.cpp (revision 5883)
+++ src/plugins/contrib/codesnippets/codesnippetswindow.cpp (working copy)
@@ -51,7 +51,7 @@
         #include "macrosmanager.h"
         #include "configmanager.h"
         #include "editormanager.h"
-        #include "wxscintilla/include/wx/wxscintilla.h"
+//        #include "wxscintilla/include/wx/wxscintilla.h"
         #include "cbeditor.h"
         #include "globals.h"
     #endif
Index: src/plugins/debuggergdb/editbreakpointdlg.h
===================================================================
--- src/plugins/debuggergdb/editbreakpointdlg.h (revision 5883)
+++ src/plugins/debuggergdb/editbreakpointdlg.h (working copy)
@@ -6,9 +6,11 @@
 #ifndef EDITBREAKPOINT_H
 #define EDITBREAKPOINT_H
 
-#include <wx/dialog.h>
+#include <scrollingdialog.h>
+
 #include "debugger_defs.h"
 
+
 class EditBreakpointDlg : public wxScrollingDialog
 {
     public:
Index: src/src/main.h
===================================================================
--- src/src/main.h (revision 5883)
+++ src/src/main.h (working copy)
@@ -19,6 +19,7 @@
 #include "cbplugin.h"
 #include "sdk_events.h"
 #include "scripting/bindings/sc_base_types.h"
+#include <scrollingdialog.h>
 
 WX_DECLARE_HASH_MAP(int, wxString, wxIntegerHash, wxIntegerEqual, PluginIDsMap);
 WX_DECLARE_HASH_MAP(cbPlugin*, wxToolBar*, wxPointerHash, wxPointerEqual, PluginToolbarsMap);
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiler settings issue
« Reply #13 on: October 31, 2009, 06:54:08 pm »
I just committed a bunch of changed files to debugger-branch:
wxSmith now supports wxScrollingDialog natively,
an xrc-handler exists, so it can also be use in xrc-files directly,
changed the appropriate wxs, xrc, header, source and projectfiles accordingly.

Today I stumbled over an error described here: http://forums.codeblocks.org/index.php/topic,11024.msg75279.html#msg75279, C::B crashes on saving xrc- or wxs-files, after removing tinyxml from wxSmith's link libraries, the error disappears.

I hope I did not break anything this time, I tested it on linux (project/workspace-files and automake) and vista.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Compiler settings issue
« Reply #14 on: November 01, 2009, 02:10:43 am »
I just committed a bunch of changed files to debugger-branch:

Minimum Patch needed for Windows XP compile without PCH.

Patch to Code::Blocks Core Project Files
Code
Index: src/sdk/xtra_res.cpp
===================================================================
--- src/sdk/xtra_res.cpp (revision 5893)
+++ src/sdk/xtra_res.cpp (working copy)
@@ -10,6 +10,7 @@
 #include "sdk_precomp.h"
 
 #ifndef CB_PRECOMP
+    #include "scrollingdialog.h"
     #include "xtra_res.h"
     #include <wx/wx.h>
 #endif
Index: src/plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- src/plugins/debuggergdb/debuggergdb.cpp (revision 5893)
+++ src/plugins/debuggergdb/debuggergdb.cpp (working copy)
@@ -9,6 +9,7 @@
 
 #include <sdk.h>
 
+#include <algorithm> // std::remove_if
 #include <wx/tokenzr.h>
 #include "editarraystringdlg.h"
 #include "projectloader_hooks.h"
@@ -55,7 +56,7 @@
     #include "cbeditor.h"
     #include "projectbuildtarget.h"
     #include "sdk_events.h"
-    #include "compilerfactory.h
+    #include "compilerfactory.h"
     #include "xtra_res.h"
 
     #include "scrollingdialog.h"

Contrib Files
Code
Index: src/plugins/contrib/codesnippets/editor/editproperties.h
===================================================================
--- src/plugins/contrib/codesnippets/editor/editproperties.h (revision 5893)
+++ src/plugins/contrib/codesnippets/editor/editproperties.h (working copy)
@@ -1,6 +1,7 @@
 #ifndef EDITPROPERTIES_H
 #define EDITPROPERTIES_H
 
+#include <scrollingdialog.h>
 
 class ScbEditor;
 //----------------------------------------------------------------------------
« Last Edit: November 01, 2009, 02:52:51 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org