@@ -64,6 +64,7 @@ - (void)registerServices
64
64
- (void )applicationDidFinishLaunching : (NSNotification *)notification
65
65
{
66
66
[[SUUpdater sharedUpdater ] setSendsSystemProfile: YES ];
67
+ [[SUUpdater sharedUpdater ] setDelegate: self ];
67
68
68
69
// Make sure Git's SSH password requests get forwarded to our little UI tool:
69
70
setenv ( " SSH_ASKPASS" , [[[NSBundle mainBundle ] pathForResource: @" gitx_askpasswd" ofType: @" " ] UTF8String ], 1 );
@@ -380,4 +381,29 @@ - (void) dealloc {
380
381
[managedObjectModel release ], managedObjectModel = nil ;
381
382
[super dealloc ];
382
383
}
384
+
385
+
386
+ #pragma mark Sparkle delegate methods
387
+
388
+ - (NSArray *)feedParametersForUpdater : (SUUpdater *)updater sendingSystemProfile : (BOOL )sendingProfile
389
+ {
390
+ NSArray *keys = [NSArray arrayWithObjects: @" key" , @" displayKey" , @" value" , @" displayValue" , nil ];
391
+ NSMutableArray *feedParameters = [NSMutableArray array ];
392
+
393
+ // only add parameters if the profile is being sent this time
394
+ if (sendingProfile) {
395
+ NSString *CFBundleGitVersion = [[[NSBundle mainBundle ] infoDictionary ] valueForKey: @" CFBundleGitVersion" ];
396
+ if (CFBundleGitVersion)
397
+ [feedParameters addObject: [NSDictionary dictionaryWithObjects: [NSArray arrayWithObjects: @" CFBundleGitVersion" , @" Full Version" , CFBundleGitVersion, CFBundleGitVersion, nil ]
398
+ forKeys: keys]];
399
+
400
+ NSString *gitVersion = [PBGitBinary version ];
401
+ if (gitVersion)
402
+ [feedParameters addObject: [NSDictionary dictionaryWithObjects: [NSArray arrayWithObjects: @" gitVersion" , @" git Version" , gitVersion, gitVersion, nil ]
403
+ forKeys: keys]];
404
+ }
405
+
406
+ return feedParameters;
407
+ }
408
+
383
409
@end
0 commit comments