Archive for June, 2009
SMART Utility 2.0.2 is out!
Monday, June 8th, 2009 | SMART Utility | No Comments
Its mostly just bug fixes and small additions. Get it here.
Here are the release notes:
- Added French localization for help
- Now main window refreshes when a test is complete
- Now shows serial number when attempting to register again
- Now updates registration menu depending on whether application is registered or not
- Fixed bug where unregistering would cause application to consider the demo period expired
- Fixed some memory leaks
- Fixed some incorrect texts in help
- Optimized debug log for faster output
- Optimized launching code
- Serial number is now in a separate file to allow deleting of preferences without losing registration information
A Current of Cocoa Code: Command Line Universal Compilation
Thursday, June 4th, 2009 | Code Tutorial | No Comments
On a mailing list I belong to (X-Unix) the question came up of how to make a universal binary of a command line program. For the simple programs its pretty easy. Run the “configure” utility. That will output the “Makefile”. Find the “CFLAGS”, “CPPFLAGS”, and “CXXFLAGS” entries in the “Makefile”. Make them look like this:
CFLAGS = -g -O2 -mmacosx-version-min=10.4 -arch i386 -arch ppc
CPPFLAGS = -mmacosx-version-min=10.4 -arch i386 -arch ppc
CXXFLAGS = -g -O2 -Wall -W -mmacosx-version-min=10.4 -arch i386 -arch ppc
The 10.4 code also allows compilation on 10.5 but execution on 10.4. It is not needed (but I do it anyway).
However, that doesn’t work for the more complex apps which use certain gcc switches. So you have to do two builds- have one i386 and the other ppc. Then you have to combine them together.
You have to use “lipo” for that. So if I had two builds test.ppc and test.i386 and I wanted to make a universal build, I would put this on the command line:
lipo test.ppc test.i386 -output test.uni
That’s it! It took me a bit of experimentation to figure that out, so I hope others can get some use out of it.