Author Topic: Code::Blocks on Mac OS X  (Read 9445 times)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Code::Blocks on Mac OS X
« on: September 11, 2006, 11:56:30 pm »
I've updated the Wiki pages with some more info:
Installing_Code::Blocks_nightly_build_on_Mac_OS_X
Installing_Code::Blocks_from_source_on_Mac_OS_X

Currently there are three major ways to install C::B:

1) Download the binary package and run it. Easy :-)
wxWidgets libraries are included in the app bundle.
/Developer/Applications/CodeBlocks.app

2) Build the entire thing in /usr/local, from scratch...
This currently requires some tweaks and autotools-fu.
/usr/local/bin/codeblocks

3) Download and build using the DarwinPorts system.
Somewhat of a pain until Portfile is included upstream.
/Applications/DarwinPorts/CodeBlocks.app
/opt/local/bin/codeblocks

BTW:
The advantages of DarwinPorts is that it can build
both wxMac and wxGTK versions, and that all the
dependencies and updates from SVN are automated.
It can also build packages, which might be interesting.
Code
port install codeblocks

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: Code::Blocks on Mac OS X
« Reply #1 on: September 12, 2006, 01:13:08 am »
i'm maybe a little offtopic but i've some big problem with code::blocks on mac...

basically i changed the console to Terminal.app and programs run fine. The only problem - if i click the red X button to stop the process, my computer almost shuts down! (dock disappears, screen goes blue, then fades down - but quickly finder starts again) i have no idea what this can be i've never seen this behaviour anywhere - any idea?à

(BTW thanks for your efforts in this project  :) )
« Last Edit: September 12, 2006, 01:14:44 am by Auria »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Code::Blocks on Mac OS X
« Reply #2 on: September 12, 2006, 09:06:27 am »
basically i changed the console to Terminal.app and programs run fine. The only problem - if i click the red X button to stop the process, my computer almost shuts down! (dock disappears, screen goes blue, then fades down - but quickly finder starts again) i have no idea what this can be i've never seen this behaviour anywhere - any idea?

Confirmed.

Do not set your console to /Applications/Utilities/Terminal.app ("Doctor, it hurts when I do this"). It starts in the background, and that "X" will kill your entire login instead... (quitting all your apps)

It also uses "LD_LIBRARY_PATH" instead of "DYLD_LIBRARY_PATH" like it should on Darwin, so the console settings in Code::Blocks will need some fixing for Mac OS X: i.e. it's a current bug.
« Last Edit: September 12, 2006, 09:14:07 am by afb »

Offline Paco.Blasco

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: Code::Blocks on Mac OS X
« Reply #3 on: September 12, 2006, 09:36:16 am »
I've updated the Wiki pages with some more info:
Installing_Code::Blocks_nightly_build_on_Mac_OS_X
Installing_Code::Blocks_from_source_on_Mac_OS_X

Currently there are three major ways to install C::B:

1) Download the binary package and run it. Easy :-)
wxWidgets libraries are included in the app bundle.
/Developer/Applications/CodeBlocks.app

2) Build the entire thing in /usr/local, from scratch...
This currently requires some tweaks and autotools-fu.
/usr/local/bin/codeblocks

3) Download and build using the DarwinPorts system.
Somewhat of a pain until Portfile is included upstream.
/Applications/DarwinPorts/CodeBlocks.app
/opt/local/bin/codeblocks

BTW:
The advantages of DarwinPorts is that it can build
both wxMac and wxGTK versions, and that all the
dependencies and updates from SVN are automated.
It can also build packages, which might be interesting.
Code
port install codeblocks

Hi afb:

I didn't see on my DarwinPorts a dports/devel folder. Can you tell me the absolute path? I supposed you have the "standard" folder: /opt
By the other side, I was probing the x86 and it crashed. If you want, I can send you the crashing info.
Thanks a lot all your effort!!!


Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Code::Blocks on Mac OS X
« Reply #4 on: September 12, 2006, 10:18:51 am »
I didn't see on my DarwinPorts a dports/devel folder. Can you tell me the absolute path? I supposed you have the "standard" folder: /opt

Sure: "~/dports" :-) - you need to create the folder yourself, first time:
http://darwinports.opendarwin.org/docs/ch03s05.html#local_repository

My sources.conf looks like this:
Code
# To enable your local ports repository, uncomment and customize the
# following line to point at your local dports directory
# Example: file:///Users/landonf/misc/darwinports/dports
file:///Users/afb/dports
# To get darwinports from the opendarwin rsync server use:
# rsync://rsync.darwinports.org/dpupdate/dports
rsync://rsync.darwinports.org/dpupdate/dports

Quote
By the other side, I was probing the x86 and it crashed. If you want, I can send you the crashing info.

Please report as bugs on BerliOS (when back), but I haven't started debugging x86 myself yet - and there are known issues on PPC too... Will try to detail some of the more common ones on the Wiki page

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Code::Blocks on Mac OS X
« Reply #5 on: September 12, 2006, 02:55:30 pm »
It looks as if the portfile install both the wxGTK and wxMac versions by default, can this behaviour be disabled?  I don't want to use GTK on OS X, I use it enough with linux.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Code::Blocks on Mac OS X
« Reply #6 on: September 12, 2006, 03:20:53 pm »
It looks as if the portfile install both the wxGTK and wxMac versions by default, can this behaviour be disabled?  I don't want to use GTK on OS X, I use it enough with linux.

It would use "wxMac" for +macosx variants, and "wxGTK" for +puredarwin variants ?
(I am using it both to test the X11 build on Mac OS X, and to compare the versions...)

Like these screenshots: http://www.algonet.se/~afb/wx/codeblocks.html#rev2921

But the default Portfile should instead use the official "wxWidgets" port (hard-coded Mac),
I think I commented out wxMac ? (feel free to comment out wxGTK as well, if you like...)
« Last Edit: September 12, 2006, 03:22:38 pm by afb »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Code::Blocks on Mac OS X
« Reply #7 on: September 12, 2006, 03:32:03 pm »
The official Portfile for wxWidgets have moved onto here instead, now that Darwin is dead:
http://trac.macports.org/projects/macports/browser/trunk/dports/graphics/wxWidgets/Portfile

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Code::Blocks on Mac OS X
« Reply #8 on: September 12, 2006, 11:13:30 pm »
Thank you for your work afb, hopefully I will get a chance to try this out soon.