61 Commits
v2.4 ... 2.6

Author SHA1 Message Date
2d69dcc399 Moved Preference Strings into Constants 2016-10-16 18:28:42 +02:00
b5103c8f64 Worked around invisible statusbar text in macOS Sierra Dark mode 2016-10-12 03:48:56 +02:00
df287a7bf4 Adjusted version number 2016-10-12 03:01:17 +02:00
96aecc00f2 Merge pull request #53 from margaretmoser/patch-1
fixed brew install instructions
2016-06-09 00:50:36 +02:00
59ba7232fe fixed brew install instructions
brew cask install smsfancontrol   =>    brew cask install smcfancontrol
2016-06-08 15:48:49 -07:00
a37e18d227 Update Readme.md 2016-06-08 14:19:40 +02:00
3109288146 Merge pull request #47 from joelwallis/improvements-to-readme-file
Adds installation instructions using Homebrew & Cask
2016-06-08 14:18:51 +02:00
97683b91b7 2.6 Beta Release 2016-03-21 15:26:46 +01:00
6d2a6ed863 Bumped version number to 2.6, fixed crash on 12“ Macbook 2016-03-21 15:20:59 +01:00
3c84277cef Changed URLs to https, fixed Sparkle load error 2016-03-21 14:50:26 +01:00
411ba5a485 Fixed build error 2016-03-21 14:42:01 +01:00
2804ac0c85 Updated Sparkle 2016-03-21 14:34:34 +01:00
252fc40328 Adds installation instructions using Homebrew & Cask 2015-12-18 17:45:46 -03:00
3e00b8e79a Merge pull request #38 from stefancrain/master
Adding missing define in header, fixes #21
2015-12-18 15:36:27 +01:00
b956d0efe0 Merge pull request #40 from pyrou/patch-1
Add French localization
2015-12-18 15:35:45 +01:00
825feeebfc Fixed compile on OS X 10.11/ Xcode 7.x 2015-12-18 15:30:19 +01:00
b01a8cd165 Add French localization 2015-03-29 21:03:20 +02:00
2075ad0793 Adding missing define in header, fixes #21 2015-03-13 09:50:12 -04:00
c78366cebb Changed back authentication for smc binary to checkSum method (codesign check was causing issues on some mac)
Reset-Feature to reset fans back to factory defaults, delete settings and favorites
2014-10-30 16:51:29 +01:00
62059ede9b Bumped version to 2.5.1 2014-10-22 22:24:30 +02:00
052664221c Changed temperature readout and filter out wrong iMac values 2014-10-22 22:23:54 +02:00
d4dee3b02f Fixed a crash on 10.6 English Language 2014-10-22 10:56:36 +02:00
f271718c71 Added new sparkle version, deprecated 10.5 and 32 Bit support,
converted to ARC, fixed some memory management issues, Donation
Reminder Screen
2014-10-21 17:57:58 +02:00
4a94a92620 Fixed scrolling offset under Yosemite 2014-10-20 17:32:01 +02:00
2abb74a087 Fixed scroller display 2014-10-20 17:30:59 +02:00
ee8f96e45f Merge branch 'master' of https://github.com/hholtmann/smcFanControl
Conflicts:
	smcFanControl.xcodeproj/project.pbxproj
2014-10-20 16:41:03 +02:00
bb9eb56faf state 2014-10-20 16:39:19 +02:00
b5d8d8838e state 2014-10-20 16:38:48 +02:00
47c1d38d4c Merge pull request #22 from AnakinMac/master
Use a function to do right check
2014-10-20 16:38:23 +02:00
8d9b496dd4 Started support for dark mode 2014-10-20 16:33:31 +02:00
93c7f15214 Use codesign verification to do dmc check 2014-05-19 22:50:16 -04:00
1eae87aede Use Xcode comment syntax, introduce objective-c modern syntax and some other code rearrange 2014-05-19 16:22:44 -04:00
b47bbf0177 Use a function to do right check 2014-03-27 12:38:43 -04:00
65fef1adc3 Test 2014-03-27 15:36:06 +01:00
7489cd8239 Merge pull request #20 from AnakinMac/master
Some fixes
2014-03-26 02:07:14 +01:00
3dbea4bd98 Fix compile warning
Fix crash if smc failed to get current authorization during first use
2014-03-25 15:13:47 -04:00
063d53b06c Changes for 2.5beta Release 2014-02-28 16:28:58 +01:00
d52a71e091 Testing different temperature readout method 2014-02-23 17:37:28 +01:00
8b1127b5b6 Fixed deletion of favorites on OS X 10.9 2014-02-23 17:13:43 +01:00
1b51b7d952 set timer tolerance for Mavericks 2014-02-10 02:09:25 +01:00
595fcd5957 Additional merging 2014-02-10 01:57:21 +01:00
7383e0819e Merge branch 'master' of https://github.com/mw9074/smcFanControl into mw9074-master
Conflicts:
	smc-command/smc.c
	smc-command/smc.h
2014-02-10 01:47:40 +01:00
f233b0846a Merge pull request #12 from nyeates/patch-1
Grammar fixes in Readme.md
2014-02-10 01:30:30 +01:00
0be72efddf Merge pull request #6 from denis2342/master
fixes the decoding of int values. this is important for the correct readout of the number of keys
2014-02-10 01:28:37 +01:00
3328c0018f No longer read unnecessary data in -readFanData
-readFanData was always reading the temperature and the speeds of all
of the fans regardless of what data was displayed in the menu bar. Now,
-readFanData only reads the data necessary to update the text in the
menubar, so, if only the temp is displayed, only the temp is read. The
updating of the fan speeds in the menu is now only done when the user
clicks on the menu. Also: cleaned up some test code and deleted an
unnecessary comment.
2013-12-25 09:47:10 -05:00
c537db9fdd Dramatically reduced energy impact by improving code efficiency
Cached various information to reduce calls to get information from
hardware. Avoided dynamic memory allocation. Added brief comments and
TODOs.
2013-12-21 09:26:27 -05:00
32ced3b969 FAQ file references
The FAQ has a lot of good info and is well written. Any reader of this quick readme should know about the documentation within the FAQ file. I could not figure out a way to universally link to it within githubs flavor of .md markdown, so I just referenced it by textual explanation.
2013-12-07 04:06:21 -05:00
73c981e31a Grammar fixes in Readme.md 2013-12-07 03:08:12 -05:00
afebcc65f1 add more encoding types 2013-02-05 21:45:39 +01:00
77280ab43c support all found sp/fp oocurances I found so far 2013-02-05 20:54:26 +01:00
7ea2001e49 add '{pwm' decoding support 2013-02-03 04:40:08 +01:00
de8d762534 SP78 is signed, so print it that way 2013-02-03 04:40:08 +01:00
44c4e1d15a add support for SI16 signed integer type 2013-02-03 04:39:53 +01:00
dd63c65655 add support for SI8 signed integer type 2013-02-02 16:33:23 +01:00
3b87cc972d added the two missing bits to the result when decoding FPE2 values 2013-02-01 01:47:35 +01:00
b125097a07 add support for the sp78 format 2013-01-31 20:31:11 +01:00
afb554fc66 add the ID of the fan to the output 2013-01-31 18:43:03 +01:00
95dfefbe13 correctly read out int values, this fixes the wrong number of keys displayed and all other values which are ints with more than one byte 2013-01-31 18:36:00 +01:00
3212d78eac Updated read me 2012-08-21 17:55:14 +03:00
514a4e1757 new readme 2012-08-21 16:50:41 +02:00
b64ed93aec Updated Readme 2012-08-21 16:48:34 +02:00
242 changed files with 9464 additions and 7223 deletions

4
.gitignore vendored Normal file
View 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
View 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"

19
Classes/FanControl.h Normal file → Executable file
View File

@ -2,7 +2,8 @@
* FanControl
*
* Copyright (c) 2006-2012 Hendrik Holtmann
*
* Portions Copyright (c) 2013 Michael Wilber
*
* FanControl.h - MacBook(Pro) FanControl application
*
* This program is free software; you can redistribute it and/or modify
@ -33,12 +34,13 @@
#include <IOKit/pwr_mgt/IOPMLib.h>
#include <IOKit/IOMessage.h>
#import "Constants.h"
#define kMenuBarHeight 22
@interface FanControl : NSObject
@interface FanControl : NSObject <NSMenuDelegate>
{
IBOutlet id currentSpeed;
@ -98,17 +100,16 @@
IBOutlet id DefaultsController;
MachineDefaults *mdefaults;
NSDictionary *s_sed;
NSDictionary *undo_dic;
NSImage *menu_image;
NSImage *menu_image_alt;
}
@property (nonatomic, strong ) NSMutableDictionary *machineDefaultsDict;
-(void)terminate:(id)sender;
- (IBAction)paypal:(id)sender;
@ -117,6 +118,7 @@
- (IBAction)closePreferences:(id)sender;
- (IBAction)savePreferences:(id)sender;
- (IBAction)updateCheck:(id)sender;
- (IBAction)resetSettings:(id)sender;
- (void)init_statusitem;
@ -133,12 +135,13 @@
- (void) syncBinder:(Boolean)bind;
- (IBAction) changeMenu:(id)sender;
- (IBAction)menuSelect:(id)sender;
- (void)menuNeedsUpdate:(NSMenu*)menu;
@end
@interface NSNumber (NumberAdditions)
- (NSString *) tohex;
- (NSNumber*) celsius_fahrenheit;
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *tohex;
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSNumber *celsius_fahrenheit;
@end

661
Classes/FanControl.m Normal file → Executable file
View File

