Author Topic: codeblocks 20.03 available for MacOS Intel on MacPorts  (Read 1391 times)

Offline kencu

  • Single posting newcomer
  • *
  • Posts: 4
codeblocks 20.03 available for MacOS Intel on MacPorts
« on: September 07, 2022, 05:40:01 pm »
I have recently updated the macOS build to the current version on MacPorts, for anyone interested in that. It builds on all 64 bit Intel systems from 10.6.8 SnowLeopard to the current Monterey:

https://ports.macports.org/port/codeblocks/details/

It defaults to building using wxWidgets-gtk 3.0, which also requires an x11 server (either XQuartz or the one from MacPorts).

The wxWidgets 3.0 cocoa build I thought worked pretty well on Mojave but not on Monterey (crashed) so I didn't default that version, unfortunately. Perhaps that crash is fixable. MacPorts supports variants, so you can build codeblocks with different wxWidgets flavours very easily if you are curious.

The arm64 builds are not presently working -- something to do with how MacPorts has implemented boost seems to be the issue. I don't have an arm Mac, so that will be harder for me to fix.

Homebrew is more popular than MacPorts, but MacPorts has some versatility that makes it more adapatable to building certain things I find, like gtk / x11 projects in particular.

The MacPorts installer is a very quick 2 minute installation. To install codeblocks you would then do something like this:

sudo port -v install codeblocks

(accept all the supporting ports that would be needed)

then install an x11 server if you need it, either from XQuartz.org or like this:

sudo port -v install xorg-server

(accept all the supporting ports that would be needed)

Then to run codeblocks there is a double-clickable icon in /Applications/MacPorts or you can run it from a terminal in the usual fashion, "codeblocks".

Best, K

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: codeblocks 20.03 available for MacOS Intel on MacPorts
« Reply #1 on: September 08, 2022, 12:37:24 am »
Thanks for the work. I will have a look at it in the next week or so.

If you want to C::B to debug then currently you will need have a look at the following repo and build C::B in order to get the DAP debugger plugin so you can use it to debug your app until the DAP debugger is included in the SF trunk source code:
https://github.com/acotty/CodeBlocks_Unofficial_Testing

If you want see want the DAP status is and also a reference to the work in progress to get the DAP into the SF truck, then have a look at the following thread:
https://forums.codeblocks.org/index.php/topic,25058


In the CodeBlocks_Unofficial_Testing repo I have the build process documented in the Readme_Build_<OS and build process>.txt files, so you can see how to build C::B using the files in the repo. The C::B trunk does not have support for C::B building C::B and does not include all of the plugins that are included in the makefiles in the repo for MAC.

Offline kencu

  • Single posting newcomer
  • *
  • Posts: 4
Re: codeblocks 20.03 available for MacOS Intel on MacPorts
« Reply #2 on: September 08, 2022, 04:42:23 am »
I built svn trunk 12881 against wxWidgets-3.2 on Monterey Intel and it seems to me to be better behaved than 20.03 built against wxWidgets-3.0 was on this system.

No crashes, a few assertions. I'll package that up into an alternate Portfile and put that Portfile somewhere accessible.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: codeblocks 20.03 available for MacOS Intel on MacPorts
« Reply #3 on: September 08, 2022, 05:04:06 am »
What are the assertions?

I also found that the wxWidgets 3.2 is more stable.

Offline kencu

  • Single posting newcomer
  • *
  • Posts: 4
Re: codeblocks 20.03 available for MacOS Intel on MacPorts
« Reply #4 on: September 10, 2022, 02:35:06 am »
The arm64 issues the 20.03 have been fixed with some newer config.* parts, so that now builds on M1 Macs as well.

I created a new codeblocks-devel port that builds the tip of the svn trunk. As this works quite well with wxWidgets-3.2 that has been defaulted on for all newer systems (10.11 up). Older systems will still use the GTK-3.0 build (10.6 to 10.10).

I'll attach the assertions.

Offline kencu

  • Single posting newcomer
  • *
  • Posts: 4
Re: codeblocks 20.03 available for MacOS Intel on MacPorts
« Reply #5 on: September 10, 2022, 02:35:48 am »
and the other assertions. These ones occur when you quit wxWidgets with it's quit menu instead of quitting Code::Blocks with it's quit menu.

Can the wxWidgets Quit menu be disabled somehow? Have to check on that...
« Last Edit: September 10, 2022, 04:32:47 am by kencu »