mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Fix invalid parameter error on check for updates
reason: Invalid parameter not satisfying: windowNibPath See https://github.com/sparkle-project/Sparkle/issues/237#issuecomment-11618894
This commit is contained in:
1 parent
0b186dc939
commit
a8d96e0dce
6 files changed
+7
-14
No files matched your search
Vendored
+1
-1
@@ -23,7 +23,7 @@
|
||||
|
||||
- (instancetype)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)aHost delegate:(id<SUAutomaticUpdateAlertDelegate>)del
|
||||
{
|
||||
self = [super initWithHost:aHost windowNibName:@"SUAutomaticUpdateAlert"];
|
||||
self = [super initWithWindowNibName:@"SUAutomaticUpdateAlert"];
|
||||
if (self)
|
||||
{
|
||||
self.updateItem = item;
|
||||
|
||||
Vendored
+1
-1
@@ -31,7 +31,7 @@
|
||||
|
||||
- (instancetype)initWithHost:(SUHost *)aHost
|
||||
{
|
||||
self = [super initWithHost:aHost windowNibName:@"SUStatus"];
|
||||
self = [super initWithWindowNibName:@"SUStatus"];
|
||||
if (self)
|
||||
{
|
||||
self.host = aHost;
|
||||
|
||||
Vendored
+1
-1
@@ -54,7 +54,7 @@
|
||||
|
||||
- (instancetype)initWithAppcastItem:(SUAppcastItem *)item host:(SUHost *)aHost
|
||||
{
|
||||
self = [super initWithHost:host windowNibName:@"SUUpdateAlert"];
|
||||
self = [super initWithWindowNibName:@"SUUpdateAlert"];
|
||||
if (self)
|
||||
{
|
||||
host = aHost;
|
||||
|
||||
Vendored
+1
-1
@@ -45,7 +45,7 @@
|
||||
|
||||
- (instancetype)initWithHost:(SUHost *)aHost systemProfile:(NSArray *)profile delegate:(id<SUUpdatePermissionPromptDelegate>)d
|
||||
{
|
||||
self = [super initWithHost:aHost windowNibName:@"SUUpdatePermissionPrompt"];
|
||||
self = [super initWithWindowNibName:@"SUUpdatePermissionPrompt"];
|
||||
if (self)
|
||||
{
|
||||
host = aHost;
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@
|
||||
@class SUHost;
|
||||
@interface SUWindowController : NSWindowController
|
||||
// We use this instead of plain old NSWindowController initWithWindowNibName so that we'll be able to find the right path when running in a bundle loaded from another app.
|
||||
- (instancetype)initWithHost:(SUHost *)host windowNibName:(NSString *)nibName;
|
||||
- (instancetype)initWithWindowNibName:(NSString *)nibName;
|
||||
@end
|
||||
|
||||
#endif
|
||||
Vendored
+2
-9
@@ -11,16 +11,9 @@
|
||||
|
||||
@implementation SUWindowController
|
||||
|
||||
- (instancetype)initWithHost:(SUHost *)host windowNibName:(NSString *)nibName
|
||||
- (instancetype)initWithWindowNibName:(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 = [[[host bundle] sharedFrameworksPath] stringByAppendingPathComponent:@"Sparkle.framework"];
|
||||
NSBundle *framework = [NSBundle bundleWithPath:frameworkPath];
|
||||
path = [framework pathForResource:nibName ofType:@"nib"];
|
||||
}
|
||||
self = [super initWithWindowNibPath:path owner:self];
|
||||
self = [super initWithWindowNibName:nibName owner:self];
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user