|
|
| Universal Binary on Mac OS X |
|
boulifb
Member #7,909
October 2006
|
Hello, I have compiled and installed Allegro using the universal binary option. While it compiled well and runs fine on my Mac intel, I am unable to produce any true universal binaries. After compilation, I get only intel compiled boundled applcations, thus even if I select PPC and Intel as architecture targets in Xcode. Maybe I have missunderstood a step in the installation procedure, but I don't see where. Can anybody tell me how to compile properly allegro applications as universal binary please? Best regards. Fred. |
|
Thomas Harte
Member #33
April 2000
|
I think this might be another problem with Allegro's Probject Builder templates when matched to modern Xcode. The problem is probably that you have ZeroLink enabled even for your Deployment build? If so then that's why you're only getting an Intel binary. One way to fix your problem is to disable ZeroLink for your Deployment build. Another way is to do "Project->Upgrade All Targets in Project to Native" (which seems to mean "native to Xcode", not "native to your CPU family") which I think does a similar thing. But check that ZeroLink setting just to be sure! [My site] [Tetrominoes] |
|
boulifb
Member #7,909
October 2006
|
Hi, The ZeroLink is already deactivated. When I use the "Upgrade All Targets in Project to Native" I get plenty of errors (203) in allegro headers and so on... Maybe the Xcode template have to be updated to the newer versions of Xcode. There must be a way to compile allegro applications in UB while waiting for "bug" fix. |
|
Thomas Harte
Member #33
April 2000
|
Quote: Hi, The ZeroLink is already deactivated. When I use the "Upgrade All Targets in Project to Native" I get plenty of errors (203) in allegro headers and so on... Which begs the question — did you remember to do ./fix.sh macosx-universal instead of just ./fix.sh macosx? Allegro, being very weird, is very UNIX centric and based on the model that your users will download your application and install Allegro for themselves separately. Quote: Maybe the Xcode template have to be updated to the newer versions of Xcode. There must be a way to compile allegro applications in UB while waiting for "bug" fix. Attached is my replacement Allegro template for Xcode. Assuming you have universal versions of the Allegro framework and .a libraries (another UNIX hangover), it'll build universal binaries for you and, unlike the ProjectBuilder project, will even embed the framework so you can easily distribute your work. Go to /Library/Application Support/Apple/Developer Tools/Project Templates/Application/Allegro Application/, trash everything except main.c and drop in the AllegroApp.xcodeproj that comes out of the .zip file. After that, all Allegro projects you create will be in its image. I've actually been meaning to offer it for contribution to the main Allegro distribution, I just haven't had my Mac online for the last week. [My site] [Tetrominoes] |
|
boulifb
Member #7,909
October 2006
|
Hi Thomas, Ok, with our project fix it is compiled as UB!!! When getting the info (Get Info) the system says it is a universal application Fred. |
|
Thomas Harte
Member #33
April 2000
|
That's good news! I must put together an installer with the framework, the project files and the various .a and .dylib files as soon as I've figured out how! [My site] [Tetrominoes] |
|
boulifb
Member #7,909
October 2006
|
as it manually works, it should be a good idea to integrate the fix to the install process of allegro. Note: Last login: Wed Nov 22 22:11:59 on console Any idea? Fred. |
|
Thomas Harte
Member #33
April 2000
|
Did you do sudo make install-framework EMBED=1 rather than just sudo make install-framework when you built Allegro? [My site] [Tetrominoes] |
|
Trogdor
Member #8,184
January 2007
|
This might sound as a strange or noobish request (which is right, i got a mac since 2 months and the last time i coded anything in C was at least 10 years ago), but Thomas, as you seem to be very experienced with this, could you perhaps draw up a quick howto of getting allegro to work correctly under macosx ? I want to build universal binaries (ofcourse) I am currently fighting with the installation. Also if i build it all the standard way and create an allegro project in xcode, i get a reference to a 'projectname.app' file in the project, that is not created. So, a somewhat more clear helpfile / howto / listing of options would be rather helpfull to me, and probably also to other fresh starters like myself (that i know are lurking around somewhere. speak up, crowd!) (again, sorry if my lack of experience is wasting time) Edit: The correct setup is: ./fix macosx-universal |
|
|