mirror of
https://github.com/hholtmann/smcFanControl.git
synced 2025-11-04 19:49:16 +01:00
Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de3988463a | |||
| 6d6a6e8df5 | |||
| 8dd7096e96 | |||
| 65071b3bda | |||
| df1fdde5a1 | |||
| d1dff0106f | |||
| 2c8c9ce9b0 | |||
| e4257f547f | |||
| 37d3f97221 | |||
| 8bac767ee2 | |||
| ebe1cb6db6 | |||
| e35ada4887 | |||
| c37ad48839 | |||
| cbe7057bb2 | |||
| 757dd0083f | |||
| 679e6c659c | |||
| 11c0565924 | |||
| 2308d9b194 | |||
| 6f41bb6552 | |||
| 2d69dcc399 | |||
| b5103c8f64 | |||
| df287a7bf4 | |||
| 96aecc00f2 | |||
| 59ba7232fe | |||
| 9536827e73 | |||
| a37e18d227 | |||
| 3109288146 | |||
| 97683b91b7 | |||
| 6d2a6ed863 | |||
| 3c84277cef | |||
| 411ba5a485 | |||
| 2804ac0c85 | |||
| 252fc40328 | |||
| 3e00b8e79a | |||
| b956d0efe0 | |||
| 825feeebfc | |||
| b01a8cd165 | |||
| 2075ad0793 | |||
| c78366cebb | |||
| 62059ede9b | |||
| 052664221c | |||
| d4dee3b02f | |||
| f271718c71 | |||
| 4a94a92620 | |||
| 2abb74a087 | |||
| ee8f96e45f | |||
| bb9eb56faf | |||
| b5d8d8838e | |||
| 47c1d38d4c | |||
| 8d9b496dd4 | |||
| 93c7f15214 | |||
| 1eae87aede | |||
| b47bbf0177 | |||
| 65fef1adc3 | |||
| 7489cd8239 | |||
| 3dbea4bd98 |
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/build/
|
||||||
|
/smcFanControl.xcodeproj/project.xcworkspace/xcshareddata/
|
||||||
|
/smcFanControl.xcodeproj/project.xcworkspace/xcuserdata/
|
||||||
|
/smcFanControl.xcodeproj/xcuserdata/
|
||||||
28
Classes/Constants.h
Normal file
28
Classes/Constants.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
//
|
||||||
|
// Constants.h
|
||||||
|
// smcFanControl
|
||||||
|
//
|
||||||
|
// Created by Hendrik Holtmann on 16/10/16.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
#define PREF_TEMP_UNIT @"Unit"
|
||||||
|
#define PREF_SELECTION_DEFAULT @"SelDefault"
|
||||||
|
#define PREF_AUTOSTART_ENABLED @"AutoStart"
|
||||||
|
#define PREF_AUTOMATIC_CHANGE @"AutomaticChange"
|
||||||
|
#define PREF_BATTERY_SELECTION @"selbatt"
|
||||||
|
#define PREF_AC_SELECTION @"selac"
|
||||||
|
#define PREF_CHARGING_SELECTION @"selload"
|
||||||
|
#define PREF_MENU_DISPLAYMODE @"MenuBar"
|
||||||
|
#define PREF_TEMPERATURE_SENSOR @"TSensor"
|
||||||
|
#define PREF_NUMBEROF_LAUNCHES @"NumLaunches"
|
||||||
|
#define PREF_DONATIONMESSAGE_DISPLAY @"DonationMessageDisplay"
|
||||||
|
#define PREF_MENU_TEXTCOLOR @"MenuColor"
|
||||||
|
#define PREF_FAVORITES_ARRAY @"Favorites"
|
||||||
|
|
||||||
|
#define PREF_FAN_ARRAY @"FanData"
|
||||||
|
#define PREF_FAN_TITLE @"Title"
|
||||||
|
#define PREF_FAN_MINSPEED @"Minspeed"
|
||||||
|
#define PREF_FAN_SELSPEED @"selspeed"
|
||||||
|
#define PREF_FAN_SYNC @"sync"
|
||||||
|
#define PREF_FAN_SHOWMENU @"menu"
|
||||||
@ -23,17 +23,18 @@
|
|||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import "NSFileManager+DirectoryLocations.h"
|
#import "NSFileManager+DirectoryLocations.h"
|
||||||
#import <smc.h>
|
#import "smc.h"
|
||||||
#import <smcWrapper.h>
|
#import "smcWrapper.h"
|
||||||
#import <MachineDefaults.h>
|
#import "MachineDefaults.h"
|
||||||
|
|
||||||
#import <Power.h>
|
#import "Power.h"
|
||||||
#include <mach/mach_port.h>
|
#include <mach/mach_port.h>
|
||||||
#include <mach/mach_interface.h>
|
#include <mach/mach_interface.h>
|
||||||
#include <mach/mach_init.h>
|
#include <mach/mach_init.h>
|
||||||
|
|
||||||
#include <IOKit/pwr_mgt/IOPMLib.h>
|
#include <IOKit/pwr_mgt/IOPMLib.h>
|
||||||
#include <IOKit/IOMessage.h>
|
#include <IOKit/IOMessage.h>
|
||||||
|
#import "Constants.h"
|
||||||
|
|
||||||
|
|
||||||
#define kMenuBarHeight 22
|
#define kMenuBarHeight 22
|
||||||
@ -99,7 +100,6 @@
|
|||||||
IBOutlet id DefaultsController;
|
IBOutlet id DefaultsController;
|
||||||
|
|
||||||
MachineDefaults *mdefaults;
|
MachineDefaults *mdefaults;
|
||||||
NSDictionary *s_sed;
|
|
||||||
|
|
||||||
NSDictionary *undo_dic;
|
NSDictionary *undo_dic;
|
||||||
|
|
||||||
@ -107,6 +107,9 @@
|
|||||||
NSImage *menu_image_alt;
|
NSImage *menu_image_alt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property (nonatomic, strong ) NSMutableDictionary *machineDefaultsDict;
|
||||||
|
|
||||||
|
|
||||||
-(void)terminate:(id)sender;
|
-(void)terminate:(id)sender;
|
||||||
|
|
||||||
- (IBAction)paypal:(id)sender;
|
- (IBAction)paypal:(id)sender;
|
||||||
@ -115,6 +118,7 @@
|
|||||||
- (IBAction)closePreferences:(id)sender;
|
- (IBAction)closePreferences:(id)sender;
|
||||||
- (IBAction)savePreferences:(id)sender;
|
- (IBAction)savePreferences:(id)sender;
|
||||||
- (IBAction)updateCheck:(id)sender;
|
- (IBAction)updateCheck:(id)sender;
|
||||||
|
- (IBAction)resetSettings:(id)sender;
|
||||||
|
|
||||||
- (void)init_statusitem;
|
- (void)init_statusitem;
|
||||||
|
|
||||||
@ -136,8 +140,8 @@
|
|||||||
|
|
||||||
|
|
||||||
@interface NSNumber (NumberAdditions)
|
@interface NSNumber (NumberAdditions)
|
||||||
- (NSString *) tohex;
|
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *tohex;
|
||||||
- (NSNumber*) celsius_fahrenheit;
|
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSNumber *celsius_fahrenheit;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|||||||
@ -31,9 +31,10 @@
|
|||||||
#import "SystemVersion.h"
|
#import "SystemVersion.h"
|
||||||
|
|
||||||
@interface FanControl ()
|
@interface FanControl ()
|
||||||
+(void)copyMachinesIfNecessary;
|
+ (void)copyMachinesIfNecessary;
|
||||||
- (BOOL)isInAutoStart;
|
@property (NS_NONATOMIC_IOSONLY, getter=isInAutoStart, readonly) BOOL inAutoStart;
|
||||||
- (void) setStartAtLogin:(BOOL)enabled;
|
- (void)setStartAtLogin:(BOOL)enabled;
|
||||||
|
+ (void)checkRightStatus:(OSStatus)status;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation FanControl
|
@implementation FanControl
|
||||||
@ -41,6 +42,7 @@
|
|||||||
// Number of fans reported by the hardware.
|
// Number of fans reported by the hardware.
|
||||||
int g_numFans = 0;
|
int g_numFans = 0;
|
||||||
|
|
||||||
|
|
||||||
NSUserDefaults *defaults;
|
NSUserDefaults *defaults;
|
||||||
|
|
||||||
#pragma mark **Init-Methods**
|
#pragma mark **Init-Methods**
|
||||||
@ -79,14 +81,14 @@ NSUserDefaults *defaults;
|
|||||||
for (i=0;i<[rfavorites count];i++)
|
for (i=0;i<[rfavorites count];i++)
|
||||||
{
|
{
|
||||||
BOOL selected = NO;
|
BOOL selected = NO;
|
||||||
NSArray *fans = [[rfavorites objectAtIndex:i] objectForKey:@"FanData"];
|
NSArray *fans = rfavorites[i][PREF_FAN_ARRAY];
|
||||||
for (j=0;j<[fans count];j++) {
|
for (j=0;j<[fans count];j++) {
|
||||||
if ([[[fans objectAtIndex:j] objectForKey:@"menu"] boolValue] == YES ) {
|
if ([fans[j][PREF_FAN_SHOWMENU] boolValue] == YES ) {
|
||||||
selected = YES;
|
selected = YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (selected==NO) {
|
if (selected==NO) {
|
||||||
[[[[rfavorites objectAtIndex:i] objectForKey:@"FanData"] objectAtIndex:0] setObject:[NSNumber numberWithBool:YES] forKey:@"menu"];
|
rfavorites[i][PREF_FAN_ARRAY][0][PREF_FAN_SHOWMENU] = @YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,97 +96,89 @@ NSUserDefaults *defaults;
|
|||||||
|
|
||||||
-(void) awakeFromNib {
|
-(void) awakeFromNib {
|
||||||
|
|
||||||
s_sed = nil;
|
|
||||||
pw=[[Power alloc] init];
|
pw=[[Power alloc] init];
|
||||||
[pw setDelegate:self];
|
[pw setDelegate:self];
|
||||||
[pw registerForSleepWakeNotification];
|
[pw registerForSleepWakeNotification];
|
||||||
[pw registerForPowerChange];
|
[pw registerForPowerChange];
|
||||||
|
|
||||||
//load defaults
|
|
||||||
|
|
||||||
[DefaultsController setAppliesImmediately:NO];
|
//load defaults
|
||||||
|
|
||||||
|
[DefaultsController setAppliesImmediately:NO];
|
||||||
|
|
||||||
mdefaults=[[MachineDefaults alloc] init:nil];
|
mdefaults=[[MachineDefaults alloc] init:nil];
|
||||||
|
|
||||||
s_sed=[mdefaults get_machine_defaults];
|
self.machineDefaultsDict=[[NSMutableDictionary alloc] initWithDictionary:[mdefaults get_machine_defaults]];
|
||||||
|
|
||||||
|
NSMutableArray *favorites = [[NSMutableArray alloc] init];
|
||||||
|
|
||||||
|
NSMutableDictionary *defaultFav = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Default", PREF_FAN_TITLE,
|
||||||
|
[NSKeyedUnarchiver unarchiveObjectWithData:[NSKeyedArchiver archivedDataWithRootObject:[[mdefaults get_machine_defaults] objectForKey:@"Fans"]]], PREF_FAN_ARRAY,nil];
|
||||||
|
|
||||||
|
[favorites addObject:defaultFav];
|
||||||
|
|
||||||
|
|
||||||
NSMutableArray *favorites=[NSMutableArray arrayWithObjects:
|
|
||||||
[NSMutableDictionary dictionaryWithObjectsAndKeys:
|
|
||||||
@"Default", @"Title",
|
|
||||||
[s_sed objectForKey:@"Fans"], @"FanData",nil],nil];
|
|
||||||
NSRange range=[[MachineDefaults computerModel] rangeOfString:@"MacBook"];
|
NSRange range=[[MachineDefaults computerModel] rangeOfString:@"MacBook"];
|
||||||
if (range.length>0) {
|
if (range.length>0) {
|
||||||
//for macbooks add a second default
|
//for macbooks add a second default
|
||||||
MachineDefaults *msdefaults=[[MachineDefaults alloc] init:nil];
|
NSMutableDictionary *higherFav=[[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Higher RPM", PREF_FAN_TITLE,
|
||||||
NSMutableDictionary *sec_fav=[NSMutableDictionary dictionaryWithObjectsAndKeys:@"Higher RPM", @"Title",
|
[NSKeyedUnarchiver unarchiveObjectWithData:[NSKeyedArchiver archivedDataWithRootObject:[[mdefaults get_machine_defaults] objectForKey:@"Fans"]]], PREF_FAN_ARRAY,nil];
|
||||||
[[msdefaults get_machine_defaults] objectForKey:@"Fans"], @"FanData",nil];
|
for (NSUInteger i=0;i<[_machineDefaultsDict[@"Fans"] count];i++) {
|
||||||
[favorites addObject:sec_fav];
|
|
||||||
int i;
|
|
||||||
for (i=0;i<[[s_sed objectForKey:@"Fans"] count];i++) {
|
|
||||||
int min_value=([[[[s_sed objectForKey:@"Fans"] objectAtIndex:i] valueForKey:@"Minspeed"] intValue])*2;
|
|
||||||
[[[[favorites objectAtIndex:1] objectForKey:@"FanData"] objectAtIndex:i] setObject:[NSNumber numberWithInt:min_value] forKey:@"selspeed"];
|
|
||||||
|
|
||||||
|
int min_value=([[[[_machineDefaultsDict objectForKey:@"Fans"] objectAtIndex:i] objectForKey:PREF_FAN_MINSPEED] intValue])*2;
|
||||||
|
[[[higherFav objectForKey:PREF_FAN_ARRAY] objectAtIndex:i] setObject:[NSNumber numberWithInt:min_value] forKey:PREF_FAN_SELSPEED];
|
||||||
}
|
}
|
||||||
[msdefaults release];
|
[favorites addObject:higherFav];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//sync option for Macbook Pro's
|
//sync option for Macbook Pro's
|
||||||
NSRange range_mbp=[[MachineDefaults computerModel] rangeOfString:@"MacBookPro"];
|
NSRange range_mbp=[[MachineDefaults computerModel] rangeOfString:@"MacBookPro"];
|
||||||
if (range_mbp.length>0) {
|
if (range_mbp.length>0 && [_machineDefaultsDict[@"Fans"] count] == 2) {
|
||||||
[sync setHidden:NO];
|
[sync setHidden:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NSString *feedURL = nil;
|
|
||||||
if ([SystemVersion isTiger]) {
|
|
||||||
feedURL = @"http://www.eidac.de/smcfancontrol/smcfancontrol_tiger.xml";
|
|
||||||
} else {
|
|
||||||
feedURL = @"http://www.eidac.de/smcfancontrol/smcfancontrol.xml";
|
|
||||||
}
|
|
||||||
|
|
||||||
//load user defaults
|
//load user defaults
|
||||||
defaults = [NSUserDefaults standardUserDefaults];
|
defaults = [NSUserDefaults standardUserDefaults];
|
||||||
[defaults registerDefaults:
|
[defaults registerDefaults:
|
||||||
[NSMutableDictionary dictionaryWithObjectsAndKeys:
|
[NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||||
[NSNumber numberWithInt:0], @"Unit",
|
@0, PREF_TEMP_UNIT,
|
||||||
[NSNumber numberWithInt:0], @"SelDefault",
|
@0, PREF_SELECTION_DEFAULT,
|
||||||
[NSNumber numberWithBool:NO], @"AutoStart",
|
@NO,PREF_AUTOSTART_ENABLED,
|
||||||
[NSNumber numberWithBool:NO],@"AutomaticChange",
|
@NO,PREF_AUTOMATIC_CHANGE,
|
||||||
[NSNumber numberWithInt:0],@"selbatt",
|
@0, PREF_BATTERY_SELECTION,
|
||||||
[NSNumber numberWithInt:0],@"selac",
|
@0, PREF_AC_SELECTION,
|
||||||
[NSNumber numberWithInt:0],@"selload",
|
@0, PREF_CHARGING_SELECTION,
|
||||||
[NSNumber numberWithInt:0],@"MenuBar",
|
@0, PREF_MENU_DISPLAYMODE,
|
||||||
@"TC0D",@"TSensor",
|
@"TC0D",PREF_TEMPERATURE_SENSOR,
|
||||||
feedURL,@"SUFeedURL",
|
@0, PREF_NUMBEROF_LAUNCHES,
|
||||||
[NSArchiver archivedDataWithRootObject:[NSColor blackColor]],@"MenuColor",
|
@NO,PREF_DONATIONMESSAGE_DISPLAY,
|
||||||
favorites,@"Favorites",
|
[NSArchiver archivedDataWithRootObject:[NSColor blackColor]],PREF_MENU_TEXTCOLOR,
|
||||||
|
favorites,PREF_FAVORITES_ARRAY,
|
||||||
nil]];
|
nil]];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
g_numFans = [smcWrapper get_fan_num];
|
g_numFans = [smcWrapper get_fan_num];
|
||||||
s_menus=[[NSMutableArray alloc] init];
|
s_menus=[[NSMutableArray alloc] init];
|
||||||
[s_menus autorelease];
|
|
||||||
int i;
|
int i;
|
||||||
for(i=0;i<g_numFans;i++){
|
for(i=0;i<g_numFans;i++){
|
||||||
NSMenuItem *mitem=[[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"Fan: %d",i] action:NULL keyEquivalent:@""];
|
NSMenuItem *mitem=[[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"Fan: %d",i] action:NULL keyEquivalent:@""];
|
||||||
[mitem setTag:(i+1)*10];
|
[mitem setTag:(i+1)*10];
|
||||||
[s_menus insertObject:mitem atIndex:i];
|
[s_menus insertObject:mitem atIndex:i];
|
||||||
[mitem release];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[FavoritesController bind:@"content"
|
[FavoritesController bind:@"content"
|
||||||
toObject:[NSUserDefaultsController sharedUserDefaultsController]
|
toObject:[NSUserDefaultsController sharedUserDefaultsController]
|
||||||
withKeyPath:@"values.Favorites"
|
withKeyPath:[@"values." stringByAppendingString:PREF_FAVORITES_ARRAY]
|
||||||
options:nil];
|
options:nil];
|
||||||
[FavoritesController setEditable:YES];
|
[FavoritesController setEditable:YES];
|
||||||
|
|
||||||
// set slider sync - only for MBP
|
// set slider sync - only for MBP
|
||||||
for (i=0;i<[[FavoritesController arrangedObjects] count];i++) {
|
for (i=0;i<[[FavoritesController arrangedObjects] count];i++) {
|
||||||
if([[[[FavoritesController arrangedObjects] objectAtIndex:i] objectForKey:@"sync"] boolValue]==YES) {
|
if([[FavoritesController arrangedObjects][i][PREF_FAN_SYNC] boolValue]==YES) {
|
||||||
[FavoritesController setSelectionIndex:i];
|
[FavoritesController setSelectionIndex:i];
|
||||||
[self syncBinder:[[[[FavoritesController arrangedObjects] objectAtIndex:i] objectForKey:@"sync"] boolValue]];
|
[self syncBinder:[[FavoritesController arrangedObjects][i][PREF_FAN_SYNC] boolValue]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,40 +199,70 @@ NSUserDefaults *defaults;
|
|||||||
[autochange setEnabled:false];
|
[autochange setEnabled:false];
|
||||||
}
|
}
|
||||||
[faqText replaceCharactersInRange:NSMakeRange(0,0) withRTF: [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"F.A.Q" ofType:@"rtf"]]];
|
[faqText replaceCharactersInRange:NSMakeRange(0,0) withRTF: [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"F.A.Q" ofType:@"rtf"]]];
|
||||||
[self apply_settings:nil controllerindex:[[defaults objectForKey:@"SelDefault"] intValue]];
|
[self apply_settings:nil controllerindex:[[defaults objectForKey:PREF_SELECTION_DEFAULT] intValue]];
|
||||||
[[[[theMenu itemWithTag:1] submenu] itemAtIndex:[[defaults objectForKey:@"SelDefault"] intValue]] setState:NSOnState];
|
[[[[theMenu itemWithTag:1] submenu] itemAtIndex:[[defaults objectForKey:PREF_SELECTION_DEFAULT] intValue]] setState:NSOnState];
|
||||||
[[sliderCell dataCell] setControlSize:NSSmallControlSize];
|
[[sliderCell dataCell] setControlSize:NSSmallControlSize];
|
||||||
[self changeMenu:nil];
|
[self changeMenu:nil];
|
||||||
|
|
||||||
//seting toolbar image
|
//seting toolbar image
|
||||||
menu_image=[[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"smc" ofType:@"png"]];
|
menu_image = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"smc" ofType:@"png"]];
|
||||||
menu_image_alt=[[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"smcover" ofType:@"png"]];
|
menu_image_alt = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"smcover" ofType:@"png"]];
|
||||||
|
if ([menu_image respondsToSelector:@selector(setTemplate:)]) {
|
||||||
|
[menu_image setTemplate:YES];
|
||||||
|
[menu_image_alt setTemplate:YES];
|
||||||
|
}
|
||||||
|
|
||||||
//release MachineDefaults class first call
|
|
||||||
//add timer for reading to RunLoop
|
//add timer for reading to RunLoop
|
||||||
_readTimer = [NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(readFanData:) userInfo:nil repeats:YES];
|
_readTimer = [NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(readFanData:) userInfo:nil repeats:YES];
|
||||||
if ([_readTimer respondsToSelector:@selector(setTolerance:)]) {
|
if ([_readTimer respondsToSelector:@selector(setTolerance:)]) {
|
||||||
[_readTimer setTolerance:2.0];
|
[_readTimer setTolerance:2.0];
|
||||||
}
|
}
|
||||||
[_readTimer fire];
|
[_readTimer fire];
|
||||||
|
|
||||||
//autoapply settings if valid
|
//autoapply settings if valid
|
||||||
[self upgradeFavorites];
|
[self upgradeFavorites];
|
||||||
|
|
||||||
//autostart
|
//autostart
|
||||||
[[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithBool:[self isInAutoStart]] forKey:@"AutoStart"];
|
[[NSUserDefaults standardUserDefaults] setValue:@([self isInAutoStart]) forKey:PREF_AUTOSTART_ENABLED];
|
||||||
|
NSUInteger numLaunches = [[[NSUserDefaults standardUserDefaults] objectForKey:PREF_NUMBEROF_LAUNCHES] integerValue];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:@(numLaunches+1) forKey:PREF_NUMBEROF_LAUNCHES];
|
||||||
|
if (numLaunches != 0 && (numLaunches % 3 == 0) && ![[[NSUserDefaults standardUserDefaults] objectForKey:PREF_DONATIONMESSAGE_DISPLAY] boolValue]) {
|
||||||
|
[self displayDonationMessage];
|
||||||
|
}
|
||||||
|
|
||||||
|
[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(readFanData:) name:@"AppleInterfaceThemeChangedNotification" object:nil];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)displayDonationMessage
|
||||||
|
{
|
||||||
|
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Consider a donation",nil)
|
||||||
|
defaultButton:NSLocalizedString(@"Donate over Paypal",nil) alternateButton:NSLocalizedString(@"Never ask me again",nil) otherButton:NSLocalizedString(@"Remind me later",nil)
|
||||||
|
informativeTextWithFormat:NSLocalizedString(@"smcFanControl keeps your Mac cool since 2006.\n\nIf smcFanControl is helfpul for you and you want to support further development, a small donation over Paypal is much appreciated.",nil)];
|
||||||
|
NSModalResponse code=[alert runModal];
|
||||||
|
if (code == NSAlertDefaultReturn) {
|
||||||
|
[self paypal:nil];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:PREF_DONATIONMESSAGE_DISPLAY];
|
||||||
|
} else if (code == NSAlertAlternateReturn) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:PREF_DONATIONMESSAGE_DISPLAY];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-(void)init_statusitem{
|
-(void)init_statusitem{
|
||||||
statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength: NSVariableStatusItemLength] retain];
|
statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength: NSVariableStatusItemLength];
|
||||||
[statusItem setMenu: theMenu];
|
[statusItem setMenu: theMenu];
|
||||||
[statusItem setEnabled: YES];
|
|
||||||
[statusItem setHighlightMode:YES];
|
if ([statusItem respondsToSelector:@selector(button)]) {
|
||||||
[statusItem setTitle:@"smc..."];
|
[statusItem.button setTitle:@"smc..."];
|
||||||
|
} else {
|
||||||
|
[statusItem setEnabled: YES];
|
||||||
|
[statusItem setHighlightMode:YES];
|
||||||
|
[statusItem setTitle:@"smc..."];
|
||||||
|
}
|
||||||
int i;
|
int i;
|
||||||
for(i=0;i<[s_menus count];i++) {
|
for(i=0;i<[s_menus count];i++) {
|
||||||
[theMenu insertItem:[s_menus objectAtIndex:i] atIndex:i];
|
[theMenu insertItem:s_menus[i] atIndex:i];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Sign up for menuNeedsUpdate call
|
// Sign up for menuNeedsUpdate call
|
||||||
@ -273,21 +297,19 @@ NSUserDefaults *defaults;
|
|||||||
- (IBAction)save_favorite:(id)sender{
|
- (IBAction)save_favorite:(id)sender{
|
||||||
MachineDefaults *msdefaults=[[MachineDefaults alloc] init:nil];
|
MachineDefaults *msdefaults=[[MachineDefaults alloc] init:nil];
|
||||||
if ([[newfavorite_title stringValue] length]>0) {
|
if ([[newfavorite_title stringValue] length]>0) {
|
||||||
NSMutableDictionary *toinsert=[[NSMutableDictionary alloc] initWithObjectsAndKeys:[newfavorite_title stringValue],@"Title",[[msdefaults get_machine_defaults] objectForKey:@"Fans"],@"FanData",nil]; //default as template
|
NSMutableDictionary *toinsert=[[NSMutableDictionary alloc] initWithObjectsAndKeys:[newfavorite_title stringValue],@"Title",[msdefaults get_machine_defaults][@"Fans"],PREF_FAN_ARRAY,nil]; //default as template
|
||||||
[toinsert setValue:[NSNumber numberWithInt:0] forKey:@"Standard"];
|
[toinsert setValue:@0 forKey:@"Standard"];
|
||||||
[FavoritesController addObject:toinsert];
|
[FavoritesController addObject:toinsert];
|
||||||
[toinsert release];
|
|
||||||
[newfavoritewindow close];
|
[newfavoritewindow close];
|
||||||
[[NSApplication sharedApplication] endSheet:newfavoritewindow];
|
[[NSApplication sharedApplication] endSheet:newfavoritewindow];
|
||||||
}
|
}
|
||||||
[msdefaults release];
|
|
||||||
[self upgradeFavorites];
|
[self upgradeFavorites];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-(void) check_deletion:(id)combo{
|
-(void) check_deletion:(id)combo{
|
||||||
if ([FavoritesController selectionIndex]==[[defaults objectForKey:combo] intValue]) {
|
if ([FavoritesController selectionIndex]==[[defaults objectForKey:combo] intValue]) {
|
||||||
[defaults setObject:[NSNumber numberWithInt:0] forKey:combo];
|
[defaults setObject:@0 forKey:combo];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,29 +319,30 @@ NSUserDefaults *defaults;
|
|||||||
{
|
{
|
||||||
if (returnCode==0) {
|
if (returnCode==0) {
|
||||||
//delete favorite, but resets presets before
|
//delete favorite, but resets presets before
|
||||||
[self check_deletion:@"selbatt"];
|
[self check_deletion:PREF_BATTERY_SELECTION];
|
||||||
[self check_deletion:@"selac"];
|
[self check_deletion:PREF_AC_SELECTION];
|
||||||
[self check_deletion:@"selload"];
|
[self check_deletion:PREF_CHARGING_SELECTION];
|
||||||
[FavoritesController removeObjects:[FavoritesController selectedObjects]];
|
[FavoritesController removeObjects:[FavoritesController selectedObjects]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)delete_favorite:(id)sender{
|
- (IBAction)delete_favorite:(id)sender{
|
||||||
|
|
||||||
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Delete favorite",nil) defaultButton:NSLocalizedString(@"No",nil) alternateButton:NSLocalizedString(@"Yes",nil) otherButton:nil informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the favorite %@?",nil), [ [ [FavoritesController arrangedObjects] objectAtIndex:[FavoritesController selectionIndex]] objectForKey:@"Title"] ]];
|
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Delete favorite",nil) defaultButton:NSLocalizedString(@"No",nil) alternateButton:NSLocalizedString(@"Yes",nil) otherButton:nil informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the favorite %@?",nil), [FavoritesController arrangedObjects][[FavoritesController selectionIndex]][@"Title"] ]];
|
||||||
|
|
||||||
[alert beginSheetModalForWindow:mainwindow modalDelegate:self didEndSelector:@selector(deleteAlertDidEnd:returnCode:contextInfo:) contextInfo:NULL];
|
[alert beginSheetModalForWindow:mainwindow modalDelegate:self didEndSelector:@selector(deleteAlertDidEnd:returnCode:contextInfo:) contextInfo:NULL];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Called via a timer mechanism. This is where all the temp / RPM reading is done.
|
// Called via a timer mechanism. This is where all the temp / RPM reading is done.
|
||||||
//reads fan data and updates the gui
|
//reads fan data and updates the gui
|
||||||
-(void) readFanData:(NSTimer*)timer{
|
-(void) readFanData:(id)caller{
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
//on init handling
|
//on init handling
|
||||||
if (s_sed==nil) {
|
if (_machineDefaultsDict==nil) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,7 +350,7 @@ NSUserDefaults *defaults;
|
|||||||
// as low as possible.
|
// as low as possible.
|
||||||
bool bNeedTemp = false;
|
bool bNeedTemp = false;
|
||||||
bool bNeedRpm = false;
|
bool bNeedRpm = false;
|
||||||
const int menuBarSetting = [[defaults objectForKey:@"MenuBar"] intValue];
|
const int menuBarSetting = [[defaults objectForKey:PREF_MENU_DISPLAYMODE] intValue];
|
||||||
switch (menuBarSetting) {
|
switch (menuBarSetting) {
|
||||||
default:
|
default:
|
||||||
case 1:
|
case 1:
|
||||||
@ -358,16 +381,16 @@ NSUserDefaults *defaults;
|
|||||||
|
|
||||||
if (bNeedRpm == true) {
|
if (bNeedRpm == true) {
|
||||||
// Read the current fan speed for the desired fan and format text for display in the menubar.
|
// Read the current fan speed for the desired fan and format text for display in the menubar.
|
||||||
NSArray *fans = [[[FavoritesController arrangedObjects] objectAtIndex:[FavoritesController selectionIndex]] objectForKey:@"FanData"];
|
NSArray *fans = [FavoritesController arrangedObjects][[FavoritesController selectionIndex]][PREF_FAN_ARRAY];
|
||||||
for (i=0; i<g_numFans && i<[fans count]; i++)
|
for (i=0; i<g_numFans && i<[fans count]; i++)
|
||||||
{
|
{
|
||||||
if ([[[fans objectAtIndex:i] objectForKey:@"menu"] boolValue]==YES) {
|
if ([fans[i][PREF_FAN_SHOWMENU] boolValue]==YES) {
|
||||||
selectedRpm = [smcWrapper get_fan_rpm:i];
|
selectedRpm = [smcWrapper get_fan_rpm:i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NSNumberFormatter *nc=[[[NSNumberFormatter alloc] init] autorelease];
|
NSNumberFormatter *nc=[[NSNumberFormatter alloc] init];
|
||||||
//avoid jumping in menu bar
|
//avoid jumping in menu bar
|
||||||
[nc setFormat:@"000;000;-000"];
|
[nc setFormat:@"000;000;-000"];
|
||||||
|
|
||||||
@ -378,12 +401,12 @@ NSUserDefaults *defaults;
|
|||||||
// Read current temperature and format text for the menubar.
|
// Read current temperature and format text for the menubar.
|
||||||
c_temp = [smcWrapper get_maintemp];
|
c_temp = [smcWrapper get_maintemp];
|
||||||
|
|
||||||
if ([[defaults objectForKey:@"Unit"] intValue]==0) {
|
if ([[defaults objectForKey:PREF_TEMP_UNIT] intValue]==0) {
|
||||||
temp = [NSString stringWithFormat:@"%@%CC",[NSNumber numberWithFloat:c_temp],(unsigned short)0xb0];
|
temp = [NSString stringWithFormat:@"%@%CC",@(c_temp),(unsigned short)0xb0];
|
||||||
} else {
|
} else {
|
||||||
NSNumberFormatter *ncf=[[[NSNumberFormatter alloc] init] autorelease];
|
NSNumberFormatter *ncf=[[NSNumberFormatter alloc] init];
|
||||||
[ncf setFormat:@"00;00;-00"];
|
[ncf setFormat:@"00;00;-00"];
|
||||||
temp = [NSString stringWithFormat:@"%@%CF",[ncf stringForObjectValue:[[NSNumber numberWithFloat:c_temp] celsius_fahrenheit]],(unsigned short)0xb0];
|
temp = [NSString stringWithFormat:@"%@%CF",[ncf stringForObjectValue:[@(c_temp) celsius_fahrenheit]],(unsigned short)0xb0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,6 +414,19 @@ NSUserDefaults *defaults;
|
|||||||
NSMutableAttributedString *s_status = nil;
|
NSMutableAttributedString *s_status = nil;
|
||||||
NSMutableParagraphStyle *paragraphStyle = nil;
|
NSMutableParagraphStyle *paragraphStyle = nil;
|
||||||
|
|
||||||
|
NSColor *menuColor = (NSColor*)[NSUnarchiver unarchiveObjectWithData:[defaults objectForKey:PREF_MENU_TEXTCOLOR]];
|
||||||
|
BOOL setColor = NO;
|
||||||
|
if (!([[menuColor colorUsingColorSpaceName:
|
||||||
|
NSCalibratedWhiteColorSpace] whiteComponent] == 0.0) || ![statusItem respondsToSelector:@selector(button)]) setColor = YES;
|
||||||
|
|
||||||
|
|
||||||
|
NSString *osxMode = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"];
|
||||||
|
|
||||||
|
if (osxMode && !setColor) {
|
||||||
|
menuColor = [NSColor whiteColor];
|
||||||
|
setColor = YES;
|
||||||
|
}
|
||||||
|
|
||||||
switch (menuBarSetting) {
|
switch (menuBarSetting) {
|
||||||
default:
|
default:
|
||||||
case 1: {
|
case 1: {
|
||||||
@ -411,10 +447,19 @@ NSUserDefaults *defaults;
|
|||||||
[paragraphStyle setAlignment:NSLeftTextAlignment];
|
[paragraphStyle setAlignment:NSLeftTextAlignment];
|
||||||
[s_status addAttribute:NSFontAttributeName value:[NSFont fontWithName:@"Lucida Grande" size:fsize] range:NSMakeRange(0,[s_status length])];
|
[s_status addAttribute:NSFontAttributeName value:[NSFont fontWithName:@"Lucida Grande" size:fsize] range:NSMakeRange(0,[s_status length])];
|
||||||
[s_status addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[s_status length])];
|
[s_status addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[s_status length])];
|
||||||
[s_status addAttribute:NSForegroundColorAttributeName value:(NSColor*)[NSUnarchiver unarchiveObjectWithData:[defaults objectForKey:@"MenuColor"]] range:NSMakeRange(0,[s_status length])];
|
|
||||||
[statusItem setAttributedTitle:s_status];
|
if (setColor) [s_status addAttribute:NSForegroundColorAttributeName value:menuColor range:NSMakeRange(0,[s_status length])];
|
||||||
[statusItem setImage:nil];
|
|
||||||
[statusItem setAlternateImage:nil];
|
|
||||||
|
if ([statusItem respondsToSelector:@selector(button)]) {
|
||||||
|
[statusItem.button setAttributedTitle:s_status];
|
||||||
|
[statusItem.button setImage:nil];
|
||||||
|
[statusItem.button setAlternateImage:nil];
|
||||||
|
} else {
|
||||||
|
[statusItem setAttributedTitle:s_status];
|
||||||
|
[statusItem setImage:nil];
|
||||||
|
[statusItem setAlternateImage:nil];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,41 +467,58 @@ NSUserDefaults *defaults;
|
|||||||
// TODO: Big waste of energy to update this tooltip every X seconds when the user
|
// TODO: Big waste of energy to update this tooltip every X seconds when the user
|
||||||
// is unlikely to hover the smcFanControl icon over and over again.
|
// is unlikely to hover the smcFanControl icon over and over again.
|
||||||
[statusItem setLength:26];
|
[statusItem setLength:26];
|
||||||
[statusItem setTitle:nil];
|
if ([statusItem respondsToSelector:@selector(button)]) {
|
||||||
[statusItem setToolTip:[NSString stringWithFormat:@"%@\n%@",temp,fan]];
|
[statusItem.button setTitle:nil];
|
||||||
[statusItem setImage:menu_image];
|
[statusItem.button setToolTip:[NSString stringWithFormat:@"%@\n%@",temp,fan]];
|
||||||
[statusItem setAlternateImage:menu_image_alt];
|
[statusItem.button setImage:menu_image];
|
||||||
|
[statusItem.button setAlternateImage:menu_image_alt];
|
||||||
|
} else {
|
||||||
|
[statusItem setTitle:nil];
|
||||||
|
[statusItem setToolTip:[NSString stringWithFormat:@"%@\n%@",temp,fan]];
|
||||||
|
[statusItem setImage:menu_image];
|
||||||
|
[statusItem setAlternateImage:menu_image_alt];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
[statusItem setLength:46];
|
[statusItem setLength:46];
|
||||||
s_status=[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",temp]];
|
s_status=[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",temp]];
|
||||||
[s_status addAttribute:NSFontAttributeName value:[NSFont fontWithName:@"Lucida Grande" size:12] range:NSMakeRange(0,[s_status length])];
|
[s_status addAttribute:NSFontAttributeName value:[NSFont fontWithName:@"Lucida Grande" size:12] range:NSMakeRange(0,[s_status length])];
|
||||||
[s_status addAttribute:NSForegroundColorAttributeName value:(NSColor*)[NSUnarchiver unarchiveObjectWithData:[defaults objectForKey:@"MenuColor"]] range:NSMakeRange(0,[s_status length])];
|
if (setColor) [s_status addAttribute:NSForegroundColorAttributeName value:menuColor range:NSMakeRange(0,[s_status length])];
|
||||||
[statusItem setAttributedTitle:s_status];
|
if ([statusItem respondsToSelector:@selector(button)]) {
|
||||||
[statusItem setImage:nil];
|
[statusItem.button setAttributedTitle:s_status];
|
||||||
[statusItem setAlternateImage:nil];
|
[statusItem.button setImage:nil];
|
||||||
|
[statusItem.button setAlternateImage:nil];
|
||||||
|
} else {
|
||||||
|
[statusItem setAttributedTitle:s_status];
|
||||||
|
[statusItem setImage:nil];
|
||||||
|
[statusItem setAlternateImage:nil];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
[statusItem setLength:65];
|
[statusItem setLength:65];
|
||||||
s_status=[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",fan]];
|
s_status=[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",fan]];
|
||||||
[s_status addAttribute:NSFontAttributeName value:[NSFont fontWithName:@"Lucida Grande" size:12] range:NSMakeRange(0,[s_status length])];
|
[s_status addAttribute:NSFontAttributeName value:[NSFont fontWithName:@"Lucida Grande" size:12] range:NSMakeRange(0,[s_status length])];
|
||||||
[s_status addAttribute:NSForegroundColorAttributeName value:(NSColor*)[NSUnarchiver unarchiveObjectWithData:[defaults objectForKey:@"MenuColor"]] range:NSMakeRange(0,[s_status length])];
|
if (setColor) [s_status addAttribute:NSForegroundColorAttributeName value:menuColor range:NSMakeRange(0,[s_status length])];
|
||||||
[statusItem setAttributedTitle:s_status];
|
if ([statusItem respondsToSelector:@selector(button)]) {
|
||||||
[statusItem setImage:nil];
|
[statusItem.button setAttributedTitle:s_status];
|
||||||
[statusItem setAlternateImage:nil];
|
[statusItem.button setImage:nil];
|
||||||
|
[statusItem.button setAlternateImage:nil];
|
||||||
|
} else {
|
||||||
|
[statusItem setAttributedTitle:s_status];
|
||||||
|
[statusItem setImage:nil];
|
||||||
|
[statusItem setAlternateImage:nil];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
[paragraphStyle release];
|
|
||||||
[s_status release];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (IBAction)savePreferences:(id)sender{
|
- (IBAction)savePreferences:(id)sender{
|
||||||
[(NSUserDefaultsController *)DefaultsController save:sender];
|
[(NSUserDefaultsController *)DefaultsController save:sender];
|
||||||
[defaults setValue:[FavoritesController content] forKey:@"Favorites"];
|
[defaults setValue:[FavoritesController content] forKey:PREF_FAVORITES_ARRAY];
|
||||||
[defaults synchronize];
|
[defaults synchronize];
|
||||||
[mainwindow close];
|
[mainwindow close];
|
||||||
[self apply_settings:sender controllerindex:[FavoritesController selectionIndex]];
|
[self apply_settings:sender controllerindex:[FavoritesController selectionIndex]];
|
||||||
@ -477,17 +539,30 @@ NSUserDefaults *defaults;
|
|||||||
int i;
|
int i;
|
||||||
[FanControl setRights];
|
[FanControl setRights];
|
||||||
[FavoritesController setSelectionIndex:cIndex];
|
[FavoritesController setSelectionIndex:cIndex];
|
||||||
for (i=0;i<[[[[FavoritesController arrangedObjects] objectAtIndex:cIndex] objectForKey:@"FanData"] count];i++) {
|
|
||||||
[smcWrapper setKey_external:[NSString stringWithFormat:@"F%dMn",i] value:[[[[FanController arrangedObjects] objectAtIndex:i] objectForKey:@"selspeed"] tohex]];
|
if ([[MachineDefaults computerModel] rangeOfString:@"MacBookPro15"].location != NSNotFound) {
|
||||||
}
|
for (i=0;i<[[FavoritesController arrangedObjects][cIndex][PREF_FAN_ARRAY] count];i++) {
|
||||||
NSMenu *submenu = [[[NSMenu alloc] init] autorelease];
|
[smcWrapper setKey_external:[NSString stringWithFormat:@"F%dMd",i] value:@"01"];
|
||||||
|
float f_val = [[FanController arrangedObjects][i][PREF_FAN_SELSPEED] floatValue];
|
||||||
|
uint8 *vals = (uint8*)&f_val;
|
||||||
|
//NSString str_val = ;
|
||||||
|
[smcWrapper setKey_external:[NSString stringWithFormat:@"F%dTg",i] value:[NSString stringWithFormat:@"%02x%02x%02x%02x",vals[0],vals[1],vals[2],vals[3]]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (i=0;i<[[FavoritesController arrangedObjects][cIndex][PREF_FAN_ARRAY] count];i++) {
|
||||||
|
[smcWrapper setKey_external:[NSString stringWithFormat:@"F%dMn",i] value:[[FanController arrangedObjects][i][PREF_FAN_SELSPEED] tohex]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NSMenu *submenu = [[NSMenu alloc] init];
|
||||||
|
|
||||||
for(i=0;i<[[FavoritesController arrangedObjects] count];i++){
|
for(i=0;i<[[FavoritesController arrangedObjects] count];i++){
|
||||||
NSMenuItem *submenuItem = [[[NSMenuItem alloc] initWithTitle:[[[FavoritesController arrangedObjects] objectAtIndex:i] objectForKey:@"Title"] action:@selector(apply_quickselect:) keyEquivalent:@""] autorelease];
|
NSMenuItem *submenuItem = [[NSMenuItem alloc] initWithTitle:[FavoritesController arrangedObjects][i][@"Title"] action:@selector(apply_quickselect:) keyEquivalent:@""];
|
||||||
[submenuItem setTag:i*100]; //for later manipulation
|
[submenuItem setTag:i*100]; //for later manipulation
|
||||||
[submenuItem setEnabled:YES];
|
[submenuItem setEnabled:YES];
|
||||||
[submenuItem setTarget:self];
|
[submenuItem setTarget:self];
|
||||||
[submenuItem setRepresentedObject:[[FavoritesController arrangedObjects] objectAtIndex:i]];
|
[submenuItem setRepresentedObject:[FavoritesController arrangedObjects][i]];
|
||||||
[submenu addItem:submenuItem];
|
[submenu addItem:submenuItem];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,9 +571,9 @@ NSUserDefaults *defaults;
|
|||||||
[[[[theMenu itemWithTag:1] submenu] itemAtIndex:i] setState:NSOffState];
|
[[[[theMenu itemWithTag:1] submenu] itemAtIndex:i] setState:NSOffState];
|
||||||
}
|
}
|
||||||
[[[[theMenu itemWithTag:1] submenu] itemAtIndex:cIndex] setState:NSOnState];
|
[[[[theMenu itemWithTag:1] submenu] itemAtIndex:cIndex] setState:NSOnState];
|
||||||
[defaults setObject:[NSNumber numberWithInt:cIndex] forKey:@"SelDefault"];
|
[defaults setObject:@(cIndex) forKey:PREF_SELECTION_DEFAULT];
|
||||||
//change active setting display
|
//change active setting display
|
||||||
[[theMenu itemWithTag:1] setTitle:[NSString stringWithFormat:@"%@: %@",NSLocalizedString(@"Active Setting",nil),[ [ [FavoritesController arrangedObjects] objectAtIndex:[FavoritesController selectionIndex]] objectForKey:@"Title"] ]];
|
[[theMenu itemWithTag:1] setTitle:[NSString stringWithFormat:@"%@: %@",NSLocalizedString(@"Active Setting",nil),[FavoritesController arrangedObjects][[FavoritesController selectionIndex]][PREF_FAN_TITLE] ]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -523,13 +598,6 @@ NSUserDefaults *defaults;
|
|||||||
[_readTimer invalidate];
|
[_readTimer invalidate];
|
||||||
[pw deregisterForSleepWakeNotification];
|
[pw deregisterForSleepWakeNotification];
|
||||||
[pw deregisterForPowerChange];
|
[pw deregisterForPowerChange];
|
||||||
[pw release];
|
|
||||||
[menu_image release];
|
|
||||||
[menu_image_alt release];
|
|
||||||
//[mdefaults release];
|
|
||||||
//[statusItem release];
|
|
||||||
//[s_menus release];
|
|
||||||
//[theMenu release];
|
|
||||||
[[NSApplication sharedApplication] terminate:self];
|
[[NSApplication sharedApplication] terminate:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -545,7 +613,7 @@ NSUserDefaults *defaults;
|
|||||||
|
|
||||||
|
|
||||||
- (IBAction) changeMenu:(id)sender{
|
- (IBAction) changeMenu:(id)sender{
|
||||||
if ([[[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:@"MenuBar"] intValue]==2) {
|
if ([[[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:PREF_MENU_DISPLAYMODE] intValue]==2) {
|
||||||
[colorSelector setEnabled:NO];
|
[colorSelector setEnabled:NO];
|
||||||
} else {
|
} else {
|
||||||
[colorSelector setEnabled:YES];
|
[colorSelector setEnabled:YES];
|
||||||
@ -558,7 +626,7 @@ NSUserDefaults *defaults;
|
|||||||
int i;
|
int i;
|
||||||
for (i=0;i<[[FanController arrangedObjects] count];i++) {
|
for (i=0;i<[[FanController arrangedObjects] count];i++) {
|
||||||
if (i!=[sender selectedRow]) {
|
if (i!=[sender selectedRow]) {
|
||||||
[[[FanController arrangedObjects] objectAtIndex:i] setValue:[NSNumber numberWithBool:NO] forKey:@"menu"];
|
[[FanController arrangedObjects][i] setValue:@NO forKey:PREF_FAN_SHOWMENU];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -568,16 +636,18 @@ NSUserDefaults *defaults;
|
|||||||
// menu items are now only updated here in order to
|
// menu items are now only updated here in order to
|
||||||
// reduce the energy impact of -readFanData.
|
// reduce the energy impact of -readFanData.
|
||||||
- (void)menuNeedsUpdate:(NSMenu*)menu {
|
- (void)menuNeedsUpdate:(NSMenu*)menu {
|
||||||
if (theMenu == menu) {
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
if (s_sed == nil)
|
if (theMenu == menu) {
|
||||||
return;
|
if (_machineDefaultsDict == nil)
|
||||||
|
return;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for(i=0; i<g_numFans; ++i){
|
for(i=0; i<g_numFans; ++i){
|
||||||
NSString *fandesc=[[[s_sed objectForKey:@"Fans"] objectAtIndex:i] objectForKey:@"Description"];
|
NSString *fandesc=_machineDefaultsDict[@"Fans"][i][@"Description"];
|
||||||
[[theMenu itemWithTag:(i+1)*10] setTitle:[NSString stringWithFormat:@"%@: %@ rpm",fandesc,[[NSNumber numberWithInt:[smcWrapper get_fan_rpm:i]] stringValue]]];
|
[[theMenu itemWithTag:(i+1)*10] setTitle:[NSString stringWithFormat:@"%@: %@ rpm",fandesc,[@([smcWrapper get_fan_rpm:i]) stringValue]]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -586,12 +656,58 @@ NSUserDefaults *defaults;
|
|||||||
|
|
||||||
//just a helper to bringt update-info-window to the front
|
//just a helper to bringt update-info-window to the front
|
||||||
- (IBAction)updateCheck:(id)sender{
|
- (IBAction)updateCheck:(id)sender{
|
||||||
[[[SUUpdater alloc] init] checkForUpdates:sender];
|
SUUpdater *updater = [[SUUpdater alloc] init];
|
||||||
|
[updater checkForUpdates:sender];
|
||||||
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
|
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)performReset
|
||||||
|
{
|
||||||
|
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||||
|
|
||||||
|
NSError *error;
|
||||||
|
NSString *machinesPath = [[fileManager applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"];
|
||||||
|
[fileManager removeItemAtPath:machinesPath error:&error];
|
||||||
|
if (error) {
|
||||||
|
NSLog(@"Error deleting %@",machinesPath);
|
||||||
|
}
|
||||||
|
error = nil;
|
||||||
|
if ([[MachineDefaults computerModel] rangeOfString:@"MacBookPro15"].location != NSNotFound) {
|
||||||
|
for (int i=0;i<[[FavoritesController arrangedObjects][0][PREF_FAN_ARRAY] count];i++) {
|
||||||
|
[smcWrapper setKey_external:[NSString stringWithFormat:@"F%dMd",i] value:@"00"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *domainName = [[NSBundle mainBundle] bundleIdentifier];
|
||||||
|
[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:domainName];
|
||||||
|
|
||||||
|
|
||||||
|
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Shutdown required",nil)
|
||||||
|
defaultButton:NSLocalizedString(@"OK",nil) alternateButton:nil otherButton:nil
|
||||||
|
informativeTextWithFormat:NSLocalizedString(@"Please shutdown your computer now to return to default fan settings.",nil)];
|
||||||
|
NSModalResponse code=[alert runModal];
|
||||||
|
if (code == NSAlertDefaultReturn) {
|
||||||
|
[[NSApplication sharedApplication] terminate:self];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)resetSettings:(id)sender
|
||||||
|
{
|
||||||
|
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Reset Settings",nil)
|
||||||
|
defaultButton:NSLocalizedString(@"Yes",nil) alternateButton:NSLocalizedString(@"No",nil) otherButton:nil
|
||||||
|
informativeTextWithFormat:NSLocalizedString(@"Do you want to reset smcFanControl to default settings? Favorites will be deleted and fans will return to default speed.",nil)];
|
||||||
|
NSModalResponse code=[alert runModal];
|
||||||
|
if (code == NSAlertDefaultReturn) {
|
||||||
|
[self performReset];
|
||||||
|
} else if (code == NSAlertAlternateReturn) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
- (IBAction)visitHomepage:(id)sender{
|
- (IBAction)visitHomepage:(id)sender{
|
||||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.eidac.de/products"]];
|
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://www.eidac.de/products"]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -603,11 +719,11 @@ NSUserDefaults *defaults;
|
|||||||
//in case plist is corrupt, don't bind
|
//in case plist is corrupt, don't bind
|
||||||
if ([[FanController arrangedObjects] count]>1 ) {
|
if ([[FanController arrangedObjects] count]>1 ) {
|
||||||
if (bind==YES) {
|
if (bind==YES) {
|
||||||
[[[FanController arrangedObjects] objectAtIndex:1] bind:@"selspeed" toObject:[[FanController arrangedObjects] objectAtIndex:0] withKeyPath:@"selspeed" options:nil];
|
[[FanController arrangedObjects][1] bind:PREF_FAN_SELSPEED toObject:[FanController arrangedObjects][0] withKeyPath:PREF_FAN_SELSPEED options:nil];
|
||||||
[[[FanController arrangedObjects] objectAtIndex:0] bind:@"selspeed" toObject:[[FanController arrangedObjects] objectAtIndex:1] withKeyPath:@"selspeed" options:nil];
|
[[FanController arrangedObjects][0] bind:PREF_FAN_SELSPEED toObject:[FanController arrangedObjects][1] withKeyPath:PREF_FAN_SELSPEED options:nil];
|
||||||
} else {
|
} else {
|
||||||
[[[FanController arrangedObjects] objectAtIndex:1] unbind:@"selspeed"];
|
[[FanController arrangedObjects][1] unbind:PREF_FAN_SELSPEED];
|
||||||
[[[FanController arrangedObjects] objectAtIndex:0] unbind:@"selspeed"];
|
[[FanController arrangedObjects][0] unbind:PREF_FAN_SELSPEED];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -616,27 +732,27 @@ NSUserDefaults *defaults;
|
|||||||
#pragma mark **Power Watchdog-Methods**
|
#pragma mark **Power Watchdog-Methods**
|
||||||
|
|
||||||
- (void)systemDidWakeFromSleep:(id)sender{
|
- (void)systemDidWakeFromSleep:(id)sender{
|
||||||
[self apply_settings:nil controllerindex:[[defaults objectForKey:@"SelDefault"] intValue]];
|
[self apply_settings:nil controllerindex:[[defaults objectForKey:PREF_SELECTION_DEFAULT] intValue]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)powerChangeToBattery:(id)sender{
|
- (void)powerChangeToBattery:(id)sender{
|
||||||
|
|
||||||
if ([[defaults objectForKey:@"AutomaticChange"] boolValue]==YES) {
|
if ([[defaults objectForKey:@"AutomaticChange"] boolValue]==YES) {
|
||||||
[self apply_settings:nil controllerindex:[[defaults objectForKey:@"selbatt"] intValue]];
|
[self apply_settings:nil controllerindex:[[defaults objectForKey:PREF_BATTERY_SELECTION] intValue]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)powerChangeToAC:(id)sender{
|
- (void)powerChangeToAC:(id)sender{
|
||||||
if ([[defaults objectForKey:@"AutomaticChange"] boolValue]==YES) {
|
if ([[defaults objectForKey:@"AutomaticChange"] boolValue]==YES) {
|
||||||
[self apply_settings:nil controllerindex:[[defaults objectForKey:@"selac"] intValue]];
|
[self apply_settings:nil controllerindex:[[defaults objectForKey:PREF_AC_SELECTION] intValue]];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)powerChangeToACLoading:(id)sender{
|
- (void)powerChangeToACLoading:(id)sender{
|
||||||
if ([[defaults objectForKey:@"AutomaticChange"] boolValue]==YES) {
|
if ([[defaults objectForKey:@"AutomaticChange"] boolValue]==YES) {
|
||||||
[self apply_settings:nil controllerindex:[[defaults objectForKey:@"selload"] intValue]];
|
[self apply_settings:nil controllerindex:[[defaults objectForKey:PREF_CHARGING_SELECTION] intValue]];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -650,14 +766,14 @@ NSUserDefaults *defaults;
|
|||||||
BOOL found = NO;
|
BOOL found = NO;
|
||||||
LSSharedFileListRef loginItems = LSSharedFileListCreate(kCFAllocatorDefault, kLSSharedFileListSessionLoginItems, /*options*/ NULL);
|
LSSharedFileListRef loginItems = LSSharedFileListCreate(kCFAllocatorDefault, kLSSharedFileListSessionLoginItems, /*options*/ NULL);
|
||||||
NSString *path = [[NSBundle mainBundle] bundlePath];
|
NSString *path = [[NSBundle mainBundle] bundlePath];
|
||||||
CFURLRef URLToToggle = (CFURLRef)[NSURL fileURLWithPath:path];
|
CFURLRef URLToToggle = (__bridge CFURLRef)[NSURL fileURLWithPath:path];
|
||||||
LSSharedFileListItemRef existingItem = NULL;
|
//LSSharedFileListItemRef existingItem = NULL;
|
||||||
|
|
||||||
UInt32 seed = 0U;
|
UInt32 seed = 0U;
|
||||||
NSArray *currentLoginItems = [NSMakeCollectable(LSSharedFileListCopySnapshot(loginItems, &seed)) autorelease];
|
NSArray *currentLoginItems = CFBridgingRelease(LSSharedFileListCopySnapshot(loginItems, &seed));
|
||||||
|
|
||||||
for (id itemObject in currentLoginItems) {
|
for (id itemObject in currentLoginItems) {
|
||||||
LSSharedFileListItemRef item = (LSSharedFileListItemRef)itemObject;
|
LSSharedFileListItemRef item = (__bridge LSSharedFileListItemRef)itemObject;
|
||||||
|
|
||||||
UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
|
UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
|
||||||
CFURLRef URL = NULL;
|
CFURLRef URL = NULL;
|
||||||
@ -667,7 +783,7 @@ NSUserDefaults *defaults;
|
|||||||
CFRelease(URL);
|
CFRelease(URL);
|
||||||
|
|
||||||
if (foundIt) {
|
if (foundIt) {
|
||||||
existingItem = item;
|
//existingItem = item;
|
||||||
found = YES;
|
found = YES;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -684,14 +800,14 @@ NSUserDefaults *defaults;
|
|||||||
NSString *path = [[NSBundle mainBundle] bundlePath];
|
NSString *path = [[NSBundle mainBundle] bundlePath];
|
||||||
|
|
||||||
OSStatus status;
|
OSStatus status;
|
||||||
CFURLRef URLToToggle = (CFURLRef)[NSURL fileURLWithPath:path];
|
CFURLRef URLToToggle = (__bridge CFURLRef)[NSURL fileURLWithPath:path];
|
||||||
LSSharedFileListItemRef existingItem = NULL;
|
LSSharedFileListItemRef existingItem = NULL;
|
||||||
|
|
||||||
UInt32 seed = 0U;
|
UInt32 seed = 0U;
|
||||||
NSArray *currentLoginItems = [NSMakeCollectable(LSSharedFileListCopySnapshot(loginItems, &seed)) autorelease];
|
NSArray *currentLoginItems = CFBridgingRelease(LSSharedFileListCopySnapshot(loginItems, &seed));
|
||||||
|
|
||||||
for (id itemObject in currentLoginItems) {
|
for (id itemObject in currentLoginItems) {
|
||||||
LSSharedFileListItemRef item = (LSSharedFileListItemRef)itemObject;
|
LSSharedFileListItemRef item = (__bridge LSSharedFileListItemRef)itemObject;
|
||||||
|
|
||||||
UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
|
UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
|
||||||
CFURLRef URL = NULL;
|
CFURLRef URL = NULL;
|
||||||
@ -723,12 +839,24 @@ NSUserDefaults *defaults;
|
|||||||
icon = NULL;
|
icon = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst, (CFStringRef)displayName, icon, URLToToggle, /*propertiesToSet*/ NULL, /*propertiesToClear*/ NULL);
|
LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst, (__bridge CFStringRef)displayName, icon, URLToToggle, /*propertiesToSet*/ NULL, /*propertiesToClear*/ NULL);
|
||||||
} else if (!enabled && (existingItem != NULL))
|
} else if (!enabled && (existingItem != NULL))
|
||||||
LSSharedFileListItemRemove(loginItems, existingItem);
|
LSSharedFileListItemRemove(loginItems, existingItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+(void) checkRightStatus:(OSStatus) status
|
||||||
|
{
|
||||||
|
if (status != errAuthorizationSuccess) {
|
||||||
|
NSAlert *alert = [NSAlert alertWithMessageText:@"Authorization failed" defaultButton:@"Quit" alternateButton:nil otherButton:nil informativeTextWithFormat:[NSString stringWithFormat:@"Authorization failed with code %d",status]];
|
||||||
|
[alert setAlertStyle:2];
|
||||||
|
NSInteger result = [alert runModal];
|
||||||
|
|
||||||
|
if (result == NSAlertDefaultReturn) {
|
||||||
|
[[NSApplication sharedApplication] terminate:self];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark **SMC-Binary Owner/Right Check**
|
#pragma mark **SMC-Binary Owner/Right Check**
|
||||||
//TODO: It looks like this function is called inefficiently.
|
//TODO: It looks like this function is called inefficiently.
|
||||||
@ -748,26 +876,39 @@ NSUserDefaults *defaults;
|
|||||||
AuthorizationRights gencright = { 1, &gencitem };
|
AuthorizationRights gencright = { 1, &gencitem };
|
||||||
int flags = kAuthorizationFlagExtendRights | kAuthorizationFlagInteractionAllowed;
|
int flags = kAuthorizationFlagExtendRights | kAuthorizationFlagInteractionAllowed;
|
||||||
OSStatus status = AuthorizationCreate(&gencright, kAuthorizationEmptyEnvironment, flags, &authorizationRef);
|
OSStatus status = AuthorizationCreate(&gencright, kAuthorizationEmptyEnvironment, flags, &authorizationRef);
|
||||||
NSString *tool=@"/usr/sbin/chown";
|
|
||||||
NSArray *argsArray = [NSArray arrayWithObjects: @"root:admin",smcpath,nil];
|
[self checkRightStatus:status];
|
||||||
|
|
||||||
|
NSString *tool=@"/usr/sbin/chown";
|
||||||
|
NSArray *argsArray = @[@"root:admin",smcpath];
|
||||||
int i;
|
int i;
|
||||||
char *args[255];
|
char *args[255];
|
||||||
for(i = 0;i < [argsArray count];i++){
|
for(i = 0;i < [argsArray count];i++){
|
||||||
args[i] = (char *)[[argsArray objectAtIndex:i]cString];
|
args[i] = (char *)[argsArray[i]cString];
|
||||||
}
|
}
|
||||||
args[i] = NULL;
|
args[i] = NULL;
|
||||||
status=AuthorizationExecuteWithPrivileges(authorizationRef,[tool UTF8String],0,args,&commPipe);
|
status=AuthorizationExecuteWithPrivileges(authorizationRef,[tool UTF8String],0,args,&commPipe);
|
||||||
//second call for suid-bit
|
|
||||||
|
[self checkRightStatus:status];
|
||||||
|
|
||||||
|
//second call for suid-bit
|
||||||
tool=@"/bin/chmod";
|
tool=@"/bin/chmod";
|
||||||
argsArray = [NSArray arrayWithObjects: @"6555",smcpath,nil];
|
argsArray = @[@"6555",smcpath];
|
||||||
for(i = 0;i < [argsArray count];i++){
|
for(i = 0;i < [argsArray count];i++){
|
||||||
args[i] = (char *)[[argsArray objectAtIndex:i]cString];
|
args[i] = (char *)[argsArray[i]cString];
|
||||||
}
|
}
|
||||||
args[i] = NULL;
|
args[i] = NULL;
|
||||||
status=AuthorizationExecuteWithPrivileges(authorizationRef,[tool UTF8String],0,args,&commPipe);
|
status=AuthorizationExecuteWithPrivileges(authorizationRef,[tool UTF8String],0,args,&commPipe);
|
||||||
|
|
||||||
|
[self checkRightStatus:status];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)dealloc
|
||||||
|
{
|
||||||
|
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@ -783,7 +924,7 @@ NSUserDefaults *defaults;
|
|||||||
- (NSNumber*) celsius_fahrenheit{
|
- (NSNumber*) celsius_fahrenheit{
|
||||||
float celsius=[self floatValue];
|
float celsius=[self floatValue];
|
||||||
float fahrenheit=(celsius*9)/5+32;
|
float fahrenheit=(celsius*9)/5+32;
|
||||||
return [NSNumber numberWithFloat:fahrenheit];
|
return @(fahrenheit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import <smcWrapper.h>
|
#import "smcWrapper.h"
|
||||||
|
|
||||||
|
|
||||||
@interface MachineDefaults : NSObject {
|
@interface MachineDefaults : NSObject {
|
||||||
@ -30,8 +30,9 @@
|
|||||||
int machine_num;
|
int machine_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSString *)computerModel;
|
+ (NSString *)computerModel;
|
||||||
- (id)init:(NSString*)p_machine;
|
- (instancetype)init:(NSString*)p_machine ;
|
||||||
-(NSDictionary*)get_machine_defaults;
|
|
||||||
- (void)dealloc;
|
@property (NS_NONATOMIC_IOSONLY, getter=get_machine_defaults, readonly, copy) NSDictionary *_machine_defaults;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -23,57 +23,67 @@
|
|||||||
#import "MachineDefaults.h"
|
#import "MachineDefaults.h"
|
||||||
#import "NSFileManager+DirectoryLocations.h"
|
#import "NSFileManager+DirectoryLocations.h"
|
||||||
|
|
||||||
|
@interface MachineDefaults ()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation MachineDefaults
|
@implementation MachineDefaults
|
||||||
|
|
||||||
|
|
||||||
- (id)init:(NSString*)p_machine{
|
- (instancetype)init:(NSString*)p_machine{
|
||||||
machine=[MachineDefaults computerModel];
|
if (self = [super init]){
|
||||||
supported_machines=[[NSArray alloc] initWithContentsOfFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"]];
|
machine=[MachineDefaults computerModel];
|
||||||
|
[self refreshPlist];
|
||||||
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)refreshPlist
|
||||||
-(Boolean)is_supported{
|
{
|
||||||
int i;
|
supported_machines=[[NSArray alloc] initWithContentsOfFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"]];
|
||||||
supported=NO;
|
supported=NO;
|
||||||
for(i=0;i<[supported_machines count];i++) {
|
int i;
|
||||||
if ([machine isEqualToString:[[supported_machines objectAtIndex:i] objectForKey:@"Machine"]]) {
|
for(i=0;i<[supported_machines count];i++) {
|
||||||
supported=YES;
|
if ([machine isEqualToString:supported_machines[i][@"Machine"]]) {
|
||||||
machine_num=i;
|
supported=YES;
|
||||||
}
|
machine_num=i;
|
||||||
}
|
}
|
||||||
return supported;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(NSDictionary*) readFromPlist{
|
||||||
-(NSDictionary*) readfrom_plist{
|
|
||||||
if (!supported) {return nil;}
|
if (!supported) {return nil;}
|
||||||
return [supported_machines objectAtIndex:machine_num];
|
return supported_machines[machine_num];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-(NSDictionary*) readfrom_smc{
|
-(void) readFromSMC{
|
||||||
if (supported) {return nil;}
|
NSUInteger num_fans=[smcWrapper get_fan_num];
|
||||||
int num_fans,i;
|
|
||||||
[smcWrapper init];
|
|
||||||
num_fans=[smcWrapper get_fan_num];
|
|
||||||
NSString *desc;
|
NSString *desc;
|
||||||
NSNumber *min,*max;
|
NSNumber *min,*max;
|
||||||
NSData *xmldata;
|
NSData *xmldata;
|
||||||
NSString *error;
|
NSString *error;
|
||||||
NSMutableArray *fans=[[NSMutableArray alloc] init];
|
NSMutableArray *fans=[[NSMutableArray alloc] init];
|
||||||
for (i = 0; i < num_fans; i++) {
|
for (NSUInteger i = 0; i < num_fans; i++) {
|
||||||
min=[NSNumber numberWithInt:[smcWrapper get_min_speed:i]];
|
min=@([smcWrapper get_min_speed:i]);
|
||||||
max=[NSNumber numberWithInt:[smcWrapper get_max_speed:i]];
|
max=@([smcWrapper get_max_speed:i]);
|
||||||
desc=[smcWrapper get_fan_descr:i];
|
desc=[smcWrapper get_fan_descr:i];
|
||||||
[fans addObject:[NSDictionary dictionaryWithObjectsAndKeys:desc,@"Description",min,@"Minspeed",max,@"Maxspeed",min,@"selspeed",nil]];
|
[fans addObject:[[NSMutableDictionary alloc] initWithDictionary:@{@"Description": desc,@"Minspeed": min,@"Maxspeed": max,@"selspeed": min}]];
|
||||||
}
|
}
|
||||||
//save to plist for future
|
//save to plist for future
|
||||||
NSMutableArray *supported_m=[[NSMutableArray alloc] initWithContentsOfFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"]];
|
NSMutableArray *supported_m=[[NSMutableArray alloc] initWithContentsOfFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"]];
|
||||||
NSDictionary *new_machine= [NSDictionary dictionaryWithObjectsAndKeys:fans,@"Fans",[NSNumber numberWithInt:num_fans],@"NumFans",machine,@"Machine",@"Autogenerated",@"Comment",nil];
|
NSMutableDictionary *new_machine;
|
||||||
[fans release];
|
if (fans == nil)
|
||||||
|
{
|
||||||
|
new_machine= [[NSMutableDictionary alloc] initWithDictionary:@{@"Fans": [NSNull null],@"NumFans": @(0),@"Machine": machine,@"Comment": @"Autogenerated",@"Minspeed": min,@"Maxspeed": max}];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
new_machine= [[NSMutableDictionary alloc] initWithDictionary:@{@"Fans": fans,@"NumFans": @(num_fans),@"Machine": machine,@"Comment": @"Autogenerated",@"Minspeed": min,@"Maxspeed": max}];
|
||||||
|
}
|
||||||
[supported_m addObject:new_machine];
|
[supported_m addObject:new_machine];
|
||||||
|
|
||||||
//save to plist
|
//save to plist
|
||||||
@ -81,37 +91,36 @@
|
|||||||
format:NSPropertyListXMLFormat_v1_0
|
format:NSPropertyListXMLFormat_v1_0
|
||||||
errorDescription:&error];
|
errorDescription:&error];
|
||||||
[xmldata writeToFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"] atomically:YES];
|
[xmldata writeToFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"] atomically:YES];
|
||||||
[supported_m release];
|
|
||||||
//return new machine-live-data
|
|
||||||
return [new_machine retain];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-(NSDictionary*)get_machine_defaults{
|
-(NSDictionary*)get_machine_defaults{
|
||||||
NSDictionary *m_defaults=nil;
|
|
||||||
if ([self is_supported]) {
|
if (!supported) {
|
||||||
m_defaults=[self readfrom_plist];
|
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Alert!",nil)
|
||||||
int i;
|
|
||||||
//localize fan-descriptions
|
|
||||||
for (i=0;i<[[m_defaults objectForKey:@"Fans"] count];i++) {
|
|
||||||
NSString *newvalue=NSLocalizedString([[[m_defaults objectForKey:@"Fans"] objectAtIndex:i] objectForKey:@"Description"],nil);
|
|
||||||
[[[m_defaults objectForKey:@"Fans"] objectAtIndex:i] setValue:newvalue forKey:@"Description"];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Alert!",nil)
|
|
||||||
defaultButton:NSLocalizedString(@"Continue",nil) alternateButton:NSLocalizedString(@"Quit",nil) otherButton:nil
|
defaultButton:NSLocalizedString(@"Continue",nil) alternateButton:NSLocalizedString(@"Quit",nil) otherButton:nil
|
||||||
informativeTextWithFormat:NSLocalizedString(@"smcFanControl has not been tested on this machine yet, but it should run if you follow the instructions. \n\nIf you choose to continue, please make you have no other FanControl-software running. Otherwise please quit, deinstall the other software, restart your machine and rerun smcFanControl!",nil)];
|
informativeTextWithFormat:NSLocalizedString(@"smcFanControl has not been tested on this machine yet, but it should run if you follow the instructions. \n\nIf you choose to continue, please make you have no other FanControl-software running. Otherwise please quit, deinstall the other software, restart your machine and rerun smcFanControl!",nil)];
|
||||||
int code=[alert runModal];
|
NSModalResponse code=[alert runModal];
|
||||||
if (code==NSAlertDefaultReturn) {
|
if (code == NSAlertDefaultReturn) {
|
||||||
m_defaults=[self readfrom_smc];
|
[self readFromSMC];
|
||||||
|
[self refreshPlist];
|
||||||
} else {
|
} else {
|
||||||
[[NSApplication sharedApplication] terminate:nil];
|
[[NSApplication sharedApplication] terminate:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return m_defaults;
|
|
||||||
|
NSDictionary *defaultsDict=[self readFromPlist];
|
||||||
|
NSUInteger i;
|
||||||
|
//localize fan-descriptions
|
||||||
|
for (i=0;i<[defaultsDict[@"Fans"] count];i++) {
|
||||||
|
NSString *newvalue=NSLocalizedString(defaultsDict[@"Fans"][i][@"Description"],nil);
|
||||||
|
[defaultsDict[@"Fans"][i] setValue:newvalue forKey:@"Description"];
|
||||||
|
}
|
||||||
|
|
||||||
|
return defaultsDict;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSString *)computerModel
|
+ (NSString *)computerModel
|
||||||
@ -122,18 +131,13 @@
|
|||||||
if ((pexpdev = IOServiceGetMatchingService (kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"))))
|
if ((pexpdev = IOServiceGetMatchingService (kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"))))
|
||||||
{
|
{
|
||||||
NSData *data;
|
NSData *data;
|
||||||
if ((data = (id)IORegistryEntryCreateCFProperty(pexpdev, CFSTR("model"), kCFAllocatorDefault, 0))) {
|
if ((data = (id)CFBridgingRelease(IORegistryEntryCreateCFProperty(pexpdev, CFSTR("model"), kCFAllocatorDefault, 0)))) {
|
||||||
computerModel = [[NSString allocWithZone:NULL] initWithCString:[data bytes] encoding:NSASCIIStringEncoding];
|
computerModel = [[NSString allocWithZone:NULL] initWithCString:[data bytes] encoding:NSASCIIStringEncoding];
|
||||||
[data release];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return computerModel;
|
return computerModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc{
|
|
||||||
[super dealloc];
|
|
||||||
//[supported_machines release];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -31,6 +31,6 @@
|
|||||||
inDomain:(NSSearchPathDomainMask)domainMask
|
inDomain:(NSSearchPathDomainMask)domainMask
|
||||||
appendPathComponent:(NSString *)appendComponent
|
appendPathComponent:(NSString *)appendComponent
|
||||||
error:(NSError **)errorOut;
|
error:(NSError **)errorOut;
|
||||||
- (NSString *)applicationSupportDirectory;
|
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *applicationSupportDirectory;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -31,120 +31,93 @@ NSString * const DirectoryLocationDomain = @"DirectoryLocationDomain";
|
|||||||
|
|
||||||
@implementation NSFileManager (DirectoryLocations)
|
@implementation NSFileManager (DirectoryLocations)
|
||||||
|
|
||||||
//
|
|
||||||
// findOrCreateDirectory:inDomain:appendPathComponent:error:
|
/*! Method to tie together the steps of:
|
||||||
//
|
1) Locate a standard directory by search path and domain mask
|
||||||
// Method to tie together the steps of:
|
2) Select the first path in the results
|
||||||
// 1) Locate a standard directory by search path and domain mask
|
3) Append a subdirectory to that path
|
||||||
// 2) Select the first path in the results
|
4) Create the directory and intermediate directories if needed
|
||||||
// 3) Append a subdirectory to that path
|
5) Handle errors by emitting a proper NSError object
|
||||||
// 4) Create the directory and intermediate directories if needed
|
|
||||||
// 5) Handle errors by emitting a proper NSError object
|
* \pararm searchPathDirectory - the search path passed to NSSearchPathForDirectoriesInDomains
|
||||||
//
|
* \pararm domainMask - the domain mask passed to NSSearchPathForDirectoriesInDomains
|
||||||
// Parameters:
|
* \pararm appendComponent - the subdirectory appended
|
||||||
// searchPathDirectory - the search path passed to NSSearchPathForDirectoriesInDomains
|
* \pararm errorOut - any error from file operations
|
||||||
// domainMask - the domain mask passed to NSSearchPathForDirectoriesInDomains
|
|
||||||
// appendComponent - the subdirectory appended
|
* \returns returns the path to the directory (if path found and exists), nil otherwise
|
||||||
// errorOut - any error from file operations
|
*/
|
||||||
//
|
|
||||||
// returns the path to the directory (if path found and exists), nil otherwise
|
|
||||||
//
|
|
||||||
- (NSString *)findOrCreateDirectory:(NSSearchPathDirectory)searchPathDirectory
|
- (NSString *)findOrCreateDirectory:(NSSearchPathDirectory)searchPathDirectory
|
||||||
inDomain:(NSSearchPathDomainMask)domainMask
|
inDomain:(NSSearchPathDomainMask)domainMask
|
||||||
appendPathComponent:(NSString *)appendComponent
|
appendPathComponent:(NSString *)appendComponent
|
||||||
error:(NSError **)errorOut
|
error:(NSError **)errorOut
|
||||||
{
|
{
|
||||||
|
// Declare an NSError first, so we don't need to check errorOut again and again
|
||||||
|
NSError *error;
|
||||||
|
|
||||||
|
if (errorOut) {
|
||||||
|
error = *errorOut;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error = nil;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Search for the path
|
// Search for the path
|
||||||
//
|
//
|
||||||
NSArray* paths = NSSearchPathForDirectoriesInDomains(
|
NSArray* paths = NSSearchPathForDirectoriesInDomains(searchPathDirectory,domainMask,YES);
|
||||||
searchPathDirectory,
|
|
||||||
domainMask,
|
|
||||||
YES);
|
|
||||||
if ([paths count] == 0)
|
if ([paths count] == 0)
|
||||||
{
|
{
|
||||||
if (errorOut)
|
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"No path found for directory in domain.",@"Errors",nil),
|
||||||
{
|
@"NSSearchPathDirectory":@(searchPathDirectory),
|
||||||
NSDictionary *userInfo =
|
@"NSSearchPathDomainMask":@(domainMask)};
|
||||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
|
||||||
NSLocalizedStringFromTable(
|
error = [NSError errorWithDomain:DirectoryLocationDomain
|
||||||
@"No path found for directory in domain.",
|
code:DirectoryLocationErrorNoPathFound
|
||||||
@"Errors",
|
userInfo:userInfo];
|
||||||
nil),
|
|
||||||
NSLocalizedDescriptionKey,
|
|
||||||
[NSNumber numberWithInteger:searchPathDirectory],
|
|
||||||
@"NSSearchPathDirectory",
|
|
||||||
[NSNumber numberWithInteger:domainMask],
|
|
||||||
@"NSSearchPathDomainMask",
|
|
||||||
nil];
|
|
||||||
*errorOut =
|
|
||||||
[NSError
|
|
||||||
errorWithDomain:DirectoryLocationDomain
|
|
||||||
code:DirectoryLocationErrorNoPathFound
|
|
||||||
userInfo:userInfo];
|
|
||||||
}
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Normally only need the first path returned
|
// Normally only need the first path returned
|
||||||
//
|
//
|
||||||
NSString *resolvedPath = [paths objectAtIndex:0];
|
NSString *resolvedPath = paths[0];
|
||||||
|
|
||||||
//
|
//
|
||||||
// Append the extra path component
|
// Append the extra path component
|
||||||
//
|
//
|
||||||
if (appendComponent)
|
if (appendComponent)
|
||||||
{
|
{
|
||||||
resolvedPath = [resolvedPath
|
resolvedPath = [resolvedPath stringByAppendingPathComponent:appendComponent];
|
||||||
stringByAppendingPathComponent:appendComponent];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create the path if it doesn't exist
|
// Create the path if it doesn't exist
|
||||||
//
|
//
|
||||||
NSError *error = nil;
|
|
||||||
BOOL success = [self
|
|
||||||
createDirectoryAtPath:resolvedPath
|
|
||||||
withIntermediateDirectories:YES
|
|
||||||
attributes:nil
|
|
||||||
error:&error];
|
|
||||||
if (!success)
|
|
||||||
{
|
|
||||||
if (errorOut)
|
|
||||||
{
|
|
||||||
*errorOut = error;
|
|
||||||
}
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// If we've made it this far, we have a success
|
if ([self createDirectoryAtPath:resolvedPath withIntermediateDirectories:YES
|
||||||
//
|
attributes:nil error:&error])
|
||||||
if (errorOut)
|
return resolvedPath;
|
||||||
{
|
else
|
||||||
*errorOut = nil;
|
return nil;
|
||||||
}
|
|
||||||
return resolvedPath;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// applicationSupportDirectory
|
/*! applicationSupportDirectory
|
||||||
//
|
|
||||||
// Returns the path to the applicationSupportDirectory (creating it if it doesn't
|
* \returns The path to the applicationSupportDirectory (creating it if it doesn't exist).
|
||||||
// exist).
|
*/
|
||||||
//
|
|
||||||
- (NSString *)applicationSupportDirectory
|
- (NSString *)applicationSupportDirectory
|
||||||
{
|
{
|
||||||
NSString *executableName =
|
NSString *executableName = [[NSBundle mainBundle] infoDictionary][@"CFBundleExecutable"];
|
||||||
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleExecutable"];
|
|
||||||
NSError *error;
|
NSError *error = nil;
|
||||||
NSString *result =
|
|
||||||
[self
|
NSString *result = [self findOrCreateDirectory:NSApplicationSupportDirectory
|
||||||
findOrCreateDirectory:NSApplicationSupportDirectory
|
inDomain:NSUserDomainMask
|
||||||
inDomain:NSUserDomainMask
|
appendPathComponent:executableName
|
||||||
appendPathComponent:executableName
|
error:&error];
|
||||||
error:&error];
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
NSLog(@"Unable to find or create application support directory:\n%@", error);
|
NSLog(@"Unable to find or create application support directory:\n%@", error);
|
||||||
|
|||||||
@ -37,10 +37,9 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id)init;
|
- (instancetype)init NS_DESIGNATED_INITIALIZER;
|
||||||
|
|
||||||
- (id)delegate;
|
@property (NS_NONATOMIC_IOSONLY, unsafe_unretained) id delegate;
|
||||||
- (void)setDelegate:(id)new_delegate;
|
|
||||||
|
|
||||||
- (void)registerForSleepWakeNotification;
|
- (void)registerForSleepWakeNotification;
|
||||||
- (void)deregisterForSleepWakeNotification;
|
- (void)deregisterForSleepWakeNotification;
|
||||||
|
|||||||
@ -31,7 +31,7 @@ static int lastsource=0;
|
|||||||
|
|
||||||
|
|
||||||
void SleepWatcher( void * refCon, io_service_t service, natural_t messageType, void * messageArgument ){
|
void SleepWatcher( void * refCon, io_service_t service, natural_t messageType, void * messageArgument ){
|
||||||
[(Power *)refCon powerMessageReceived: messageType withArgument: messageArgument];
|
[(__bridge Power *)refCon powerMessageReceived: messageType withArgument: messageArgument];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -48,14 +48,14 @@ static void powerSourceChanged(void * refCon)
|
|||||||
powerSource = CFArrayGetValueAtIndex(powerSourcesList, i);
|
powerSource = CFArrayGetValueAtIndex(powerSourcesList, i);
|
||||||
description = IOPSGetPowerSourceDescription(powerBlob, powerSource);
|
description = IOPSGetPowerSourceDescription(powerBlob, powerSource);
|
||||||
//work with NSArray from here
|
//work with NSArray from here
|
||||||
NSDictionary *n_description = (NSDictionary *)description;
|
NSDictionary *n_description = (__bridge NSDictionary *)description;
|
||||||
[(Power *)refCon powerSourceMesssageReceived:n_description];
|
[(__bridge Power *)refCon powerSourceMesssageReceived:n_description];
|
||||||
}
|
}
|
||||||
CFRelease(powerBlob);
|
CFRelease(powerBlob);
|
||||||
CFRelease(powerSourcesList);
|
CFRelease(powerSourcesList);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id)init{
|
- (instancetype)init{
|
||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -65,14 +65,14 @@ static void powerSourceChanged(void * refCon)
|
|||||||
|
|
||||||
- (void)registerForSleepWakeNotification
|
- (void)registerForSleepWakeNotification
|
||||||
{
|
{
|
||||||
root_port = IORegisterForSystemPower(self, ¬ificationPort, SleepWatcher, ¬ifier);
|
root_port = IORegisterForSystemPower((__bridge void *)(self), ¬ificationPort, SleepWatcher, ¬ifier);
|
||||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(notificationPort), kCFRunLoopDefaultMode);
|
CFRunLoopAddSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(notificationPort), kCFRunLoopDefaultMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)registerForPowerChange
|
- (void)registerForPowerChange
|
||||||
{
|
{
|
||||||
powerNotifierRunLoopSource = IOPSNotificationCreateRunLoopSource(powerSourceChanged,self);
|
powerNotifierRunLoopSource = IOPSNotificationCreateRunLoopSource(powerSourceChanged,(__bridge void *)(self));
|
||||||
if (powerNotifierRunLoopSource) {
|
if (powerNotifierRunLoopSource) {
|
||||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), powerNotifierRunLoopSource, kCFRunLoopDefaultMode);
|
CFRunLoopAddSource(CFRunLoopGetCurrent(), powerNotifierRunLoopSource, kCFRunLoopDefaultMode);
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ static void powerSourceChanged(void * refCon)
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)powerSourceMesssageReceived:(NSDictionary *)n_description{
|
- (void)powerSourceMesssageReceived:(NSDictionary *)n_description{
|
||||||
if (([[n_description objectForKey:@"Power Source State"] isEqualToString:@"AC Power"] && [[n_description objectForKey:@"Is Charging"] intValue]==1) && lastsource!=1) {
|
if (([n_description[@"Power Source State"] isEqualToString:@"AC Power"] && [n_description[@"Is Charging"] intValue]==1) && lastsource!=1) {
|
||||||
lastsource=1;
|
lastsource=1;
|
||||||
if ([_delegate respondsToSelector:@selector(powerChangeToACLoading:)])
|
if ([_delegate respondsToSelector:@selector(powerChangeToACLoading:)])
|
||||||
[_delegate powerChangeToACLoading:self];
|
[_delegate powerChangeToACLoading:self];
|
||||||
@ -129,7 +129,7 @@ static void powerSourceChanged(void * refCon)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (([[n_description objectForKey:@"Power Source State"] isEqualToString:@"AC Power"] && [[n_description objectForKey:@"Is Charging"] intValue]==0) && lastsource!=2) {
|
if (([n_description[@"Power Source State"] isEqualToString:@"AC Power"] && [n_description[@"Is Charging"] intValue]==0) && lastsource!=2) {
|
||||||
lastsource=2;
|
lastsource=2;
|
||||||
if ([_delegate respondsToSelector:@selector(powerChangeToAC:)])
|
if ([_delegate respondsToSelector:@selector(powerChangeToAC:)])
|
||||||
[_delegate powerChangeToAC:self];
|
[_delegate powerChangeToAC:self];
|
||||||
@ -139,7 +139,7 @@ static void powerSourceChanged(void * refCon)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (([[n_description objectForKey:@"Power Source State"] isEqualToString:@"Battery Power"]) && lastsource!=3) {
|
if (([n_description[@"Power Source State"] isEqualToString:@"Battery Power"]) && lastsource!=3) {
|
||||||
lastsource=3;
|
lastsource=3;
|
||||||
if ([_delegate respondsToSelector:@selector(powerChangeToBattery:)])
|
if ([_delegate respondsToSelector:@selector(powerChangeToBattery:)])
|
||||||
[_delegate powerChangeToBattery:self];
|
[_delegate powerChangeToBattery:self];
|
||||||
@ -171,7 +171,6 @@ static void powerSourceChanged(void * refCon)
|
|||||||
if (_delegate)
|
if (_delegate)
|
||||||
[nc removeObserver:_delegate name:nil object:self];
|
[nc removeObserver:_delegate name:nil object:self];
|
||||||
|
|
||||||
[super dealloc];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -68,18 +68,18 @@ static NSString *const kSystemVersionPlistPath = @"/System/Library/CoreServices/
|
|||||||
#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_3
|
#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_3
|
||||||
|
|
||||||
#else // GTM_MACOS_SDK
|
#else // GTM_MACOS_SDK
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
@autoreleasepool {
|
||||||
NSDictionary *systemVersionPlist
|
NSDictionary *systemVersionPlist
|
||||||
= [NSDictionary dictionaryWithContentsOfFile:kSystemVersionPlistPath];
|
= [NSDictionary dictionaryWithContentsOfFile:kSystemVersionPlistPath];
|
||||||
NSString *version = [systemVersionPlist objectForKey:@"ProductVersion"];
|
NSString *version = systemVersionPlist[@"ProductVersion"];
|
||||||
NSArray *versionInfo = [version componentsSeparatedByString:@"."];
|
NSArray *versionInfo = [version componentsSeparatedByString:@"."];
|
||||||
int length = [versionInfo count];
|
int length = [versionInfo count];
|
||||||
sGTMSystemVersionMajor = [[versionInfo objectAtIndex:0] intValue];
|
sGTMSystemVersionMajor = [versionInfo[0] intValue];
|
||||||
sGTMSystemVersionMinor = [[versionInfo objectAtIndex:1] intValue];
|
sGTMSystemVersionMinor = [versionInfo[1] intValue];
|
||||||
if (length == 3) {
|
if (length == 3) {
|
||||||
sGTMSystemVersionBugFix = [[versionInfo objectAtIndex:2] intValue];
|
sGTMSystemVersionBugFix = [versionInfo[2] intValue];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
[pool release];
|
|
||||||
#endif // GTM_MACOS_SDK
|
#endif // GTM_MACOS_SDK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ static NSString *const kSystemVersionPlistPath = @"/System/Library/CoreServices/
|
|||||||
if (!sBuild) {
|
if (!sBuild) {
|
||||||
NSDictionary *systemVersionPlist
|
NSDictionary *systemVersionPlist
|
||||||
= [NSDictionary dictionaryWithContentsOfFile:kSystemVersionPlistPath];
|
= [NSDictionary dictionaryWithContentsOfFile:kSystemVersionPlistPath];
|
||||||
sBuild = [[systemVersionPlist objectForKey:@"ProductBuildVersion"] retain];
|
sBuild = systemVersionPlist[@"ProductBuildVersion"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sBuild;
|
return sBuild;
|
||||||
|
|||||||
@ -21,10 +21,10 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import <smc.h>
|
#import "smc.h"
|
||||||
#import <MachineDefaults.h>
|
#import "MachineDefaults.h"
|
||||||
|
#import "Constants.h"
|
||||||
|
|
||||||
@interface smcWrapper : NSObject {
|
@interface smcWrapper : NSObject {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,45 +23,80 @@
|
|||||||
|
|
||||||
#import "smcWrapper.h"
|
#import "smcWrapper.h"
|
||||||
#import <CommonCrypto/CommonDigest.h>
|
#import <CommonCrypto/CommonDigest.h>
|
||||||
|
NSString * const smc_checksum=@"4fc00a0979970ee8b55f078a0c793c4d";
|
||||||
|
|
||||||
//TODO: This is the smcFanControl 2.5ß checksum, it needs to be updated for the next release.
|
NSArray *allSensors;
|
||||||
NSString * const smc_checksum=@"03548c5634bd01315b19c46bf329cceb";
|
|
||||||
static NSArray *allSensors = nil;
|
|
||||||
|
|
||||||
|
|
||||||
@implementation smcWrapper
|
@implementation smcWrapper
|
||||||
io_connect_t conn;
|
io_connect_t conn;
|
||||||
|
|
||||||
+(void)init{
|
+(void)init{
|
||||||
SMCOpen(&conn);
|
SMCOpen(&conn);
|
||||||
allSensors = [[NSArray alloc] initWithObjects:@"TC0D",@"TC0H",@"TC0F",@"TCAH",@"TCBH",@"TC0P",nil];
|
|
||||||
}
|
}
|
||||||
+(void)cleanUp{
|
+(void)cleanUp{
|
||||||
SMCClose(conn);
|
SMCClose(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
+(float) get_maintemp{
|
+(int)convertToNumber:(SMCVal_t) val
|
||||||
float c_temp;
|
{
|
||||||
|
float fval = -1.0f;
|
||||||
|
|
||||||
SMCVal_t val;
|
if (strcmp(val.dataType, DATATYPE_FLT) == 0 && val.dataSize == 4) {
|
||||||
NSString *sensor = [[NSUserDefaults standardUserDefaults] objectForKey:@"TSensor"];
|
memcpy(&fval,val.bytes,sizeof(float));
|
||||||
SMCReadKey2((char*)[sensor UTF8String], &val,conn);
|
}
|
||||||
c_temp= ((val.bytes[0] * 256 + val.bytes[1]) >> 2)/64;
|
else if (strcmp(val.dataType, DATATYPE_FPE2) == 0 && val.dataSize == 2) {
|
||||||
|
fval = _strtof(val.bytes, val.dataSize, 2);
|
||||||
if (c_temp<=0) {
|
}
|
||||||
for (NSString *sensor in allSensors) {
|
else if (strcmp(val.dataType, DATATYPE_UINT16) == 0 && val.dataSize == 2) {
|
||||||
SMCReadKey2((char*)[sensor UTF8String], &val,conn);
|
fval = (float)_strtoul((char *)val.bytes, val.dataSize, 10);
|
||||||
c_temp= ((val.bytes[0] * 256 + val.bytes[1]) >> 2)/64;
|
}
|
||||||
if (c_temp>0) {
|
else if (strcmp(val.dataType, DATATYPE_UINT8) == 0 && val.dataSize == 1) {
|
||||||
[[NSUserDefaults standardUserDefaults] setObject:sensor forKey:@"TSensor"];
|
fval = (float)val.bytes[0];
|
||||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
}
|
||||||
break;
|
else if (strcmp(val.dataType, DATATYPE_SP78) == 0 && val.dataSize == 2) {
|
||||||
}
|
fval = ((val.bytes[0] * 256 + val.bytes[1]) >> 2)/64;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
NSLog(@"%@", [NSString stringWithFormat:@"Unknown val:%s size-%d",val.dataType,val.dataSize]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (int)fval;
|
||||||
|
}
|
||||||
|
|
||||||
return c_temp;
|
+(float)readTempSensors
|
||||||
|
{
|
||||||
|
float retValue;
|
||||||
|
SMCVal_t val;
|
||||||
|
NSString *sensor = [[NSUserDefaults standardUserDefaults] objectForKey:PREF_TEMPERATURE_SENSOR];
|
||||||
|
SMCReadKey2((char*)[sensor UTF8String], &val,conn);
|
||||||
|
retValue = [self convertToNumber:val];
|
||||||
|
allSensors = [NSArray arrayWithObjects:@"TC0D",@"TC0P",@"TCAD",@"TC0H",@"TC0F",@"TCAH",@"TCBH",nil];
|
||||||
|
if (retValue<=0 || floor(retValue) == 129 ) { //workaround for some iMac Models
|
||||||
|
for (NSString *sensor in allSensors) {
|
||||||
|
SMCReadKey2((char*)[sensor UTF8String], &val,conn);
|
||||||
|
retValue= [self convertToNumber:val];
|
||||||
|
if (retValue>0 && floor(retValue) != 129 ) {
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:sensor forKey:PREF_TEMPERATURE_SENSOR];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
+(float) get_maintemp{
|
||||||
|
float retValue;
|
||||||
|
NSRange range_pro=[[MachineDefaults computerModel] rangeOfString:@"MacPro"];
|
||||||
|
if (range_pro.length > 0) {
|
||||||
|
retValue = [smcWrapper get_mptemp];
|
||||||
|
if (retValue<=0 || floor(retValue) == 129 ) {
|
||||||
|
retValue = [smcWrapper readTempSensors];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
retValue = [smcWrapper readTempSensors];
|
||||||
|
}
|
||||||
|
return retValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -77,8 +112,8 @@ static NSArray *allSensors = nil;
|
|||||||
SMCReadKey2(keyA, &valA,conn);
|
SMCReadKey2(keyA, &valA,conn);
|
||||||
sprintf(keyB, "TCBH");
|
sprintf(keyB, "TCBH");
|
||||||
SMCReadKey2(keyB, &valB,conn);
|
SMCReadKey2(keyB, &valB,conn);
|
||||||
float c_tempA= ((valA.bytes[0] * 256 + valA.bytes[1]) >> 2)/64.0;
|
float c_tempA= [self convertToNumber:valA];
|
||||||
float c_tempB= ((valB.bytes[0] * 256 + valB.bytes[1]) >> 2)/64.0;
|
float c_tempB= [self convertToNumber:valB];
|
||||||
int i_tempA, i_tempB;
|
int i_tempA, i_tempB;
|
||||||
if (c_tempA < c_tempB)
|
if (c_tempA < c_tempB)
|
||||||
{
|
{
|
||||||
@ -98,7 +133,7 @@ static NSArray *allSensors = nil;
|
|||||||
//kern_return_t result;
|
//kern_return_t result;
|
||||||
sprintf(key, "F%dAc", fan_number);
|
sprintf(key, "F%dAc", fan_number);
|
||||||
SMCReadKey2(key, &val,conn);
|
SMCReadKey2(key, &val,conn);
|
||||||
int running= _strtof(val.bytes, val.dataSize, 2);
|
int running= [self convertToNumber:val];
|
||||||
return running;
|
return running;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +142,7 @@ static NSArray *allSensors = nil;
|
|||||||
SMCVal_t val;
|
SMCVal_t val;
|
||||||
int totalFans;
|
int totalFans;
|
||||||
SMCReadKey2("FNum", &val,conn);
|
SMCReadKey2("FNum", &val,conn);
|
||||||
totalFans = _strtoul(val.bytes, val.dataSize, 10);
|
totalFans = [self convertToNumber:val];
|
||||||
return totalFans;
|
return totalFans;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,17 +152,24 @@ static NSArray *allSensors = nil;
|
|||||||
SMCVal_t val;
|
SMCVal_t val;
|
||||||
//kern_return_t result;
|
//kern_return_t result;
|
||||||
NSMutableString *desc;
|
NSMutableString *desc;
|
||||||
// desc=[[NSMutableString alloc] initWithFormat:@"Fan #%d: ",fan_number+1];
|
|
||||||
desc=[[[NSMutableString alloc]init] autorelease];
|
sprintf(key, "F%dID", fan_number);
|
||||||
sprintf(key, "F%dID", fan_number);
|
SMCReadKey2(key, &val,conn);
|
||||||
SMCReadKey2(key, &val,conn);
|
|
||||||
int i;
|
if(val.dataSize>0){
|
||||||
for (i = 0; i < val.dataSize; i++) {
|
desc=[[NSMutableString alloc]init];
|
||||||
if ((int)val.bytes[i]>32) {
|
int i;
|
||||||
temp=(unsigned char)val.bytes[i];
|
for (i = 0; i < val.dataSize; i++) {
|
||||||
[desc appendFormat:@"%c",temp];
|
if ((int)val.bytes[i]>32) {
|
||||||
}
|
temp=(unsigned char)val.bytes[i];
|
||||||
}
|
[desc appendFormat:@"%c",temp];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//On MacBookPro 15.1 descriptions aren't available
|
||||||
|
desc=[[NSMutableString alloc] initWithFormat:@"Fan #%d: ",fan_number+1];
|
||||||
|
}
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +180,7 @@ static NSArray *allSensors = nil;
|
|||||||
//kern_return_t result;
|
//kern_return_t result;
|
||||||
sprintf(key, "F%dMn", fan_number);
|
sprintf(key, "F%dMn", fan_number);
|
||||||
SMCReadKey2(key, &val,conn);
|
SMCReadKey2(key, &val,conn);
|
||||||
int min= _strtof(val.bytes, val.dataSize, 2);
|
int min= [self convertToNumber:val];
|
||||||
return min;
|
return min;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,18 +190,48 @@ static NSArray *allSensors = nil;
|
|||||||
//kern_return_t result;
|
//kern_return_t result;
|
||||||
sprintf(key, "F%dMx", fan_number);
|
sprintf(key, "F%dMx", fan_number);
|
||||||
SMCReadKey2(key, &val,conn);
|
SMCReadKey2(key, &val,conn);
|
||||||
int max= _strtof(val.bytes, val.dataSize, 2);
|
int max= [self convertToNumber:val];
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+ (BOOL)validateSMC:(NSString*)path
|
||||||
|
{
|
||||||
|
SecStaticCodeRef ref = NULL;
|
||||||
|
|
||||||
|
NSURL * url = [NSURL URLWithString:path];
|
||||||
|
|
||||||
|
OSStatus status;
|
||||||
|
|
||||||
|
// obtain the cert info from the executable
|
||||||
|
status = SecStaticCodeCreateWithPath((__bridge CFURLRef)url, kSecCSDefaultFlags, &ref);
|
||||||
|
|
||||||
|
if (status != noErr) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@try {
|
||||||
|
status = SecStaticCodeCheckValidity(ref, kSecCSDefaultFlags, nil);
|
||||||
|
|
||||||
|
if (status != noErr) {
|
||||||
|
NSLog(@"Codesign verification failed: Error id = %d",status);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@catch (NSException *exception) {
|
||||||
|
NSLog(@"Codesign exception %@",exception);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
+ (NSString*)createCheckSum:(NSString*)path {
|
+ (NSString*)createCheckSum:(NSString*)path {
|
||||||
NSData *d=[NSData dataWithContentsOfMappedFile:path];
|
NSData *d=[NSData dataWithContentsOfMappedFile:path];
|
||||||
unsigned char result[CC_MD5_DIGEST_LENGTH];
|
unsigned char result[CC_MD5_DIGEST_LENGTH];
|
||||||
CC_MD5((void *)[d bytes], [d length], result);
|
CC_MD5((void *)[d bytes], [d length], result);
|
||||||
NSMutableString *ret = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH*2];
|
NSMutableString *ret = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH*2];
|
||||||
int i;
|
for(int i = 0; i<CC_MD5_DIGEST_LENGTH; i++) {
|
||||||
for(i = 0; i<CC_MD5_DIGEST_LENGTH; i++) {
|
|
||||||
[ret appendFormat:@"%02x",result[i]];
|
[ret appendFormat:@"%02x",result[i]];
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -169,20 +241,18 @@ static NSArray *allSensors = nil;
|
|||||||
// The smc binary is given root permissions in FanControl.m with the setRights method.
|
// The smc binary is given root permissions in FanControl.m with the setRights method.
|
||||||
+(void)setKey_external:(NSString *)key value:(NSString *)value{
|
+(void)setKey_external:(NSString *)key value:(NSString *)value{
|
||||||
NSString *launchPath = [[NSBundle mainBundle] pathForResource:@"smc" ofType:@""];
|
NSString *launchPath = [[NSBundle mainBundle] pathForResource:@"smc" ofType:@""];
|
||||||
NSString *checksum=[smcWrapper createCheckSum:launchPath];
|
|
||||||
//first check if it's the right binary (security)
|
NSString *checksum=[smcWrapper createCheckSum:launchPath];
|
||||||
// MW: Disabled smc binary checksum. This should be re-enabled in an official release.
|
if (![checksum isEqualToString:smc_checksum]) {
|
||||||
if (![checksum isEqualToString:smc_checksum]) {
|
NSLog(@"smcFanControl: Security Error: smc-binary is not the distributed one");
|
||||||
NSLog(@"smcFanControl: Security Error: smc-binary is not the distributed one");
|
return;
|
||||||
return;
|
}
|
||||||
}
|
NSArray *argsArray = @[@"-k",key,@"-w",value];
|
||||||
NSArray *argsArray = [NSArray arrayWithObjects: @"-k",key,@"-w",value,nil];
|
|
||||||
NSTask *task;
|
NSTask *task;
|
||||||
task = [[NSTask alloc] init];
|
task = [[NSTask alloc] init];
|
||||||
[task setLaunchPath: launchPath];
|
[task setLaunchPath: launchPath];
|
||||||
[task setArguments: argsArray];
|
[task setArguments: argsArray];
|
||||||
[task launch];
|
[task launch];
|
||||||
[task release];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
12
Info.plist
12
Info.plist
@ -7,11 +7,11 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>smcFanControl</string>
|
<string>smcFanControl</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>smcFanControl 2.5ß, Hendrik Holtmann (GPL)</string>
|
<string>smcFanControl 2.6, Hendrik Holtmann (GPL)</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>smcfancontrol_v2</string>
|
<string>smcfancontrol_v2</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.eidac.smcFanControl2</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
@ -19,18 +19,20 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.5ß</string>
|
<string>2.6.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2.5ß</string>
|
<string>2.6.1</string>
|
||||||
<key>LSUIElement</key>
|
<key>LSUIElement</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Hendrik Holtmann(GPL)</string>
|
<string>Hendrik Holtmann (GPL)</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
|
<key>SUFeedURL</key>
|
||||||
|
<string>https://www.eidac.de/smcfancontrol/smcfancontrol.xml</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
24
Readme.md
24
Readme.md
@ -1,13 +1,27 @@
|
|||||||
smcFanControl
|
# smcFanControl
|
||||||
=============
|
|
||||||
|
|
||||||
smcFanControl lets the user set a minimum speed for built-in fans. It allows you to increase your minimum fan speed to make your Intel Mac run cooler. In order to not damage your machine, smcFanControl does not let you set a minimum speed to a value below Apple's defaults.
|
smcFanControl lets the user set a minimum speed for built-in fans. It allows you to increase your minimum fan speed to make your Intel Mac run cooler. In order to not damage your machine, smcFanControl does not let you set a minimum speed to a value below Apple's defaults.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Requirements: Intel Mac / OS X 10.5 or higher
|
|
||||||
|
|
||||||
Compiled version: http://www.eidac.de/smcfancontrol/smcfancontrol_2_4.zip
|
## Installing it using Homebrew & Cask
|
||||||
|
|
||||||
|
Make sure you have both [Homebrew](http://brew.sh/) and [Cask](https://caskroom.github.io/) installed. You'll find intructions to install both tools on their respective websites.
|
||||||
|
|
||||||
|
After installing Homebrew and Cask, run:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ brew cask install smcfancontrol
|
||||||
|
```
|
||||||
|
|
||||||
|
After that you'll be able to use Spotlight to launch smcFanControl normally. :-)
|
||||||
|
|
||||||
|
|
||||||
|
Requirements: Intel Mac / OS X 10.7 or higher
|
||||||
|
|
||||||
|
|
||||||
|
Compiled version: https://www.eidac.de/smcfancontrol/smcfancontrol_2_6.zip
|
||||||
|
|
||||||
FAQ / More info: Found in project under "Ressources/*.lproj/F.A.Q.rtf" or included in above .zip
|
FAQ / More info: Found in project under "Ressources/*.lproj/F.A.Q.rtf" or included in above .zip
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
{\rtf1\ansi\ansicpg1252\cocoartf1187
|
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf340
|
||||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
{\colortbl;\red255\green255\blue255;}
|
{\colortbl;\red255\green255\blue255;}
|
||||||
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}
|
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}
|
||||||
{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2}}
|
{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2}}
|
||||||
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
|
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
|
||||||
\paperw12240\paperh15840\viewkind0
|
\paperw12240\paperh15840\viewkind0
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\f0\fs62 \cf0 F.A.Q for smcFanControl 2.4\
|
\f0\fs62 \cf0 F.A.Q for smcFanControl 2.6\
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\fs24 \cf0 \
|
\fs24 \cf0 \
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ Will there be a version of smcFanControl for Powerbooks or other PPC based Macs?
|
|||||||
\
|
\
|
||||||
|
|
||||||
\b What are the main-differences between Version 1.2x and Version 2.x of smcFanControl?\
|
\b What are the main-differences between Version 1.2x and Version 2.x of smcFanControl?\
|
||||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural
|
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
|
||||||
\ls1\ilvl0
|
\ls1\ilvl0
|
||||||
\b0 \cf0 {\listtext \'95 }Version 2.x is a completely rewritten application.\
|
\b0 \cf0 {\listtext \'95 }Version 2.x is a completely rewritten application.\
|
||||||
{\listtext \'95 }Version 1.x was a "regular" application located in the dock. Version 2.x sits in the menubar for quicker access to the fan settings, easier monitoring and a better overall user-experience\
|
{\listtext \'95 }Version 1.x was a "regular" application located in the dock. Version 2.x sits in the menubar for quicker access to the fan settings, easier monitoring and a better overall user-experience\
|
||||||
@ -97,16 +97,16 @@ Will there be a version of smcFanControl for Powerbooks or other PPC based Macs?
|
|||||||
{\listtext \'95 }Version 2.x has got an "add to login-items option" now\
|
{\listtext \'95 }Version 2.x has got an "add to login-items option" now\
|
||||||
{\listtext \'95 }Version 2.x uses standard OS X authentication now\
|
{\listtext \'95 }Version 2.x uses standard OS X authentication now\
|
||||||
{\listtext \'95 }Version 2.x uses the Sparkle-Framework to automatically check for updates\
|
{\listtext \'95 }Version 2.x uses the Sparkle-Framework to automatically check for updates\
|
||||||
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\b \cf0 \
|
\b \cf0 \
|
||||||
Sourcecode: https://github.com/hholtmann/smcFanControl
|
Sourcecode: https://github.com/hholtmann/smcFanControl
|
||||||
\b0 \
|
\b0 \
|
||||||
|
|
||||||
\b \
|
\b \
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\b0 \cf0 \
|
\b0 \cf0 \
|
||||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural
|
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
|
||||||
\ls2\ilvl0\cf0 \
|
\ls2\ilvl0\cf0 \
|
||||||
}
|
}
|
||||||
@ -21,3 +21,22 @@
|
|||||||
"Alert!" = "Let op!";
|
"Alert!" = "Let op!";
|
||||||
|
|
||||||
"Active Setting" = "Actieve Instelling";
|
"Active Setting" = "Actieve Instelling";
|
||||||
|
|
||||||
|
|
||||||
|
"Remind me later" = "Remind me later";
|
||||||
|
|
||||||
|
"Consider a donation" = "Consider a donation";
|
||||||
|
|
||||||
|
"Never ask me again" = "Never ask me again";
|
||||||
|
|
||||||
|
"Donate over Paypal" = "Donate over Paypal";
|
||||||
|
|
||||||
|
"smcFanControl keeps your Mac cool since 2006.\n\nIf smcFanControl is helfpul for you and you want to support further development, a small donation over Paypal is much appreciated." = "smcFanControl keeps your Mac cool since 2006.\n\nIf smcFanControl is helfpul for you and you want to support further development, a small donation over Paypal is much appreciated.";
|
||||||
|
|
||||||
|
"Do you want to reset smcFanControl to default settings? Favorites will be deleted and fans will return to default speed." = "Do you want to reset smcFanControl to default settings?\nFavorites will be deleted and fans will return to default speed.";
|
||||||
|
|
||||||
|
"Please shutdown your computer now to return to default fan settings." = "Please shutdown your computer now to return to default fan settings.";
|
||||||
|
|
||||||
|
"Reset Settings" = "Reset Settings";
|
||||||
|
|
||||||
|
"Shutdown required" = "Shutdown required";
|
||||||
5863
Ressources/Dutch.lproj/MainMenu.nib/designable.nib
generated
5863
Ressources/Dutch.lproj/MainMenu.nib/designable.nib
generated
File diff suppressed because it is too large
Load Diff
BIN
Ressources/Dutch.lproj/MainMenu.nib/keyedobjects.nib
generated
BIN
Ressources/Dutch.lproj/MainMenu.nib/keyedobjects.nib
generated
Binary file not shown.
@ -1,13 +1,13 @@
|
|||||||
{\rtf1\ansi\ansicpg1252\cocoartf1187
|
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf340
|
||||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
{\colortbl;\red255\green255\blue255;}
|
{\colortbl;\red255\green255\blue255;}
|
||||||
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
|
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
|
||||||
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
|
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
|
||||||
\paperw12240\paperh15840\vieww10800\viewh8400\viewkind0
|
\paperw12240\paperh15840\vieww10800\viewh8400\viewkind0
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\f0\fs62 \cf0 F.A.Q for smcFanControl 2.4\
|
\f0\fs62 \cf0 F.A.Q for smcFanControl 2.6\
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\fs24 \cf0 \
|
\fs24 \cf0 \
|
||||||
|
|
||||||
@ -86,10 +86,10 @@ Will there be a version of smcFanControl for Powerbooks or other PPC based Macs?
|
|||||||
\b \
|
\b \
|
||||||
|
|
||||||
\b0 \
|
\b0 \
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
\ls1\ilvl0
|
\ls1\ilvl0
|
||||||
\b \cf0 {\listtext \'95 }What are the main-differences between Version 1.2x and Version 2.x of smcFanControl?\
|
\b \cf0 {\listtext \'95 }What are the main-differences between Version 1.2x and Version 2.x of smcFanControl?\
|
||||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural
|
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
|
||||||
\ls1\ilvl0
|
\ls1\ilvl0
|
||||||
\b0 \cf0 {\listtext \'95 }Version 2.x is a completely rewritten application.\
|
\b0 \cf0 {\listtext \'95 }Version 2.x is a completely rewritten application.\
|
||||||
{\listtext \'95 }Version 1.x was a "regular" application located in the dock. Version 2.x sits in the menubar for quicker access to the fan settings, easier monitoring and a better overall user-experience\
|
{\listtext \'95 }Version 1.x was a "regular" application located in the dock. Version 2.x sits in the menubar for quicker access to the fan settings, easier monitoring and a better overall user-experience\
|
||||||
@ -100,7 +100,7 @@ Will there be a version of smcFanControl for Powerbooks or other PPC based Macs?
|
|||||||
{\listtext \'95 }Version 2.x uses standard OS X authentication now\
|
{\listtext \'95 }Version 2.x uses standard OS X authentication now\
|
||||||
{\listtext \'95 }Version 2.x uses the Sparkle-Framework to automatically check for updates\
|
{\listtext \'95 }Version 2.x uses the Sparkle-Framework to automatically check for updates\
|
||||||
{\listtext \'95 }\
|
{\listtext \'95 }\
|
||||||
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
\cf0 \
|
\cf0 \
|
||||||
|
|
||||||
\b Sourcecode: https://github.com/hholtmann/smcFanControl
|
\b Sourcecode: https://github.com/hholtmann/smcFanControl
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
5741
Ressources/English.lproj/MainMenu.nib/designable.nib
generated
5741
Ressources/English.lproj/MainMenu.nib/designable.nib
generated
File diff suppressed because it is too large
Load Diff
BIN
Ressources/English.lproj/MainMenu.nib/keyedobjects.nib
generated
BIN
Ressources/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Binary file not shown.
95
Ressources/French.lproj/F.A.Q.rtf
Normal file
95
Ressources/French.lproj/F.A.Q.rtf
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf340
|
||||||
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
|
||||||
|
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
|
||||||
|
\paperw12240\paperh15840\vieww10800\viewh8400\viewkind0
|
||||||
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
|
\f0\fs62 \cf0 F.A.Q smcFanControl 2.6\
|
||||||
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
|
\fs24 \cf0 \
|
||||||
|
|
||||||
|
\b Comment installer ou d\'e9sinstaller smcFanControl?\
|
||||||
|
|
||||||
|
\b0 smcFanControl est une simple application. Ainsi apr\'e8s son t\'e9l\'e9chargement, d\'e9placez-le o\'f9 vous le souhaitez (ex. le dossier Applications). Pour le d\'e9sinstaller, il suffit de le d\'e9placer dans la corbeille. smcFanControl n'installer aucun d\'e9mon ou processus en arri\'e8re plan. \
|
||||||
|
To les changements op\'e9r\'e9s par smcFanControl sur le contr\'f4leur de ventilation sont perdus \'e0 l'extinction de la machine (pas lors d'un red\'e9marrage) ou lorsque la machine entre veille (si smcFanControl n'est plus en cours d'ex\'e9cution \'e0 la reprise d'activit\'e9). La vitesse minimum de rotation revient alors \'e0 la valeur par d\'e9faut d\'e9finie par le syst\'e8me.\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b Lorsque j'utilise smcFanControl et d\'e9finis une vitesse minimum, la vitesse augmente-t-elle tout de m\'eame lorsque la temp\'e9rature du CPU augmente ?\
|
||||||
|
Oui
|
||||||
|
\b0 , la vitesse augmentera comme d\'e9fini par Apple. smcFanControl laissera toujours vos ventilateur en mode automatique et ne modifiera \ul que la vitesse minimum\ulnone du ventilateur. Ainsi, plus la vitesse minimum d\'e9finie est \'e9lev\'e9e, plus le contr\'f4leur de ventilation mettra du temps \'e0 juger n\'e9c\'e9ssaire l'augmentation de vitesse \'e0 mesure que la temp\'e9rature augmente.\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b Pourquoi smcFanControl me demande un identifiant et un mot de passe et quels identifiants dois-je utiliser ?\
|
||||||
|
|
||||||
|
\b0 smcFanControl a besoin des identifiants d'un compte administrateur afin de pouvoir modifier la vitesse de rotation des ventilateurs. Vous n'aurez \'e0 les rentrer qu'une seuls fois. Pour autant, ces identifiants ne sont pas sauvegard\'e9s par smcFanControl. Ils sont justes utilis\'e9s pour voir d\'e9finir correctement les droits d'ex\'e9cution du programme.\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b J'obtiens le message d'avertissement "smcFanControl n'a pas encore \'e9t\'e9 test\'e9 sur cette machine". Qu'est ce que cela signifie?\
|
||||||
|
|
||||||
|
\b0 Techniquement, smcFanControl fonctionne avec tous les Mac intel, mais ces machines ont des valeurs par d\'e9faut diff\'e9rente. Si vous obtenez ce message, smcFanControl tente de lire la valeur par d\'e9faut directement du System Management Controller. Si vous suivez les instructions (ne pas lancer d'autres logiciels de gestion de ventilation, etc.) vous devriez pouvoir utiliser smcFanControl sur une machine que n'a pas encore \'e9t\'e9 test\'e9e par nos soins.\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b Comment revenir au valeur par d\'e9fauts d\'e9finies par Apple ?\
|
||||||
|
|
||||||
|
\b0 Placer les curseurs \'e0 gaucher et cliquer "enregistrer". Les valeurs minimales autoris\'e9es sont celles d\'e9finies par d\'e9faut par Apple. Depuis la derni\'e8re mise \'e0 jour Apple du contr\'f4leur SMC les valeurs minimum par d\'e9faut sont de 1000rpm pour les MBP 15,4", 1500rpm pour le MB 13,3". 2000rpm les MBP Core2Duo et 1800rpm pour les MB Core2Duo.\
|
||||||
|
|
||||||
|
\b \
|
||||||
|
Pourquoi ne puis-je pas d\'e9finir 0 rpm?\
|
||||||
|
|
||||||
|
\b0 smcFanControl ne vous permet que de d\'e9finir une valeur comprise entre les minimum et maximum d'Apple. D\'e9finir une valeur \'e0 0 est possible sur le plan technique mais provoquerait probablement des dommages \'e0 votre mat\'e9riel.\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b Quand les r\'e9glages smcFanControl sont-ils perdus ?\
|
||||||
|
|
||||||
|
\b0 Les r\'e9glages de vitesse minimum de rotation des ventilateurs sont perdus dans deux sc\'e9narios :\
|
||||||
|
a) L'ordinateur est entr\'e9 en veille et smcFanControl n'est plus en cours d'ex\'e9cution (dans le cas contraire, smcFanControl v\'e9rifie l'\'e9tat de veille et applique \'e0 nouveau les r\'e9glages au r\'e9veil de la machine).\
|
||||||
|
b) \'c9teindre votre machine.\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b Quelle sonde est utilis\'e9e pour lire la temp\'e9rature affich\'e9e?\
|
||||||
|
|
||||||
|
\b0 Ce n'est pas directement la sonde du CPU CoreDuo. Cela permet en outre de ne pas charg\'e9 une extension Kernel afin de lire la temp\'e9rature. La sonde utilis\'e9e est tr\'e8s proche de celle du CoreDuo, mais n'est effectivement pas exactement pareil.\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b Qu'en est il de Windows avec Bootcamp?\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b0 smcFanControl \'e9tant une application native OSX, vous ne pouvez d\'e9finir la valeur minimum des rotation lorsque vous \'eates sous windows.\
|
||||||
|
Toutefois, vous pouvez d\'e9finir une vitesse minimale sous OSX puis red\'e9marrer sous windows, vos r\'e9glages n'\'e9tant pas perdu lors du red\'e9marrage. Certes personnes ont report\'e9s que cette m\'e9thode permettait de se pr\'e9venir de certain crash de jeux sous Windows.\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b Ne serait-il pas mieux de d\'e9finir la vitesse de rotation en fonction de la temp\'e9rature plut\'f4t que de choisir une vitesse minimale et laisse Apple faire le reste ?\
|
||||||
|
|
||||||
|
\b0 Oui, cette approche serait probablement plus int\'e9ressante. MAIS : cette m\'e9thode n'a pas \'e9t\'e9 retenue car elle comporte des risques. D\'e9finir la vitesse en fonction de la temp\'e9rature requiert un programme qui tourne en continue. Si ce programme crash ou devient incompatible \'e0 la suite d'une mise \'e0 jour, le ventilateur pourrait \'eatre d\'e9fini \'e0 une valeur trop basse qui pourrait endommager votre machine. D'autre part, cette logique est complexe \'e0 mettre en oeuvre. Un mac intel poss\'e8de une dizaine de sondes de temp\'e9rature, lues continuellement afin de d\'e9finir la vitesse ad\'e9quate de rotation des ventilateurs. Ainsi il ne serait pas judicieux de se reposer sur la lecture d'une seule sonde pour le contr\'f4le de la ventilation.\
|
||||||
|
\
|
||||||
|
|
||||||
|
\b Je poss\'e8de un MBP et smcFanControl m'indique 0 rpm pour l'un des ventilateurs\
|
||||||
|
|
||||||
|
\b0 Dans ce cas, le ventilateur n'a remont\'e9 aucune information \'e0 smcFanControl.
|
||||||
|
\b
|
||||||
|
\b0 Il est possible que le ventilateur subisse un disfonctionnement. Vous pouvez diagnostiquer vitre Mac \'e0 l'aide du Test Hardware d'Apple (cette outils est livr\'e9 avec le DVD d'installation de votre machine).
|
||||||
|
\b \
|
||||||
|
|
||||||
|
\b0 \
|
||||||
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
\ls1\ilvl0
|
||||||
|
\b \cf0 Quelles sont les principales diff\'e9rence entre les versions 1.2x et 2.x de smcFanControl ?\
|
||||||
|
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
|
||||||
|
\ls1\ilvl0
|
||||||
|
\b0 \cf0 {\listtext \'95 }La version 2.x a \'e9t\'e9 enti\'e8rement r\'e9\'e9crites.\
|
||||||
|
{\listtext \'95 }La version 1.x \'e9tait une application "normale" plac\'e9e dans le dock. La version 2.x se trouve d\'e9sormais dans la bar des menus, permettant un acc\'e8s rapide ainsi qu'un contr\'f4le plus simple de la temp\'e9rature et vitesse de rotation.\
|
||||||
|
{\listtext \'95 }La version 2.x supporte tous les Macs intel.\
|
||||||
|
{\listtext \'95 }Dans la version 2.x vous pouvez d\'e9finir plusieurs r\'e9glages favoris et les activer en un clic.\
|
||||||
|
{\listtext \'95 }Sur les Macs portables, vous pouvez activer automatiquement un r\'e9glage favoris en fonction de la source d'alimentation. Ainsi vous pouvez choisir de rafraichir automatique votre mac lorsque que celui-ci est branch\'e9 ou en charge (et que typiquement dans ces conditions il chauffe davantage).\
|
||||||
|
{\listtext \'95 }La version 2.x poss\'e8de d\'e9sormais une option de d\'e9marrage automatique avec la session.\
|
||||||
|
{\listtext \'95 }La version 2.x utilise la fen\'eatre standard d'authentification d'OSX\
|
||||||
|
{\listtext \'95 }La version 2.x uses the Framework Sparkle pour v\'e9rifier automatiquement les mises \'e0 jour\
|
||||||
|
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
\cf0 \
|
||||||
|
|
||||||
|
\b Code source : https://github.com/hholtmann/smcFanControl
|
||||||
|
\b0 \
|
||||||
|
}
|
||||||
BIN
Ressources/French.lproj/Localizable.strings
Normal file
BIN
Ressources/French.lproj/Localizable.strings
Normal file
Binary file not shown.
1082
Ressources/French.lproj/MainMenu.nib/designable.nib
generated
Normal file
1082
Ressources/French.lproj/MainMenu.nib/designable.nib
generated
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Ressources/French.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
BIN
Ressources/French.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
@ -1,14 +1,14 @@
|
|||||||
{\rtf1\ansi\ansicpg1252\cocoartf1187
|
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf340
|
||||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
{\colortbl;\red255\green255\blue255;}
|
{\colortbl;\red255\green255\blue255;}
|
||||||
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}
|
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}
|
||||||
{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2}}
|
{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2}}
|
||||||
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
|
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
|
||||||
\paperw12240\paperh15840\viewkind0
|
\paperw12240\paperh15840\viewkind0
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\f0\fs62 \cf0 F.A.Q for smcFanControl 2.4\
|
\f0\fs62 \cf0 F.A.Q for smcFanControl 2.6\
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\fs24 \cf0 \
|
\fs24 \cf0 \
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ Will there be a version of smcFanControl for Powerbooks or other PPC based Macs?
|
|||||||
\b0 \
|
\b0 \
|
||||||
|
|
||||||
\b What are the main-differences between Version 1.2x and Version 2.x of smcFanControl?\
|
\b What are the main-differences between Version 1.2x and Version 2.x of smcFanControl?\
|
||||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural
|
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
|
||||||
\ls1\ilvl0
|
\ls1\ilvl0
|
||||||
\b0 \cf0 {\listtext \'95 }Version 2.x is a completely rewritten application.\
|
\b0 \cf0 {\listtext \'95 }Version 2.x is a completely rewritten application.\
|
||||||
{\listtext \'95 }Version 1.x was a "regular" application located in the dock. Version 2.x sits in the menubar for quicker access to the fan settings, easier monitoring and a better overall user-experience\
|
{\listtext \'95 }Version 1.x was a "regular" application located in the dock. Version 2.x sits in the menubar for quicker access to the fan settings, easier monitoring and a better overall user-experience\
|
||||||
@ -99,12 +99,12 @@ Will there be a version of smcFanControl for Powerbooks or other PPC based Macs?
|
|||||||
{\listtext \'95 }Version 2.x has got an "add to login-items option" now\
|
{\listtext \'95 }Version 2.x has got an "add to login-items option" now\
|
||||||
{\listtext \'95 }Version 2.x uses standard OS X authentication now\
|
{\listtext \'95 }Version 2.x uses standard OS X authentication now\
|
||||||
{\listtext \'95 }Version 2.x uses the Sparkle-Framework to automatically check for updates\
|
{\listtext \'95 }Version 2.x uses the Sparkle-Framework to automatically check for updates\
|
||||||
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\b \cf0 \
|
\b \cf0 \
|
||||||
Sourcecode: https://github.com/hholtmann/smcFanControl
|
Sourcecode: https://github.com/hholtmann/smcFanControl
|
||||||
\b0 \
|
\b0 \
|
||||||
\
|
\
|
||||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural
|
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
|
||||||
\ls2\ilvl0\cf0 \
|
\ls2\ilvl0\cf0 \
|
||||||
}
|
}
|
||||||
@ -21,3 +21,21 @@
|
|||||||
"Alert!" = "Achtung!";
|
"Alert!" = "Achtung!";
|
||||||
|
|
||||||
"Active Setting" = "Aktive Einstellung";
|
"Active Setting" = "Aktive Einstellung";
|
||||||
|
|
||||||
|
"Remind me later" = "Später erinnern";
|
||||||
|
|
||||||
|
"Consider a donation" = "Spenden...";
|
||||||
|
|
||||||
|
"Never ask me again" = "Nie wieder fragen";
|
||||||
|
|
||||||
|
"Donate over Paypal" = "Spenden über PayPal";
|
||||||
|
|
||||||
|
"smcFanControl keeps your Mac cool since 2006.\n\nIf smcFanControl is helfpul for you and you want to support further development, a small donation over Paypal is much appreciated." = "smcFanControl hält seit 2006 Macs in aller Welt kühl.\n\nWenn Sie smcFanControl gerne benutzen und Sie die Weiterentwicklung unterstützen wollen, freuen wir uns über eine kleine Spende über PayPal.";
|
||||||
|
|
||||||
|
"Do you want to reset smcFanControl to default settings? Favorites will be deleted and fans will return to default speed." = "Wollen Sie smcFanControl auf die Default-Einstellungen zurücksetzen?\nDie Favoriten werden gelöscht und die Lüfter auf Werkseinstellung gesetzt.";
|
||||||
|
|
||||||
|
"Please shutdown your computer now to return to default fan settings." = "Bitte schalten Sie den Computer jetzt aus, um die Werkseinstellung für die Lüfter wiederherzustellen.";
|
||||||
|
|
||||||
|
"Reset Settings" = "Einstellungen zurücksetzen";
|
||||||
|
|
||||||
|
"Shutdown required" = "Ausschalten erforderlich";
|
||||||
5602
Ressources/German.lproj/MainMenu.nib/designable.nib
generated
5602
Ressources/German.lproj/MainMenu.nib/designable.nib
generated
File diff suppressed because it is too large
Load Diff
BIN
Ressources/German.lproj/MainMenu.nib/keyedobjects.nib
generated
BIN
Ressources/German.lproj/MainMenu.nib/keyedobjects.nib
generated
Binary file not shown.
@ -1,13 +1,13 @@
|
|||||||
{\rtf1\ansi\ansicpg1252\cocoartf1187
|
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf340
|
||||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
{\colortbl;\red255\green255\blue255;}
|
{\colortbl;\red255\green255\blue255;}
|
||||||
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
|
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
|
||||||
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
|
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
|
||||||
\paperw12240\paperh15840\viewkind0
|
\paperw12240\paperh15840\viewkind0
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\f0\fs62 \cf0 F.A.Q para smcFanControl 2.4\
|
\f0\fs62 \cf0 F.A.Q para smcFanControl 2.6\
|
||||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
|
|
||||||
\fs24 \cf0 \
|
\fs24 \cf0 \
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ b) La m\'e1quina se apaga.\
|
|||||||
\
|
\
|
||||||
|
|
||||||
\b \'bfCuales son las principales diferencias entre las versiones 1.2.x y 2.x de smcFanControl?\
|
\b \'bfCuales son las principales diferencias entre las versiones 1.2.x y 2.x de smcFanControl?\
|
||||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural
|
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0
|
||||||
\ls1\ilvl0
|
\ls1\ilvl0
|
||||||
\b0 \cf0 {\listtext \'95 }La versi\'f3n 2.x est\'e1 completamente rescrita.\
|
\b0 \cf0 {\listtext \'95 }La versi\'f3n 2.x est\'e1 completamente rescrita.\
|
||||||
{\listtext \'95 }La versi\'f3n 1.x era una aplicaci\'f3n "regular" en el dock. La versi\'f3n 2.x se coloca en la barra de menu, por lo que se accede r\'e1pidamente a los ajustes de los ventiladores, al control de temperatura y en general un uso m\'e1s agradable\
|
{\listtext \'95 }La versi\'f3n 1.x era una aplicaci\'f3n "regular" en el dock. La versi\'f3n 2.x se coloca en la barra de menu, por lo que se accede r\'e1pidamente a los ajustes de los ventiladores, al control de temperatura y en general un uso m\'e1s agradable\
|
||||||
@ -94,11 +94,10 @@ b) La m\'e1quina se apaga.\
|
|||||||
{\listtext \'95 }La versi\'f3n 2.x tiene la opci\'f3n de "a\'f1adir a los elementos de inicio"\
|
{\listtext \'95 }La versi\'f3n 2.x tiene la opci\'f3n de "a\'f1adir a los elementos de inicio"\
|
||||||
{\listtext \'95 }La versi\'f3n 2.x usa la autenticaci\'f3n est\'e1ndard de OS X\
|
{\listtext \'95 }La versi\'f3n 2.x usa la autenticaci\'f3n est\'e1ndard de OS X\
|
||||||
{\listtext \'95 }La versi\'f3n 2.x usa el "Sparkle-Framework" para busca autom\'e1ticamente actualizaciones\
|
{\listtext \'95 }La versi\'f3n 2.x usa el "Sparkle-Framework" para busca autom\'e1ticamente actualizaciones\
|
||||||
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||||
\cf0 \
|
\cf0 \
|
||||||
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
|
||||||
|
|
||||||
\b \cf0 Sourcecode: https://github.com/hholtmann/smcFanControl
|
\b Sourcecode: https://github.com/hholtmann/smcFanControl
|
||||||
\b0 \
|
\b0 \
|
||||||
\
|
\
|
||||||
}
|
}
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/* Localized versions of Info.plist keys */
|
|
||||||
|
|
||||||
NSHumanReadableCopyright = "by Hendrik Holtmann, 2009 (GPL License)";
|
|
||||||
@ -21,3 +21,21 @@
|
|||||||
"Alert!" = "¡Atención!";
|
"Alert!" = "¡Atención!";
|
||||||
|
|
||||||
"Active Setting" = "Configuración activa";
|
"Active Setting" = "Configuración activa";
|
||||||
|
|
||||||
|
"Remind me later" = "Remind me later";
|
||||||
|
|
||||||
|
"Consider a donation" = "Consider a donation";
|
||||||
|
|
||||||
|
"Never ask me again" = "Never ask me again";
|
||||||
|
|
||||||
|
"Donate over Paypal" = "Donate over Paypal";
|
||||||
|
|
||||||
|
"smcFanControl keeps your Mac cool since 2006.\n\nIf smcFanControl is helfpul for you and you want to support further development, a small donation over Paypal is much appreciated." = "smcFanControl keeps your Mac cool since 2006.\n\nIf smcFanControl is helfpul for you and you want to support further development, a small donation over Paypal is much appreciated.";
|
||||||
|
|
||||||
|
"Do you want to reset smcFanControl to default settings? Favorites will be deleted and fans will return to default speed." = "Do you want to reset smcFanControl to default settings?\nFavorites will be deleted and fans will return to default speed.";
|
||||||
|
|
||||||
|
"Please shutdown your computer now to return to default fan settings." = "Please shutdown your computer now to return to default fan settings.";
|
||||||
|
|
||||||
|
"Reset Settings" = "Reset Settings";
|
||||||
|
|
||||||
|
"Shutdown required" = "Shutdown required";
|
||||||
5674
Ressources/Spanish.lproj/MainMenu.nib/designable.nib
generated
5674
Ressources/Spanish.lproj/MainMenu.nib/designable.nib
generated
File diff suppressed because it is too large
Load Diff
BIN
Ressources/Spanish.lproj/MainMenu.nib/keyedobjects.nib
generated
BIN
Ressources/Spanish.lproj/MainMenu.nib/keyedobjects.nib
generated
Binary file not shown.
1
Sparkle.framework/Modules
Symbolic link
1
Sparkle.framework/Modules
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
Versions/Current/Modules
|
||||||
1
Sparkle.framework/PrivateHeaders
Symbolic link
1
Sparkle.framework/PrivateHeaders
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
Versions/Current/PrivateHeaders
|
||||||
@ -1,13 +0,0 @@
|
|||||||
//
|
|
||||||
// NSApplication+AppCopies.h
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Andy Matuschak on 3/16/06.
|
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
@interface NSApplication (SUAppCopies)
|
|
||||||
- (int)copiesRunning;
|
|
||||||
@end
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
//
|
|
||||||
// NSFileManager+Authentication.m
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Andy Matuschak on 3/9/06.
|
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
@interface NSFileManager (SUAuthenticationAdditions)
|
|
||||||
- (BOOL)movePathWithAuthentication:(NSString *)src toPath:(NSString *)dst;
|
|
||||||
@end
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
//
|
|
||||||
// NSFileManager+Verification.h
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Andy Matuschak on 3/16/06.
|
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
// For the paranoid folks!
|
|
||||||
@interface NSFileManager (SUVerification)
|
|
||||||
- (BOOL)validatePath:(NSString *)path withMD5Hash:(NSString *)hash;
|
|
||||||
- (BOOL)validatePath:(NSString *)path withEncodedDSASignature:(NSString *)encodedSignature;
|
|
||||||
@end
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
BSD License
|
|
||||||
|
|
||||||
Copyright (c) 2002, Brent Simmons
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of ranchero.com or Brent Simmons nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived
|
|
||||||
from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
|
||||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
|
||||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
||||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
NSString+extras.h
|
|
||||||
NetNewsWire
|
|
||||||
|
|
||||||
Created by Brent Simmons on Fri Jun 14 2002.
|
|
||||||
Copyright (c) 2002 Brent Simmons. All rights reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
|
||||||
#import <CoreFoundation/CoreFoundation.h>
|
|
||||||
|
|
||||||
|
|
||||||
@interface NSString (extras)
|
|
||||||
|
|
||||||
- (NSString *)stringWithSubstitute:(NSString *)subs forCharactersFromSet:(NSCharacterSet *)set;
|
|
||||||
|
|
||||||
- (NSString *) trimWhiteSpace;
|
|
||||||
|
|
||||||
- (NSString *) stripHTML;
|
|
||||||
|
|
||||||
- (NSString *) ellipsizeAfterNWords: (int) n;
|
|
||||||
|
|
||||||
+ (BOOL) stringIsEmpty: (NSString *) s;
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
BSD License
|
|
||||||
|
|
||||||
Copyright (c) 2002, Brent Simmons
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of ranchero.com or Brent Simmons nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived
|
|
||||||
from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
|
||||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
|
||||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
||||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
RSS.h
|
|
||||||
A class for reading RSS feeds.
|
|
||||||
|
|
||||||
Created by Brent Simmons on Wed Apr 17 2002.
|
|
||||||
Copyright (c) 2002 Brent Simmons. All rights reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import <CoreFoundation/CoreFoundation.h>
|
|
||||||
#import "NSString+extras.h"
|
|
||||||
|
|
||||||
|
|
||||||
@interface RSS : NSObject {
|
|
||||||
|
|
||||||
NSDictionary *headerItems;
|
|
||||||
NSMutableArray *newsItems;
|
|
||||||
NSString *version;
|
|
||||||
|
|
||||||
BOOL flRdf;
|
|
||||||
BOOL normalize;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*Public*/
|
|
||||||
|
|
||||||
- (RSS *) initWithTitle: (NSString *) title andDescription: (NSString *) description;
|
|
||||||
|
|
||||||
- (RSS *) initWithData: (NSData *) rssData normalize: (BOOL) fl;
|
|
||||||
|
|
||||||
- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl;
|
|
||||||
- (RSS *) initWithURL: (NSURL *) url normalize: (BOOL) fl userAgent:(NSString *)userAgent;
|
|
||||||
|
|
||||||
- (NSDictionary *) headerItems;
|
|
||||||
|
|
||||||
- (NSMutableArray *) newsItems;
|
|
||||||
|
|
||||||
- (NSString *) version;
|
|
||||||
|
|
||||||
// AMM's extensions for Sparkle
|
|
||||||
- (NSDictionary *)newestItem;
|
|
||||||
|
|
||||||
|
|
||||||
/*Private*/
|
|
||||||
|
|
||||||
- (void) createheaderdictionary: (CFXMLTreeRef) tree;
|
|
||||||
|
|
||||||
- (void) createitemsarray: (CFXMLTreeRef) tree;
|
|
||||||
|
|
||||||
- (void) setversionstring: (CFXMLTreeRef) tree;
|
|
||||||
|
|
||||||
- (void) flattenimagechildren: (CFXMLTreeRef) tree into: (NSMutableDictionary *) dictionary;
|
|
||||||
|
|
||||||
- (void) flattensourceattributes: (CFXMLNodeRef) node into: (NSMutableDictionary *) dictionary;
|
|
||||||
|
|
||||||
- (CFXMLTreeRef) getchanneltree: (CFXMLTreeRef) tree;
|
|
||||||
|
|
||||||
- (CFXMLTreeRef) getnamedtree: (CFXMLTreeRef) currentTree name: (NSString *) name;
|
|
||||||
|
|
||||||
- (void) normalizeRSSItem: (NSMutableDictionary *) rssItem;
|
|
||||||
|
|
||||||
- (NSString *) getelementvalue: (CFXMLTreeRef) tree;
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -6,22 +6,22 @@
|
|||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#ifndef SUAPPCAST_H
|
||||||
|
#define SUAPPCAST_H
|
||||||
|
|
||||||
@class RSS, SUAppcastItem;
|
#import <Foundation/Foundation.h>
|
||||||
@interface SUAppcast : NSObject {
|
#import "SUExport.h"
|
||||||
NSArray *items;
|
|
||||||
id delegate;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)fetchAppcastFromURL:(NSURL *)url;
|
@class SUAppcastItem;
|
||||||
- (void)setDelegate:delegate;
|
SU_EXPORT @interface SUAppcast : NSObject<NSURLDownloadDelegate>
|
||||||
|
|
||||||
- (SUAppcastItem *)newestItem;
|
@property (copy) NSString *userAgentString;
|
||||||
- (NSArray *)items;
|
@property (copy) NSDictionary *httpHeaders;
|
||||||
|
|
||||||
|
- (void)fetchAppcastFromURL:(NSURL *)url completionBlock:(void (^)(NSError *))err;
|
||||||
|
- (SUAppcast *)copyWithoutDeltaUpdates;
|
||||||
|
|
||||||
|
@property (readonly, copy) NSArray *items;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSObject (SUAppcastDelegate)
|
#endif
|
||||||
- appcastDidFinishLoading:(SUAppcast *)appcast;
|
|
||||||
@end
|
|
||||||
|
|||||||
@ -6,52 +6,39 @@
|
|||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#ifndef SUAPPCASTITEM_H
|
||||||
|
#define SUAPPCASTITEM_H
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "SUExport.h"
|
||||||
|
|
||||||
@interface SUAppcastItem : NSObject {
|
SU_EXPORT @interface SUAppcastItem : NSObject
|
||||||
NSString *title;
|
@property (copy, readonly) NSString *title;
|
||||||
NSDate *date;
|
@property (copy, readonly) NSDate *date;
|
||||||
NSString *description;
|
@property (copy, readonly) NSString *itemDescription;
|
||||||
|
@property (strong, readonly) NSURL *releaseNotesURL;
|
||||||
NSURL *releaseNotesURL;
|
@property (copy, readonly) NSString *DSASignature;
|
||||||
|
@property (copy, readonly) NSString *minimumSystemVersion;
|
||||||
NSString *DSASignature;
|
@property (copy, readonly) NSString *maximumSystemVersion;
|
||||||
NSString *MD5Sum;
|
@property (strong, readonly) NSURL *fileURL;
|
||||||
|
@property (copy, readonly) NSString *versionString;
|
||||||
NSURL *fileURL;
|
@property (copy, readonly) NSString *displayVersionString;
|
||||||
NSString *fileVersion;
|
@property (copy, readonly) NSDictionary *deltaUpdates;
|
||||||
NSString *versionString;
|
@property (strong, readonly) NSURL *infoURL;
|
||||||
}
|
|
||||||
|
|
||||||
// Initializes with data from a dictionary provided by the RSS class.
|
// Initializes with data from a dictionary provided by the RSS class.
|
||||||
- initWithDictionary:(NSDictionary *)dict;
|
- (instancetype)initWithDictionary:(NSDictionary *)dict;
|
||||||
|
- (instancetype)initWithDictionary:(NSDictionary *)dict failureReason:(NSString **)error;
|
||||||
|
|
||||||
- (NSString *)title;
|
@property (getter=isDeltaUpdate, readonly) BOOL deltaUpdate;
|
||||||
- (void)setTitle:(NSString *)aTitle;
|
@property (getter=isCriticalUpdate, readonly) BOOL criticalUpdate;
|
||||||
|
@property (getter=isInformationOnlyUpdate, readonly) BOOL informationOnlyUpdate;
|
||||||
|
|
||||||
- (NSDate *)date;
|
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
|
||||||
- (void)setDate:(NSDate *)aDate;
|
@property (readonly, copy) NSDictionary *propertiesDictionary;
|
||||||
|
|
||||||
- (NSString *)description;
|
- (NSURL *)infoURL;
|
||||||
- (void)setDescription:(NSString *)aDescription;
|
|
||||||
|
|
||||||
- (NSURL *)releaseNotesURL;
|
|
||||||
- (void)setReleaseNotesURL:(NSURL *)aReleaseNotesURL;
|
|
||||||
|
|
||||||
- (NSString *)DSASignature;
|
|
||||||
- (void)setDSASignature:(NSString *)aDSASignature;
|
|
||||||
|
|
||||||
- (NSString *)MD5Sum;
|
|
||||||
- (void)setMD5Sum:(NSString *)aMd5Sum;
|
|
||||||
|
|
||||||
- (NSURL *)fileURL;
|
|
||||||
- (void)setFileURL:(NSURL *)aFileURL;
|
|
||||||
|
|
||||||
- (NSString *)fileVersion;
|
|
||||||
- (void)setFileVersion:(NSString *)aFileVersion;
|
|
||||||
|
|
||||||
- (NSString *)versionString;
|
|
||||||
- (void)setVersionString:(NSString *)versionString;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
//
|
|
||||||
// SUAutomaticUpdateAlert.h
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Andy Matuschak on 3/18/06.
|
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
@class SUAppcastItem;
|
|
||||||
@interface SUAutomaticUpdateAlert : NSWindowController {
|
|
||||||
SUAppcastItem *updateItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
- initWithAppcastItem:(SUAppcastItem *)item;
|
|
||||||
|
|
||||||
- (IBAction)relaunchNow:sender;
|
|
||||||
- (IBAction)relaunchLater:sender;
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
//
|
|
||||||
// SUConstants.h
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Andy Matuschak on 3/16/06.
|
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
extern NSString *SUUpdaterWillRestartNotification;
|
|
||||||
|
|
||||||
extern NSString *SUCheckAtStartupKey;
|
|
||||||
extern NSString *SUFeedURLKey;
|
|
||||||
extern NSString *SUShowReleaseNotesKey;
|
|
||||||
extern NSString *SUSkippedVersionKey;
|
|
||||||
extern NSString *SUScheduledCheckIntervalKey;
|
|
||||||
extern NSString *SULastCheckTimeKey;
|
|
||||||
extern NSString *SUExpectsDSASignatureKey;
|
|
||||||
extern NSString *SUPublicDSAKeyKey;
|
|
||||||
extern NSString *SUAutomaticallyUpdateKey;
|
|
||||||
extern NSString *SUAllowsAutomaticUpdatesKey;
|
|
||||||
47
Sparkle.framework/Versions/A/Headers/SUErrors.h
Normal file
47
Sparkle.framework/Versions/A/Headers/SUErrors.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
//
|
||||||
|
// SUErrors.h
|
||||||
|
// Sparkle
|
||||||
|
//
|
||||||
|
// Created by C.W. Betts on 10/13/14.
|
||||||
|
// Copyright (c) 2014 Sparkle Project. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef SUERRORS_H
|
||||||
|
#define SUERRORS_H
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "SUExport.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Error domain used by Sparkle
|
||||||
|
*/
|
||||||
|
SU_EXPORT extern NSString *const SUSparkleErrorDomain;
|
||||||
|
|
||||||
|
typedef NS_ENUM(OSStatus, SUError) {
|
||||||
|
// Appcast phase errors.
|
||||||
|
SUAppcastParseError = 1000,
|
||||||
|
SUNoUpdateError = 1001,
|
||||||
|
SUAppcastError = 1002,
|
||||||
|
SURunningFromDiskImageError = 1003,
|
||||||
|
|
||||||
|
// Downlaod phase errors.
|
||||||
|
SUTemporaryDirectoryError = 2000,
|
||||||
|
|
||||||
|
// Extraction phase errors.
|
||||||
|
SUUnarchivingError = 3000,
|
||||||
|
SUSignatureError = 3001,
|
||||||
|
|
||||||
|
// Installation phase errors.
|
||||||
|
SUFileCopyFailure = 4000,
|
||||||
|
SUAuthenticationFailure = 4001,
|
||||||
|
SUMissingUpdateError = 4002,
|
||||||
|
SUMissingInstallerToolError = 4003,
|
||||||
|
SURelaunchError = 4004,
|
||||||
|
SUInstallationError = 4005,
|
||||||
|
SUDowngradeError = 4006,
|
||||||
|
|
||||||
|
// System phase errors
|
||||||
|
SUSystemPowerOffError = 5000
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
18
Sparkle.framework/Versions/A/Headers/SUExport.h
Normal file
18
Sparkle.framework/Versions/A/Headers/SUExport.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// SUExport.h
|
||||||
|
// Sparkle
|
||||||
|
//
|
||||||
|
// Created by Jake Petroules on 2014-08-23.
|
||||||
|
// Copyright (c) 2014 Sparkle Project. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef SUEXPORT_H
|
||||||
|
#define SUEXPORT_H
|
||||||
|
|
||||||
|
#ifdef BUILDING_SPARKLE
|
||||||
|
#define SU_EXPORT __attribute__((visibility("default")))
|
||||||
|
#else
|
||||||
|
#define SU_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
//
|
||||||
|
// SUStandardVersionComparator.h
|
||||||
|
// Sparkle
|
||||||
|
//
|
||||||
|
// Created by Andy Matuschak on 12/21/07.
|
||||||
|
// Copyright 2007 Andy Matuschak. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef SUSTANDARDVERSIONCOMPARATOR_H
|
||||||
|
#define SUSTANDARDVERSIONCOMPARATOR_H
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "SUExport.h"
|
||||||
|
#import "SUVersionComparisonProtocol.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sparkle's default version comparator.
|
||||||
|
|
||||||
|
This comparator is adapted from MacPAD, by Kevin Ballard.
|
||||||
|
It's "dumb" in that it does essentially string comparison,
|
||||||
|
in components split by character type.
|
||||||
|
*/
|
||||||
|
SU_EXPORT @interface SUStandardVersionComparator : NSObject <SUVersionComparison>
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns a singleton instance of the comparator.
|
||||||
|
*/
|
||||||
|
+ (SUStandardVersionComparator *)defaultComparator;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Compares version strings through textual analysis.
|
||||||
|
|
||||||
|
See the implementation for more details.
|
||||||
|
*/
|
||||||
|
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -1,26 +0,0 @@
|
|||||||
//
|
|
||||||
// SUStatusChecker.h
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Evan Schoenberg on 7/6/06.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import <Sparkle/SUUpdater.h>
|
|
||||||
|
|
||||||
@class SUStatusChecker;
|
|
||||||
|
|
||||||
@protocol SUStatusCheckerDelegate <NSObject>
|
|
||||||
//versionString will be nil and isNewVersion will be NO if version checking fails.
|
|
||||||
- (void)statusChecker:(SUStatusChecker *)statusChecker foundVersion:(NSString *)versionString isNewVersion:(BOOL)isNewVersion;
|
|
||||||
@end
|
|
||||||
|
|
||||||
@interface SUStatusChecker : SUUpdater {
|
|
||||||
id<SUStatusCheckerDelegate> scDelegate;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a status checker which will notifiy delegate once the appcast version is determined.
|
|
||||||
// Notification occurs via the method defined in the SUStatusCheckerDelegate informal protocol.
|
|
||||||
+ (SUStatusChecker *)statusCheckerForDelegate:(id<SUStatusCheckerDelegate>)delegate;
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
//
|
|
||||||
// SUStatusController.h
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Andy Matuschak on 3/14/06.
|
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
|
|
||||||
@interface SUStatusController : NSWindowController {
|
|
||||||
double progressValue, maxProgressValue;
|
|
||||||
NSString *title, *statusText, *buttonTitle;
|
|
||||||
IBOutlet NSButton *actionButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pass 0 for the max progress value to get an indeterminate progress bar.
|
|
||||||
// Pass nil for the status text to not show it.
|
|
||||||
- (void)beginActionWithTitle:(NSString *)title maxProgressValue:(double)maxProgressValue statusText:(NSString *)statusText;
|
|
||||||
|
|
||||||
// If isDefault is YES, the button's key equivalent will be \r.
|
|
||||||
- (void)setButtonTitle:(NSString *)buttonTitle target:target action:(SEL)action isDefault:(BOOL)isDefault;
|
|
||||||
- (void)setButtonEnabled:(BOOL)enabled;
|
|
||||||
|
|
||||||
- (double)progressValue;
|
|
||||||
- (void)setProgressValue:(double)value;
|
|
||||||
- (double)maxProgressValue;
|
|
||||||
- (void)setMaxProgressValue:(double)value;
|
|
||||||
|
|
||||||
- (void)setStatusText:(NSString *)statusText;
|
|
||||||
|
|
||||||
@end
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
//
|
|
||||||
// SUUnarchiver.h
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Andy Matuschak on 3/16/06.
|
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
|
|
||||||
@interface SUUnarchiver : NSObject {
|
|
||||||
id delegate;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)unarchivePath:(NSString *)path;
|
|
||||||
- (void)setDelegate:delegate;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@interface NSObject (SUUnarchiverDelegate)
|
|
||||||
- (void)unarchiver:(SUUnarchiver *)unarchiver extractedLength:(long)length;
|
|
||||||
- (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver;
|
|
||||||
- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver;
|
|
||||||
@end
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
//
|
|
||||||
// SUUpdateAlert.h
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Andy Matuschak on 3/12/06.
|
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
SUInstallUpdateChoice,
|
|
||||||
SURemindMeLaterChoice,
|
|
||||||
SUSkipThisVersionChoice
|
|
||||||
} SUUpdateAlertChoice;
|
|
||||||
|
|
||||||
@class WebView, SUAppcastItem;
|
|
||||||
@interface SUUpdateAlert : NSWindowController {
|
|
||||||
SUAppcastItem *updateItem;
|
|
||||||
id delegate;
|
|
||||||
|
|
||||||
IBOutlet WebView *releaseNotesView;
|
|
||||||
IBOutlet NSTextField *description;
|
|
||||||
NSProgressIndicator *releaseNotesSpinner;
|
|
||||||
BOOL webViewFinishedLoading;
|
|
||||||
}
|
|
||||||
|
|
||||||
- initWithAppcastItem:(SUAppcastItem *)item;
|
|
||||||
- (void)setDelegate:delegate;
|
|
||||||
|
|
||||||
- (IBAction)installUpdate:sender;
|
|
||||||
- (IBAction)skipThisVersion:sender;
|
|
||||||
- (IBAction)remindMeLater:sender;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@interface NSObject (SUUpdateAlertDelegate)
|
|
||||||
- (void)updateAlert:(SUUpdateAlert *)updateAlert finishedWithChoice:(SUUpdateAlertChoice)updateChoice;
|
|
||||||
@end
|
|
||||||
@ -6,50 +6,361 @@
|
|||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#ifndef SUUPDATER_H
|
||||||
|
#define SUUPDATER_H
|
||||||
|
|
||||||
// Before you use Sparkle in your app, you must set SUFeedURL in Info.plist to the
|
#import <Foundation/Foundation.h>
|
||||||
// address of the appcast on your webserver. If you don't already have an
|
#import "SUExport.h"
|
||||||
// appcast, please see the Sparkle documentation to learn about how to set one up.
|
#import "SUVersionComparisonProtocol.h"
|
||||||
|
#import "SUVersionDisplayProtocol.h"
|
||||||
|
|
||||||
// .zip, .dmg, .tar, .tbz, .tgz archives are supported at this time.
|
@class SUAppcastItem, SUAppcast;
|
||||||
|
|
||||||
// By default, Sparkle offers to show the user the release notes of the build they'll be
|
@protocol SUUpdaterDelegate;
|
||||||
// getting, which it assumes are in the description (or body) field of the relevant RSS item.
|
|
||||||
// Set SUShowReleaseNotes to <false/> in Info.plist to hide the button.
|
|
||||||
|
|
||||||
@class SUAppcastItem, SUUpdateAlert, SUStatusController;
|
/*!
|
||||||
@interface SUUpdater : NSObject {
|
The main API in Sparkle for controlling the update mechanism.
|
||||||
SUAppcastItem *updateItem;
|
|
||||||
|
|
||||||
SUStatusController *statusController;
|
This class is used to configure the update paramters as well as manually
|
||||||
SUUpdateAlert *updateAlert;
|
and automatically schedule and control checks for updates.
|
||||||
|
*/
|
||||||
|
SU_EXPORT @interface SUUpdater : NSObject
|
||||||
|
|
||||||
NSURLDownload *downloader;
|
@property (unsafe_unretained) IBOutlet id<SUUpdaterDelegate> delegate;
|
||||||
NSString *downloadPath;
|
|
||||||
|
|
||||||
NSTimer *checkTimer;
|
+ (SUUpdater *)sharedUpdater;
|
||||||
NSTimeInterval checkInterval;
|
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
|
||||||
|
- (instancetype)initForBundle:(NSBundle *)bundle;
|
||||||
|
|
||||||
BOOL verbose;
|
@property (readonly, strong) NSBundle *hostBundle;
|
||||||
BOOL updateInProgress;
|
@property (strong, readonly) NSBundle *sparkleBundle;
|
||||||
}
|
|
||||||
|
|
||||||
// This IBAction is meant for a main menu item. Hook up any menu item to this action,
|
@property BOOL automaticallyChecksForUpdates;
|
||||||
// and Sparkle will check for updates and report back its findings verbosely.
|
|
||||||
- (IBAction)checkForUpdates:sender;
|
|
||||||
|
|
||||||
// This method is similar to the above, but it's intended for updates initiated by
|
@property NSTimeInterval updateCheckInterval;
|
||||||
// the computer instead of by the user. It does not alert the user when he is up to date,
|
|
||||||
// and it remains silent about network errors in fetching the feed. This is what you
|
/*!
|
||||||
// want to call to update programmatically; only use checkForUpdates: with buttons and menu items.
|
* The URL of the appcast used to download update information.
|
||||||
|
*
|
||||||
|
* This property must be called on the main thread.
|
||||||
|
*/
|
||||||
|
@property (copy) NSURL *feedURL;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *userAgentString;
|
||||||
|
|
||||||
|
@property (copy) NSDictionary *httpHeaders;
|
||||||
|
|
||||||
|
@property BOOL sendsSystemProfile;
|
||||||
|
|
||||||
|
@property BOOL automaticallyDownloadsUpdates;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *decryptionPassword;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Explicitly checks for updates and displays a progress dialog while doing so.
|
||||||
|
|
||||||
|
This method is meant for a main menu item.
|
||||||
|
Connect any menu item to this action in Interface Builder,
|
||||||
|
and Sparkle will check for updates and report back its findings verbosely
|
||||||
|
when it is invoked.
|
||||||
|
*/
|
||||||
|
- (IBAction)checkForUpdates:(id)sender;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Checks for updates, but does not display any UI unless an update is found.
|
||||||
|
|
||||||
|
This is meant for programmatically initating a check for updates. That is,
|
||||||
|
it will display no UI unless it actually finds an update, in which case it
|
||||||
|
proceeds as usual.
|
||||||
|
|
||||||
|
If the fully automated updating is turned on, however, this will invoke that
|
||||||
|
behavior, and if an update is found, it will be downloaded and prepped for
|
||||||
|
installation.
|
||||||
|
*/
|
||||||
- (void)checkForUpdatesInBackground;
|
- (void)checkForUpdatesInBackground;
|
||||||
|
|
||||||
// This method allows you to schedule a check to run every time interval. You can
|
/*!
|
||||||
// pass 0 to this method to cancel a previously scheduled timer. You probably don't want
|
Checks for updates and, if available, immediately downloads and installs them.
|
||||||
// to call this directly: if you set a SUScheduledCheckInterval key in Info.plist or
|
A progress dialog is shown but the user will never be prompted to read the
|
||||||
// the user defaults, Sparkle will set this up for you automatically on startup. You might
|
release notes.
|
||||||
// just want to call this every time the user changes the setting in the preferences.
|
|
||||||
- (void)scheduleCheckWithInterval:(NSTimeInterval)interval;
|
You may want to respond to the userDidCancelDownload delegate method in case
|
||||||
|
the user clicks the "Cancel" button while the update is downloading.
|
||||||
|
*/
|
||||||
|
- (void)installUpdatesIfAvailable;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the date of last update check.
|
||||||
|
|
||||||
|
\returns \c nil if no check has been performed.
|
||||||
|
*/
|
||||||
|
@property (readonly, copy) NSDate *lastUpdateCheckDate;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Begins a "probing" check for updates which will not actually offer to
|
||||||
|
update to that version.
|
||||||
|
|
||||||
|
However, the delegate methods
|
||||||
|
SUUpdaterDelegate::updater:didFindValidUpdate: and
|
||||||
|
SUUpdaterDelegate::updaterDidNotFindUpdate: will be called,
|
||||||
|
so you can use that information in your UI.
|
||||||
|
*/
|
||||||
|
- (void)checkForUpdateInformation;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Appropriately schedules or cancels the update checking timer according to
|
||||||
|
the preferences for time interval and automatic checks.
|
||||||
|
|
||||||
|
This call does not change the date of the next check,
|
||||||
|
but only the internal NSTimer.
|
||||||
|
*/
|
||||||
|
- (void)resetUpdateCycle;
|
||||||
|
|
||||||
|
@property (readonly) BOOL updateInProgress;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// SUUpdater Notifications for events that might be interesting to more than just the delegate
|
||||||
|
// The updater will be the notification object
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
SU_EXPORT extern NSString *const SUUpdaterDidFinishLoadingAppCastNotification;
|
||||||
|
SU_EXPORT extern NSString *const SUUpdaterDidFindValidUpdateNotification;
|
||||||
|
SU_EXPORT extern NSString *const SUUpdaterDidNotFindUpdateNotification;
|
||||||
|
SU_EXPORT extern NSString *const SUUpdaterWillRestartNotification;
|
||||||
|
#define SUUpdaterWillRelaunchApplicationNotification SUUpdaterWillRestartNotification;
|
||||||
|
#define SUUpdaterWillInstallUpdateNotification SUUpdaterWillRestartNotification;
|
||||||
|
|
||||||
|
// Key for the SUAppcastItem object in the SUUpdaterDidFindValidUpdateNotification userInfo
|
||||||
|
SU_EXPORT extern NSString *const SUUpdaterAppcastItemNotificationKey;
|
||||||
|
// Key for the SUAppcast object in the SUUpdaterDidFinishLoadingAppCastNotification userInfo
|
||||||
|
SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// SUUpdater Delegate:
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Provides methods to control the behavior of an SUUpdater object.
|
||||||
|
*/
|
||||||
|
@protocol SUUpdaterDelegate <NSObject>
|
||||||
|
@optional
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns whether to allow Sparkle to pop up.
|
||||||
|
|
||||||
|
For example, this may be used to prevent Sparkle from interrupting a setup assistant.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (BOOL)updaterMayCheckForUpdates:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns additional parameters to append to the appcast URL's query string.
|
||||||
|
|
||||||
|
This is potentially based on whether or not Sparkle will also be sending along the system profile.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param sendingProfile Whether the system profile will also be sent.
|
||||||
|
|
||||||
|
\return An array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user.
|
||||||
|
*/
|
||||||
|
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns a custom appcast URL.
|
||||||
|
|
||||||
|
Override this to dynamically specify the entire URL.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (NSString *)feedURLStringForUpdater:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns whether Sparkle should prompt the user about automatic update checks.
|
||||||
|
|
||||||
|
Use this to override the default behavior.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called after Sparkle has downloaded the appcast from the remote server.
|
||||||
|
|
||||||
|
Implement this if you want to do some special handling with the appcast once it finishes loading.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param appcast The appcast that was downloaded from the remote server.
|
||||||
|
*/
|
||||||
|
- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the item in the appcast corresponding to the update that should be installed.
|
||||||
|
|
||||||
|
If you're using special logic or extensions in your appcast,
|
||||||
|
implement this to use your own logic for finding a valid update, if any,
|
||||||
|
in the given appcast.
|
||||||
|
|
||||||
|
\param appcast The appcast that was downloaded from the remote server.
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called when a valid update is found by the update driver.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||||
|
*/
|
||||||
|
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)item;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called when a valid update is not found.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (void)updaterDidNotFindUpdate:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called immediately before downloading the specified update.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param item The appcast item corresponding to the update that is proposed to be downloaded.
|
||||||
|
\param request The mutable URL request that will be used to download the update.
|
||||||
|
*/
|
||||||
|
- (void)updater:(SUUpdater *)updater willDownloadUpdate:(SUAppcastItem *)item withRequest:(NSMutableURLRequest *)request;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called after the specified update failed to download.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param item The appcast item corresponding to the update that failed to download.
|
||||||
|
\param error The error generated by the failed download.
|
||||||
|
*/
|
||||||
|
- (void)updater:(SUUpdater *)updater failedToDownloadUpdate:(SUAppcastItem *)item error:(NSError *)error;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called when the user clicks the cancel button while and update is being downloaded.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (void)userDidCancelDownload:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called immediately before installing the specified update.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||||
|
*/
|
||||||
|
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)item;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns whether the relaunch should be delayed in order to perform other tasks.
|
||||||
|
|
||||||
|
This is not called if the user didn't relaunch on the previous update,
|
||||||
|
in that case it will immediately restart.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||||
|
\param invocation The invocation that must be completed before continuing with the relaunch.
|
||||||
|
|
||||||
|
\return \c YES to delay the relaunch until \p invocation is invoked.
|
||||||
|
*/
|
||||||
|
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)item untilInvoking:(NSInvocation *)invocation;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns whether the application should be relaunched at all.
|
||||||
|
|
||||||
|
Some apps \b cannot be relaunched under certain circumstances.
|
||||||
|
This method can be used to explicitly prevent a relaunch.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (BOOL)updaterShouldRelaunchApplication:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called immediately before relaunching.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns an object that compares version numbers to determine their arithmetic relation to each other.
|
||||||
|
|
||||||
|
This method allows you to provide a custom version comparator.
|
||||||
|
If you don't implement this method or return \c nil,
|
||||||
|
the standard version comparator will be used.
|
||||||
|
|
||||||
|
\sa SUStandardVersionComparator
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (id<SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns an object that formats version numbers for display to the user.
|
||||||
|
|
||||||
|
If you don't implement this method or return \c nil,
|
||||||
|
the standard version formatter will be used.
|
||||||
|
|
||||||
|
\sa SUUpdateAlert
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (id<SUVersionDisplay>)versionDisplayerForUpdater:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the path which is used to relaunch the client after the update is installed.
|
||||||
|
|
||||||
|
The default is the path of the host bundle.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called before an updater shows a modal alert window,
|
||||||
|
to give the host the opportunity to hide attached windows that may get in the way.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (void)updaterWillShowModalAlert:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called after an updater shows a modal alert window,
|
||||||
|
to give the host the opportunity to hide attached windows that may get in the way.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
*/
|
||||||
|
- (void)updaterDidShowModalAlert:(SUUpdater *)updater;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called when an update is scheduled to be silently installed on quit.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||||
|
\param invocation Can be used to trigger an immediate silent install and relaunch.
|
||||||
|
*/
|
||||||
|
- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)item immediateInstallationInvocation:(NSInvocation *)invocation;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Calls after an update that was scheduled to be silently installed on quit has been canceled.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param item The appcast item corresponding to the update that was proposed to be installed.
|
||||||
|
*/
|
||||||
|
- (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)item;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Called after an update is aborted due to an error.
|
||||||
|
|
||||||
|
\param updater The SUUpdater instance.
|
||||||
|
\param error The error that caused the abort
|
||||||
|
*/
|
||||||
|
- (void)updater:(SUUpdater *)updater didAbortWithError:(NSError *)error;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
//
|
|
||||||
// SUUtilities.h
|
|
||||||
// Sparkle
|
|
||||||
//
|
|
||||||
// Created by Andy Matuschak on 3/12/06.
|
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
id SUInfoValueForKey(NSString *key);
|
|
||||||
NSString *SUHostAppName();
|
|
||||||
NSString *SUHostAppDisplayName();
|
|
||||||
NSString *SUHostAppVersion();
|
|
||||||
NSString *SUHostAppVersionString();
|
|
||||||
|
|
||||||
NSComparisonResult SUStandardVersionComparison(NSString * versionA, NSString * versionB);
|
|
||||||
|
|
||||||
// If running make localizable-strings for genstrings, ignore the error on this line.
|
|
||||||
NSString *SULocalizedString(NSString *key, NSString *comment);
|
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
//
|
||||||
|
// SUVersionComparisonProtocol.h
|
||||||
|
// Sparkle
|
||||||
|
//
|
||||||
|
// Created by Andy Matuschak on 12/21/07.
|
||||||
|
// Copyright 2007 Andy Matuschak. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
|
||||||
|
#define SUVERSIONCOMPARISONPROTOCOL_H
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "SUExport.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Provides version comparison facilities for Sparkle.
|
||||||
|
*/
|
||||||
|
@protocol SUVersionComparison
|
||||||
|
|
||||||
|
/*!
|
||||||
|
An abstract method to compare two version strings.
|
||||||
|
|
||||||
|
Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a,
|
||||||
|
and NSOrderedSame if they are equivalent.
|
||||||
|
*/
|
||||||
|
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; // *** MAY BE CALLED ON NON-MAIN THREAD!
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// SUVersionDisplayProtocol.h
|
||||||
|
// EyeTV
|
||||||
|
//
|
||||||
|
// Created by Uli Kusterer on 08.12.09.
|
||||||
|
// Copyright 2009 Elgato Systems GmbH. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "SUExport.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Applies special display formatting to version numbers.
|
||||||
|
*/
|
||||||
|
@protocol SUVersionDisplay
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Formats two version strings.
|
||||||
|
|
||||||
|
Both versions are provided so that important distinguishing information
|
||||||
|
can be displayed while also leaving out unnecessary/confusing parts.
|
||||||
|
*/
|
||||||
|
- (void)formatVersion:(NSString **)inOutVersionA andVersion:(NSString **)inOutVersionB;
|
||||||
|
|
||||||
|
@end
|
||||||
@ -2,21 +2,24 @@
|
|||||||
// Sparkle.h
|
// Sparkle.h
|
||||||
// Sparkle
|
// Sparkle
|
||||||
//
|
//
|
||||||
// Created by Andy Matuschak on 3/16/06.
|
// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
|
||||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "SUUpdater.h"
|
#ifndef SPARKLE_H
|
||||||
#import "SUUtilities.h"
|
#define SPARKLE_H
|
||||||
#import "SUConstants.h"
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
|
||||||
|
// there are name-space collisions) so we can list all of them to start with:
|
||||||
|
|
||||||
#import "SUAppcast.h"
|
#import "SUAppcast.h"
|
||||||
#import "SUAppcastItem.h"
|
#import "SUAppcastItem.h"
|
||||||
#import "SUUpdateAlert.h"
|
#import "SUStandardVersionComparator.h"
|
||||||
#import "SUAutomaticUpdateAlert.h"
|
#import "SUUpdater.h"
|
||||||
#import "SUStatusController.h"
|
#import "SUVersionComparisonProtocol.h"
|
||||||
#import "SUUnarchiver.h"
|
#import "SUVersionDisplayProtocol.h"
|
||||||
#import "SUStatusChecker.h"
|
#import "SUErrors.h"
|
||||||
|
|
||||||
#import "NSApplication+AppCopies.h"
|
#endif
|
||||||
#import "NSFileManager+Authentication.h"
|
|
||||||
#import "NSFileManager+Verification.h"
|
|
||||||
|
|||||||
6
Sparkle.framework/Versions/A/Modules/module.modulemap
Normal file
6
Sparkle.framework/Versions/A/Modules/module.modulemap
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
framework module Sparkle {
|
||||||
|
umbrella header "Sparkle.h"
|
||||||
|
|
||||||
|
export *
|
||||||
|
module * { export * }
|
||||||
|
}
|
||||||
36
Sparkle.framework/Versions/A/PrivateHeaders/SUUnarchiver.h
Normal file
36
Sparkle.framework/Versions/A/PrivateHeaders/SUUnarchiver.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
//
|
||||||
|
// SUUnarchiver.h
|
||||||
|
// Sparkle
|
||||||
|
//
|
||||||
|
// Created by Andy Matuschak on 3/16/06.
|
||||||
|
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef SUUNARCHIVER_H
|
||||||
|
#define SUUNARCHIVER_H
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@class SUHost;
|
||||||
|
@protocol SUUnarchiverDelegate;
|
||||||
|
|
||||||
|
@interface SUUnarchiver : NSObject
|
||||||
|
|
||||||
|
@property (copy, readonly) NSString *archivePath;
|
||||||
|
@property (copy, readonly) NSString *updateHostBundlePath;
|
||||||
|
@property (copy, readonly) NSString *decryptionPassword;
|
||||||
|
@property (weak) id<SUUnarchiverDelegate> delegate;
|
||||||
|
|
||||||
|
+ (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)host withPassword:(NSString *)decryptionPassword;
|
||||||
|
|
||||||
|
- (void)start;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@protocol SUUnarchiverDelegate <NSObject>
|
||||||
|
- (void)unarchiverDidFinish:(SUUnarchiver *)unarchiver;
|
||||||
|
- (void)unarchiverDidFail:(SUUnarchiver *)unarchiver;
|
||||||
|
@optional
|
||||||
|
- (void)unarchiver:(SUUnarchiver *)unarchiver extractedProgress:(double)progress;
|
||||||
|
@end
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>BuildMachineOSBuild</key>
|
||||||
|
<string>15E49a</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>Autoupdate</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>AppIcon</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.sparkle-project.Sparkle.Autoupdate</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.14.0</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
|
<array>
|
||||||
|
<string>MacOSX</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.14.0</string>
|
||||||
|
<key>DTCompiler</key>
|
||||||
|
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||||
|
<key>DTPlatformBuild</key>
|
||||||
|
<string>7C1002</string>
|
||||||
|
<key>DTPlatformVersion</key>
|
||||||
|
<string>GM</string>
|
||||||
|
<key>DTSDKBuild</key>
|
||||||
|
<string>15C43</string>
|
||||||
|
<key>DTSDKName</key>
|
||||||
|
<string>macosx10.11</string>
|
||||||
|
<key>DTXcode</key>
|
||||||
|
<string>0721</string>
|
||||||
|
<key>DTXcodeBuild</key>
|
||||||
|
<string>7C1002</string>
|
||||||
|
<key>LSBackgroundOnly</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.7</string>
|
||||||
|
<key>LSUIElement</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>NSMainNibFile</key>
|
||||||
|
<string>MainMenu</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
BIN
Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/MacOS/Autoupdate
Executable file
BIN
Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/MacOS/Autoupdate
Executable file
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
APPL????
|
||||||
Binary file not shown.
BIN
Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/Resources/SUStatus.nib
generated
Normal file
BIN
Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/Resources/SUStatus.nib
generated
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,36 +3,42 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>BuildMachineOSBuild</key>
|
<key>BuildMachineOSBuild</key>
|
||||||
<string>12A269</string>
|
<string>15E49a</string>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>English</string>
|
<string>en</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>Sparkle</string>
|
<string>Sparkle</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.andymatuschak.Sparkle</string>
|
<string>org.sparkle-project.Sparkle</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>Sparkle</string>
|
<string>Sparkle</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.14.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
|
<array>
|
||||||
|
<string>MacOSX</string>
|
||||||
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.1</string>
|
<string>1.14.0</string>
|
||||||
<key>DTCompiler</key>
|
<key>DTCompiler</key>
|
||||||
<string>com.apple.compilers.llvmgcc42</string>
|
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||||
<key>DTPlatformBuild</key>
|
<key>DTPlatformBuild</key>
|
||||||
<string>4F1003</string>
|
<string>7C1002</string>
|
||||||
<key>DTPlatformVersion</key>
|
<key>DTPlatformVersion</key>
|
||||||
<string>GM</string>
|
<string>GM</string>
|
||||||
<key>DTSDKBuild</key>
|
<key>DTSDKBuild</key>
|
||||||
<string>9L31a</string>
|
<string>15C43</string>
|
||||||
<key>DTSDKName</key>
|
<key>DTSDKName</key>
|
||||||
<string>macosx10.5</string>
|
<string>macosx10.11</string>
|
||||||
<key>DTXcode</key>
|
<key>DTXcode</key>
|
||||||
<string>0441</string>
|
<string>0721</string>
|
||||||
<key>DTXcodeBuild</key>
|
<key>DTXcodeBuild</key>
|
||||||
<string>4F1003</string>
|
<string>7C1002</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
314
Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist
Normal file
314
Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist
Normal file
@ -0,0 +1,314 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>ADP2,1</key>
|
||||||
|
<string>Developer Transition Kit</string>
|
||||||
|
<key>iMac1,1</key>
|
||||||
|
<string>iMac G3 (Rev A-D)</string>
|
||||||
|
<key>iMac4,1</key>
|
||||||
|
<string>iMac (Core Duo)</string>
|
||||||
|
<key>iMac4,2</key>
|
||||||
|
<string>iMac for Education (17 inch, Core Duo)</string>
|
||||||
|
<key>iMac5,1</key>
|
||||||
|
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
|
||||||
|
<key>iMac5,2</key>
|
||||||
|
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
|
||||||
|
<key>iMac6,1</key>
|
||||||
|
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
|
||||||
|
<key>iMac7,1</key>
|
||||||
|
<string>iMac Intel Core 2 Duo (aluminum enclosure)</string>
|
||||||
|
<key>iMac8,1</key>
|
||||||
|
<string>iMac (Core 2 Duo, 20 or 24 inch, Early 2008 )</string>
|
||||||
|
<key>iMac9,1</key>
|
||||||
|
<string>iMac (Core 2 Duo, 20 or 24 inch, Early or Mid 2009 )</string>
|
||||||
|
<key>iMac10,1</key>
|
||||||
|
<string>iMac (Core 2 Duo, 21.5 or 27 inch, Late 2009 )</string>
|
||||||
|
<key>iMac11,1</key>
|
||||||
|
<string>iMac (Core i5 or i7, 27 inch Late 2009)</string>
|
||||||
|
<key>iMac11,2</key>
|
||||||
|
<string>21.5" iMac (mid 2010)</string>
|
||||||
|
<key>iMac11,3</key>
|
||||||
|
<string>iMac (Core i5 or i7, 27 inch Mid 2010)</string>
|
||||||
|
<key>iMac12,1</key>
|
||||||
|
<string>iMac (Core i3 or i5 or i7, 21.5 inch Mid 2010 or Late 2011)</string>
|
||||||
|
<key>iMac12,2</key>
|
||||||
|
<string>iMac (Core i5 or i7, 27 inch Mid 2011)</string>
|
||||||
|
<key>iMac13,1</key>
|
||||||
|
<string>iMac (Core i3 or i5 or i7, 21.5 inch Late 2012 or Early 2013)</string>
|
||||||
|
<key>iMac13,2</key>
|
||||||
|
<string>iMac (Core i5 or i7, 27 inch Late 2012)</string>
|
||||||
|
<key>iMac14,1</key>
|
||||||
|
<string>iMac (Core i5, 21.5 inch Late 2013)</string>
|
||||||
|
<key>iMac14,2</key>
|
||||||
|
<string>iMac (Core i5 or i7, 27 inch Late 2013)</string>
|
||||||
|
<key>iMac14,3</key>
|
||||||
|
<string>iMac (Core i5 or i7, 21.5 inch Late 2013)</string>
|
||||||
|
<key>iMac14,4</key>
|
||||||
|
<string>iMac (Core i5, 21.5 inch Mid 2014)</string>
|
||||||
|
<key>iMac15,1</key>
|
||||||
|
<string>iMac (Retina 5K Core i5 or i7, 27 inch Late 2014 or Mid 2015)</string>
|
||||||
|
<key>iMac16,1</key>
|
||||||
|
<string>iMac (Core i5, 21,5 inch Late 2015)</string>
|
||||||
|
<key>iMac16,2</key>
|
||||||
|
<string>iMac (Retina 4K Core i5 or i7, 21.5 inch Late 2015)</string>
|
||||||
|
<key>iMac17,1</key>
|
||||||
|
<string>iMac (Retina 5K Core i5 or i7, 27 inch Late 2015)</string>
|
||||||
|
<key>MacBook1,1</key>
|
||||||
|
<string>MacBook (Core Duo)</string>
|
||||||
|
<key>MacBook2,1</key>
|
||||||
|
<string>MacBook (Core 2 Duo)</string>
|
||||||
|
<key>MacBook4,1</key>
|
||||||
|
<string>MacBook (Core 2 Duo Feb 2008)</string>
|
||||||
|
<key>MacBook5,1</key>
|
||||||
|
<string>MacBook (Core 2 Duo, Late 2008, Unibody)</string>
|
||||||
|
<key>MacBook5,2</key>
|
||||||
|
<string>MacBook (Core 2 Duo, Early 2009, White)</string>
|
||||||
|
<key>MacBook6,1</key>
|
||||||
|
<string>MacBook (Core 2 Duo, Late 2009, Unibody)</string>
|
||||||
|
<key>MacBook7,1</key>
|
||||||
|
<string>MacBook (Core 2 Duo, Mid 2010, White)</string>
|
||||||
|
<key>MacBook8,1</key>
|
||||||
|
<string>MacBook (Core M, 12 inch, Early 2015)</string>
|
||||||
|
<key>MacBookAir1,1</key>
|
||||||
|
<string>MacBook Air (Core 2 Duo, 13 inch, Early 2008)</string>
|
||||||
|
<key>MacBookAir2,1</key>
|
||||||
|
<string>MacBook Air (Core 2 Duo, 13 inch, Mid 2009)</string>
|
||||||
|
<key>MacBookAir3,1</key>
|
||||||
|
<string>MacBook Air (Core 2 Duo, 11 inch, Late 2010)</string>
|
||||||
|
<key>MacBookAir3,2</key>
|
||||||
|
<string>MacBook Air (Core 2 Duo, 13 inch, Late 2010)</string>
|
||||||
|
<key>MacBookAir4,1</key>
|
||||||
|
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2011)</string>
|
||||||
|
<key>MacBookAir4,2</key>
|
||||||
|
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2011)</string>
|
||||||
|
<key>MacBookAir5,1</key>
|
||||||
|
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2012)</string>
|
||||||
|
<key>MacBookAir5,2</key>
|
||||||
|
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2012)</string>
|
||||||
|
<key>MacBookAir6,1</key>
|
||||||
|
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2013 or Early 2014)</string>
|
||||||
|
<key>MacBookAir6,2</key>
|
||||||
|
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2013 or Early 2014)</string>
|
||||||
|
<key>MacBookAir7,1</key>
|
||||||
|
<string>MacBook Air (Core i5 or i7, 11 inch, Early 2015)</string>
|
||||||
|
<key>MacBookAir7,2</key>
|
||||||
|
<string>MacBook Air (Core i5 or i7, 13 inch, Early 2015)</string>
|
||||||
|
<key>MacBookPro1,1</key>
|
||||||
|
<string>MacBook Pro Core Duo (15-inch)</string>
|
||||||
|
<key>MacBookPro1,2</key>
|
||||||
|
<string>MacBook Pro Core Duo (17-inch)</string>
|
||||||
|
<key>MacBookPro2,1</key>
|
||||||
|
<string>MacBook Pro Core 2 Duo (17-inch)</string>
|
||||||
|
<key>MacBookPro2,2</key>
|
||||||
|
<string>MacBook Pro Core 2 Duo (15-inch)</string>
|
||||||
|
<key>MacBookPro3,1</key>
|
||||||
|
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
|
||||||
|
<key>MacBookPro3,2</key>
|
||||||
|
<string>MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)</string>
|
||||||
|
<key>MacBookPro4,1</key>
|
||||||
|
<string>MacBook Pro (Core 2 Duo Feb 2008)</string>
|
||||||
|
<key>MacBookPro5,1</key>
|
||||||
|
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||||
|
<key>MacBookPro5,2</key>
|
||||||
|
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||||
|
<key>MacBookPro5,3</key>
|
||||||
|
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||||
|
<key>MacBookPro5,4</key>
|
||||||
|
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||||
|
<key>MacBookPro5,5</key>
|
||||||
|
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||||
|
<key>MacBookPro6,1</key>
|
||||||
|
<string>MacBook Pro Intel Core i5, Intel Core i7 (mid 2010)</string>
|
||||||
|
<key>MacBookPro6,2</key>
|
||||||
|
<string>MacBook Pro Intel Core i5, Intel Core i7 (mid 2010)</string>
|
||||||
|
<key>MacBookPro7,1</key>
|
||||||
|
<string>MacBook Pro Intel Core 2 Duo (mid 2010)</string>
|
||||||
|
<key>MacBookPro8,1</key>
|
||||||
|
<string>MacBook Pro Intel Core i5, Intel Core i7, 13" (early 2011)</string>
|
||||||
|
<key>MacBookPro8,2</key>
|
||||||
|
<string>MacBook Pro Intel Core i7, 15" (early 2011)</string>
|
||||||
|
<key>MacBookPro8,3</key>
|
||||||
|
<string>MacBook Pro Intel Core i7, 17" (early 2011)</string>
|
||||||
|
<key>MacBookPro9,1</key>
|
||||||
|
<string>MacBook Pro (15-inch, Mid 2012)</string>
|
||||||
|
<key>MacBookPro9,2</key>
|
||||||
|
<string>MacBook Pro (13-inch, Mid 2012)</string>
|
||||||
|
<key>MacBookPro10,1</key>
|
||||||
|
<string>MacBook Pro (Retina, Mid 2012)</string>
|
||||||
|
<key>MacBookPro10,2</key>
|
||||||
|
<string>MacBook Pro (Retina, 13-inch, Late 2012)</string>
|
||||||
|
<key>MacBookPro11,1</key>
|
||||||
|
<string>MacBook Pro (Retina, 13-inch, Late 2013)</string>
|
||||||
|
<key>MacBookPro11,2</key>
|
||||||
|
<string>MacBook Pro (Retina, 15-inch, Late 2013)</string>
|
||||||
|
<key>MacBookPro11,3</key>
|
||||||
|
<string>MacBook Pro (Retina, 15-inch, Late 2013)</string>
|
||||||
|
<key>MacbookPro11,4</key>
|
||||||
|
<string>MacBook Pro (Retina, 15-inch, Mid 2015)</string>
|
||||||
|
<key>MacbookPro11,5</key>
|
||||||
|
<string>MacBook Pro (Retina, 15-inch, Mid 2015)</string>
|
||||||
|
<key>MacbookPro12,1 </key>
|
||||||
|
<string>MacBook Pro (Retina, 13-inch, Early 2015)</string>
|
||||||
|
<key>Macmini1,1</key>
|
||||||
|
<string>Mac Mini (Core Solo/Duo)</string>
|
||||||
|
<key>Macmini2,1</key>
|
||||||
|
<string>Mac mini Intel Core</string>
|
||||||
|
<key>Macmini3,1</key>
|
||||||
|
<string>Mac mini Intel Core</string>
|
||||||
|
<key>Macmini4,1</key>
|
||||||
|
<string>Mac mini Intel Core (Mid 2010)</string>
|
||||||
|
<key>Macmini5,1</key>
|
||||||
|
<string>Mac mini (Core i5, Mid 2011)</string>
|
||||||
|
<key>Macmini5,2</key>
|
||||||
|
<string>Mac mini (Core i5 or Core i7, Mid 2011)</string>
|
||||||
|
<key>Macmini5,3</key>
|
||||||
|
<string>Mac mini (Core i7, Server, Mid 2011)</string>
|
||||||
|
<key>Macmini6,1</key>
|
||||||
|
<string>Mac mini (Core i5, Late 2012)</string>
|
||||||
|
<key>Macmini6,2</key>
|
||||||
|
<string>Mac mini (Core i7, Normal or Server, Late 2012)</string>
|
||||||
|
<key>Macmini7,1</key>
|
||||||
|
<string>Mac mini (Core i5 or Core i7, Late 2014)</string>
|
||||||
|
<key>MacPro1,1,Quad</key>
|
||||||
|
<string>Mac Pro</string>
|
||||||
|
<key>MacPro1,1</key>
|
||||||
|
<string>Mac Pro (four-core)</string>
|
||||||
|
<key>MacPro2,1</key>
|
||||||
|
<string>Mac Pro (eight-core)</string>
|
||||||
|
<key>MacPro3,1</key>
|
||||||
|
<string>Mac Pro (January 2008 4- or 8- core "Harpertown")</string>
|
||||||
|
<key>MacPro4,1</key>
|
||||||
|
<string>Mac Pro (March 2009)</string>
|
||||||
|
<key>MacPro5,1</key>
|
||||||
|
<string>Mac Pro (2010 or 2012)</string>
|
||||||
|
<key>MacPro6,1</key>
|
||||||
|
<string>Mac Pro (Late 2013)</string>
|
||||||
|
<key>PowerBook1,1</key>
|
||||||
|
<string>PowerBook G3</string>
|
||||||
|
<key>PowerBook2,1</key>
|
||||||
|
<string>iBook G3</string>
|
||||||
|
<key>PowerBook2,2</key>
|
||||||
|
<string>iBook G3 (FireWire)</string>
|
||||||
|
<key>PowerBook2,3</key>
|
||||||
|
<string>iBook G3</string>
|
||||||
|
<key>PowerBook2,4</key>
|
||||||
|
<string>iBook G3</string>
|
||||||
|
<key>PowerBook3,1</key>
|
||||||
|
<string>PowerBook G3 (FireWire)</string>
|
||||||
|
<key>PowerBook3,2</key>
|
||||||
|
<string>PowerBook G4</string>
|
||||||
|
<key>PowerBook3,3</key>
|
||||||
|
<string>PowerBook G4 (Gigabit Ethernet)</string>
|
||||||
|
<key>PowerBook3,4</key>
|
||||||
|
<string>PowerBook G4 (DVI)</string>
|
||||||
|
<key>PowerBook3,5</key>
|
||||||
|
<string>PowerBook G4 (1GHz / 867MHz)</string>
|
||||||
|
<key>PowerBook4,1</key>
|
||||||
|
<string>iBook G3 (Dual USB, Late 2001)</string>
|
||||||
|
<key>PowerBook4,2</key>
|
||||||
|
<string>iBook G3 (16MB VRAM)</string>
|
||||||
|
<key>PowerBook4,3</key>
|
||||||
|
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
|
||||||
|
<key>PowerBook5,1</key>
|
||||||
|
<string>PowerBook G4 (17 inch)</string>
|
||||||
|
<key>PowerBook5,2</key>
|
||||||
|
<string>PowerBook G4 (15 inch FW 800)</string>
|
||||||
|
<key>PowerBook5,3</key>
|
||||||
|
<string>PowerBook G4 (17-inch 1.33GHz)</string>
|
||||||
|
<key>PowerBook5,4</key>
|
||||||
|
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
|
||||||
|
<key>PowerBook5,5</key>
|
||||||
|
<string>PowerBook G4 (17-inch 1.5GHz)</string>
|
||||||
|
<key>PowerBook5,6</key>
|
||||||
|
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
|
||||||
|
<key>PowerBook5,7</key>
|
||||||
|
<string>PowerBook G4 (17-inch 1.67GHz)</string>
|
||||||
|
<key>PowerBook5,8</key>
|
||||||
|
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
|
||||||
|
<key>PowerBook5,9</key>
|
||||||
|
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
|
||||||
|
<key>PowerBook6,1</key>
|
||||||
|
<string>PowerBook G4 (12 inch)</string>
|
||||||
|
<key>PowerBook6,2</key>
|
||||||
|
<string>PowerBook G4 (12 inch, DVI)</string>
|
||||||
|
<key>PowerBook6,3</key>
|
||||||
|
<string>iBook G4</string>
|
||||||
|
<key>PowerBook6,4</key>
|
||||||
|
<string>PowerBook G4 (12 inch 1.33GHz)</string>
|
||||||
|
<key>PowerBook6,5</key>
|
||||||
|
<string>iBook G4 (Early-Late 2004)</string>
|
||||||
|
<key>PowerBook6,7</key>
|
||||||
|
<string>iBook G4 (Mid 2005)</string>
|
||||||
|
<key>PowerBook6,8</key>
|
||||||
|
<string>PowerBook G4 (12 inch 1.5GHz)</string>
|
||||||
|
<key>PowerMac1,1</key>
|
||||||
|
<string>Power Macintosh G3 (Blue & White)</string>
|
||||||
|
<key>PowerMac1,2</key>
|
||||||
|
<string>Power Macintosh G4 (PCI Graphics)</string>
|
||||||
|
<key>PowerMac2,1</key>
|
||||||
|
<string>iMac G3 (Slot-loading CD-ROM)</string>
|
||||||
|
<key>PowerMac2,2</key>
|
||||||
|
<string>iMac G3 (Summer 2000)</string>
|
||||||
|
<key>PowerMac3,1</key>
|
||||||
|
<string>Power Macintosh G4 (AGP Graphics)</string>
|
||||||
|
<key>PowerMac3,2</key>
|
||||||
|
<string>Power Macintosh G4 (AGP Graphics)</string>
|
||||||
|
<key>PowerMac3,3</key>
|
||||||
|
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
|
||||||
|
<key>PowerMac3,4</key>
|
||||||
|
<string>Power Macintosh G4 (Digital Audio)</string>
|
||||||
|
<key>PowerMac3,5</key>
|
||||||
|
<string>Power Macintosh G4 (Quick Silver)</string>
|
||||||
|
<key>PowerMac3,6</key>
|
||||||
|
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
|
||||||
|
<key>PowerMac4,1</key>
|
||||||
|
<string>iMac G3 (Early/Summer 2001)</string>
|
||||||
|
<key>PowerMac4,2</key>
|
||||||
|
<string>iMac G4 (Flat Panel)</string>
|
||||||
|
<key>PowerMac4,4</key>
|
||||||
|
<string>eMac</string>
|
||||||
|
<key>PowerMac4,5</key>
|
||||||
|
<string>iMac G4 (17-inch Flat Panel)</string>
|
||||||
|
<key>PowerMac5,1</key>
|
||||||
|
<string>Power Macintosh G4 Cube</string>
|
||||||
|
<key>PowerMac5,2</key>
|
||||||
|
<string>Power Mac G4 Cube</string>
|
||||||
|
<key>PowerMac6,1</key>
|
||||||
|
<string>iMac G4 (USB 2.0)</string>
|
||||||
|
<key>PowerMac6,3</key>
|
||||||
|
<string>iMac G4 (20-inch Flat Panel)</string>
|
||||||
|
<key>PowerMac6,4</key>
|
||||||
|
<string>eMac (USB 2.0, 2005)</string>
|
||||||
|
<key>PowerMac7,2</key>
|
||||||
|
<string>Power Macintosh G5</string>
|
||||||
|
<key>PowerMac7,3</key>
|
||||||
|
<string>Power Macintosh G5</string>
|
||||||
|
<key>PowerMac8,1</key>
|
||||||
|
<string>iMac G5</string>
|
||||||
|
<key>PowerMac8,2</key>
|
||||||
|
<string>iMac G5 (Ambient Light Sensor)</string>
|
||||||
|
<key>PowerMac9,1</key>
|
||||||
|
<string>Power Macintosh G5 (Late 2005)</string>
|
||||||
|
<key>PowerMac10,1</key>
|
||||||
|
<string>Mac Mini G4</string>
|
||||||
|
<key>PowerMac10,2</key>
|
||||||
|
<string>Mac Mini (Late 2005)</string>
|
||||||
|
<key>PowerMac11,2</key>
|
||||||
|
<string>Power Macintosh G5 (Late 2005)</string>
|
||||||
|
<key>PowerMac12,1</key>
|
||||||
|
<string>iMac G5 (iSight)</string>
|
||||||
|
<key>RackMac1,1</key>
|
||||||
|
<string>Xserve G4</string>
|
||||||
|
<key>RackMac1,2</key>
|
||||||
|
<string>Xserve G4 (slot-loading, cluster node)</string>
|
||||||
|
<key>RackMac3,1</key>
|
||||||
|
<string>Xserve G5</string>
|
||||||
|
<key>Xserve1,1</key>
|
||||||
|
<string>Xserve (Intel Xeon)</string>
|
||||||
|
<key>Xserve2,1</key>
|
||||||
|
<string>Xserve (January 2008 quad-core)</string>
|
||||||
|
<key>Xserve3,1</key>
|
||||||
|
<string>Xserve (early 2009)</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
BIN
Sparkle.framework/Versions/A/Resources/SUStatus.nib
generated
BIN
Sparkle.framework/Versions/A/Resources/SUStatus.nib
generated
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user