Build a Universal Binary (BlitzMax)
Archives Forums/MacOS X Discussion/Build a Universal Binary (BlitzMax)
| ||
IS there a way to compile a universal binary (works on both ppc and intel) in blitz? |
| ||
You need to compile both PPC and X86 binaries, then merge them together using the lipo command-line tool. You can either : 1) have 2 Macs - 1 ppc, 1 x86, compile up everything separately. Copy one binary to the other machine, and run the lipo tool against it. 2) use a custom build tool to do everything on one (supported) machine in the same installation of BlitzMax. |
| ||
You need to compile both PPC and X86 binaries I have Snow Leopard + Rosetta installed as secondary OS's. use a custom build tool to do everything on one How can I do that? |
| ||
IIRC Brucey made a custom version of bmk that could automagically do it? |
| ||
Do you mean this: http://www.blitzmax.com/Community/posts.php?topic=85108 ? |
| ||
Do you mean this: http://www.blitzmax.com/Community/posts.php?topic=85108 ? Yes, that's the one. From the first posting: "Universal Builds on Intel Mac" It also lets you create windows .exe's on a Mac or Linux computer. (Unfortunately, you can't make Mac executables on a PC, due to the xcode requirement.) |
| ||
When I install the bmk, it saysunrecognized extension:bmx I replaced the default bmk with brucey's bmk. |
| ||
you also need MaxIDE CE (Community Edition) which has support for the extended functions of brucey's BMK including cross platform/architecture targeting where supported. OR You have to use it by hand from the command line. Side bar: PPC is officially dead as a supported mac architecture. Not saying that to discourage using it (it still works fine) but from a commercial standpoint it isn't a critical target. You would likely have a higher return by targeting Linux than PPC mac. Last edited 2013 |
| ||
MaxIDE CE (Community Edition) I compiled this for OSX some time ago. It still doesn't work with the bmk. :( The source files will compile now that I have copied the .bmk files to the /bin/ directory. Do I need to copy any libs from the PPC max package to make this compile for powerpc? Also, I am interested in compiling for Windows on my Mac, too. This would save a LOT of time having to reboot when I want to compile for MS Windows. :) Last edited 2013 |
| ||
If I recall correctly you need a binary from the PPC build as well, should be in the instructions for BMK+. You can cross compile for windows but it involves a lot of hunting down the right tools. Look under the BMK threads for further details, it's quite extensive and I haven't done it from scratch in a long time. |
| ||
You need to rename the bcc program from the PPC BlitzMax to bcc_ppc (so that two bcc apps can sit in the same bin folder together). You can test things by going into the terminal to your BlitzMax/bin dir and type things like : ./bmk -v … for a version number. ./bmk makemods -i … to build mods for universal (this will build a set of PPC and x86 modules). As a minimum for bmk_ng to run, you need the files core.bmk and make.bmk in the bin dir too. If you can, build bmk from source with the settings of mutithread, non-gui and non-debug. Remember to back-up the original before replacing it. |
| ||
I finally got this working. Can I build a windows binary on my mac now and be rid of Windows finally? |
| ||
You can build Windows binaries via mingw32 on Linux/OS X. You can even run them in Wine. But whether you should get rid of Windows, I won't comment. Certainly you should probably have something around for testing, if you intend to ship Windows apps. I have XP running in Parallels. |
| ||
I could probably install Win8 in Parallels Desktop 7 just for that purpose. |