Author Topic: Building Code::Blocks on Mac OS X  (Read 19650 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."

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #15 on: February 26, 2006, 01:48:27 pm »
Well, like you said we have bigger problems... :-)

New icons look *really* good though. Thanks again.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Building Code::Blocks on Mac OS X
« Reply #16 on: February 26, 2006, 11:45:18 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 ;)

I am pretty sure apple ships something with the OS X that converts from bitmaps to the proper mac format.  I will look into it.
« Last Edit: February 27, 2006, 12:46:18 am by Game_Ender »

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Building Code::Blocks on Mac OS X
« Reply #17 on: February 27, 2006, 12:41:20 am »
What is the progress with the layout and wxAUI?  I have recently compiled the wxAUI demo application with the on Mac OS X and it worked perfectly with tons of windows.  Codeblocks isn't doing anything that complicated, just one main frame, three inset pains and three toolbars.  The demo application has ~12 panes and 4 toolbars and looks fine.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #18 on: February 27, 2006, 01:03:04 am »
It's something with the notebooks and parenting...
Tried both with wxFlatNotebook and wxNotebook.

The contents end up outside the designated area:
http://www.algonet.se/~afb/wx/codeblocks.html#rev2060

PS:
I updated the links to the C::B icons, from the same page.
So both of CodeBlocks.icns and CodeBlocks.r.gz are new...

New icon looks like this:
« Last Edit: February 27, 2006, 01:30:11 am by afb »

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Building Code::Blocks on Mac OS X
« Reply #19 on: February 27, 2006, 02:06:20 am »
I have seen the picture before.  Where are those floating options boxes coming from? On closer inspection it appears to be widgets from the panes in the notebooks in the panes wxAUI is managing, odd.  I will test this tomorrow.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #20 on: February 27, 2006, 08:37:14 am »
On closer inspection it appears to be widgets from the panes in the notebooks in the panes wxAUI is managing, odd.

Yes, it is all the various tabs - dumped on top of eachother in the topleft.
BTW: The problem with wxFlatNotebook is that the tabs are not showing...

Trikko

  • Guest
Re: Building Code::Blocks on Mac OS X
« Reply #21 on: February 27, 2006, 08:52:36 am »
I think that C::B icon is too similar to avg one :D I confuse them on menu :)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #22 on: February 27, 2006, 09:14:14 am »
"Totally different colors" :-)


Me, I think it's kinda similar to:


Having "Code::Blocks" be an illegal filename doesn't help either.
But I'm new here, and it has probably been discussed all over... ?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Building Code::Blocks on Mac OS X
« Reply #23 on: February 27, 2006, 09:19:56 am »
Having "Code::Blocks" be an illegal filename doesn't help either.
Actually, we make our life a lot easier on Windows and Linux by just calling the executable codeblocks. But if you insist on Code::Blocks...  :P

Regarding the logo, not only is it completely different, but even if it was similar, what could we do about it :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Trikko

  • Guest
Re: Building Code::Blocks on Mac OS X
« Reply #24 on: February 27, 2006, 09:29:03 am »
Regarding the logo, not only is it completely different, but even if it was similar, what could we do about it :)

LOL :) I want a logo / splashscreen contest! ;)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Building Code::Blocks on Mac OS X
« Reply #25 on: February 27, 2006, 09:31:49 am »
LOL :) I want a logo / splashscreen contest! ;)

This week's contest is over. Try next week again...
Be patient!
This bug will be fixed soon...

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Building Code::Blocks on Mac OS X
« Reply #26 on: February 27, 2006, 11:56:12 am »
Actually, we make our life a lot easier on Windows and Linux by just calling the executable codeblocks. But if you insist on Code::Blocks...  :P

I called the Mac OS X bundle "CodeBlocks.app", and inside of that you'll find a "bin/codeblocks" on Darwin too... :-)

takeshimiya

  • Guest
Re: Building Code::Blocks on Mac OS X
« Reply #27 on: February 27, 2006, 12:44:33 pm »
LOL :) I want a logo / splashscreen contest! ;)

This week's contest is over. Try next week again...

lol :lol:

sethjackson

  • Guest
Re: Building Code::Blocks on Mac OS X
« Reply #28 on: February 27, 2006, 05:22:31 pm »
 :lol: :lol: :lol: