mac

How do I tell /usr/bin/indent on Mac OS X 10.5 to format my C code K&R style?

On Linux I am used to running indent -kr ... to indent C files. /usr/bin/indent on Mac OS X 10.5 does not support the -kr option. Does anyone have a ~/.indent.pro file that would produce results closest to K&R style? Thanks! ...

Python 3.1.1 on Mac OS X 10.6 Snow Leopard

I've spent some time today playing with getting the source for python 3.1.1 to build on my MacBook Pro using the --enable-framework and --enable-universalsdk options with no success. I will humbly admit that I have no real clue why I can't compile 3.1.1 on Snow Leopard, I did make sure to get the new Xcode version for Snow Leopard, and m...

Why does Macports take FOREVER to build simple packages?

I guess the title says it all. Building from source outside of macports is a breeze. Building with macports takes forever and seems to freeze the os every so often. Is this typical behavior? Although it seems like a nice packaging tool for os x, if I have to go through this pain every time during every install I think I'll do without...

Mac Pro 64-bit addressing kernel

I am wondering about an app I am developing and 64-bit addressing. I would like to use around 12 GB of 32 GB available on a Mac Pro. Here's the thing, the kernel is not 64-bit in Snow Leopard on my Mac Pro (efi 32-bit). I am wondering though if I will be able to address that much ram, >4GB per application, even if the kernel is only 3...

Problems with NSTask in OS X 10.6 Snow Leopard

Has anyone else seen or heard of any issues with NSTask in 10.6? This code worked fine yesterday, and is not working today. NSTask *task = [converter task]; [task waitUntilExit]; NSLog(@"Task did complete"); The task does what it's supposed to do (I checked the output and it's fine), but the program will wait indefinitely at the wait...

How to make XCode Run Script Build Phase run if the build breaks?

Hi, I want to be able to launch a Run Script Build Phase in XCode that does this: /usr/bin/say "Broke it." if my build fails. Not sure how to capture the build failure to prompt that though? Two reasons I guess, one "what to catch", two "the build is done so the script has already run in theory... ?" How would you do this? Thanks //...

How do I split a large file in unix repeatedly?

I have a situation with a failing LaCie 500GB hard drive. It stays on for only about 10 minutes, then becomes unusable. For those 10 minutes or so I do have complete control. I can't get my main mov file(160GB) transferred off that quickly, so I was thinking if I split it into small chunks, I could move them all off. I tried splitting t...

What are good database options to use for app dev on Mac OSX?

I'm looking to develop a small application on Mac OSX and it will need to use a database. Can anyone recommend one for the Mac? This will be my first Mac development so this is very much a newbie question. To help you I am interested in the following aspects: Is it suitable for small applications? (Important) Is it suitable for larger...

JFileChooser for directories on the Mac: how to make it not suck?

The JFileChooser in "directories only" mode on the Mac has two serious, crippling problems: 1) You cannot create directories with it 2) You cannot switch drives This is rather a huge problem for my installer app. As far as I can tell, Apple provides no way around this problem, you can't even activate the non-native directory chooser ....

Legality of Modifying OS x INstaller File (Distribution)

The program I would like to make is to modify one of the OS X Installer files, specifically the file "Distribution" which defines in the OS x Installer what packages are to be listed in the Custom dialog and some other variables in the installer, is this legal to modify and put an in application and can this be legally hosted in say Goog...

What's the best resource to learn how to write apps for Mac OS X?

Hi. I'd like to learn how to write application for Mac OS X. Like how to use XCode properly, Cocoa syntaxes and examples, etc. I'm already a web developer using ruby, php, mysql, rails, etc. I looked through google quite some times but never found something palpable to learn from. But I really want to make my own application, for fu...

How well does Xgrid work with Xcode for parallel compiling?

I'm intrigued by the idea of using Xgrid to speed up my Xcode compiling across multiple machines... but it seems very difficult to find any information on people's experiences with it, any gotchas, etc. I don't have multiple Macs that I can test it with right now, so I'm curious. Have you tried it? How well has it worked for you? What k...

Importing Data from a Microsoft Access File on a Mac

Hey guys, I have an MS-Access mdb file that I need to import data from into my mysql instance. I am on a mac, is there any free/OSS tools that allow me to do that? If not, is there a free/OSS JDBC driver that I can use to extract the data I need? Thanks. ...

Balancing Mac Experience with Apple Patents

Like (probably) most people here, I'm not a fan of Software Patents. It makes it hard to write software, especially for an operating system like Mac OS X, where you generally want to do things "the Macintosh way". But when Apple patents techniques that they use in their own OS and software, it's very difficult for third-party developer...

detect 64-bit CPU in Ruby on Mac OS X

I'm looking to differentiate between Core Solo/Duo and Core 2 Duo processors for 64-bit support. On a Core 2 Duo, then `sysctl hw.cpu64bit_capable` gives 1, as desired, but on a 32-bit processor, it throws an error, saying: second level name cpu64bit_capable in hw.cpu64bit_capable is invalid What's the best way to detect a 64-bit pro...

Any risks using Macports?

I'm considering installing macports on my mac so I can have easy access to *nix dev tools/apps. However, I'm wondering if there are any risks. I'm ok with the inevitable compatibility issue from time to time (hear snow leopard + macports has issues) but I do not want the stability of my "core" mac system to be effected. I'm also curio...

Change the dll dependency on windows.

I have to rename some dlls which are used by some xyz.dll. For xyz.dll I don't have the source code is there a way to change xyz.dll to point to renamed dlls, For DYlibs on Mac I used Install_name_tool. For windows still looking for something, Please suggest. ...

Strategies for porting Carbon code to Cocoa

I'm looking for strategies and articles on making Carbon code 64-bit ready. Carbon for 64-bit does not and will not exist. It's pretty much a dead end. So in order to bring Carbon application and toolkits to 64-bit their GUI part will have to be re-written in Cocoa and Objective-C, right? How can I minimize the effort I have to put in...

Imagemagick problem when loading a png file

I've compiled the latest version of imagemagick for the mac and I get the assertion below when I load a particular png file. This is a bit of a hassle as it crashes the program in debug mode. Anyone ever seen this before? Any workarounds? Assertion failed: (quantum_info->signature == MagickSignature), function DestroyQuantumInfo, file...

Testing on different version of Mac without buying OSX Server or multiple machines

On Windows, testing different OSes is made simple using VMs. Is there a simple way to do something similar for Mac testing, where I might need to run on Tiger/Leopard/Snow Leopard to verify functionality? AFAICT, to run OS X in a VM you need OSX server or buy multiple Macs - is that what folks out there do? Or are there other cheaper op...