Skip to content
This repository
Browse code

Now reporting 64-bit capability of the host system.

Showing GHz to the user instead of MHz for the clock speed reading.
  • Loading branch information...
commit 44a547341d58b8d6510a215cc3b74b4455fc9f55 2 parents c3f2c69 + 918217f
Andy Matuschak authored
16  SUSystemProfiler.m
@@ -56,12 +56,24 @@ - (NSMutableArray *)systemProfileArrayForHostBundle:(NSBundle *)hostBundle
56 56
 		}
57 57
 		[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"cputype",@"CPU Type", [NSNumber numberWithInt:value], visibleCPUType,nil] forKeys:profileDictKeys]];
58 58
 	}
  59
+	error = sysctlbyname("hw.cpu64bit_capable", &value, &length, NULL, 0);
  60
+	if(error != 0)
  61
+		error = sysctlbyname("hw.optional.x86_64", &value, &length, NULL, 0); //x86 specific
  62
+	if(error != 0)
  63
+		error = sysctlbyname("hw.optional.64bitops", &value, &length, NULL, 0); //PPC specific
  64
+	
  65
+	BOOL is64bit = NO;
  66
+	
  67
+	if (error == 0) {
  68
+		is64bit = value == 1;
  69
+		[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"cpu64bit", @"CPU is 64-Bit?", [NSNumber numberWithBool:is64bit], is64bit ? @"Yes" : @"No", nil] forKeys:profileDictKeys]];
  70
+	}
59 71
 	error = sysctlbyname("hw.cpusubtype", &value, &length, NULL, 0);
60 72
 	if (error == 0) {
61 73
 		NSString *visibleCPUSubType;
62 74
 		if (cpuType == 7) {
63 75
 			// Intel
64  
-			visibleCPUSubType = @"Intel";	// If anyone knows how to tell a Core Duo from a Core Solo, please email tph@atomicbird.com
  76
+			visibleCPUSubType = is64bit ? @"Intel Core 2" : @"Intel Core";	// If anyone knows how to tell a Core Duo from a Core Solo, please email tph@atomicbird.com
65 77
 		} else if (cpuType == 18) {
66 78
 			// PowerPC
67 79
 			switch(value) {
@@ -116,7 +128,7 @@ - (NSMutableArray *)systemProfileArrayForHostBundle:(NSBundle *)hostBundle
116 128
 	SInt32 gestaltInfo;
117 129
 	err = Gestalt(gestaltProcClkSpeedMHz,&gestaltInfo);
118 130
 	if (err == noErr)
119  
-		[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"cpuFreqMHz",@"CPU Speed (MHz)", [NSNumber numberWithInt:gestaltInfo], [NSNumber numberWithInt:gestaltInfo],nil] forKeys:profileDictKeys]];
  131
+		[profileArray addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"cpuFreqMHz",@"CPU Speed (GHz)", [NSNumber numberWithInt:gestaltInfo], [NSNumber numberWithDouble:gestaltInfo/1000.0],nil] forKeys:profileDictKeys]];
120 132
 	
121 133
 	// amount of RAM
122 134
 	err = Gestalt(gestaltPhysicalRAMSizeInMegabytes,&gestaltInfo);
1  SUUpdater.m
@@ -129,6 +129,7 @@ - (void)checkForUpdatesWithDriver:(SUUpdateDriver *)d
129 129
 	
130 130
 	driver = [d retain];
131 131
 	if ([driver delegate] == nil) { [driver setDelegate:delegate]; }
  132
+	NSLog(@"Checking %@", [self feedURL]);
132 133
 	[driver checkForUpdatesAtURL:[self feedURL] hostBundle:hostBundle];
133 134
 }
134 135
 
6  en.lproj/SUUpdatePermissionPrompt.nib/info.nib
@@ -3,18 +3,18 @@
3 3
 <plist version="1.0">
4 4
 <dict>
5 5
 	<key>IBFramework Version</key>
6  
-	<string>658</string>
  6
+	<string>667</string>
7 7
 	<key>IBLastKnownRelativeProjectPath</key>
8 8
 	<string>../Sparkle.xcodeproj</string>
9 9
 	<key>IBOldestOS</key>
10 10
 	<integer>5</integer>
11 11
 	<key>IBOpenObjects</key>
12 12
 	<array>
13  
-		<integer>39</integer>
14 13
 		<integer>6</integer>
  14
+		<integer>39</integer>
15 15
 	</array>
16 16
 	<key>IBSystem Version</key>
17  
-	<string>9C7010</string>
  17
+	<string>9D34</string>
18 18
 	<key>targetFramework</key>
19 19
 	<string>IBCocoaFramework</string>
20 20
 </dict>
BIN  en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
Binary file not shown

0 notes on commit 44a5473

Please sign in to comment.
Something went wrong with that request. Please try again.