Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: stahta01 on July 28, 2022, 04:53:16 pm

Title: Code::Blocks can build against wxGTK/Win 3.2.0
Post by: stahta01 on July 28, 2022, 04:53:16 pm
I have gotten Code::Blocks core project to build with minor edits.
https://github.com/stahta01/codeblocks_sfmirror/tree/wxMSW-msys2 (https://github.com/stahta01/codeblocks_sfmirror/tree/wxMSW-msys2)

Edit: The above repo was just to test the MINGW-packages below!!!!!!!!!!!!!

I likely did a few edits that was not needed.

I did it to test this wxWidgets 3.2.0 package.
https://github.com/msys2/MINGW-packages/pull/12224 (https://github.com/msys2/MINGW-packages/pull/12224)

Code::Blocks IDE was the only large app I know would compile with wxGTK/Win with only minor edits.

Edit: Other that looking about about box I did no testing

Code
Name                    : Code::Blocks
Version                 : svn-r12852
SDK Version             : 2.19.0
Scintilla Version       : 3.7.5
Author                  : The Code::Blocks Team
E-mail                  : info@codeblocks.org
Website                 : https://www.codeblocks.org
OS                      : Windows 10 (build 19044), 64-bit edition
Scaling factor          : 1.000000
Detected scaling factor : 1.250000
Display PPI             : 120x120
Display count           : 2
Display 0 (\\.\DISPLAY1): XY=[1600,0]; Size=[1700,960];
Display 1 (\\.\DISPLAY2): XY=[0,0]; Size=[1280,1024]; Primary

wxWidgets Library (wxGTK port)
Version 3.2.0 (Unicode: wchar_t, debug level: 1),
compiled at Jul 28 2022 04:54:56

Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.34.

Edit2: Ran into wxGetKeyState() issues; very fast. So, the CB built with wxGTK/Win is not very usable till that is fixed.

Tim S.

Title: Re: Code::Blocks can build against wxGTK/Win 3.2.0
Post by: BlueHazzard on July 29, 2022, 12:20:44 am
What does this mean? Could we provide a package over msys with this?
msys isn't using wxGTK by default or?

 
Quote
Ran into wxGetKeyState() issues
So you can not type?

[Edit:] I see mostly only ifdef changes, so this should be straight forward if we want to integrate it. I am just no fan of the new project files  :-\ we should try to remove project files instead of adding them...
Title: Re: Code::Blocks can build against wxGTK/Win 3.2.0
Post by: stahta01 on July 29, 2022, 01:49:29 am
What does this mean? Could we provide a package over msys with this?
msys isn't using wxGTK by default or?

 
Quote
Ran into wxGetKeyState() issues
So you can not type?

[Edit:] I see mostly only ifdef changes, so this should be straight forward if we want to integrate it. I am just no fan of the new project files  :-\ we should try to remove project files instead of adding them...

The wxWidgets 3.2.0 package I did an PR on for MSys2 supplies both wxMSW and wxGTK-gtk3; I needed a way to test the wxGTK.
I know that 2 to 3 years ago the CB was close to compiling with wxGTK/Win; so I used CB to test it.
I have no plans to submit the CB projects I have in the repo above. Or the code changes.
But, I do consider it a example way to build CB projects for other software.

wxGetKeyState() returns shift/control/alt etc.
I did not even try to type; the assert messages about wxGetKeyState() happened when trying to build an previously created CB project with a single printf statement.

But, the PR seems to supply the private wxMSW headers needed to build the Code::Blocks core project.
If anyone uses MSys2, please test my PR and give feedback on the wx3.2 or wx3.0 PRs
3.2 https://github.com/msys2/MINGW-packages/pull/12224 (https://github.com/msys2/MINGW-packages/pull/12224)
3.0 https://github.com/msys2/MINGW-packages/pull/12194 (https://github.com/msys2/MINGW-packages/pull/12194)

I hope I finally have package names the MSys2 folks will support.

Tim S.
Title: Re: Code::Blocks can build against wxGTK/Win 3.2.0
Post by: AndrewCot on July 29, 2022, 02:49:57 am
I am cloning the branch now and will be giving it a go.
Title: Re: Code::Blocks can build against wxGTK/Win 3.2.0
Post by: AndrewCot on July 29, 2022, 05:47:08 am
I loved how I could build C::B without having to build wxWidgets and therefore it would make it a heck of allot better for newbies as they do not always get the parameters and/or the steps right.

I downloaded the MINGW64 artifact from last night's build.
Needed to do the following in order to do the build:

CodeBlocks_wxGTK32-msys2.cbp

Conclusion - allot easier to build and test C::B than the existing requirement to build wxWidgets
Smaller Size - Possibly smaller in that the nightly directory with DLL's is 172MB (approx) and the output32_GTK3 is approx 148Mb on disk. Needs more investigation to double check.

CodeBlocks_wxMSW32-msys2.cbp

Conclusion - allot easier to build and test C::B than the existing requirement to build wxWidgets
Smaller Size - Possibly smaller in that the nightly directory with DLL's is 172MB (approx) and the output32_MSW is approx 150Mb on disk. Needs more investigation to double check.


Going Forward
Why do you not want to run with getting the Windows (wxWidgets 3.2 only IMHO) build changed to use the new packages and therefore stopping the requirement to build a wxWidgets in order to build  C::B?
Title: Re: Code::Blocks can build against wxGTK/Win 3.2.0
Post by: AndrewCot on July 29, 2022, 06:00:04 am
Stability/Bugs:
The MSW seems allot more stable that the GTK3 in my quick tests. As C::B GTK3 crashes allot. I got a crash when moving the watches dialog with no GDB debugging session running.The MSW build does not have the issue with the dialogs moving like the C::B wx3.2 monolithic build does without the fix.

Dumb questions:
Are there going to be any group packages instead of having to download the individual packages?
Do you know if the existing wxWidgets 3.1 GTK3 is okay if you build an app with it?
Title: Re: Code::Blocks can build against wxGTK/Win 3.2.0
Post by: stahta01 on July 29, 2022, 02:21:53 pm
Stability/Bugs:
The MSW seems allot more stable that the GTK3 in my quick tests. As C::B GTK3 crashes allot. I got a crash when moving the watches dialog with no GDB debugging session running.The MSW build does not have the issue with the dialogs moving like the C::B wx3.2 monolithic build does without the fix.

Dumb questions:
Are there going to be any group packages instead of having to download the individual packages?
Do you know if the existing wxWidgets 3.1 GTK3 is okay if you build an app with it?

wxGTK-gtk3/Win is likely not okay; but, without testing will never become okay.
The wxWidgets people released it like it was okay; but, it did not build till I patched it.

Once the PR is added to MSys2 and the binaries released only two [wxWidgets] packages should be needed to be installed to build under MinGW64.
mingw-w64-x86_64-wxwidgets3.2-msw and mingw-w64-x86_64-wxwidgets3.2-msw-cb_headers.

AND, AS I ALREADY STATED THE CB PROJECTS ARE NOT SOMETHING I PLANNED TO SUMMIT TO THE CB TEAM; They were for testing the MSys2 wxWidgets packages!!!!

Edit: I would prefer to use configure/make to build Code::Blocks using an PKGBUILD; does anyone remember who it was that took my broken work on that and added to it?

Tim S.