Author Topic: codeblocks wxWidgets 3.0 on openSuSe 13.2  (Read 7128 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
codeblocks wxWidgets 3.0 on openSuSe 13.2
« on: October 27, 2015, 11:17:14 pm »
hi everybody,

has somebody ever made some tries compiling c::b with wxWidgets 3.0 on openSuSE 13.2 ?

Got any results?

regards
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12069
    • Travis build status
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #1 on: October 28, 2015, 09:54:28 am »
Night builds should compile fine. If not please post the error messages, so we can look it up.
But there might be problems at runtime, because the porting to wx30 hasn't finished.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #2 on: October 28, 2015, 02:11:01 pm »
hi and thx for the answer...

so, I built it and everything worked fine, but now I have to start it...

it gives me this message in a pop up window:


Cannot find resources...
Code::Blocks was configured to be installed in '/home/fri/Programmieren/cb_svn/trunk/srd/devel30/share/codeblocks'.
Please use the command-line switch '--prefix' or set the CODEBLOCKS_DATA_DIR environment variable to point where Code::Blocks is installed,
or try re-installing the application...




maybe its because I am really lacking sleep, but I can help myself here...

any hints appreciated

regards
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #3 on: October 28, 2015, 05:49:50 pm »
OK, forgot the update30 command...

sorry
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #4 on: October 28, 2015, 06:46:06 pm »
working now.

had to make some changes in source code because I compiled against wxWidgets 3.0  STD (the default coming with opensSuSE 13.2)

only minor changes though, all due to STD:
- putting auto where compiler claimed not knowing some types (compatibility_iterator).
- adding some .c_strg() here and there, mainly in the loggers.h/loggers.cpp.
- making a change sc_wxtypes.cpp in registering wxArraystring to squirrel (had to split it up: some functions wxArrayString, some wxArrayStringBase) (why?).

many dialogues really fumbled up (why?). some gui elements pretty ugly (why?).

but working

was fun
« Last Edit: October 28, 2015, 06:47:47 pm by frithjofh »
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #5 on: October 28, 2015, 11:54:48 pm »
all plugins work too.

not much to adapt in their code.

exception: wxSmith. it relies too heavily on wxWidgets containers... seems to be a lot of work
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12069
    • Travis build status
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #6 on: October 29, 2015, 12:39:55 am »
Is suse's wx compiled in stl mode?
Generally auto should not be used in the current code base.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #7 on: October 29, 2015, 08:05:49 am »
yes, the wx of suse is in STL mode...

that was what I was trying out, compiling c::b with wx in STL mode.

using auto wasn't really necessary, I could have put compatibility_iterator instead. it just saved typing and was in order to test auto in these places.
« Last Edit: October 29, 2015, 08:09:26 pm by frithjofh »
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12069
    • Travis build status
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #8 on: October 30, 2015, 10:01:51 am »
Patches?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #9 on: October 30, 2015, 11:35:55 am »
whoa, slow down please ...  ;)

I id this like as a personal experiment first. like to ponder the amount of work it would suppose and if it even was possible.

well, it is working right now. I didn't have any crashes so far. but there are some strange behaviours in gui elements.

for patches I would do things more serious.

for instance, I would think these changes should be made so, that they don't affect the wx native containers build. in order to have only one code base for both wx native and wx STL. maybe even, if this would require using the auto keyword.

for other patches I would need to help from you devs. for instance many compiler errors come from the function signature

Code: [Select]
inline wxString F(const wxChar* msg, ...)
in logmanagers.h because of the use of const wxChar* which does not go along with wx STL wxString. I changed that functions signature to

Code: [Select]
inline wxString F(const wxString& msg, ...)
because as far as I could see, this change doesn't affect the way this function works or any of its callers.

Then again, that same function seems a bit messy all together, so I changed it to:

Code: [Select]
inline wxString F(wxString msg, ...)
    {
        va_list arg_list;
        va_start(arg_list, msg);

#if wxCHECK_VERSION(2,9,0) && wxUSE_UNICODE
        // in wx >=  2.9 unicode-build (default) we need the %ls here, or the strings get cut after the first character
        msg.Replace(_T("%s"), _T("%ls"));
#endif

        ::temp_string = wxString::FormatV(msg, arg_list);

        va_end(arg_list);

        return ::temp_string;
    }

to save all this needless copying of strings. but then: what happens to wxCHECK_VERSION(3,0,0) etc...?

short: I am too insecure  :-[
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #10 on: October 30, 2015, 12:28:53 pm »
what is that ::temp_string variable good for anyway?

to me it seems like a intended optimization for speed, but I don't think it really gives any benefit. on the contrary I think it even slows things down because it looses cache locality this way...

in all the 14 places it shows up, it could be easily and better be substituted for a local string, I think.
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12069
    • Travis build status
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #11 on: October 31, 2015, 12:24:21 pm »
The patches are in svn.
Some notes:
1. you've created them in reverse, the plus lines should contain your changes.
2. please if you have more patches post them in this topic.

About the F function, yes it is some awkward one.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #12 on: October 31, 2015, 12:45:46 pm »
sorry for that reverse...

here comes a patch for the logmanager.h file...

that messy F function
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #13 on: October 31, 2015, 01:19:10 pm »
patch for EnvVars

- only some change of variables

- changed some wxString functions to the STL versions

- replaced some wxString wx1.0 compatibility functions by STL version

- changed the   void EnvVarsDebugLog(wxString msg, ...) similar as in logmanager.h. they were actually quite the same
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 373
Re: codeblocks wxWidgets 3.0 on openSuSe 13.2
« Reply #14 on: October 31, 2015, 01:27:20 pm »
patch for smartindent

only a glitch in the c::b project file
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100