@ -2,7 +2,8 @@
* FanControl
*
* Copyright (c) 2006-2012 Hendrik Holtmann
*
* Portions Copyright (c) 2013 Michael Wilber
*
* FanControl.m - MacBook(Pro) FanControl application
*
* This program is free software; you can redistribute it and/or modify
@ -30,25 +31,18 @@
#import "SystemVersion.h"
@interface FanControl ()
+(void)copyMachinesIfNecessary;
- (BOOL)isInAutoStart;
- (void) setStartAtLogin:(BOOL)enabled;
+ (void)copyMachinesIfNecessary;
@property (NS_NONATOMIC_IOSONLY, getter=isInAutoStart, readonly) BOOL inAutoStart;
- (void)setStartAtLogin:(BOOL)enabled;
+ (void)checkRightStatus:(OSStatus)status;
@end
@implementation FanControl
io_connect_t conn;
kern_return_t result;
SMCVal_t val;
// Number of fans reported by the hardware.
int g_numFans = 0;
NSUserDefaults *defaults;
Boolean supported=false;
extern char *optarg;
SMCVal_t val;
OSStatus status;
NSDictionary* machine_defaults;
NSString *authpw;
#pragma mark **Init-Methods**
@ -86,111 +80,104 @@ NSString *authpw;
for (i=0;i<[rfavorites count];i++)
{
BOOL selected = NO;
NSArray *fans = [[rfavorites objectAtIndex:i] objectForKey:@"FanData"];
NSArray *fans = rfavorites[i][PREF_FAN_ARRAY];
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;
}
}
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;
}
}
}
-(void) awakeFromNib {
s_sed = nil;
pw=[[Power alloc] init];
[pw setDelegate:self];
[pw registerForSleepWakeNotification];
[pw registerForPowerChange];
//load defaults
[DefaultsController setAppliesImmediately:NO];
//load defaults
[DefaultsController setAppliesImmediately:NO];
mdefaults=[[MachineDefaults alloc] init:nil];
s_sed=[mdefaults get_machine_defaults];
self.machineDefaultsDict=[[NSMutableDictionary alloc] initWithDictionary:[mdefaults get_machine_defaults]];
NSMutableArray *favorites=[NSMutableArray arrayWithObjects:
[NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Default", @"Title",
[s_sed objectForKey:@"Fans"], @"FanData",nil],nil];
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];
NSRange range=[[MachineDefaults computerModel] rangeOfString:@"MacBook"];
if (range.length>0) {
//for macbooks add a second default
MachineDefaults *msdefaults=[[MachineDefaults alloc] init:nil];
NSMutableDictionary *sec_fav=[NSMutableDictionary dictionaryWithObjectsAndKeys:@"Higher RPM", @"Title",
[[msdefaults get_machine_defaults] objectForKey:@"Fans"], @"FanData",nil];
[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"];
NSMutableDictionary *higherFav=[[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Higher RPM", PREF_FAN_TITLE,
[NSKeyedUnarchiver unarchiveObjectWithData:[NSKeyedArchiver archivedDataWithRootObject:[[mdefaults get_machine_defaults] objectForKey:@"Fans"]]], PREF_FAN_ARRAY,nil];
for (NSUInteger i=0;i<[_machineDefaultsDict[@"Fans"] count];i++) {
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
NSRange range_mbp=[[MachineDefaults computerModel] rangeOfString:@"MacBookPro"];
if (range_mbp.length>0) {
if (range_mbp.length>0 && [_machineDefaultsDict[@"Fans"] count] == 2) {
[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
defaults = [NSUserDefaults standardUserDefaults];
[defaults registerDefaults:
[NSMutableDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:0], @"Unit",
[NSNumber numberWithInt:0], @"SelDefault",
[NSNumber numberWithBool:NO], @"AutoStart",
[NSNumber numberWithBool:NO],@"AutomaticChange",
[NSNumber numberWithInt:0],@"selbatt",
[NSNumber numberWithInt:0],@"selac",
[NSNumber numberWithInt:0],@"selload",
[NSNumber numberWithInt:0],@"MenuBar",
feedURL,@"SUFeedURL",
[NSArchiver archivedDataWithRootObject:[NSColor blackColor]],@"MenuColor",
favorites,@"Favorites",
@0, PREF_TEMP_UNIT,
@0, PREF_SELECTION_DEFAULT,
@NO,PREF_AUTOSTART_ENABLED,
@NO,PREF_AUTOMATIC_CHANGE,
@0, PREF_BATTERY_SELECTION,
@0, PREF_AC_SELECTION,
@0, PREF_CHARGING_SELECTION,
@0, PREF_MENU_DISPLAYMODE,
@"TC0D",PREF_TEMPERATURE_SENSOR,
@0, PREF_NUMBEROF_LAUNCHES,
@NO,PREF_DONATIONMESSAGE_DISPLAY,
[NSArchiver archivedDataWithRootObject:[NSColor blackColor]],PREF_MENU_TEXTCOLOR,
favorites,PREF_FAVORITES_ARRAY,
nil]];
g_numFans = [smcWrapper get_fan_num];
s_menus=[[NSMutableArray alloc] init];
[s_menus autorelease];
int i;
for(i=0;i<[smcWrapper get_fan_num];i++){
for(i=0;i<g_numFans;i++){
NSMenuItem *mitem=[[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"Fan: %d",i] action:NULL keyEquivalent:@""];
[mitem setTag:(i+1)*10];
[s_menus insertObject:mitem atIndex:i];
[mitem release];
}
[FavoritesController bind:@"content"
toObject:[NSUserDefaultsController sharedUserDefaultsController]
withKeyPath:@"values.Favorites"
withKeyPath:[@"values." stringByAppendingString:PREF_FAVORITES_ARRAY]
options:nil];
[FavoritesController setEditable:YES];
// set slider sync - only for MBP
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];
[self syncBinder:[[[[FavoritesController arrangedObjects] objectAtIndex:i] objectForKey:@"sync"] boolValue]];
[self syncBinder:[[FavoritesController arrangedObjects][i][PREF_FAN_SYNC] boolValue]];
}
}
@ -211,38 +198,76 @@ NSString *authpw;
[autochange setEnabled:false];
}
[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]];
[[[[theMenu itemWithTag:1] submenu] itemAtIndex:[[defaults objectForKey:@"SelDefault"] intValue]] setState:NSOnState];
[self apply_settings:nil controllerindex:[[defaults objectForKey:PREF_SELECTION_DEFAULT] intValue]];
[[[[theMenu itemWithTag:1] submenu] itemAtIndex:[[defaults objectForKey:PREF_SELECTION_DEFAULT] intValue]] setState:NSOnState];
[[sliderCell dataCell] setControlSize:NSSmallControlSize];
[self changeMenu:nil];
//seting toolbar image
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 = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"smc" 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
_readTimer = [NSTimer scheduledTimerWithTimeInterval:3.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:)]) {
[_readTimer setTolerance:2.0];
}
[_readTimer fire];
//autoapply settings if valid
[self upgradeFavorites];
//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{
statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength: NSVariableStatusItemLength] retain];
statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength: NSVariableStatusItemLength];
[statusItem setMenu: theMenu];
[statusItem setEnabled: YES];
[statusItem setHighlightMode:YES];
[statusItem setTitle:@"smc..."];
if ([statusItem respondsToSelector:@selector(button)]) {
[statusItem.button setTitle:@"smc..."];
} else {
[statusItem setEnabled: YES];
[statusItem setHighlightMode:YES];
[statusItem setTitle:@"smc..."];
}
int 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
// so that the fan speeds in the menu can be updated
// only when needed.
[theMenu setDelegate:self];
}
@ -271,147 +296,228 @@ NSString *authpw;
- (IBAction)save_favorite:(id)sender{
MachineDefaults *msdefaults=[[MachineDefaults alloc] init:nil];
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
[toinsert setValue:[NSNumber numberWithInt:0] forKey:@"Standard"];
NSMutableDictionary *toinsert=[[NSMutableDictionary alloc] initWithObjectsAndKeys:[newfavorite_title stringValue],@"Title",[msdefaults get_machine_defaults][@"Fans"],PREF_FAN_ARRAY,nil]; //default as template
[toinsert setValue:@0 forKey:@"Standard"];
[FavoritesController addObject:toinsert];
[toinsert release];
[newfavoritewindow close];
[[NSApplication sharedApplication] endSheet:newfavoritewindow];
}
[msdefaults release];
[self upgradeFavorites];
}
-(void) check_deletion:(id)combo{
if ([FavoritesController selectionIndex]==[[defaults objectForKey:combo] intValue]) {
[defaults setObject:[NSNumber numberWithInt:0] forKey:combo];
[defaults setObject:@0 forKey:combo];
}
}
- (IBAction)delete_favorite:(id)sender{
int pressesButton=NSRunCriticalAlertPanelRelativeToWindow(
NSLocalizedString(@"Delete favorite",nil),
[NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the favorite %@?",nil), [ [ [FavoritesController arrangedObjects] objectAtIndex:[FavoritesController selectionIndex]] objectForKey:@"Title"] ],
NSLocalizedString(@"No",nil),
NSLocalizedString(@"Yes",nil),nil,mainwindow);
if (pressesButton==0) {
- (void) deleteAlertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
{
if (returnCode==0) {
//delete favorite, but resets presets before
[self check_deletion:@"selbatt"];
[self check_deletion:@"selac"];
[self check_deletion:@"selload"];
[FavoritesController removeObjects:[FavoritesController selectedObjects]];
[self check_deletion:PREF_BATTERY_SELECTION];
[self check_deletion:PREF_AC_SELECTION];
[self check_deletion:PREF_CHARGING_SELECTION];
[FavoritesController removeObjects:[FavoritesController selectedObjects]];
}
}
- (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][[FavoritesController selectionIndex]][@"Title"] ]];
[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.
//reads fan data and updates the gui
-(void) readFanData:(NSTimer*)timer{
-(void) readFanData:(id)caller{
NSString *temp;
NSString *fan;
int i = 0;
//on init handling
if (s_sed==nil) {
if (_machineDefaultsDict==nil) {
return;
}
//populate Menu Items with recent Data
int i;
for(i=0;i<[smcWrapper get_fan_num];i++){
NSString *fandesc=[[[s_sed objectForKey:@"Fans"] objectAtIndex:i] objectForKey:@"Description"];
[[theMenu itemWithTag:(i+1)*10] setTitle:[NSString stringWithFormat:@"%@: %@ rpm",fandesc,[[NSNumber numberWithInt:[smcWrapper get_fan_rpm:i]] stringValue]]];
}
float c_temp=[smcWrapper get_maintemp];
if ([[defaults objectForKey:@"Unit"] intValue]==0) {
temp=[NSString stringWithFormat:@"%@%CC",[NSNumber numberWithFloat:c_temp],(unsigned short)0xb0];
} else {
NSNumberFormatter *ncf=[[[NSNumberFormatter alloc] init] autorelease];
[ncf setFormat:@"00;00;-00"];
temp=[NSString stringWithFormat:@"%@%CF",[ncf stringForObjectValue:[[NSNumber numberWithFloat:c_temp] celsius_fahrenheit]],(unsigned short)0xb0];
}
NSNumberFormatter *nc=[[[NSNumberFormatter alloc] init] autorelease];
//avoid jumping in menu bar
[nc setFormat:@"000;000;-000"];
int selected = 0;
NSArray *fans = [[[FavoritesController arrangedObjects] objectAtIndex:[FavoritesController selectionIndex]] objectForKey:@"FanData"];
for (i=0;i<[fans count];i++)
{
if ([[[fans objectAtIndex:i] objectForKey:@"menu"] boolValue]==YES) {
selected = i;
}
}
fan=[NSString stringWithFormat:@"%@rpm",[nc stringForObjectValue:[NSNumber numberWithFloat:[smcWrapper get_fan_rpm:selected]]]];
// Determine what data is actually needed to keep the energy impact
// as low as possible.
bool bNeedTemp = false;
bool bNeedRpm = false;
const int menuBarSetting = [[defaults objectForKey:PREF_MENU_DISPLAYMODE] intValue];
switch (menuBarSetting) {
default:
case 1:
bNeedTemp = true;
bNeedRpm = true;
break;
case 2:
bNeedTemp = true;
bNeedRpm = true;
break;
case 3:
bNeedTemp = true;
bNeedRpm = false;
break;
case 4:
bNeedTemp = false;
bNeedRpm = true;
break;
}
if ([[defaults objectForKey:@"MenuBar"] intValue]<=1) {
NSString *add;
int fsize;
if ([[defaults objectForKey:@"MenuBar"] intValue]==0) {
add=@"\n";
fsize=9;
[statusItem setLength:53];
} else {
add=@" ";
fsize=11;
[statusItem setLength:96];
}
NSMutableAttributedString *s_status=[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@%@%@",temp,add,fan]];
NSMutableParagraphStyle *paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraphStyle setAlignment:NSLeftTextAlignment];
[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:NSForegroundColorAttributeName value:(NSColor*)[NSUnarchiver unarchiveObjectWithData:[defaults objectForKey:@"MenuColor"]] range:NSMakeRange(0,[s_status length])];
[statusItem setAttributedTitle:s_status];
[statusItem setImage:nil];
[statusItem setAlternateImage:nil];
[paragraphStyle release];
[s_status release];
}
if ([[defaults objectForKey:@"MenuBar"] intValue]==2) {
[statusItem setLength:26];
[statusItem setTitle:nil];
[statusItem setToolTip:[NSString stringWithFormat:@"%@\n%@",temp,fan]];
[statusItem setImage:menu_image];
[statusItem setAlternateImage:menu_image_alt];
}
if ([[defaults objectForKey:@"MenuBar"] intValue]==3) {
[statusItem setLength:46];
NSMutableAttributedString *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:NSForegroundColorAttributeName value:(NSColor*)[NSUnarchiver unarchiveObjectWithData:[defaults objectForKey:@"MenuColor"]] range:NSMakeRange(0,[s_status length])];
[statusItem setAttributedTitle:s_status];
[statusItem setImage:nil];
[statusItem setAlternateImage:nil];
[s_status release];
}
if ([[defaults objectForKey:@"MenuBar"] intValue]==4) {
[statusItem setLength:65];
NSMutableAttributedString *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:NSForegroundColorAttributeName value:(NSColor*)[NSUnarchiver unarchiveObjectWithData:[defaults objectForKey:@"MenuColor"]] range:NSMakeRange(0,[s_status length])];
[statusItem setAttributedTitle:s_status];
[statusItem setImage:nil];
[statusItem setAlternateImage:nil];
[s_status release];
}
NSString *temp = nil;
NSString *fan = nil;
float c_temp = 0.0f;
int selectedRpm = 0;
if (bNeedRpm == true) {
// Read the current fan speed for the desired fan and format text for display in the menubar.
NSArray *fans = [FavoritesController arrangedObjects][[FavoritesController selectionIndex]][PREF_FAN_ARRAY];
for (i=0; i<g_numFans && i<[fans count]; i++)
{
if ([fans[i][PREF_FAN_SHOWMENU] boolValue]==YES) {
selectedRpm = [smcWrapper get_fan_rpm:i];
break;
}
}
NSNumberFormatter *nc=[[NSNumberFormatter alloc] init];
//avoid jumping in menu bar
[nc setFormat:@"000;000;-000"];
fan = [NSString stringWithFormat:@"%@rpm",[nc stringForObjectValue:[NSNumber numberWithFloat:selectedRpm]]];
}
if (bNeedTemp == true) {
// Read current temperature and format text for the menubar.
c_temp = [smcWrapper get_maintemp];
if ([[defaults objectForKey:PREF_TEMP_UNIT] intValue]==0) {
temp = [NSString stringWithFormat:@"%@%CC",@(c_temp),(unsigned short)0xb0];
} else {
NSNumberFormatter *ncf=[[NSNumberFormatter alloc] init];
[ncf setFormat:@"00;00;-00"];
temp = [NSString stringWithFormat:@"%@%CF",[ncf stringForObjectValue:[@(c_temp) celsius_fahrenheit]],(unsigned short)0xb0];
}
}
// Update the temp and/or fan speed text in the menubar.
NSMutableAttributedString *s_status = 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) {
default:
case 1: {
int fsize = 0;
NSString *add = nil;
if (menuBarSetting==0) {
add=@"\n";
fsize=9;
[statusItem setLength:53];
} else {
add=@" ";
fsize=11;
[statusItem setLength:96];
}
s_status=[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@%@%@",temp,add,fan]];
paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraphStyle setAlignment:NSLeftTextAlignment];
[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])];
if (setColor) [s_status addAttribute:NSForegroundColorAttributeName value:menuColor range:NSMakeRange(0,[s_status length])];
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;
}
case 2:
// 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.
[statusItem setLength:26];
if ([statusItem respondsToSelector:@selector(button)]) {
[statusItem.button setTitle:nil];
[statusItem.button setToolTip:[NSString stringWithFormat:@"%@\n%@",temp,fan]];
[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;
case 3:
[statusItem setLength:46];
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])];
if (setColor) [s_status addAttribute:NSForegroundColorAttributeName value:menuColor range:NSMakeRange(0,[s_status length])];
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;
case 4:
[statusItem setLength:65];
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])];
if (setColor) [s_status addAttribute:NSForegroundColorAttributeName value:menuColor range:NSMakeRange(0,[s_status length])];
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;
}
}
- (IBAction)savePreferences:(id)sender{
[(NSUserDefaultsController *)DefaultsController save:sender];
[defaults setValue:[FavoritesController content] forKey:@"Favorites"];
[defaults setValue:[FavoritesController content] forKey:PREF_FAVORITES_ARRAY];
[defaults synchronize];
[mainwindow close];
[self apply_settings:sender controllerindex:[FavoritesController selectionIndex]];
@ -432,17 +538,17 @@ NSString *authpw;
int i;
[FanControl setRights];
[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]];
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] autorelease];
NSMenu *submenu = [[NSMenu alloc] init];
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 setEnabled:YES];
[submenuItem setTarget:self];
[submenuItem setRepresentedObject:[[FavoritesController arrangedObjects] objectAtIndex:i]];
[submenuItem setRepresentedObject:[FavoritesController arrangedObjects][i]];
[submenu addItem:submenuItem];
}
@ -451,9 +557,9 @@ NSString *authpw;
[[[[theMenu itemWithTag:1] submenu] itemAtIndex:i] setState:NSOffState];
}
[[[[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
[[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] ]];
}
@ -474,17 +580,10 @@ NSString *authpw;
-(void)terminate:(id)sender{
//get last active selection
[defaults synchronize];
SMCClose(conn);
[smcWrapper cleanUp];
[_readTimer invalidate];
[pw deregisterForSleepWakeNotification];
[pw deregisterForPowerChange];
[pw release];
[menu_image release];
[menu_image_alt release];
//[mdefaults release];
//[statusItem release];
//[s_menus release];
//[theMenu release];
[[NSApplication sharedApplication] terminate:self];
}
@ -500,7 +599,7 @@ NSString *authpw;
- (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];
} else {
[colorSelector setEnabled:YES];
@ -513,10 +612,29 @@ NSString *authpw;
int i;
for (i=0;i<[[FanController arrangedObjects] count];i++) {
if (i!=[sender selectedRow]) {
[[[FanController arrangedObjects] objectAtIndex:i] setValue:[NSNumber numberWithBool:NO] forKey:@"menu"];
[[FanController arrangedObjects][i] setValue:@NO forKey:PREF_FAN_SHOWMENU];
}
}
}
}
// Called when user clicks on smcFanControl status bar item
// in the status area of the menubar. The fan speed
// menu items are now only updated here in order to
// reduce the energy impact of -readFanData.
- (void)menuNeedsUpdate:(NSMenu*)menu {
dispatch_async(dispatch_get_main_queue(), ^{
if (theMenu == menu) {
if (_machineDefaultsDict == nil)
return;
int i;
for(i=0; i<g_numFans; ++i){
NSString *fandesc=_machineDefaultsDict[@"Fans"][i][@"Description"];
[[theMenu itemWithTag:(i+1)*10] setTitle:[NSString stringWithFormat:@"%@: %@ rpm",fandesc,[@([smcWrapper get_fan_rpm:i]) stringValue]]];
}
}
});
}
@ -524,12 +642,53 @@ NSString *authpw;
//just a helper to bringt update-info-window to the front
- (IBAction)updateCheck:(id)sender{
[[[SUUpdater alloc] init] checkForUpdates:sender];
SUUpdater *updater = [[SUUpdater alloc] init];
[updater checkForUpdates:sender];
[[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;
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{
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.eidac.de/products"]];
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://www.eidac.de/products"]];
}
@ -541,11 +700,11 @@ NSString *authpw;
//in case plist is corrupt, don't bind
if ([[FanController arrangedObjects] count]>1 ) {
if (bind==YES) {
[[[FanController arrangedObjects] objectAtIndex:1] bind:@"selspeed" toObject:[[FanController arrangedObjects] objectAtIndex:0] withKeyPath:@"selspeed" options:nil];
[[[FanController arrangedObjects] objectAtIndex:0] bind:@"selspeed" toObject:[[FanController arrangedObjects] objectAtIndex:1] withKeyPath:@"selspeed" options:nil];
[[FanController arrangedObjects][1] bind:PREF_FAN_SELSPEED toObject:[FanController arrangedObjects][0] withKeyPath:PREF_FAN_SELSPEED options:nil];
[[FanController arrangedObjects][0] bind:PREF_FAN_SELSPEED toObject:[FanController arrangedObjects][1] withKeyPath:PREF_FAN_SELSPEED options:nil];
} else {
[[[FanController arrangedObjects] objectAtIndex:1] unbind:@"selspeed"];
[[[FanController arrangedObjects] objectAtIndex:0] unbind:@"selspeed"];
[[FanController arrangedObjects][1] unbind:PREF_FAN_SELSPEED];
[[FanController arrangedObjects][0] unbind:PREF_FAN_SELSPEED];
}
}
}
@ -554,27 +713,27 @@ NSString *authpw;
#pragma mark **Power Watchdog-Methods**
- (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{
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{
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{
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]];
}
}
@ -588,14 +747,14 @@ NSString *authpw;
BOOL found = NO;
LSSharedFileListRef loginItems = LSSharedFileListCreate(kCFAllocatorDefault, kLSSharedFileListSessionLoginItems, /*options*/ NULL);
NSString *path = [[NSBundle mainBundle] bundlePath];
CFURLRef URLToToggle = (CFURLRef)[NSURL fileURLWithPath:path];
LSSharedFileListItemRef existingItem = NULL;
CFURLRef URLToToggle = (__bridge CFURLRef)[NSURL fileURLWithPath:path];
//LSSharedFileListItemRef existingItem = NULL;
UInt32 seed = 0U;
NSArray *currentLoginItems = [NSMakeCollectable(LSSharedFileListCopySnapshot(loginItems, &seed)) autorelease];
NSArray *currentLoginItems = CFBridgingRelease(LSSharedFileListCopySnapshot(loginItems, &seed));
for (id itemObject in currentLoginItems) {
LSSharedFileListItemRef item = (LSSharedFileListItemRef)itemObject;
LSSharedFileListItemRef item = (__bridge LSSharedFileListItemRef)itemObject;
UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
CFURLRef URL = NULL;
@ -605,7 +764,7 @@ NSString *authpw;
CFRelease(URL);
if (foundIt) {
existingItem = item;
//existingItem = item;
found = YES;
break;
}
@ -622,14 +781,14 @@ NSString *authpw;
NSString *path = [[NSBundle mainBundle] bundlePath];
OSStatus status;
CFURLRef URLToToggle = (CFURLRef)[NSURL fileURLWithPath:path];
CFURLRef URLToToggle = (__bridge CFURLRef)[NSURL fileURLWithPath:path];
LSSharedFileListItemRef existingItem = NULL;
UInt32 seed = 0U;
NSArray *currentLoginItems = [NSMakeCollectable(LSSharedFileListCopySnapshot(loginItems, &seed)) autorelease];
NSArray *currentLoginItems = CFBridgingRelease(LSSharedFileListCopySnapshot(loginItems, &seed));
for (id itemObject in currentLoginItems) {
LSSharedFileListItemRef item = (LSSharedFileListItemRef)itemObject;
LSSharedFileListItemRef item = (__bridge LSSharedFileListItemRef)itemObject;
UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
CFURLRef URL = NULL;
@ -661,48 +820,76 @@ NSString *authpw;
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))
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**
//TODO: It looks like this function is called inefficiently.
//call smc binary with sudo rights and apply
+(void)setRights{
NSString *smcpath = [[NSBundle mainBundle] pathForResource:@"smc" ofType:@""];
NSFileManager *fmanage=[NSFileManager defaultManager];
NSDictionary *fdic = [fmanage attributesOfItemAtPath:smcpath error:nil];
if ([[fdic valueForKey:@"NSFileOwnerAccountName"] isEqualToString:@"root"] && [[fdic valueForKey:@"NSFileGroupOwnerAccountName"] isEqualToString:@"admin"] && ([[fdic valueForKey:@"NSFilePosixPermissions"] intValue]==3437)) {
return;
}
// If the SMC binary has already been modified to run as root, then do nothing.
return;
}
//TODO: Is the usage of commPipe safe?
FILE *commPipe;
AuthorizationRef authorizationRef;
AuthorizationItem gencitem = { "system.privilege.admin", 0, NULL, 0 };
AuthorizationRights gencright = { 1, &gencitem };
int flags = kAuthorizationFlagExtendRights | kAuthorizationFlagInteractionAllowed;
status = AuthorizationCreate(&gencright, kAuthorizationEmptyEnvironment, flags, &authorizationRef);
NSString *tool=@"/usr/sbin/chown";
NSArray *argsArray = [NSArray arrayWithObjects: @"root:admin",smcpath,nil];
OSStatus status = AuthorizationCreate(&gencright, kAuthorizationEmptyEnvironment, flags, &authorizationRef);
[self checkRightStatus:status];
NSString *tool=@"/usr/sbin/chown";
NSArray *argsArray = @[@"root:admin",smcpath];
int i;
char *args[255];
for(i = 0;i < [argsArray count];i++){
args[i] = (char *)[[argsArray objectAtIndex:i]cString];
args[i] = (char *)[argsArray[i]cString];
}
args[i] = NULL;
status=AuthorizationExecuteWithPrivileges(authorizationRef,[tool UTF8String],0,args,&commPipe);
//second call for suid-bit
[self checkRightStatus:status];
//second call for suid-bit
tool=@"/bin/chmod";
argsArray = [NSArray arrayWithObjects: @"6555",smcpath,nil];
argsArray = @[@"6555",smcpath];
for(i = 0;i < [argsArray count];i++){
args[i] = (char *)[[argsArray objectAtIndex:i]cString];
args[i] = (char *)[argsArray[i]cString];
}
args[i] = NULL;
status=AuthorizationExecuteWithPrivileges(authorizationRef,[tool UTF8String],0,args,&commPipe);
[self checkRightStatus:status];
}
-(void)dealloc
{
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
}
@end
@ -718,7 +905,7 @@ NSString *authpw;
- (NSNumber*) celsius_fahrenheit{
float celsius=[self floatValue];
float fahrenheit=(celsius*9)/5+32;
return [NSNumber numberWithFloat:fahrenheit];
return @(fahrenheit);
}
@end

View File

@ -30,8 +30,9 @@
int machine_num;
}
+ (NSString *)computerModel;
- (id)init:(NSString*)p_machine;
-(NSDictionary*)get_machine_defaults;
- (void)dealloc;
+ (NSString *)computerModel;
- (instancetype)init:(NSString*)p_machine ;
@property (NS_NONATOMIC_IOSONLY, getter=get_machine_defaults, readonly, copy) NSDictionary *_machine_defaults;
@end

