Author Topic: Code::Blocks still plans to keep using Configure/Make, correct?  (Read 5483 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Code::Blocks still plans to keep using Configure/Make, correct?

I am thinking about trying to create an MSys2 CB Package and wish to confirm CB has no serious plans to stop using the configure/make build system. I figure the two obvious ways was the cb project via cbp2make or using the configure/make method to create an MSys2 MinGW package for Code::Blocks. There was an CB user who suggested cmake about two years ago; but, I think that went no where.

The build systems I have glanced at in the last 5 years to build CB are:
1. configure/make  pros CB currently uses it and a lot of other projects use it
2. cbp2make          pros the CB team seems to have taken over the cbp2make project
3. cmake               pros seems to be a lot of projects using it
4. premake            pros looked like a nice system; but, few people are using it

Current plan is to create a MSys2 MinGW package for just cbp2make and see it it can create anything useful when applied to CB core project only. If the result is bad, try once more to use configure/make and see it it can produce useful output for just CB core (no contrib plugin) in a short time frame.

If that fails, then review the pros and cons on premake and cmake (cmake is the one likely to be chosen) and pick one to try.

Status updates below:
Using cbp2make looks to be too much work; just getting cbp2make to work is too much work.
Since, I am trying to learn cmake, I might try that next.

Tim S.



« Last Edit: July 29, 2022, 04:55:08 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 sodev

  • Lives here!
  • ****
  • Posts: 500
Re: Code::Blocks still plans to keep using Configure/Make, correct?
« Reply #1 on: July 29, 2022, 05:31:12 pm »
Configure/make is Linux (and the like) only, so you would still need something for Windows. Premake is just way too limited especially in regard to finding external libraries.

Go CMake right away. It works in automated CLI environments but also in GUI environments. Tool support for CMake is getting better and its library metadata format is spreading. Be aware though, doing CMake right is not easy and will take lots of time. Use the latest available version and don't care about anything before.

It took me months to get the build of wxFormBuilder done, but now it is entirely driven by CMake on all three platforms. No more external helper scripts that are a pain to maintain. Only the debian and flatpak builds are external, but with their support for using CMake, driving the build is essential a one-liner.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Code::Blocks still plans to keep using Configure/Make, correct?
« Reply #2 on: July 29, 2022, 09:28:09 pm »
Configure/make is Linux (and the like) only, so you would still need something for Windows.

Years ago, I got MSys2 to build an non working Code::Blocks using configure and someone took that work and tried to finish it.
I think I saved the broken work somewhere.

Tim S.
« Last Edit: July 29, 2022, 09:31:05 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 AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 679
Re: Code::Blocks still plans to keep using Configure/Make, correct?
« Reply #3 on: July 30, 2022, 01:40:37 am »
I have C::B building on Windows using the configre/make, but it is slow 30 minutes compared to 10 minutes using the workspace. My build includes additional plugins so it does take longer than a normal C::B build takes. I used the Linux non debian process as a starting point and made the mods as required to get it to work. The windows make/configure process create the files in the develop3x_yy directory structure like the workspace does and as such can then be used by the NSIS installer process.

The changes are in my GIT repo. You should be able to take the chanegs in the root. debian and m4 directories along with the makefile.am and build with Windows. I also have it building using Github workflow for Windows, Linuix and Mac that may help out to see how it works in a CI environment.

IMHO the boostrap/configure/make process is outdated and needs to be modernized as very few people use it daily and as I have found getting support/help from other C::B devs is almost non existent. I think cmake is the way to go. I had a friend who converted a C::B project for a poker machine to cmake in about 4 days from start to finish with the only knowledge with CMake is that it is a make system that is smarter and better than make and is used allot.



Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks still plans to keep using Configure/Make, correct?
« Reply #4 on: July 30, 2022, 04:58:50 am »
I think CMake get more popular these years.

I'm not quite familiar with CMake, but when building under Windows, do we need third library checks? I mean I don't see those check especially when using the cbp/workspace build system. So, I guess is that CMake under Windows just need to add the source file and necessary libries?  ;)
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 stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Code::Blocks still plans to keep using Configure/Make, correct?
« Reply #5 on: July 30, 2022, 08:08:54 pm »
IMHO the boostrap/configure/make process is outdated and needs to be modernized as very few people use it daily and as I have found getting support/help from other C::B devs is almost non existent. I think cmake is the way to go. I had a friend who converted a C::B project for a poker machine to cmake in about 4 days from start to finish with the only knowledge with CMake is that it is a make system that is smarter and better than make and is used allot.

Thanks, I will likely copy back my and your configure make changes.

I will wait on trying cmake; because the wxWidgets 3.2.0 cmake files are a little to new to switch right now.

Maybe once, wx3.2.2 is released I will think of trying cmake to build Code::Blocks if no one does it first.

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