blog advertising is good for you


blog advertising is good for you
User login

Compiling "App Stop" as a Universal Binary

App Stop is a great addition to my menubar, see , however it does not run natively on my MacBook Pro (I have to use Rosetta or otherwise it crashes). The author does not have an Intel box, so given that the source code is available, I was wondering if someone coud see what is wrong and fix it.

Average rating
(0 votes)
About ramonf

Adam Knight's picture

A link to the application or, preferably, source code would be of help. Smiling

And you don’t need an Intel machine to compile for Intel. Apple’s Developer site has some great instructions on building Universal binaries.

JC's picture

I managed to narrow down the problem here, and Adam’s codefu fixed it. Apparently, there are circumstances where PPC processors ignore unexpected nil returns, but i386s crash instead. Score one for PPC

Lines 405-406 of AppController.m read:

[self appOpened:[NSNotification notificationWithName:@"appOpened"
	  object:tempProcRef = [AGProcess processForProcessIdentifier:*allProcsPtr]

Remove both lines and add this instead:

tempProcRef = [AGProcess processForProcessIdentifier:*allProcsPtr];
[self appOpened:[NSNotification notificationWithName:@"appOpened"
          object:tempProcRef

Compile and go.

Adam Knight's picture

Which is to say it compiles and runs. If the feature that’s for works or not, I’m not certain. I’m just certain that it’s a bad hack to put an assignment on a line where you’re passing an argument.

Bad coder, bad, bad. slap

Post new comment
The content of this field is kept private and will not be shown publicly.
9 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.