Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mysterytramp

macrumors 65816
Original poster
Jul 17, 2008
1,334
4
Maryland
I'm sure this is the kind of question that will lead to an RTFM answer, but I'm not having any luck ...

I d/l'd the Paintbrush source from Sourceforge to see what I could learn. XCode won't compile the source because of this line:

#import <Sparkle/Sparkle.h>

in AppController.h, and for this line:

Code:
[[NSNotificationCenter defaultCenter] addObserver:self
			selector:@selector(killTheSheet:) 
			name:SUUpdaterWillRestartNotification 
			object:nil];

I found "Sparkle.h" via google (And I'm assuming the second line doesn't compile because it's contained in SUUpdater.h, which is in Sparkle ... )

Now the question is how do I get it in the project. I added the file to the project window, but XCode acts like it's not there. I figured Sparkle.h should be in the same directory as stdio.h, that didn't work either. And considering that you need to provide a password to get into the include folder, I'm guessing fooling with that folder is unwise.

mt
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
Sparkle is actually a framework. You need to add the whole thing.

Sometimes just adding a header file will work but often the headers also requires a library / framework as well that you must add.
 

mysterytramp

macrumors 65816
Original poster
Jul 17, 2008
1,334
4
Maryland
http://sparkle.andymatuschak.org/

Go grab Sparkle from that URL.

You need headers for the compiler to know what's available, you need the library that actually contains the implementations for the linker.

-Lee

The framework was installed within the Paintbrush source. The header file wasn't. The easiest thing to do seemed to remove the Sparkle.framework then reinstall following the instructions at sparkle.andymatuschak.org. Now the build is failing on a linker error:

Code:
pbxcp: warning: couldn't strip: ... /Release/Paintbrush.app/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/relaunch: No such file or directory

Is relaunch a part of Sparkle? (As in ... you update the software then relaunch?)

Y'know, for all this trouble, I thought I could comment out the two original offending lines of code. That causes even more problems.

Ugh ...

mt
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
Okay here are the steps.

Download the Sparkle framework and add it to your frameworks folder (/System/Library/Frameworks).

Download the source code from wherever you got it from.

The project should already have the framework in it and should find the framework because it is installed in the correct place. All should be happy.

Click Build and Go! Enjoy.

Any other problems let me know.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.