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

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Building Code::Blocks on Mac OS X
« on: February 12, 2006, 12:59:08 pm »
I posted some initial instructions and screenshots on:
http://www.algonet.se/~afb/wx/codeblocks.html

Code::Blocks works "OK" already on Mac OS X,
but it looks funny and there are no plugins (yet).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Building Code::Blocks on Mac OS X
« Reply #1 on: February 12, 2006, 01:09:20 pm »
This is just great :)
Be patient!
This bug will be fixed soon...

sethjackson

  • Guest
Re: Building Code::Blocks on Mac OS X
« Reply #2 on: February 12, 2006, 03:01:16 pm »
Well I'm glad it compiles, and runs.  :) It really looks messed up in that screeny tho...  :(

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #3 on: February 12, 2006, 03:12:04 pm »
There are two major issues that makes it look worse than it is:

* the "generic" popup windows (as wxMac doesn't have wxPopupWindow yet)
seem to all start out showing on top of eachother when they should be hidden...

* for some reason, the messages end up in global (0,0) position and not
in their window down at the right where they are supposed to go instead.

It's actually not all that bad, most of the menus and dialogs are OK.

sethjackson

  • Guest
Re: Building Code::Blocks on Mac OS X
« Reply #4 on: February 12, 2006, 03:14:06 pm »
OK. Then it is not so bad as I thought...... Too bad wxMac doesn't have a wxPopupWindow yet.  :P

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #5 on: February 12, 2006, 03:18:30 pm »
There is a $300 wxWidgets bounty on it, I believe...  8)
http://www.wxwidgets.org/wiki/index.php/WxWidgets_Bounties#wxMac_bounties

But there should be a generic implementation in C::B,
perhaps it just needs an extra Hide() in the ctor or so ?

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Building Code::Blocks on Mac OS X
« Reply #6 on: February 13, 2006, 03:08:17 am »
The site is not loading.  Did you make an xcode project file or did you get the autotools to work?  I had a go at the autotools but I couldn't get past the bootstrap.

EDIT: Put this on the wiki.
« Last Edit: February 13, 2006, 03:21:01 am by Game_Ender »

takeshimiya

  • Guest
Re: Building Code::Blocks on Mac OS X
« Reply #7 on: February 13, 2006, 02:26:40 pm »
Anders: First, really good job! :D

Little things to point out:
For AngelScript, define AS_MAX_PORTABILITY in as_config.h. It could make it work perhaps (this could help: http://forums.codeblocks.org/index.php?topic=2096.0).

BTW, the plugins doesn't rely on AngelScript, they're just plain shared libraries.
AngelScript is only for providing scripting functionality (which it's not used by the plugins).

The layout, toolbars and all is screwed up, it's probably because wxAUI, the docking library, which hasn't been ported to mac yet, but the author really wanted some hand, so if you can, check here http://www.kirix.com/en/community/forums/index.php?c=5

If you can resolve that, but the editor tabs are screwed up, it's probably wxFlatNotebook fault, make sure to check here: http://wxforum.shadonet.com/viewtopic.php?t=5761&postdays=0&postorder=asc&start=0&sid=3aef110096b9bfa6c821f3f6c171b57f

I'm attaching here how the C::B layout could be:

[attachment deleted by admin]

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #8 on: February 18, 2006, 02:22:32 pm »
AS_MAX_PORTABILITY isn't enough, since the default plugins uses calling conventions other than "asCALL_GENERIC" which is the only one that the "dummy" implementation handles...
What I did was to add a PowerPC stub implementation (similar to the x86 one), that registers all of the various calling conventions. It only *handles* the generic one (for now), though. The PPC asm is TODO.
This new file (as_callfunc_ppc.cpp) is in the SVN, Patch #824.

Thanks for the pointers to wxAUI and wxFlatNotebook, those probably needs fixing as well as the replacement class for wxPopupDialog. Another thing that occurs again and again is that headers are added to the precompiled version, but misspelled or wrong in the non-precompile. That should be fixable on the Windows/Linux side as well, though. (Just do the test builds both with and without the precomps)
Some widgets also need bigger font defaults, to be readable.

It's all good, but I will make some efforts to fix issues before I post another progress update.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #9 on: February 18, 2006, 02:23:38 pm »
The site is not loading.  Did you make an xcode project file or did you get the autotools to work?

I used autotools, and plan on continuing doing so... :-)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #10 on: February 18, 2006, 02:32:37 pm »
The layout, toolbars and all is screwed up, it's probably because wxAUI, the docking library, which hasn't been ported to mac yet,

Seems to be some wxMac progress, enroute for wxAUI 0.9.2:
http://www.alex.org.uk/wxAUI/0.9.1/mac.p (by Steven Csomor)
http://www.kirix.com/en/community/forums/viewtopic.php?t=87

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #11 on: February 20, 2006, 12:40:52 am »
Posted some more info on Mac progress at:
http://www.algonet.se/~afb/wx/codeblocks.html

Fixing wxNotebook is now the main thing, as wxAUI
should be OK now and wxPopupWindow not needed.

Also restored my PPC workarounds for AngelScript,
since someone nuked it all with a new AS version...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Building Code::Blocks on Mac OS X
« Reply #12 on: February 25, 2006, 08:28:42 pm »
I added some 128x128 icons made from the official SVGs and the original high res rederings in Macintosh format to the SVN tree for your convenience (so you no longer need to enlarge the 48x48 icons). I was unsure about whether to choose .icns or .rsc, so there are both of them.

Yes, that's probably the least of your problems, hope it helps anyway.  :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #13 on: February 26, 2006, 12:33:40 pm »
Thanks a lot!  :D

As I was trying to explain on the wiki page, both formats are useful...
(.rsrc can be dumped into .r files, using the DeRez -useDF command)
It seems the file suffix was mistyped though. It's "rsrc", and not "rsc" ?

Further on in time, we might want to do the same for the file icons.
Adding 128x128 icons does take some disk space, but you can use
smaller formats in the .icns format too. For instance, 48x48 "Huge" ?

BTW:
Going forward, we don't need .rsrc for all types (as it is deprecated)
But it's useful to have it for the application icon, when developling...
http://wiki.codeblocks.org/index.php?title=Compiling_Code::Blocks_in_Mac_OS_X#Bundle_application_for_Mac
« Last Edit: February 26, 2006, 01:46:34 pm by afb »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Building Code::Blocks on Mac OS X
« Reply #14 on: February 26, 2006, 12:49:59 pm »
That'll have to be soon, though. I used a 30-day trial version of some proprietary icon program to convert the bitmaps to Mac format. Did not find a better solution, unluckily.

28 days remaining and counting down ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."