Author Topic: Code::Blocks can build against wxGTK/Win 3.2.0  (Read 4058 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Code::Blocks can build against wxGTK/Win 3.2.0
« 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

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

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.

« Last Edit: July 29, 2022, 02:25:26 pm 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

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Code::Blocks can build against wxGTK/Win 3.2.0
« Reply #1 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...
« Last Edit: July 29, 2022, 12:23:10 am by BlueHazzard »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Code::Blocks can build against wxGTK/Win 3.2.0
« Reply #2 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
3.0 https://github.com/msys2/MINGW-packages/pull/12194

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

Tim S.
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 AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Code::Blocks can build against wxGTK/Win 3.2.0
« Reply #3 on: July 29, 2022, 02:49:57 am »
I am cloning the branch now and will be giving it a go.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Code::Blocks can build against wxGTK/Win 3.2.0
« Reply #4 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:
  • pacman -U *.zst --overwrite "*"
  • set global variable "cb_relase_type" to:"-g -O0 -ggdb"  (quotes added for readability)
  • Needed to install mingw-w64-x86_64-drmingw

CodeBlocks_wxGTK32-msys2.cbp

  • Loaded CodeBlocks_wxGTK32-msys2.cbp
  • Build succeeded
  • In a command prompt cd into D:\Andrew_Development\Work_Installers\stahta01_wxMSW-msys2\src directory
  • Run update32_GTK3.bat, but in my environment the strip failed a expected as I do not have it in the path.
  • Needed to copy a large number of DLL's to get the codeblocks.exe to work "standalone"
  • Could compile simple hello world test
  • Could debug test app if I setup the compiler config from the nightly build due to compiler dialog crash (see next item)
  • Crash when entering compiler setup dialog.
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
  • Loaded CodeBlocks_wxMSW32-msys2.cbp
  • re-build succeeded (done just in case the wxGTK3 left some files that could cause issues)
  • In a command prompt cd into D:\Andrew_Development\Work_Installers\stahta01_wxMSW-msys2\src directory
  • Run update32_MSW.bat., but in my environment the strip failed a expected as I do not have it in the path.
  • Needed to copy a large number of DLL's to get the codeblocks.exe to work "standalone"
  • Had to add  two more DLL's: exchndl.dll & mgwhelp.dll (I am using a batch file to do the copy)
  • Could compile simple hello world test
  • Could debug test app
  • The BIG one: No crash when entering compiler setup dialog.

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?

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Code::Blocks can build against wxGTK/Win 3.2.0
« Reply #5 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?
« Last Edit: July 29, 2022, 07:35:02 am by AndrewCot »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Code::Blocks can build against wxGTK/Win 3.2.0
« Reply #6 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.



« Last Edit: July 29, 2022, 02:41:15 pm 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