|
Revision 269, 1.0 kB
(checked in by durin42, 2 years ago)
|
Initial non-working updater app - it gets as far as downloading an update, but
it doesn't know how to unarchive yet. I've grabbed a bunch of sources from
Sparkle (duh from the filenames) but this is all we'll use from there, as from
here on out our mission is quite different from theirs. I've not yet tested
the appcast support very thoroughly, but it seems to be working in my initial
tests. I need to change it from NSUserDefaults to CFPreferencesCopyAppValue,
and fix the appcast URL in the Info.plist (note to other devs: the current URL
resolves to a nonroutable IP - you've been warned!).
I'll do unarchiving in a bit - but first I need to think about some things. I
think the solution Graham offered of using a shell script and exec() will be best.
|
| Line | |
|---|
| 1 |
// |
|---|
| 2 |
// SUStatusController.h |
|---|
| 3 |
// Sparkle |
|---|
| 4 |
// |
|---|
| 5 |
// Created by Andy Matuschak on 3/14/06. |
|---|
| 6 |
// Copyright 2006 Andy Matuschak. All rights reserved. |
|---|
| 7 |
// |
|---|
| 8 |
|
|---|
| 9 |
#import <Cocoa/Cocoa.h> |
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
@interface SUStatusController : NSWindowController { |
|---|
| 13 |
double progressValue, maxProgressValue; |
|---|
| 14 |
NSString *title, *statusText, *buttonTitle; |
|---|
| 15 |
IBOutlet NSButton *actionButton; |
|---|
| 16 |
} |
|---|
| 17 |
|
|---|
| 18 |
// Pass 0 for the max progress value to get an indeterminate progress bar. |
|---|
| 19 |
// Pass nil for the status text to not show it. |
|---|
| 20 |
- (void)beginActionWithTitle:(NSString *)title maxProgressValue:(double)maxProgressValue statusText:(NSString *)statusText; |
|---|
| 21 |
|
|---|
| 22 |
// If isDefault is YES, the button's key equivalent will be \r. |
|---|
| 23 |
- (void)setButtonTitle:(NSString *)buttonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault; |
|---|
| 24 |
- (void)setButtonEnabled:(BOOL)enabled; |
|---|
| 25 |
|
|---|
| 26 |
- (double)progressValue; |
|---|
| 27 |
- (void)setProgressValue:(double)value; |
|---|
| 28 |
- (double)maxProgressValue; |
|---|
| 29 |
- (void)setMaxProgressValue:(double)value; |
|---|
| 30 |
|
|---|
| 31 |
- (void)setStatusText:(NSString *)statusText; |
|---|
| 32 |
|
|---|
| 33 |
@end |
|---|