View File

@ -23,57 +23,67 @@
#import "MachineDefaults.h"
#import "NSFileManager+DirectoryLocations.h"
@interface MachineDefaults ()
{
}
@end
@implementation MachineDefaults
- (id)init:(NSString*)p_machine{
machine=[MachineDefaults computerModel];
supported_machines=[[NSArray alloc] initWithContentsOfFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"]];
- (instancetype)init:(NSString*)p_machine{
if (self = [super init]){
machine=[MachineDefaults computerModel];
[self refreshPlist];
}
return self;
}
-(Boolean)is_supported{
int i;
supported=NO;
for(i=0;i<[supported_machines count];i++) {
if ([machine isEqualToString:[[supported_machines objectAtIndex:i] objectForKey:@"Machine"]]) {
supported=YES;
machine_num=i;
}
}
return supported;
-(void)refreshPlist
{
supported_machines=[[NSArray alloc] initWithContentsOfFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"]];
supported=NO;
int i;
for(i=0;i<[supported_machines count];i++) {
if ([machine isEqualToString:supported_machines[i][@"Machine"]]) {
supported=YES;
machine_num=i;
}
}
}
-(NSDictionary*) readfrom_plist{
-(NSDictionary*) readFromPlist{
if (!supported) {return nil;}
return [supported_machines objectAtIndex:machine_num];
return supported_machines[machine_num];
}
-(NSDictionary*) readfrom_smc{
if (supported) {return nil;}
int num_fans,i;
[smcWrapper init];
num_fans=[smcWrapper get_fan_num];
-(void) readFromSMC{
NSUInteger num_fans=[smcWrapper get_fan_num];
NSString *desc;
NSNumber *min,*max;
NSData *xmldata;
NSString *error;
NSMutableArray *fans=[[NSMutableArray alloc] init];
for (i = 0; i < num_fans; i++) {
min=[NSNumber numberWithInt:[smcWrapper get_min_speed:i]];
max=[NSNumber numberWithInt:[smcWrapper get_max_speed:i]];
for (NSUInteger i = 0; i < num_fans; i++) {
min=@([smcWrapper get_min_speed:i]);
max=@([smcWrapper get_max_speed: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
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];
[fans release];
NSMutableArray *supported_m=[[NSMutableArray alloc] initWithContentsOfFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"]];
NSMutableDictionary *new_machine;
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];
//save to plist
@ -81,37 +91,36 @@
format:NSPropertyListXMLFormat_v1_0
errorDescription:&error];
[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 *m_defaults=nil;
if ([self is_supported]) {
m_defaults=[self readfrom_plist];
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)
if (!supported) {
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Alert!",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)];
int code=[alert runModal];
if (code==NSAlertDefaultReturn) {
m_defaults=[self readfrom_smc];
NSModalResponse code=[alert runModal];
if (code == NSAlertDefaultReturn) {
[self readFromSMC];
[self refreshPlist];
} else {
[[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
@ -122,18 +131,13 @@
if ((pexpdev = IOServiceGetMatchingService (kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"))))
{
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];
[data release];
}
}
}
return computerModel;
}
- (void)dealloc{
[super dealloc];
//[supported_machines release];
}
@end

View File

@ -31,6 +31,6 @@
inDomain:(NSSearchPathDomainMask)domainMask
appendPathComponent:(NSString *)appendComponent
error:(NSError **)errorOut;
- (NSString *)applicationSupportDirectory;
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *applicationSupportDirectory;
@end

View File

@ -31,120 +31,93 @@ NSString * const DirectoryLocationDomain = @"DirectoryLocationDomain";
@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
// 2) Select the first path in the results
// 3) Append a subdirectory to that path
// 4) Create the directory and intermediate directories if needed
// 5) Handle errors by emitting a proper NSError object
//
// Parameters:
// searchPathDirectory - the search path passed to NSSearchPathForDirectoriesInDomains
// domainMask - the domain mask passed to NSSearchPathForDirectoriesInDomains
// appendComponent - the subdirectory appended
// errorOut - any error from file operations
//
// returns the path to the directory (if path found and exists), nil otherwise
//
/*! Method to tie together the steps of:
1) Locate a standard directory by search path and domain mask
2) Select the first path in the results
3) Append a subdirectory to that path
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
* \pararm appendComponent - the subdirectory appended
* \pararm errorOut - any error from file operations
* \returns returns the path to the directory (if path found and exists), nil otherwise
*/
- (NSString *)findOrCreateDirectory:(NSSearchPathDirectory)searchPathDirectory
inDomain:(NSSearchPathDomainMask)domainMask
appendPathComponent:(NSString *)appendComponent
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
//
NSArray* paths = NSSearchPathForDirectoriesInDomains(
searchPathDirectory,
domainMask,
YES);
NSArray* paths = NSSearchPathForDirectoriesInDomains(searchPathDirectory,domainMask,YES);
if ([paths count] == 0)
{
if (errorOut)
{
NSDictionary *userInfo =
[NSDictionary dictionaryWithObjectsAndKeys:
NSLocalizedStringFromTable(
@"No path found for directory in domain.",
@"Errors",
nil),
NSLocalizedDescriptionKey,
[NSNumber numberWithInteger:searchPathDirectory],
@"NSSearchPathDirectory",
[NSNumber numberWithInteger:domainMask],
@"NSSearchPathDomainMask",
nil];
*errorOut =
[NSError
errorWithDomain:DirectoryLocationDomain
code:DirectoryLocationErrorNoPathFound
userInfo:userInfo];
}
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"No path found for directory in domain.",@"Errors",nil),
@"NSSearchPathDirectory":@(searchPathDirectory),
@"NSSearchPathDomainMask":@(domainMask)};
error = [NSError errorWithDomain:DirectoryLocationDomain
code:DirectoryLocationErrorNoPathFound
userInfo:userInfo];
return nil;
}
//
// Normally only need the first path returned
//
NSString *resolvedPath = [paths objectAtIndex:0];
NSString *resolvedPath = paths[0];
//
// Append the extra path component
//
if (appendComponent)
{
resolvedPath = [resolvedPath
stringByAppendingPathComponent:appendComponent];
resolvedPath = [resolvedPath stringByAppendingPathComponent:appendComponent];
}
//
// 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 (errorOut)
{
*errorOut = nil;
}
return resolvedPath;
if ([self createDirectoryAtPath:resolvedPath withIntermediateDirectories:YES
attributes:nil error:&error])
return resolvedPath;
else
return nil;
}
//
// applicationSupportDirectory
//
// Returns the path to the applicationSupportDirectory (creating it if it doesn't
// exist).
//
/*! applicationSupportDirectory
* \returns The path to the applicationSupportDirectory (creating it if it doesn't exist).
*/
- (NSString *)applicationSupportDirectory
{
NSString *executableName =
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleExecutable"];
NSError *error;
NSString *result =
[self
findOrCreateDirectory:NSApplicationSupportDirectory
inDomain:NSUserDomainMask
appendPathComponent:executableName
error:&error];
NSString *executableName = [[NSBundle mainBundle] infoDictionary][@"CFBundleExecutable"];
NSError *error = nil;
NSString *result = [self findOrCreateDirectory:NSApplicationSupportDirectory
inDomain:NSUserDomainMask
appendPathComponent:executableName
error:&error];
if (!result)
{
NSLog(@"Unable to find or create application support directory:\n%@", error);

View File

@ -37,10 +37,9 @@
}
- (id)init;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (id)delegate;
- (void)setDelegate:(id)new_delegate;
@property (NS_NONATOMIC_IOSONLY, unsafe_unretained) id delegate;
- (void)registerForSleepWakeNotification;
- (void)deregisterForSleepWakeNotification;

View File

@ -31,7 +31,7 @@ static int lastsource=0;
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,29 +48,31 @@ static void powerSourceChanged(void * refCon)
powerSource = CFArrayGetValueAtIndex(powerSourcesList, i);
description = IOPSGetPowerSourceDescription(powerBlob, powerSource);
//work with NSArray from here
NSDictionary *n_description = (NSDictionary *)description;
[(Power *)refCon powerSourceMesssageReceived:n_description];
NSDictionary *n_description = (__bridge NSDictionary *)description;
[(__bridge Power *)refCon powerSourceMesssageReceived:n_description];
}
CFRelease(powerBlob);
CFRelease(powerSourcesList);
}
- (id)init{
[super init];
- (instancetype)init{
if (self = [super init]) {
}
return self;
}
- (void)registerForSleepWakeNotification
{
root_port = IORegisterForSystemPower(self, &notificationPort, SleepWatcher, &notifier);
root_port = IORegisterForSystemPower((__bridge void *)(self), &notificationPort, SleepWatcher, &notifier);
CFRunLoopAddSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(notificationPort), kCFRunLoopDefaultMode);
}
- (void)registerForPowerChange
{
powerNotifierRunLoopSource = IOPSNotificationCreateRunLoopSource(powerSourceChanged,self);
powerNotifierRunLoopSource = IOPSNotificationCreateRunLoopSource(powerSourceChanged,(__bridge void *)(self));
if (powerNotifierRunLoopSource) {
CFRunLoopAddSource(CFRunLoopGetCurrent(), powerNotifierRunLoopSource, kCFRunLoopDefaultMode);
}
@ -116,7 +118,7 @@ static void powerSourceChanged(void * refCon)
}
- (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;
if ([_delegate respondsToSelector:@selector(powerChangeToACLoading:)])
[_delegate powerChangeToACLoading:self];
@ -127,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;
if ([_delegate respondsToSelector:@selector(powerChangeToAC:)])
[_delegate powerChangeToAC:self];
@ -137,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;
if ([_delegate respondsToSelector:@selector(powerChangeToBattery:)])
[_delegate powerChangeToBattery:self];
@ -169,7 +171,6 @@ static void powerSourceChanged(void * refCon)
if (_delegate)
[nc removeObserver:_delegate name:nil object:self];
[super dealloc];
}

View File

@ -68,18 +68,18 @@ static NSString *const kSystemVersionPlistPath = @"/System/Library/CoreServices/
#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_3
#else // GTM_MACOS_SDK
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSDictionary *systemVersionPlist
= [NSDictionary dictionaryWithContentsOfFile:kSystemVersionPlistPath];
NSString *version = [systemVersionPlist objectForKey:@"ProductVersion"];
NSArray *versionInfo = [version componentsSeparatedByString:@"."];
int length = [versionInfo count];
sGTMSystemVersionMajor = [[versionInfo objectAtIndex:0] intValue];
sGTMSystemVersionMinor = [[versionInfo objectAtIndex:1] intValue];
if (length == 3) {
sGTMSystemVersionBugFix = [[versionInfo objectAtIndex:2] intValue];
@autoreleasepool {
NSDictionary *systemVersionPlist
= [NSDictionary dictionaryWithContentsOfFile:kSystemVersionPlistPath];
NSString *version = systemVersionPlist[@"ProductVersion"];
NSArray *versionInfo = [version componentsSeparatedByString:@"."];
int length = [versionInfo count];
sGTMSystemVersionMajor = [versionInfo[0] intValue];
sGTMSystemVersionMinor = [versionInfo[1] intValue];
if (length == 3) {
sGTMSystemVersionBugFix = [versionInfo[2] intValue];
}
}
[pool release];
#endif // GTM_MACOS_SDK
}
}
@ -104,7 +104,7 @@ static NSString *const kSystemVersionPlistPath = @"/System/Library/CoreServices/
if (!sBuild) {
NSDictionary *systemVersionPlist
= [NSDictionary dictionaryWithContentsOfFile:kSystemVersionPlistPath];
sBuild = [[systemVersionPlist objectForKey:@"ProductBuildVersion"] retain];
sBuild = systemVersionPlist[@"ProductBuildVersion"];
}
}
return sBuild;

7
Classes/smcWrapper.h Normal file → Executable file
View File

@ -2,7 +2,8 @@
* FanControl
*
* Copyright (c) 2006-2012 Hendrik Holtmann
*
* Portions Copyright (c) 2013 Michael Wilber
*
* smcWrapper.m - MacBook(Pro) FanControl application
*
* This program is free software; you can redistribute it and/or modify
@ -20,14 +21,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <openssl/evp.h>
#import <Cocoa/Cocoa.h>
#import <smc.h>
#import <MachineDefaults.h>
#import "Constants.h"
@interface smcWrapper : NSObject {
}
+(void) cleanUp;
+(int) get_fan_rpm:(int)fan_number;
+(float) get_maintemp;
+(float) get_mptemp;

121
Classes/smcWrapper.m Normal file → Executable file
View File

@ -2,7 +2,8 @@
* FanControl
*
* Copyright (c) 2006-2012 Hendrik Holtmann
*
* Portions Copyright (c) 2013 Michael Wilber
*
* smcWrapper.m - MacBook(Pro) FanControl application
*
* This program is free software; you can redistribute it and/or modify
@ -22,48 +23,54 @@
#import "smcWrapper.h"
#import <CommonCrypto/CommonDigest.h>
NSString * const smc_checksum=@"b8e7e0f50c1d837cedd91d9af54b167f";
NSString * const smc_checksum=@"2ea544babe8a58dccc1364c920d473c8";
static NSDictionary *tsensors = nil;
NSArray *allSensors;
@implementation smcWrapper
io_connect_t conn;
+(void)init{
SMCOpen(&conn);
tsensors = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"tsensors" ofType:@"plist"]];
}
+(void)cleanUp{
SMCClose(conn);
}
+(float) get_maintemp{
float c_temp;
NSRange range_pro=[[MachineDefaults computerModel] rangeOfString:@"MacPro"];
if (range_pro.length > 0) {
//special readout for MacPro
c_temp=[smcWrapper get_mptemp];
} else {
SMCVal_t val;
NSMutableArray *allTSensors = [[tsensors allKeys] mutableCopy];
NSString *foundKey = [tsensors objectForKey:[MachineDefaults computerModel]];
if (foundKey !=nil) {
foundKey = [MachineDefaults computerModel];
} else {
foundKey = @"standard";
}
[allTSensors removeObject:foundKey];
SMCReadKey2((char*)[[tsensors objectForKey:foundKey] UTF8String], &val,conn);
c_temp= ((val.bytes[0] * 256 + val.bytes[1]) >> 2)/64;
if (c_temp<=0) {
for (NSString *key in allTSensors) {
SMCReadKey2((char*)[[tsensors objectForKey:key] UTF8String], &val,conn);
c_temp= ((val.bytes[0] * 256 + val.bytes[1]) >> 2)/64;
if (c_temp>0) break;
+(float)readTempSensors
{
float retValue;
SMCVal_t val;
NSString *sensor = [[NSUserDefaults standardUserDefaults] objectForKey:PREF_TEMPERATURE_SENSOR];
SMCReadKey2((char*)[sensor UTF8String], &val,conn);
retValue= ((val.bytes[0] * 256 + val.bytes[1]) >> 2)/64;
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= ((val.bytes[0] * 256 + val.bytes[1]) >> 2)/64;
if (retValue>0 && floor(retValue) != 129 ) {
[[NSUserDefaults standardUserDefaults] setObject:sensor forKey:PREF_TEMPERATURE_SENSOR];
[[NSUserDefaults standardUserDefaults] synchronize];
break;
}
}
}
return retValue;
}
return c_temp;
+(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;
}
@ -109,7 +116,7 @@ static NSDictionary *tsensors = nil;
SMCVal_t val;
int totalFans;
SMCReadKey2("FNum", &val,conn);
totalFans = _strtoul(val.bytes, val.dataSize, 10);
totalFans = _strtoul((char *)val.bytes, val.dataSize, 10);
return totalFans;
}
@ -120,7 +127,7 @@ static NSDictionary *tsensors = nil;
//kern_return_t result;
NSMutableString *desc;
// desc=[[NSMutableString alloc] initWithFormat:@"Fan #%d: ",fan_number+1];
desc=[[[NSMutableString alloc]init] autorelease];
desc=[[NSMutableString alloc]init];
sprintf(key, "F%dID", fan_number);
SMCReadKey2(key, &val,conn);
int i;
@ -155,34 +162,64 @@ static NSDictionary *tsensors = nil;
}
+ (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 {
NSData *d=[NSData dataWithContentsOfMappedFile:path];
unsigned char result[CC_MD5_DIGEST_LENGTH];
CC_MD5((void *)[d bytes], [d length], result);
NSMutableString *ret = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH*2];
int i;
for(i = 0; i<CC_MD5_DIGEST_LENGTH; i++) {
for(int i = 0; i<CC_MD5_DIGEST_LENGTH; i++) {
[ret appendFormat:@"%02x",result[i]];
}
return ret;
}
//call smc binary with setuid rights and apply
// The smc binary is given root permissions in FanControl.m with the setRights method.
+(void)setKey_external:(NSString *)key value:(NSString *)value{
NSString *launchPath = [[NSBundle mainBundle] pathForResource:@"smc" ofType:@""];
//first check if it's the right binary (security)
NSString *checksum=[smcWrapper createCheckSum:launchPath];
if (![checksum isEqualToString:smc_checksum]) {
NSLog(@"smcFanControl: Security Error: smc-binary is not the distributed one");
return;
}
NSArray *argsArray = [NSArray arrayWithObjects: @"-k",key,@"-w",value,nil];
NSString *checksum=[smcWrapper createCheckSum:launchPath];
if (![checksum isEqualToString:smc_checksum]) {
NSLog(@"smcFanControl: Security Error: smc-binary is not the distributed one");
return;
}
NSArray *argsArray = @[@"-k",key,@"-w",value];
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath: launchPath];
[task setArguments: argsArray];
[task launch];
[task release];
}
@end

View File

@ -7,11 +7,11 @@
<key>CFBundleExecutable</key>
<string>smcFanControl</string>
<key>CFBundleGetInfoString</key>
<string>smcFanControl 2.4, Hendrik Holtmann (GPL)</string>
<string>smcFanControl 2.6, Hendrik Holtmann (GPL)</string>
<key>CFBundleIconFile</key>
<string>smcfancontrol_v2</string>
<key>CFBundleIdentifier</key>
<string>com.eidac.smcFanControl2</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@ -19,18 +19,20 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.4</string>
<string>2.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.4</string>
<string>2.6</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
<string>Hendrik Holtmann(GPL)</string>
<string>Hendrik Holtmann (GPL)</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>SUFeedURL</key>
<string>https://www.eidac.de/smcfancontrol/smcfancontrol.xml</string>
</dict>
</plist>

5
README
View File

@ -1,5 +0,0 @@
smcFanControl lets the user set the minimum speed of the build in fans. So you can increase your minimum fan speed to make your Intel Mac run cooler. However in order not to damage your machines smcFanControl doesn't let you set a minimum speed to a value below Apple's defaults.
Requirements: Intel Mac / OS X 10.5 or higher
License: GPL 2

28
Readme.md Normal file
View File

@ -0,0 +1,28 @@
# 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.
![My image](https://dl.dropbox.com/u/363242/screenshots/smc_screenshot.png)
## Installing it using Homebrew & Cask
Make sure you have both [Homebrew](http://brew.sh/) and [Cask](http://caskroom.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 Spotilight to launch smcFanControl normally. :-)
Requirements: Intel Mac / OS X 10.6 or higher
Compiled version: http://www.eidac.de/smcfancontrol/smcfancontrol_2_5_2.zip
FAQ / More info: Found in project under "Ressources/*.lproj/F.A.Q.rtf" or included in above .zip
License: GPL 2

View File

@ -1,14 +1,14 @@
{\rtf1\ansi\ansicpg1252\cocoartf1187
{\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}
{\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}}
\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\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
\f0\fs62 \cf0 F.A.Q for smcFanControl 2.6\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\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?\
\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
\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\
@ -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 uses standard OS X authentication now\
{\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 \
Sourcecode: https://github.com/hholtmann/smcFanControl
\b0 \
\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 \
\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 \
}

View File

@ -21,3 +21,22 @@
"Alert!" = "Let op!";
"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";

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,13 @@
{\rtf1\ansi\ansicpg1252\cocoartf1187
{\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
\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\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
\f0\fs62 \cf0 F.A.Q for smcFanControl 2.6\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\fs24 \cf0 \
@ -86,10 +86,10 @@ Will there be a version of smcFanControl for Powerbooks or other PPC based Macs?
\b \
\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
\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
\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\
@ -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 the Sparkle-Framework to automatically check for updates\
{\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 \
\b Sourcecode: https://github.com/hholtmann/smcFanControl

File diff suppressed because it is too large Load Diff

View 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 \
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,14 +1,14 @@
{\rtf1\ansi\ansicpg1252\cocoartf1187
{\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}
{\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}}
\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\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
\f0\fs62 \cf0 F.A.Q for smcFanControl 2.6\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\fs24 \cf0 \
@ -89,7 +89,7 @@ Will there be a version of smcFanControl for Powerbooks or other PPC based Macs?
\b0 \
\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
\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\
@ -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 uses standard OS X authentication now\
{\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 \
Sourcecode: https://github.com/hholtmann/smcFanControl
\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 \
}

View File

@ -21,3 +21,21 @@
"Alert!" = "Achtung!";
"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";

View File

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">12A269</string>
<string key="IBDocument.InterfaceBuilderVersion">2549</string>
<string key="IBDocument.AppKitVersion">1187</string>
<string key="IBDocument.HIToolboxVersion">624.00</string>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">14A388a</string>
<string key="IBDocument.InterfaceBuilderVersion">6249</string>
<string key="IBDocument.AppKitVersion">1343.14</string>
<string key="IBDocument.HIToolboxVersion">755.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">2549</string>
<string key="NS.object.0">6249</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>NSArrayController</string>
@ -70,7 +70,7 @@
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="56889179">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSScrollView" id="461777313">
@ -79,14 +79,15 @@
<array class="NSMutableArray" key="NSSubviews">
<object class="NSClipView" id="316084299">
<reference key="NSNextResponder" ref="461777313"/>
<int key="NSvFlags">2304</int>
<int key="NSvFlags">2322</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSTableView" id="439850576">
<reference key="NSNextResponder" ref="316084299"/>
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{295, 81}</string>
<reference key="NSSuperview" ref="316084299"/>
<reference key="NSNextKeyView" ref="362041177"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="769171705"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<bool key="NSControlAllowsExpansionToolTips">YES</bool>
@ -95,6 +96,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{295, 17}</string>
<reference key="NSSuperview" ref="362041177"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="316084299"/>
<reference key="NSTableView" ref="439850576"/>
</object>
@ -114,7 +116,7 @@
<int key="NSCellFlags2">2048</int>
<string key="NSContents">Menü</string>
<object class="NSFont" key="NSSupport" id="383878287">
<string key="NSName">LucidaGrande</string>
<bool key="IBIsSystemFont">YES</bool>
<double key="NSSize">10</double>
<int key="NSfFlags">2843</int>
</object>
@ -137,7 +139,7 @@
<int key="NSCellFlags2">134348800</int>
<string key="NSContents"/>
<object class="NSFont" key="NSSupport" id="26">
<string key="NSName">LucidaGrande</string>
<bool key="IBIsSystemFont">YES</bool>
<double key="NSSize">11</double>
<int key="NSfFlags">3100</int>
</object>
@ -180,11 +182,7 @@
<object class="NSTextFieldCell" key="NSDataCell" id="804844221">
<int key="NSCellFlags">337641536</int>
<int key="NSCellFlags2">2048</int>
<object class="NSFont" key="NSSupport" id="757538014">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">11</double>
<int key="NSfFlags">16</int>
</object>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="439850576"/>
<object class="NSColor" key="NSBackgroundColor" id="150410406">
<int key="NSColorSpace">6</int>
@ -259,7 +257,7 @@
<object class="NSTextFieldCell" key="NSDataCell" id="350081106">
<int key="NSCellFlags">337641472</int>
<int key="NSCellFlags2">67108864</int>
<reference key="NSSupport" ref="757538014"/>
<reference key="NSSupport" ref="26"/>
<object class="NSNumberFormatter" key="NSFormatter" id="1062102580">
<dictionary class="NSMutableDictionary" key="NS.attributes">
<boolean value="YES" key="allowsFloats"/>
@ -343,30 +341,39 @@
</array>
<string key="NSFrame">{{1, 17}, {295, 81}}</string>
<reference key="NSSuperview" ref="461777313"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="439850576"/>
<reference key="NSDocView" ref="439850576"/>
<reference key="NSBGColor" ref="150410406"/>
<int key="NScvFlags">4</int>
<bool key="NSAutomaticallyAdjustsContentInsets">YES</bool>
</object>
<object class="NSScroller" id="950083609">
<reference key="NSNextResponder" ref="461777313"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{282, 17}, {14, 81}}</string>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {14, 81}}</string>
<reference key="NSSuperview" ref="461777313"/>
<reference key="NSNextKeyView" ref="769171705"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="295815136"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<string key="NSControlAction">_doScroller:</string>
<reference key="NSControlTarget" ref="461777313"/>
<int key="NSsFlags">256</int>
<reference key="NSTarget" ref="461777313"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.4375</double>
<double key="NSCurValue">1</double>
<double key="NSPercent">0.85217391304347823</double>
</object>
<object class="NSScroller" id="295815136">
<reference key="NSNextResponder" ref="461777313"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{1, 84}, {295, 14}}</string>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {295, 14}}</string>
<reference key="NSSuperview" ref="461777313"/>
<reference key="NSNextKeyView" ref="950083609"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="362041177"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<string key="NSControlAction">_doScroller:</string>
<reference key="NSControlTarget" ref="461777313"/>
<int key="NSsFlags">257</int>
<reference key="NSTarget" ref="461777313"/>
<string key="NSAction">_doScroller:</string>
@ -374,22 +381,23 @@
</object>
<object class="NSClipView" id="362041177">
<reference key="NSNextResponder" ref="461777313"/>
<int key="NSvFlags">2304</int>
<int key="NSvFlags">2338</int>
<array class="NSMutableArray" key="NSSubviews">
<reference ref="515038836"/>
</array>
<string key="NSFrame">{{1, 0}, {295, 17}}</string>
<reference key="NSSuperview" ref="461777313"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="515038836"/>
<reference key="NSDocView" ref="515038836"/>
<reference key="NSBGColor" ref="150410406"/>
<int key="NScvFlags">4</int>
<bool key="NSAutomaticallyAdjustsContentInsets">YES</bool>
</object>
</array>
<string key="NSFrame">{{20, 292}, {297, 99}}</string>
<reference key="NSSuperview" ref="56889179"/>
<reference key="NSNextKeyView" ref="316084299"/>
<int key="NSsFlags">133170</int>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="950083609"/>
<int key="NSsFlags">133650</int>
<reference key="NSVScroller" ref="950083609"/>
<reference key="NSHScroller" ref="295815136"/>
<reference key="NSContentView" ref="316084299"/>
@ -404,6 +412,7 @@
<int key="NSvFlags">264</int>
<string key="NSFrame">{{73, 395}, {177, 22}}</string>
<reference key="NSSuperview" ref="56889179"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="859938138"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="323849087">
@ -481,6 +490,7 @@
<int key="NSvFlags">264</int>
<string key="NSFrame">{{17, 399}, {54, 15}}</string>
<reference key="NSSuperview" ref="56889179"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="660719381"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="44536311">
@ -498,12 +508,15 @@
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSButton" id="766867091">
<reference key="NSNextResponder" ref="56889179"/>
<int key="NSvFlags">264</int>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrame">{{285, 392}, {37, 28}}</string>
<reference key="NSSuperview" ref="56889179"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="461777313"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="641395264">
@ -527,8 +540,10 @@
<object class="NSButton" id="859938138">
<reference key="NSNextResponder" ref="56889179"/>
<int key="NSvFlags">264</int>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrame">{{250, 392}, {37, 28}}</string>
<reference key="NSSuperview" ref="56889179"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="766867091"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="610011289">
@ -560,8 +575,10 @@
<object class="NSButton" id="102278614">
<reference key="NSNextResponder" ref="154902579"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrame">{{13, 85}, {272, 29}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="884733860"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="253815144">
@ -587,6 +604,7 @@
<int key="NSvFlags">264</int>
<string key="NSFrame">{{107, 58}, {168, 22}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="468559655"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="486155901">
@ -658,6 +676,7 @@
<int key="NSvFlags">264</int>
<string key="NSFrame">{{107, 33}, {168, 22}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="697176732"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="896990097">
@ -729,6 +748,7 @@
<int key="NSvFlags">264</int>
<string key="NSFrame">{{107, 8}, {168, 22}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="488752593"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="707934314">
@ -800,6 +820,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{42, 63}, {63, 14}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="212534085"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="31094978">
@ -812,12 +833,14 @@
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSTextField" id="468559655">
<reference key="NSNextResponder" ref="154902579"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{42, 38}, {63, 14}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="626682786"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="699273588">
@ -830,12 +853,14 @@
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSTextField" id="697176732">
<reference key="NSNextResponder" ref="154902579"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{28, 13}, {77, 14}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="477850836"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="736528615">
@ -848,12 +873,15 @@
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSButton" id="734683507">
<reference key="NSNextResponder" ref="154902579"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrame">{{13, 116}, {261, 23}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="102278614"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="823492718">
@ -877,6 +905,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{13, 169}, {132, 14}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="970341474"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="60536666">
@ -889,12 +918,14 @@
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSMatrix" id="970341474">
<reference key="NSNextResponder" ref="154902579"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{146, 166}, {80, 18}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="276221505"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
@ -942,7 +973,7 @@
<int key="NSCellFlags2">0</int>
<string key="NSContents">Radio</string>
<object class="NSFont" key="NSSupport" id="632123868">
<string key="NSName">LucidaGrande</string>
<bool key="IBIsSystemFont">YES</bool>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
@ -962,6 +993,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{13, 193}, {111, 14}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="695087236"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="195785791">
@ -974,12 +1006,14 @@
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSPopUpButton" id="695087236">
<reference key="NSNextResponder" ref="154902579"/>
<int key="NSvFlags">264</int>
<string key="NSFrame">{{74, 188}, {154, 22}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="249918606"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="19520968">
@ -1075,8 +1109,10 @@
<object class="NSButton" id="276221505">
<reference key="NSNextResponder" ref="154902579"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrame">{{13, 141}, {261, 23}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="734683507"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="371945940">
@ -1105,6 +1141,7 @@
</set>
<string key="NSFrame">{{233, 192}, {39, 17}}</string>
<reference key="NSSuperview" ref="154902579"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="284152290"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
@ -1114,11 +1151,13 @@
</array>
<string key="NSFrame">{{2, 2}, {299, 226}}</string>
<reference key="NSSuperview" ref="924234733"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="326397700"/>
</object>
</array>
<string key="NSFrame">{{17, 41}, {303, 243}}</string>
<reference key="NSSuperview" ref="56889179"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="154902579"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@ -1128,8 +1167,10 @@
<reference key="NSSupport" ref="26"/>
<reference key="NSBackgroundColor" ref="174422548"/>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">labelColor</string>
<reference key="NSColor" ref="31933628"/>
</object>
</object>
<reference key="NSContentView" ref="154902579"/>
@ -1141,8 +1182,10 @@
<object class="NSButton" id="583559165">
<reference key="NSNextResponder" ref="56889179"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrame">{{240, 13}, {82, 28}}</string>
<reference key="NSSuperview" ref="56889179"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="562606331">
<int key="NSCellFlags">67108864</int>
@ -1165,8 +1208,10 @@
<object class="NSButton" id="488752593">
<reference key="NSNextResponder" ref="56889179"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrame">{{157, 13}, {85, 28}}</string>
<reference key="NSSuperview" ref="56889179"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="583559165"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="14383402">
@ -1188,18 +1233,20 @@
<object class="NSButton" id="769171705">
<reference key="NSNextResponder" ref="56889179"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{97, 289}, {80, 22}}</string>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrame">{{97, 289}, {85, 22}}</string>
<reference key="NSSuperview" ref="56889179"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="924234733"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="188829269">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">262144</int>
<string key="NSContents">Slider syncen</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<object class="NSFont" key="NSSupport" id="22">
<bool key="IBIsSystemFont">YES</bool>
<double key="NSSize">9</double>
<int key="NSfFlags">16</int>
<int key="NSfFlags">3614</int>
</object>
<reference key="NSControlView" ref="769171705"/>
<int key="NSButtonFlags">1211912448</int>
@ -1218,9 +1265,11 @@
</object>
</array>
<string key="NSFrameSize">{337, 436}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="326311059"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSScreenRect">{{0, 0}, {1680, 1027}}</string>
<string key="NSMinSize">{213, 129}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<string key="NSFrameAutosaveName">MainWindow</string>
@ -1261,7 +1310,7 @@
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="628206674">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSScrollView" id="322110668">
@ -1270,7 +1319,7 @@
<array class="NSMutableArray" key="NSSubviews">
<object class="NSClipView" id="687821647">
<reference key="NSNextResponder" ref="322110668"/>
<int key="NSvFlags">2304</int>
<int key="NSvFlags">2322</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSTextView" id="342559074">
<reference key="NSNextResponder" ref="687821647"/>
@ -1560,7 +1609,7 @@ Uwo</bytes>
<int key="NSTCFlags">1</int>
</object>
<object class="NSTextViewSharedData" key="NSSharedData">
<int key="NSFlags">11109</int>
<int key="NSFlags">67119973</int>
<int key="NSTextCheckingTypes">0</int>
<nil key="NSMarkedAttributes"/>
<reference key="NSBackgroundColor" ref="687483911"/>
@ -1578,7 +1627,7 @@ Uwo</bytes>
<reference key="NSColor" ref="31933628"/>
</object>
</dictionary>
<reference key="NSInsertionColor" ref="31933628"/>
<reference key="NSInsertionColor" ref="549414805"/>
<dictionary key="NSLinkAttributes">
<object class="NSColor" key="NSColor" id="47976812">
<int key="NSColorSpace">1</int>
@ -1626,6 +1675,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
</object>
</object>
<int key="NScvFlags">4</int>
<bool key="NSAutomaticallyAdjustsContentInsets">YES</bool>
</object>
<object class="NSScroller" id="91928660">
<reference key="NSNextResponder" ref="322110668"/>
@ -1634,6 +1684,8 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<reference key="NSSuperview" ref="322110668"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<string key="NSControlAction">_doScroller:</string>
<reference key="NSControlTarget" ref="322110668"/>
<reference key="NSTarget" ref="322110668"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.15277071682765633</double>
@ -1645,6 +1697,8 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<reference key="NSSuperview" ref="322110668"/>
<reference key="NSNextKeyView" ref="687821647"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<string key="NSControlAction">_doScroller:</string>
<reference key="NSControlTarget" ref="322110668"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="322110668"/>
<string key="NSAction">_doScroller:</string>
@ -1666,10 +1720,9 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
</object>
</array>
<string key="NSFrameSize">{575, 603}</string>
<reference key="NSSuperview"/>
<reference key="NSNextKeyView" ref="322110668"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSScreenRect">{{0, 0}, {1680, 1027}}</string>
<string key="NSMinSize">{213, 129}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
@ -1687,7 +1740,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="1050492388">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSTextField" id="45449479">
@ -1695,36 +1748,37 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{97, 280}, {262, 19}}</string>
<reference key="NSSuperview" ref="1050492388"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="163206888"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="792398739">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">4194304</int>
<string key="NSContents">Programversion</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande-Bold</string>
<bool key="IBIsSystemFont">YES</bool>
<double key="NSSize">16</double>
<int key="NSfFlags">16</int>
<int key="NSfFlags">2072</int>
</object>
<reference key="NSControlView" ref="45449479"/>
<reference key="NSBackgroundColor" ref="858343721"/>
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSTextField" id="163206888">
<reference key="NSNextResponder" ref="1050492388"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{99, 235}, {143, 37}}</string>
<reference key="NSSuperview" ref="1050492388"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="204638104"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="435006901">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">272629760</int>
<string key="NSContents">Small System Font Text</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande-Bold</string>
<bool key="IBIsSystemFont">YES</bool>
<double key="NSSize">11</double>
<int key="NSfFlags">3357</int>
</object>
@ -1733,13 +1787,13 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSButton" id="835092286">
<reference key="NSNextResponder" ref="1050492388"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{121, 23}, {66, 37}}</string>
<reference key="NSSuperview" ref="1050492388"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="900680627">
<int key="NSCellFlags">67108864</int>
@ -1764,7 +1818,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{17, 119}, {265, 29}}</string>
<reference key="NSSuperview" ref="1050492388"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="496031971"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="135250125">
<int key="NSCellFlags">67108864</int>
@ -1776,13 +1830,14 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSTextField" id="860382620">
<reference key="NSNextResponder" ref="1050492388"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{17, 150}, {114, 17}}</string>
<reference key="NSSuperview" ref="1050492388"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="514008135"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="116060185">
<int key="NSCellFlags">67108864</int>
@ -1794,13 +1849,14 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSTextField" id="496031971">
<reference key="NSNextResponder" ref="1050492388"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{17, 59}, {265, 52}}</string>
<reference key="NSSuperview" ref="1050492388"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="835092286"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="774144706">
<int key="NSCellFlags">67108864</int>
@ -1812,13 +1868,14 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSTextField" id="204638104">
<reference key="NSNextResponder" ref="1050492388"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{17, 178}, {265, 49}}</string>
<reference key="NSSuperview" ref="1050492388"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="860382620"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="698963648">
<int key="NSCellFlags">67108864</int>
@ -1830,6 +1887,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSImageView" id="226050686">
<reference key="NSNextResponder" ref="1050492388"/>
@ -1844,7 +1902,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
</set>
<string key="NSFrame">{{20, 235}, {64, 64}}</string>
<reference key="NSSuperview" ref="1050492388"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="45449479"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="184744502">
<int key="NSCellFlags">134217728</int>
@ -1863,10 +1921,9 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
</object>
</array>
<string key="NSFrameSize">{299, 327}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="226050686"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSScreenRect">{{0, 0}, {1680, 1027}}</string>
<string key="NSMinSize">{213, 129}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
@ -1926,15 +1983,16 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
</object>
<object class="NSMenuItem" id="375779764">
<reference key="NSMenu" ref="70791087"/>
<string key="NSTitle">Info</string>
<string key="NSTitle">Info &amp; Support</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="735526217"/>
<reference key="NSMixedImage" ref="311919643"/>
<string key="NSAction">submenuAction:</string>
<reference key="NSTarget" ref="392629622"/>
<object class="NSMenu" key="NSSubmenu" id="392629622">
<string key="NSTitle">Info</string>
<string key="NSTitle">Info &amp; Support</string>
<array class="NSMutableArray" key="NSMenuItems">
<object class="NSMenuItem" id="837645033">
<reference key="NSMenu" ref="392629622"/>
@ -1947,13 +2005,21 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
</object>
<object class="NSMenuItem" id="557822969">
<reference key="NSMenu" ref="392629622"/>
<string key="NSTitle">Nach Updates suchen</string>
<string key="NSTitle">Nach Updates suchen...</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="735526217"/>
<reference key="NSMixedImage" ref="311919643"/>
</object>
<object class="NSMenuItem" id="499716841">
<reference key="NSMenu" ref="392629622"/>
<string key="NSTitle">Zurücksetzen...</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="735526217"/>
<reference key="NSMixedImage" ref="311919643"/>
</object>
<object class="NSMenuItem" id="874576862">
<reference key="NSMenu" ref="392629622"/>
<string key="NSTitle">FAQ</string>
@ -2074,6 +2140,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSTextField" id="1024752490">
<reference key="NSNextResponder" ref="219116160"/>
@ -2097,6 +2164,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
</object>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSButton" id="545512860">
<reference key="NSNextResponder" ref="219116160"/>
@ -2153,21 +2221,18 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<int key="NSCellFlags2">4194304</int>
<string type="base64-UTF8" key="NSContents">QWxzIFZvcmdhYmVuIGRlcyBuZXVlbiBGYXZvcml0ZW4Kd2VyZGVuIGRpZSBFaW5zdGVsbHVuZ2VuIGRl
cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">9</double>
<int key="NSfFlags">3614</int>
</object>
<reference key="NSSupport" ref="22"/>
<reference key="NSControlView" ref="376739262"/>
<reference key="NSBackgroundColor" ref="858343721"/>
<reference key="NSTextColor" ref="549414805"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
</array>
<string key="NSFrameSize">{221, 145}</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSScreenRect">{{0, 0}, {1680, 1027}}</string>
<string key="NSMinSize">{213, 129}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
@ -2231,7 +2296,7 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<reference key="NSBackgroundColor" ref="67968537"/>
<reference key="NSColor" ref="434880261"/>
</dictionary>
<reference key="NSInsertionColor" ref="31933628"/>
<reference key="NSInsertionColor" ref="549414805"/>
<dictionary key="NSLinkAttributes">
<reference key="NSColor" ref="47976812"/>
<integer value="1" key="NSUnderline"/>
@ -2252,6 +2317,7 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<reference key="NSBGColor" ref="687483911"/>
<reference key="NSCursor" ref="696172213"/>
<int key="NScvFlags">4</int>
<bool key="NSAutomaticallyAdjustsContentInsets">YES</bool>
</object>
<object class="NSScroller" id="756989930">
<reference key="NSNextResponder" ref="542193225"/>
@ -2259,6 +2325,8 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<string key="NSFrame">{{-30, 1}, {15, 587}}</string>
<reference key="NSSuperview" ref="542193225"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<string key="NSControlAction">_doScroller:</string>
<reference key="NSControlTarget" ref="542193225"/>
<reference key="NSTarget" ref="542193225"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.15277071297168732</double>
@ -2269,6 +2337,8 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<string key="NSFrame">{{-100, -100}, {87, 18}}</string>
<reference key="NSSuperview" ref="542193225"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<string key="NSControlAction">_doScroller:</string>
<reference key="NSControlTarget" ref="542193225"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="542193225"/>
<string key="NSAction">_doScroller:</string>
@ -2291,7 +2361,7 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
</array>
<string key="NSFrameSize">{575, 665}</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSScreenRect">{{0, 0}, {1680, 1027}}</string>
<string key="NSMinSize">{213, 129}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
@ -2301,7 +2371,15 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<array key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1005416442"/>
<reference key="destination" ref="73883337"/>
</object>
<int key="connectionID">871</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">makeKeyAndOrderFront:</string>
@ -2558,6 +2636,14 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
</object>
<int key="connectionID">774</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">resetSettings:</string>
<reference key="source" ref="73883337"/>
<reference key="destination" ref="499716841"/>
</object>
<int key="connectionID">873</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">makeKeyAndOrderFront:</string>
@ -3446,6 +3532,7 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<reference ref="259933181"/>
<reference ref="557822969"/>
<reference ref="313435913"/>
<reference ref="499716841"/>
</array>
<reference key="parent" ref="375779764"/>
</object>
@ -4087,6 +4174,11 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<reference key="object" ref="249918606"/>
<reference key="parent" ref="924234733"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">872</int>
<reference key="object" ref="499716841"/>
<reference key="parent" ref="392629622"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@ -4238,12 +4330,13 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<string key="868.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="869.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="870.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="872.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">870</int>
<int key="maxID">873</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -4259,6 +4352,7 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<string key="loginItem:">id</string>
<string key="menuSelect:">id</string>
<string key="paypal:">id</string>
<string key="resetSettings:">id</string>
<string key="savePreferences:">id</string>
<string key="save_favorite:">id</string>
<string key="syncSliders:">id</string>
@ -4298,6 +4392,10 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<string key="name">paypal:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="resetSettings:">
<string key="name">resetSettings:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="savePreferences:">
<string key="name">savePreferences:</string>
<string key="candidateClassName">id</string>
@ -4455,9 +4553,95 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/FanControl.h</string>
<string key="minorKey">../Classes/FanControl.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FanControl</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="add_favorite:">id</string>
<string key="changeMenu:">id</string>
<string key="closePreferences:">id</string>
<string key="close_favorite:">id</string>
<string key="delete_favorite:">id</string>
<string key="loginItem:">id</string>
<string key="menuSelect:">id</string>
<string key="paypal:">id</string>
<string key="savePreferences:">id</string>
<string key="save_favorite:">id</string>
<string key="syncSliders:">id</string>
<string key="updateCheck:">id</string>
<string key="visitHomepage:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="add_favorite:">
<string key="name">add_favorite:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="changeMenu:">
<string key="name">changeMenu:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="closePreferences:">
<string key="name">closePreferences:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="close_favorite:">
<string key="name">close_favorite:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="delete_favorite:">
<string key="name">delete_favorite:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="loginItem:">
<string key="name">loginItem:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="menuSelect:">
<string key="name">menuSelect:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="paypal:">
<string key="name">paypal:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="savePreferences:">
<string key="name">savePreferences:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="save_favorite:">
<string key="name">save_favorite:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="syncSliders:">
<string key="name">syncSliders:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="updateCheck:">
<string key="name">updateCheck:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="visitHomepage:">
<string key="name">visitHomepage:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../Classes/FanControl.m</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">StatusItemWindow</string>
<string key="superclassName">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../Classes/StatusItemWindow.h</string>
</object>
</object>
</array>
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<object class="IBPartialClassDescription">
<string key="className">SUUpdater</string>
<string key="superclassName">NSObject</string>
@ -4472,36 +4656,40 @@ cyBGYXZvcml0ZW4KIkRlZmF1bHQiIHZlcndlbmRldC4</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/SUUpdater.h</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">delegate</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">delegate</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">delegate</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">StatusItemWindow</string>
<string key="superclassName">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/StatusItemWindow.h</string>
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Sparkle.framework/Headers/SUUpdater.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<integer value="1050" key="NS.object.0"/>
<integer value="1060" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<real value="1070" key="NS.object.0"/>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="4600" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NSMenuCheckmark">{11, 11}</string>
<string key="NSMenuMixedState">{10, 3}</string>
<string key="NSMenuCheckmark">{12, 12}</string>
<string key="NSMenuMixedState">{10, 2}</string>
<string key="NSRadioButton">{16, 15}</string>
<string key="NSSwitch">{15, 15}</string>
<string key="paypal">{62, 31}</string>

View File

@ -1,13 +1,13 @@
{\rtf1\ansi\ansicpg1252\cocoartf1187
{\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\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\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
\f0\fs62 \cf0 F.A.Q para smcFanControl 2.6\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\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?\
\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
\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\
@ -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 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\
\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 \
\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 \
\
}

View File

@ -1,3 +0,0 @@
/* Localized versions of Info.plist keys */
NSHumanReadableCopyright = "by Hendrik Holtmann, 2009 (GPL License)";

View File

@ -20,4 +20,22 @@
"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";

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +0,0 @@
<?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>standard</key>
<string>TC0D</string>
<key>lastAlternative</key>
<string>TCAH</string>
<key>MacBookPro10,1</key>
<string>TC0F</string>
<key>iMac12,2</key>
<string>TC0H</string>
<key>iMac12,1</key>
<string>TC0H</string>
</dict>
</plist>

1
Sparkle.framework/Modules Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Modules

View File

@ -0,0 +1 @@
Versions/Current/PrivateHeaders

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -6,22 +6,22 @@
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#ifndef SUAPPCAST_H
#define SUAPPCAST_H
@class RSS, SUAppcastItem;
@interface SUAppcast : NSObject {
NSArray *items;
id delegate;
}
#import <Foundation/Foundation.h>
#import "SUExport.h"
- (void)fetchAppcastFromURL:(NSURL *)url;
- (void)setDelegate:delegate;
@class SUAppcastItem;
SU_EXPORT @interface SUAppcast : NSObject<NSURLDownloadDelegate>
- (SUAppcastItem *)newestItem;
- (NSArray *)items;
@property (copy) NSString *userAgentString;
@property (copy) NSDictionary *httpHeaders;
- (void)fetchAppcastFromURL:(NSURL *)url completionBlock:(void (^)(NSError *))err;
- (SUAppcast *)copyWithoutDeltaUpdates;
@property (readonly, copy) NSArray *items;
@end
@interface NSObject (SUAppcastDelegate)
- appcastDidFinishLoading:(SUAppcast *)appcast;
@end
#endif

View File

@ -6,52 +6,39 @@
// 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 {
NSString *title;
NSDate *date;
NSString *description;
NSURL *releaseNotesURL;
NSString *DSASignature;
NSString *MD5Sum;
NSURL *fileURL;
NSString *fileVersion;
NSString *versionString;
}
SU_EXPORT @interface SUAppcastItem : NSObject
@property (copy, readonly) NSString *title;
@property (copy, readonly) NSDate *date;
@property (copy, readonly) NSString *itemDescription;
@property (strong, readonly) NSURL *releaseNotesURL;
@property (copy, readonly) NSString *DSASignature;
@property (copy, readonly) NSString *minimumSystemVersion;
@property (copy, readonly) NSString *maximumSystemVersion;
@property (strong, readonly) NSURL *fileURL;
@property (copy, readonly) NSString *versionString;
@property (copy, readonly) NSString *displayVersionString;
@property (copy, readonly) NSDictionary *deltaUpdates;
@property (strong, readonly) NSURL *infoURL;
// 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;
- (void)setTitle:(NSString *)aTitle;
@property (getter=isDeltaUpdate, readonly) BOOL deltaUpdate;
@property (getter=isCriticalUpdate, readonly) BOOL criticalUpdate;
@property (getter=isInformationOnlyUpdate, readonly) BOOL informationOnlyUpdate;
- (NSDate *)date;
- (void)setDate:(NSDate *)aDate;
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
@property (readonly, copy) NSDictionary *propertiesDictionary;
- (NSString *)description;
- (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;
- (NSURL *)infoURL;
@end
#endif

View File

@ -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

View File

@ -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;

View 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

View 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -6,50 +6,361 @@
// 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
// address of the appcast on your webserver. If you don't already have an
// appcast, please see the Sparkle documentation to learn about how to set one up.
#import <Foundation/Foundation.h>
#import "SUExport.h"
#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
// 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.
@protocol SUUpdaterDelegate;
@class SUAppcastItem, SUUpdateAlert, SUStatusController;
@interface SUUpdater : NSObject {
SUAppcastItem *updateItem;
SUStatusController *statusController;
SUUpdateAlert *updateAlert;
NSURLDownload *downloader;
NSString *downloadPath;
NSTimer *checkTimer;
NSTimeInterval checkInterval;
BOOL verbose;
BOOL updateInProgress;
}
/*!
The main API in Sparkle for controlling the update mechanism.
// This IBAction is meant for a main menu item. Hook up any menu item to this action,
// and Sparkle will check for updates and report back its findings verbosely.
- (IBAction)checkForUpdates:sender;
This class is used to configure the update paramters as well as manually
and automatically schedule and control checks for updates.
*/
SU_EXPORT @interface SUUpdater : NSObject
// This method is similar to the above, but it's intended for updates initiated by
// 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.
@property (unsafe_unretained) IBOutlet id<SUUpdaterDelegate> delegate;
+ (SUUpdater *)sharedUpdater;
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
- (instancetype)initForBundle:(NSBundle *)bundle;
@property (readonly, strong) NSBundle *hostBundle;
@property (strong, readonly) NSBundle *sparkleBundle;
@property BOOL automaticallyChecksForUpdates;
@property NSTimeInterval updateCheckInterval;
/*!
* 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;
// 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
// to call this directly: if you set a SUScheduledCheckInterval key in Info.plist or
// the user defaults, Sparkle will set this up for you automatically on startup. You might
// just want to call this every time the user changes the setting in the preferences.
- (void)scheduleCheckWithInterval:(NSTimeInterval)interval;
/*!
Checks for updates and, if available, immediately downloads and installs them.
A progress dialog is shown but the user will never be prompted to read the
release notes.
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;
@end
/*!
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
// -----------------------------------------------------------------------------
// 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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -2,21 +2,24 @@
// Sparkle.h
// 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.
//
#import "SUUpdater.h"
#import "SUUtilities.h"
#import "SUConstants.h"
#ifndef SPARKLE_H
#define SPARKLE_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 "SUAppcastItem.h"
#import "SUUpdateAlert.h"
#import "SUAutomaticUpdateAlert.h"
#import "SUStatusController.h"
#import "SUUnarchiver.h"
#import "SUStatusChecker.h"
#import "SUStandardVersionComparator.h"
#import "SUUpdater.h"
#import "SUVersionComparisonProtocol.h"
#import "SUVersionDisplayProtocol.h"
#import "SUErrors.h"
#import "NSApplication+AppCopies.h"
#import "NSFileManager+Authentication.h"
#import "NSFileManager+Verification.h"
#endif

View File

@ -0,0 +1,6 @@
framework module Sparkle {
umbrella header "Sparkle.h"
export *
module * { export * }
}

View 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

View File

@ -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>

View File

@ -0,0 +1 @@
APPL????

View File

@ -3,36 +3,42 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12A269</string>
<string>15E49a</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Sparkle</string>
<key>CFBundleIdentifier</key>
<string>org.andymatuschak.Sparkle</string>
<string>org.sparkle-project.Sparkle</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Sparkle</string>
<key>CFBundlePackageType</key>
<string>FMWK</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.1</string>
<string>1.14.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvmgcc42</string>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>4F1003</string>
<string>7C1002</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>9L31a</string>
<string>15C43</string>
<key>DTSDKName</key>
<string>macosx10.5</string>
<string>macosx10.11</string>
<key>DTXcode</key>
<string>0441</string>
<string>0721</string>
<key>DTXcodeBuild</key>
<string>4F1003</string>
<string>7C1002</string>
</dict>
</plist>

Some files were not shown because too many files have changed in this diff Show More