~tcurdt/sparkle/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
//  SUWindowController.m
//  Sparkle
//
//  Created by Andy Matuschak on 2/13/08.
//  Copyright 2008 Andy Matuschak. All rights reserved.
//

#import "SUWindowController.h"

@implementation SUWindowController

- (id)initWithHostBundle:(NSBundle *)hb windowNibName:(NSString *)nibName
{
	NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:nibName ofType:@"nib"];
	if (path == nil) // Slight hack to resolve issues with running Sparkle in debug configurations.
	{
		NSString *frameworkPath = [[hb sharedFrameworksPath] stringByAppendingPathComponent:@"Sparkle.framework"];
		NSBundle *framework = [NSBundle bundleWithPath:frameworkPath];
		path = [framework pathForResource:nibName ofType:@"nib"];
	}
	return [super initWithWindowNibPath:path owner:self];	
}

@end