7 Commits
1.0 ... ISO

Author SHA1 Message Date
Talor Berthelson
9950fd546f Added support for creating ISO images. 2020-06-02 17:22:09 -04:00
Julian-Marius-Fairfax
e14aefd24f Update README.md 2020-04-30 13:11:58 +02:00
Julian-Marius-Fairfax
bca67735ba Fix 10.11 security update issue 2020-04-20 11:07:26 +02:00
Julian-Marius-Fairfax
8ba072b837 Full 10.11 support, fix NoSleep on 10.8 2020-04-19 11:41:57 +02:00
Julian-Marius-Fairfax
c47f2fbfcb Create .gitignore 2020-04-15 16:41:22 +02:00
Julian-Marius-Fairfax
4c26f069f7 Update README.md 2020-04-15 14:09:45 +02:00
Julian-Marius-Fairfax
debffcd8b1 Update issue templates 2020-04-15 13:26:18 +02:00
141 changed files with 3086 additions and 20 deletions

28
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Screenshots/logs**
If applicable, add screenshots and/or logs to help explain your problem.
**Mac (please complete the following information):**
- OS: [ex. macOS 10.11]
- Version [ex. 1.0]
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]"
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Additional context**
Add any other context or screenshots about the feature request here.

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.DS_Store

View File

@@ -124,9 +124,7 @@ Input_Operation()
Check_Installer_Version
Check_Installer_Support
Installer_Variables
Input_Volume
Create_Installer
Patch_Installer
Input_Type
fi
if [[ $operation == "2" ]]; then
Input_Package
@@ -157,14 +155,29 @@ Check_Installer_Stucture()
Check_Installer_Version()
{
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Checking installer version."${erase_style}
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Checking installer version."${erase_style}
installer_version="$(defaults read /tmp/Base\ System/System/Library/CoreServices/SystemVersion.plist ProductVersion)"
installer_version_short="$(defaults read /tmp/Base\ System/System/Library/CoreServices/SystemVersion.plist ProductVersion | cut -c-5)"
if [[ ${#installer_version} == "6" ]]; then
installer_version_short="$(defaults read /tmp/Base\ System/System/Library/CoreServices/SystemVersion.plist ProductVersion | cut -c-4)"
fi
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Checked installer version."${erase_style}
if [[ $installer_version_short == "10.8" ]]; then
installer_title="OS X Mountain Lion"
#statements
fi
if [[ $installer_version_short == "10.9" ]]; then
installer_title="OS X Mavericks"
#statements
fi
if [[ $installer_version_short == "10.10" ]]; then
installer_title="OS X Yosemite"
#statements
fi
if [[ $installer_version_short == "10.11" ]]; then
installer_title="OS X El Capitan"
#statements
fi
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Checked installer version."${erase_style}
}
Check_Installer_Support()
@@ -178,6 +191,8 @@ Check_Installer_Support()
Input_On
exit
fi
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"+ Version is $installer_title."${erase_style}
}
Installer_Variables()
@@ -186,12 +201,58 @@ Installer_Variables()
installer_prelinkedkernel="$installer_version_short"
fi
}
Input_Type()
{
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ Would you prefer to install to a disk or ISO file?"${erase_style}
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ Input an operation number."${erase_style}
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ 1 - Disk"${erase_style}
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ 2 - ISO File"${erase_style}
Input_On
read -e -p "$(date "+%b %m %H:%M:%S") / " type
Input_Off
if [[ $type == "1" ]]; then
Input_Volume
Create_Installer
Patch_Installer
#statements
fi
if [[ $type == "2" ]]; then
Where_ISO
Create_ISO
Create_Installer
Patch_Installer
Finish_ISO
#statements
fi
}
Where_ISO()
{
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ Where do you want the ISO file stored?"${erase_style}
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ Input a directory."${erase_style}
Input_On
read -e -p "$(date "+%b %m %H:%M:%S") / " iso_dir
Input_Off
}
Create_ISO()
{
hdiutil detach "/Volumes/patched"
rm -R "/Volumes/patched"
rm "/tmp/temp.cdr.dmg"
rm -R "/tmp/patched.cdr.dmg.sparsebundle"
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ Generating ISO file..."${erase_style}
hdiutil create -o "/tmp/temp.cdr.dmg" -size 8121m -layout SPUD -fs HFS+ -volname "patched" -ov
hdiutil convert -format UDRW -o "/tmp/patched.cdr.dmg" "/tmp/temp.cdr.dmg" -ov
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ Mounting ISO file..."${erase_style}
hdiutil attach "/tmp/patched.cdr.dmg" -noverify -nobrowse -mountpoint "/Volumes/Install $installer_title Patched"
installer_volume_path="/Volumes/Install $installer_title Patched"
installer_volume_name="Install $installer_title Patched"
}
Input_Volume()
{
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ What volume would you like to use?"${erase_style}
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ Input a volume name."${erase_style}
for volume_path in /Volumes/*; do
for volume_path in /Volumes/*; do
volume_name="${volume_path#/Volumes/}"
if [[ ! "$volume_name" == com.apple* ]]; then
echo -e $(date "+%b %m %H:%M:%S") ${text_message}"/ ${volume_name}"${erase_style} | sort
@@ -210,6 +271,7 @@ Create_Installer()
Output_Off asr restore -source "$installer_images_path"/BaseSystem.dmg -target "$installer_volume_path" -noprompt -noverify -erase
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Restored installer disk image."${erase_style}
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Renaming installer volume."${erase_style}
Output_Off diskutil rename /Volumes/*Base\ System "$installer_volume_name"
bless --folder "$installer_volume_path"/System/Library/CoreServices --label "$installer_volume_name"
@@ -223,7 +285,7 @@ Create_Installer()
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Copying installer disk images."${erase_style}
cp "$installer_images_path"/BaseSystem.dmg "$installer_volume_path"/
cp "$installer_images_path"/BaseSystem.chunklist "$installer_volume_path"/
if [[ -e "$installer_images_path"/AppleDiagnostics.dmg ]]; then
cp "$installer_images_path"/AppleDiagnostics.dmg "$installer_volume_path"/
cp "$installer_images_path"/AppleDiagnostics.chunklist "$installer_volume_path"/
@@ -313,13 +375,16 @@ Patch_Installer()
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Patched platform support check."${erase_style}
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Patching kernel flags."${erase_style}
if [[ $installer_version_short == "10.11" ]]; then
cp "$resources_path"/patch/com.apple.Boot.plist "$installer_volume_path"/Library/Preferences/SystemConfiguration
fi
sed -i '' 's|<string></string>|<string>kext-dev-mode=1 mbasd=1</string>|' "$installer_volume_path"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Patched kernel flags."${erase_style}
if [[ $installer_version_short == "10.11" ]]; then
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Patching kernel cache."${erase_style}
rm "$installer_volume_path"/System/Library/PrelinkedKernels/prelinkedkernel
cp "$resources_path"/PrelinkedKernel/10.11/prelinkedkernel "$installer_volume_path"/System/Library/PrelinkedKernels
cp "$resources_path"/PrelinkedKernel/10.11/patchedkernel "$installer_volume_path"/System/Library/PrelinkedKernels
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Patched kernel cache."${erase_style}
fi
@@ -366,7 +431,18 @@ Patch_Package()
Output_Off rm -R "$package_folder"
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Removed temporary files."${erase_style}
}
Finish_ISO()
{
iso_file="$installer_title Patched"
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Moving ISO file."${erase_style}
hdiutil detach "$installer_volume_path"
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Processing final ISO conversion."${erase_style}
hdiutil convert "/tmp/patched.cdr.dmg" -format UDTO -o "$iso_dir/$iso_file.iso"
mv "$iso_dir/$iso_file.iso.cdr" "$iso_dir/$iso_file.iso"
open "$iso_dir"
rm "/tmp/patched.cdr.dmg"
rm "/tmp/temp.cdr.dmg"
}
End()
{
if [[ $operation == "1" ]]; then
@@ -388,4 +464,4 @@ Check_Environment
Check_Root
Check_Resources
Input_Operation
End
End

View File

@@ -3,7 +3,7 @@
# OS X Patcher
OS X Patcher is a command line tool for running OS X on unsupported Macs
# Contributers
# Contributors
I'd like to the thank the following people, and many others, for their research, help, and inspiration.
- [parrotgeek1](https://forums.macrumors.com/members/1033441/)
- [TMRJIJ](https://forums.macrumors.com/members/tmrjij.878094/)
@@ -16,8 +16,8 @@ I'd like to the thank the following people, and many others, for their research,
# Supported Macs
## iMacs
- iMac4,1
- iMac4,2
- iMac4,1 (with C2D CPU)
- iMac4,2 (with C2D CPU)
- iMac5,1
- iMac5,2
## MacBooks
@@ -30,7 +30,7 @@ I'd like to the thank the following people, and many others, for their research,
- MacBookPro2,1
- MacBookPro2,2
## Mac minis
- Macmini1,1
- Macmini1,1 (with C2D CPU)
- Macmini2,1
## Mac Pros
- MacPro1,1
@@ -39,8 +39,12 @@ I'd like to the thank the following people, and many others, for their research,
- Xserve1,1
- Xserve2,1
# Usage
chmod +x ./OS\ X\ Patcher.sh —> makes the script runnable
sudo ./OS\ X\ Patcher.sh —> runs the script with root permissions
# Brightness Slider and NoSleep
You might notice two little applications have been installed along with OS X Patcher's other patches. They help solve some issues and should be opened and configured after patching. NoSleep is open source and can be found [here](https://github.com/integralpro/nosleep). Brightness Slider is made by ACT Productions and can be found on the [Mac App Store](http://itunes.apple.com/us/app/brightness-control/id456624497?ls=1&mt=12).
# Graphics acceleration
Your Mac won't support graphics acceleration with this patcher. This means brightness control and sleep won't work (see above) and applications that rely on your graphics card will perform slower or will simply not work. parrotgeek1 will soon release a patcher with support for graphics acceleration on certain Macs.
Your Mac won't support graphics acceleration with this patcher. This means brightness control and sleep won't work (on non-ATI cards) (see above) and applications that rely on your graphics card will perform slower or will simply not work. parrotgeek1 will soon release a patcher with support for graphics acceleration on certain Macs.

View File

@@ -301,7 +301,6 @@ Patch_Volume()
cp -R "$resources_path"/GeForceGA.plugin "$volume_path"/System/Library/Extensions/
cp -R "$resources_path"/GeForceGLDriver.bundle "$volume_path"/System/Library/Extensions/
cp -R "$resources_path"/GeForceVADriver.bundle "$volume_path"/System/Library/Extensions/
cp -R "$resources_path"/NoSleep.kext "$volume_path"/System/Library/Extensions/
cp -R "$resources_path"/NVDAGF100Hal.kext "$volume_path"/System/Library/Extensions/
cp -R "$resources_path"/NVDAGK100Hal.kext "$volume_path"/System/Library/Extensions/
cp -R "$resources_path"/NVDANV40HalG7xxx.kext "$volume_path"/System/Library/Extensions/
@@ -311,8 +310,16 @@ Patch_Volume()
cp -R "$resources_path"/NVSMU.kext "$volume_path"/System/Library/Extensions/
Output_Off cp -R "$resources_path"/Brightness\ Slider.app "$volume_path"/Applications/Utilities
Output_Off cp -R "$resources_path"/NoSleep.app "$volume_path"/Applications/Utilities
Output_Off cp -R "$resources_path"/NoSleep.prefPane "$volume_path"/System/Library/PreferencePanes
if [[ $volume_version_short == "10.8" ]]; then
cp -R "$resources_path"/1.3.3/NoSleep.kext "$volume_path"/System/Library/Extensions/
Output_Off cp -R "$resources_path"/1.3.3/NoSleep.app "$volume_path"/Applications/Utilities
Output_Off cp -R "$resources_path"/1.3.3/NoSleep.prefPane "$volume_path"/System/Library/PreferencePanes
else
cp -R "$resources_path"/NoSleep.kext "$volume_path"/System/Library/Extensions/
Output_Off cp -R "$resources_path"/NoSleep.app "$volume_path"/Applications/Utilities
Output_Off cp -R "$resources_path"/NoSleep.prefPane "$volume_path"/System/Library/PreferencePanes
fi
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Patched graphics drivers."${erase_style}
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Patching audio drivers."${erase_style}
@@ -324,6 +331,12 @@ Patch_Volume()
Output_Off rm "$volume_path"/System/Library/CoreServices/PlatformSupport.plist
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Patched platform support check."${erase_style}
if [[ $volume_version_short == "10.11" ]]; then
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Patching kernel."${erase_style}
cp "$resources_path"/Kernels/"$volume_version_short"/kernel "$volume_path"/System/Library/Kernels
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Patched kernel."${erase_style}
fi
echo -e $(date "+%b %m %H:%M:%S") ${text_progress}"> Patching kernel flags."${erase_style}
sed -i '' 's|<string></string>|<string>kext-dev-mode=1 mbasd=1</string>|' "$volume_path"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist
echo -e $(date "+%b %m %H:%M:%S") ${move_up}${erase_line}${text_success}"+ Patched kernel flags."${erase_style}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,41 @@
//
// GlobalConstants.h
// nosleep
//
// Created by Pavel Prokofiev on 4/8/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#define _STR(x) #x
#define STR(x) _STR(x)
// Extension part
#define NoSleepExtension com_protech_nosleepextension
#define NoSleepClientClass com_protech_nosleepclientclass
#define kNoSleepCommandDisabled iokit_vendor_specific_msg(0)
#define kNoSleepCommandEnabled iokit_vendor_specific_msg(1)
#define kNoSleepCommandLockScreenRequest iokit_vendor_specific_msg(2)
// AppleNVRAM Variable name
#define IORegistrySleepSuppressionMode "IORegistryCurrentSleepMode"
// Interface
#define kNoSleepDriverClassName STR(NoSleepExtension)
// GUI
#define SHOW_UI_ALERT_KEXT_NOT_LOADED() NSRunAlertPanel(@"Oops!", @"NoSleep Kernel Extension is not loaded.", @"OK", nil, nil)
#define NOSLEEP_ID "com.protech.NoSleep"
#define NOSLEEP_HELPER_PATH "/Applications/Utilities/NoSleep.app"
#define NOSLEEP_PREFPANE_PATH "/Library/PreferencePanes/NoSleep.prefPane"
#define kNoSleepModeCurrent 0
#define kNoSleepModeAC 1
#define kNoSleepModeBattery 2
//Settings
#define NOSLEEP_SETTINGS_UPDATE_EVENTNAME "UpdateSettings"
#define NOSLEEP_SETTINGS_isBWIconEnabledID "IsBWIconEnabled"
#define NOSLEEP_SETTINGS_toLockScreenID "LockScreen"
#define NOSLEEP_SETTINGS_useDoubleClick "UseDoubleClick"

View File

@@ -0,0 +1,31 @@
//
// NoSleepInterface.h
// nosleep
//
// Created by Pavel Prokofiev on 4/3/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#include <IOKit/IOKitLib.h>
//io_connect_t m_connect;
typedef io_service_t NoSleepInterfaceService;
typedef io_connect_t NoSleepInterfaceConnect;
typedef io_object_t NoSleepInterestNotification;
#ifdef __cplusplus
extern "C" {
#endif
extern bool NoSleepVerbose;
NoSleepInterestNotification NoSleep_ReceiveStateChanged(NoSleepInterfaceConnect m_connect, IOServiceInterestCallback callback, void *refCon);
void NoSleep_ReleaseStateChanged(NoSleepInterestNotification notifyObj);
bool NoSleep_InterfaceCreate(NoSleepInterfaceService *service, NoSleepInterfaceConnect *connect);
bool NoSleep_InterfaceDestroy(NoSleepInterfaceConnect connect);
bool NoSleep_GetSleepSuppressionMode(NoSleepInterfaceConnect connect, int mode);
bool NoSleep_SetSleepSuppressionMode(NoSleepInterfaceConnect connect, bool state, int mode);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,27 @@
//
// NoSleepInterfaceWrapper.h
// nosleep
//
// Created by Pavel Prokofiev on 4/7/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <NoSleep/NoSleepInterface.h>
#import <NoSleep/NoSleepNotificationDelegate.h>
@interface NoSleepInterfaceWrapper : NSObject {
@private
NoSleepInterfaceConnect _noSleepInterface;
NoSleepInterestNotification _noSleepNotification;
id<NoSleepNotificationDelegate> notificationDelegate;
}
@property (retain) id<NoSleepNotificationDelegate> notificationDelegate;
-(BOOL) stateForMode:(int)mode;
-(void) setState:(BOOL)state forMode:(int)mode;
@end

View File

@@ -0,0 +1,16 @@
//
// NoSleepNotificationDelegate.h
// nosleep
//
// Created by Pavel Prokofiev on 4/8/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol NoSleepNotificationDelegate <NSObject>
@optional
-(void) notificationReceived:(uint32_t)messageType :(void *)messageArgument;
@end

View File

@@ -0,0 +1,23 @@
//
// Utilities.h
// NoSleepFramework
//
// Created by Pavel Prokofiev on 2/24/12.
// Copyright 2012 __MyCompanyName__. All rights reserved.
//
#ifndef NoSleepFramework_Utilities_h
#define NoSleepFramework_Utilities_h
typedef enum {
kLICheck = 0,
kLIRegister,
kLIUnregister,
} LoginItemAction;
BOOL registerLoginItem(LoginItemAction action);
BOOL GetLockScreen();
void SetLockScreen(BOOL value);
#endif

View File

@@ -0,0 +1,42 @@
<?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>12D78</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>NoSleep</string>
<key>CFBundleIdentifier</key>
<string>com.protech.NoSleepFramework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>NoSleep</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.3</string>
<key>DTCompiler</key>
<string></string>
<key>DTPlatformBuild</key>
<string>4H512</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0461</string>
<key>DTXcodeBuild</key>
<string>4H512</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2013 Pavel Prokofiev. All rights reserved.</string>
</dict>
</plist>

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,33 @@
//
// SUAppcast.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCAST_H
#define SUAPPCAST_H
@class SUAppcastItem;
@interface SUAppcast : NSObject {
NSArray *items;
NSString *userAgentString;
id delegate;
NSMutableData *incrementalData;
}
- (void)fetchAppcastFromURL:(NSURL *)url;
- (void)setDelegate:delegate;
- (void)setUserAgentString:(NSString *)userAgentString;
- (NSArray *)items;
@end
@interface NSObject (SUAppcastDelegate)
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
@end
#endif

View File

@@ -0,0 +1,47 @@
//
// SUAppcastItem.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCASTITEM_H
#define SUAPPCASTITEM_H
@interface SUAppcastItem : NSObject {
NSString *title;
NSDate *date;
NSString *itemDescription;
NSURL *releaseNotesURL;
NSString *DSASignature;
NSString *minimumSystemVersion;
NSURL *fileURL;
NSString *versionString;
NSString *displayVersionString;
NSDictionary *propertiesDictionary;
}
// Initializes with data from a dictionary provided by the RSS class.
- initWithDictionary:(NSDictionary *)dict;
- (NSString *)title;
- (NSString *)versionString;
- (NSString *)displayVersionString;
- (NSDate *)date;
- (NSString *)itemDescription;
- (NSURL *)releaseNotesURL;
- (NSURL *)fileURL;
- (NSString *)DSASignature;
- (NSString *)minimumSystemVersion;
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
- (NSDictionary *)propertiesDictionary;
@end
#endif

View File

@@ -0,0 +1,118 @@
//
// SUUpdater.h
// Sparkle
//
// Created by Andy Matuschak on 1/4/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUUPDATER_H
#define SUUPDATER_H
#import <Sparkle/SUVersionComparisonProtocol.h>
@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
@interface SUUpdater : NSObject {
NSTimer *checkTimer;
SUUpdateDriver *driver;
SUHost *host;
IBOutlet id delegate;
}
+ (SUUpdater *)sharedUpdater;
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
- (NSBundle *)hostBundle;
- (void)setDelegate:(id)delegate;
- delegate;
- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyChecks;
- (BOOL)automaticallyChecksForUpdates;
- (void)setUpdateCheckInterval:(NSTimeInterval)interval;
- (NSTimeInterval)updateCheckInterval;
- (void)setFeedURL:(NSURL *)feedURL;
- (NSURL *)feedURL;
- (void)setSendsSystemProfile:(BOOL)sendsSystemProfile;
- (BOOL)sendsSystemProfile;
- (void)setAutomaticallyDownloadsUpdates:(BOOL)automaticallyDownloadsUpdates;
- (BOOL)automaticallyDownloadsUpdates;
// 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 kicks off an update meant to be programmatically initiated. 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;
// Date of last update check. Returns null if no check has been performed.
- (NSDate*)lastUpdateCheckDate;
// This begins a "probing" check for updates which will not actually offer to update to that version. The delegate methods, though,
// (up to updater:didFindValidUpdate: and updaterDidNotFindUpdate:), are called, so you can use that information in your UI.
- (void)checkForUpdateInformation;
// Call this to appropriately schedule or cancel 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;
- (BOOL)updateInProgress;
@end
@interface NSObject (SUUpdaterDelegateInformalProtocol)
// This method allows you to add extra parameters to the appcast URL, potentially based on whether or not Sparkle will also be sending along the system profile. This method should 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;
// Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle;
// Implement this if you want to do some special handling with the appcast once it finishes loading.
- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast;
// 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.
- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)bundle;
// Sent when a valid update is found by the update driver.
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update;
// Sent when a valid update is not found.
- (void)updaterDidNotFindUpdate:(SUUpdater *)update;
// Sent immediately before installing the specified update.
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
// Called immediately before relaunching.
- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
// This method allows you to provide a custom version comparator.
// If you don't implement this method or return nil, the standard version comparator will be used.
- (id <SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
// Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle.
- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
@end
// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
#ifdef DEBUG
#define SU_MIN_CHECK_INTERVAL 60
#else
#define SU_MIN_CHECK_INTERVAL 60*60
#endif
#ifdef DEBUG
#define SU_DEFAULT_CHECK_INTERVAL 60
#else
#define SU_DEFAULT_CHECK_INTERVAL 60*60*24
#endif
#endif

View File

@@ -0,0 +1,27 @@
//
// SUVersionComparisonProtocol.h
// Sparkle
//
// Created by Andy Matuschak on 12/21/07.
// Copyright 2007 Andy Matuschak. All rights reserved.
//
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
#define SUVERSIONCOMPARISONPROTOCOL_H
/*!
@protocol
@abstract Implement this protocol to provide version comparison facilities for Sparkle.
*/
@protocol SUVersionComparison
/*!
@method
@abstract An abstract method to compare two version strings.
@discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent.
*/
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
@end
#endif

View File

@@ -0,0 +1,21 @@
//
// Sparkle.h
// Sparkle
//
// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SPARKLE_H
#define SPARKLE_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 <Sparkle/SUUpdater.h>
#import <Sparkle/SUAppcast.h>
#import <Sparkle/SUAppcastItem.h>
#import <Sparkle/SUVersionComparisonProtocol.h>
#endif

View File

@@ -0,0 +1,24 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Sparkle</string>
<key>CFBundleIdentifier</key>
<string>org.andymatuschak.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.5 Beta 6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>313</string>
</dict>
</plist>

View File

@@ -0,0 +1,7 @@
Copyright (c) 2006 Andy Matuschak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,174 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ADP2,1</key>
<string>Developer Transition Kit</string>
<key>MacBook1,1</key>
<string>MacBook (Core Duo)</string>
<key>MacBook2,1</key>
<string>MacBook (Core 2 Duo)</string>
<key>MacBook4,1</key>
<string>MacBook (Core 2 Duo Feb 2008)</string>
<key>MacBookAir1,1</key>
<string>MacBook Air (January 2008)</string>
<key>MacBookPro1,1</key>
<string>MacBook Pro Core Duo (15-inch)</string>
<key>MacBookPro1,2</key>
<string>MacBook Pro Core Duo (17-inch)</string>
<key>MacBookPro2,1</key>
<string>MacBook Pro Core 2 Duo (17-inch)</string>
<key>MacBookPro2,2</key>
<string>MacBook Pro Core 2 Duo (15-inch)</string>
<key>MacBookPro3,1</key>
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
<key>MacBookPro3,2</key>
<string>MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)</string>
<key>MacBookPro4,1</key>
<string>MacBook Pro (Core 2 Duo Feb 2008)</string>
<key>MacPro1,1</key>
<string>Mac Pro (four-core)</string>
<key>MacPro2,1</key>
<string>Mac Pro (eight-core)</string>
<key>MacPro3,1</key>
<string>Mac Pro (January 2008 4- or 8- core "Harpertown")</string>
<key>Macmini1,1</key>
<string>Mac Mini (Core Solo/Duo)</string>
<key>PowerBook1,1</key>
<string>PowerBook G3</string>
<key>PowerBook2,1</key>
<string>iBook G3</string>
<key>PowerBook2,2</key>
<string>iBook G3 (FireWire)</string>
<key>PowerBook2,3</key>
<string>iBook G3</string>
<key>PowerBook2,4</key>
<string>iBook G3</string>
<key>PowerBook3,1</key>
<string>PowerBook G3 (FireWire)</string>
<key>PowerBook3,2</key>
<string>PowerBook G4</string>
<key>PowerBook3,3</key>
<string>PowerBook G4 (Gigabit Ethernet)</string>
<key>PowerBook3,4</key>
<string>PowerBook G4 (DVI)</string>
<key>PowerBook3,5</key>
<string>PowerBook G4 (1GHz / 867MHz)</string>
<key>PowerBook4,1</key>
<string>iBook G3 (Dual USB, Late 2001)</string>
<key>PowerBook4,2</key>
<string>iBook G3 (16MB VRAM)</string>
<key>PowerBook4,3</key>
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
<key>PowerBook5,1</key>
<string>PowerBook G4 (17 inch)</string>
<key>PowerBook5,2</key>
<string>PowerBook G4 (15 inch FW 800)</string>
<key>PowerBook5,3</key>
<string>PowerBook G4 (17-inch 1.33GHz)</string>
<key>PowerBook5,4</key>
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
<key>PowerBook5,5</key>
<string>PowerBook G4 (17-inch 1.5GHz)</string>
<key>PowerBook5,6</key>
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
<key>PowerBook5,7</key>
<string>PowerBook G4 (17-inch 1.67GHz)</string>
<key>PowerBook5,8</key>
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
<key>PowerBook5,9</key>
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
<key>PowerBook6,1</key>
<string>PowerBook G4 (12 inch)</string>
<key>PowerBook6,2</key>
<string>PowerBook G4 (12 inch, DVI)</string>
<key>PowerBook6,3</key>
<string>iBook G4</string>
<key>PowerBook6,4</key>
<string>PowerBook G4 (12 inch 1.33GHz)</string>
<key>PowerBook6,5</key>
<string>iBook G4 (Early-Late 2004)</string>
<key>PowerBook6,7</key>
<string>iBook G4 (Mid 2005)</string>
<key>PowerBook6,8</key>
<string>PowerBook G4 (12 inch 1.5GHz)</string>
<key>PowerMac1,1</key>
<string>Power Macintosh G3 (Blue &amp; White)</string>
<key>PowerMac1,2</key>
<string>Power Macintosh G4 (PCI Graphics)</string>
<key>PowerMac10,1</key>
<string>Mac Mini G4</string>
<key>PowerMac10,2</key>
<string>Mac Mini (Late 2005)</string>
<key>PowerMac11,2</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>PowerMac12,1</key>
<string>iMac G5 (iSight)</string>
<key>PowerMac2,1</key>
<string>iMac G3 (Slot-loading CD-ROM)</string>
<key>PowerMac2,2</key>
<string>iMac G3 (Summer 2000)</string>
<key>PowerMac3,1</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,2</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,3</key>
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
<key>PowerMac3,4</key>
<string>Power Macintosh G4 (Digital Audio)</string>
<key>PowerMac3,5</key>
<string>Power Macintosh G4 (Quick Silver)</string>
<key>PowerMac3,6</key>
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
<key>PowerMac4,1</key>
<string>iMac G3 (Early/Summer 2001)</string>
<key>PowerMac4,2</key>
<string>iMac G4 (Flat Panel)</string>
<key>PowerMac4,4</key>
<string>eMac</string>
<key>PowerMac4,5</key>
<string>iMac G4 (17-inch Flat Panel)</string>
<key>PowerMac5,1</key>
<string>Power Macintosh G4 Cube</string>
<key>PowerMac6,1</key>
<string>iMac G4 (USB 2.0)</string>
<key>PowerMac6,3</key>
<string>iMac G4 (20-inch Flat Panel)</string>
<key>PowerMac6,4</key>
<string>eMac (USB 2.0, 2005)</string>
<key>PowerMac7,2</key>
<string>Power Macintosh G5</string>
<key>PowerMac7,3</key>
<string>Power Macintosh G5</string>
<key>PowerMac8,1</key>
<string>iMac G5</string>
<key>PowerMac8,2</key>
<string>iMac G5 (Ambient Light Sensor)</string>
<key>PowerMac9,1</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>RackMac1,1</key>
<string>Xserve G4</string>
<key>RackMac1,2</key>
<string>Xserve G4 (slot-loading, cluster node)</string>
<key>RackMac3,1</key>
<string>Xserve G5</string>
<key>Xserve1,1</key>
<string>Xserve (Intel Xeon)</string>
<key>Xserve2,1</key>
<string>Xserve (January 2008 quad-core)</string>
<key>iMac1,1</key>
<string>iMac G3 (Rev A-D)</string>
<key>iMac4,1</key>
<string>iMac (Core Duo)</string>
<key>iMac4,2</key>
<string>iMac for Education (17-inch, Core Duo)</string>
<key>iMac5,1</key>
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
<key>iMac5,2</key>
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
<key>iMac6,1</key>
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
<key>iMac8,1</key>
<string>iMac (April 2008)</string>
</dict>
</plist>

View File

@@ -0,0 +1,58 @@
<?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>12D78</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>NoSleep</string>
<key>CFBundleIconFile</key>
<string>Logo.icns</string>
<key>CFBundleIdentifier</key>
<string>com.protech.NoSleep</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>NoSleep</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.3</string>
<key>DTCompiler</key>
<string></string>
<key>DTPlatformBuild</key>
<string>4H512</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0461</string>
<key>DTXcodeBuild</key>
<string>4H512</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSBackgroundOnly</key>
<false/>
<key>LSMinimumSystemVersion</key>
<string>10.5</string>
<key>LSUIElement</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2013 Pavel Prokofiev. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>SUFeedURL</key>
<string>https://macosx-nosleep-extension.googlecode.com/git/Utilities/update.xml</string>
</dict>
</plist>

Binary file not shown.

View File

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

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,69 @@
<?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>12D78</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>NoSleep</string>
<key>CFBundleIdentifier</key>
<string>com.protech.NoSleep</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>NoSleep</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.3.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.3</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>4H512</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0461</string>
<key>DTXcodeBuild</key>
<string>4H512</string>
<key>IOKitPersonalities</key>
<dict>
<key>FirstPersonality</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.protech.NoSleep</string>
<key>IOClass</key>
<string>com_protech_nosleepextension</string>
<key>IOMatchCategory</key>
<string>com_protech_nosleepextension</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
<key>IOUserClientClass</key>
<string>com_protech_nosleepclientclass</string>
</dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2013 Pavel Prokofiev. All rights reserved.</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kpi.iokit</key>
<string>9.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>9.0.0</string>
<key>com.apple.kpi.mach</key>
<string>9.0.0</string>
</dict>
</dict>
</plist>

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,41 @@
//
// GlobalConstants.h
// nosleep
//
// Created by Pavel Prokofiev on 4/8/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#define _STR(x) #x
#define STR(x) _STR(x)
// Extension part
#define NoSleepExtension com_protech_nosleepextension
#define NoSleepClientClass com_protech_nosleepclientclass
#define kNoSleepCommandDisabled iokit_vendor_specific_msg(0)
#define kNoSleepCommandEnabled iokit_vendor_specific_msg(1)
#define kNoSleepCommandLockScreenRequest iokit_vendor_specific_msg(2)
// AppleNVRAM Variable name
#define IORegistrySleepSuppressionMode "IORegistryCurrentSleepMode"
// Interface
#define kNoSleepDriverClassName STR(NoSleepExtension)
// GUI
#define SHOW_UI_ALERT_KEXT_NOT_LOADED() NSRunAlertPanel(@"Oops!", @"NoSleep Kernel Extension is not loaded.", @"OK", nil, nil)
#define NOSLEEP_ID "com.protech.NoSleep"
#define NOSLEEP_HELPER_PATH "/Applications/Utilities/NoSleep.app"
#define NOSLEEP_PREFPANE_PATH "/Library/PreferencePanes/NoSleep.prefPane"
#define kNoSleepModeCurrent 0
#define kNoSleepModeAC 1
#define kNoSleepModeBattery 2
//Settings
#define NOSLEEP_SETTINGS_UPDATE_EVENTNAME "UpdateSettings"
#define NOSLEEP_SETTINGS_isBWIconEnabledID "IsBWIconEnabled"
#define NOSLEEP_SETTINGS_toLockScreenID "LockScreen"
#define NOSLEEP_SETTINGS_useDoubleClick "UseDoubleClick"

View File

@@ -0,0 +1,31 @@
//
// NoSleepInterface.h
// nosleep
//
// Created by Pavel Prokofiev on 4/3/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#include <IOKit/IOKitLib.h>
//io_connect_t m_connect;
typedef io_service_t NoSleepInterfaceService;
typedef io_connect_t NoSleepInterfaceConnect;
typedef io_object_t NoSleepInterestNotification;
#ifdef __cplusplus
extern "C" {
#endif
extern bool NoSleepVerbose;
NoSleepInterestNotification NoSleep_ReceiveStateChanged(NoSleepInterfaceConnect m_connect, IOServiceInterestCallback callback, void *refCon);
void NoSleep_ReleaseStateChanged(NoSleepInterestNotification notifyObj);
bool NoSleep_InterfaceCreate(NoSleepInterfaceService *service, NoSleepInterfaceConnect *connect);
bool NoSleep_InterfaceDestroy(NoSleepInterfaceConnect connect);
bool NoSleep_GetSleepSuppressionMode(NoSleepInterfaceConnect connect, int mode);
bool NoSleep_SetSleepSuppressionMode(NoSleepInterfaceConnect connect, bool state, int mode);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,27 @@
//
// NoSleepInterfaceWrapper.h
// nosleep
//
// Created by Pavel Prokofiev on 4/7/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <NoSleep/NoSleepInterface.h>
#import <NoSleep/NoSleepNotificationDelegate.h>
@interface NoSleepInterfaceWrapper : NSObject {
@private
NoSleepInterfaceConnect _noSleepInterface;
NoSleepInterestNotification _noSleepNotification;
id<NoSleepNotificationDelegate> notificationDelegate;
}
@property (retain) id<NoSleepNotificationDelegate> notificationDelegate;
-(BOOL) stateForMode:(int)mode;
-(void) setState:(BOOL)state forMode:(int)mode;
@end

View File

@@ -0,0 +1,16 @@
//
// NoSleepNotificationDelegate.h
// nosleep
//
// Created by Pavel Prokofiev on 4/8/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol NoSleepNotificationDelegate <NSObject>
@optional
-(void) notificationReceived:(uint32_t)messageType :(void *)messageArgument;
@end

View File

@@ -0,0 +1,23 @@
//
// Utilities.h
// NoSleepFramework
//
// Created by Pavel Prokofiev on 2/24/12.
// Copyright 2012 __MyCompanyName__. All rights reserved.
//
#ifndef NoSleepFramework_Utilities_h
#define NoSleepFramework_Utilities_h
typedef enum {
kLICheck = 0,
kLIRegister,
kLIUnregister,
} LoginItemAction;
BOOL registerLoginItem(LoginItemAction action);
BOOL GetLockScreen();
void SetLockScreen(BOOL value);
#endif

View File

@@ -0,0 +1,42 @@
<?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>12D78</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>NoSleep</string>
<key>CFBundleIdentifier</key>
<string>com.protech.NoSleepFramework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>NoSleep</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.3</string>
<key>DTCompiler</key>
<string></string>
<key>DTPlatformBuild</key>
<string>4H512</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0461</string>
<key>DTXcodeBuild</key>
<string>4H512</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2013 Pavel Prokofiev. All rights reserved.</string>
</dict>
</plist>

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,33 @@
//
// SUAppcast.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCAST_H
#define SUAPPCAST_H
@class SUAppcastItem;
@interface SUAppcast : NSObject {
NSArray *items;
NSString *userAgentString;
id delegate;
NSMutableData *incrementalData;
}
- (void)fetchAppcastFromURL:(NSURL *)url;
- (void)setDelegate:delegate;
- (void)setUserAgentString:(NSString *)userAgentString;
- (NSArray *)items;
@end
@interface NSObject (SUAppcastDelegate)
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
@end
#endif

View File

@@ -0,0 +1,47 @@
//
// SUAppcastItem.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCASTITEM_H
#define SUAPPCASTITEM_H
@interface SUAppcastItem : NSObject {
NSString *title;
NSDate *date;
NSString *itemDescription;
NSURL *releaseNotesURL;
NSString *DSASignature;
NSString *minimumSystemVersion;
NSURL *fileURL;
NSString *versionString;
NSString *displayVersionString;
NSDictionary *propertiesDictionary;
}
// Initializes with data from a dictionary provided by the RSS class.
- initWithDictionary:(NSDictionary *)dict;
- (NSString *)title;
- (NSString *)versionString;
- (NSString *)displayVersionString;
- (NSDate *)date;
- (NSString *)itemDescription;
- (NSURL *)releaseNotesURL;
- (NSURL *)fileURL;
- (NSString *)DSASignature;
- (NSString *)minimumSystemVersion;
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
- (NSDictionary *)propertiesDictionary;
@end
#endif

View File

@@ -0,0 +1,118 @@
//
// SUUpdater.h
// Sparkle
//
// Created by Andy Matuschak on 1/4/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUUPDATER_H
#define SUUPDATER_H
#import <Sparkle/SUVersionComparisonProtocol.h>
@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
@interface SUUpdater : NSObject {
NSTimer *checkTimer;
SUUpdateDriver *driver;
SUHost *host;
IBOutlet id delegate;
}
+ (SUUpdater *)sharedUpdater;
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
- (NSBundle *)hostBundle;
- (void)setDelegate:(id)delegate;
- delegate;
- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyChecks;
- (BOOL)automaticallyChecksForUpdates;
- (void)setUpdateCheckInterval:(NSTimeInterval)interval;
- (NSTimeInterval)updateCheckInterval;
- (void)setFeedURL:(NSURL *)feedURL;
- (NSURL *)feedURL;
- (void)setSendsSystemProfile:(BOOL)sendsSystemProfile;
- (BOOL)sendsSystemProfile;
- (void)setAutomaticallyDownloadsUpdates:(BOOL)automaticallyDownloadsUpdates;
- (BOOL)automaticallyDownloadsUpdates;
// 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 kicks off an update meant to be programmatically initiated. 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;
// Date of last update check. Returns null if no check has been performed.
- (NSDate*)lastUpdateCheckDate;
// This begins a "probing" check for updates which will not actually offer to update to that version. The delegate methods, though,
// (up to updater:didFindValidUpdate: and updaterDidNotFindUpdate:), are called, so you can use that information in your UI.
- (void)checkForUpdateInformation;
// Call this to appropriately schedule or cancel 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;
- (BOOL)updateInProgress;
@end
@interface NSObject (SUUpdaterDelegateInformalProtocol)
// This method allows you to add extra parameters to the appcast URL, potentially based on whether or not Sparkle will also be sending along the system profile. This method should 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;
// Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle;
// Implement this if you want to do some special handling with the appcast once it finishes loading.
- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast;
// 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.
- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)bundle;
// Sent when a valid update is found by the update driver.
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update;
// Sent when a valid update is not found.
- (void)updaterDidNotFindUpdate:(SUUpdater *)update;
// Sent immediately before installing the specified update.
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
// Called immediately before relaunching.
- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
// This method allows you to provide a custom version comparator.
// If you don't implement this method or return nil, the standard version comparator will be used.
- (id <SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
// Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle.
- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
@end
// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
#ifdef DEBUG
#define SU_MIN_CHECK_INTERVAL 60
#else
#define SU_MIN_CHECK_INTERVAL 60*60
#endif
#ifdef DEBUG
#define SU_DEFAULT_CHECK_INTERVAL 60
#else
#define SU_DEFAULT_CHECK_INTERVAL 60*60*24
#endif
#endif

View File

@@ -0,0 +1,27 @@
//
// SUVersionComparisonProtocol.h
// Sparkle
//
// Created by Andy Matuschak on 12/21/07.
// Copyright 2007 Andy Matuschak. All rights reserved.
//
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
#define SUVERSIONCOMPARISONPROTOCOL_H
/*!
@protocol
@abstract Implement this protocol to provide version comparison facilities for Sparkle.
*/
@protocol SUVersionComparison
/*!
@method
@abstract An abstract method to compare two version strings.
@discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent.
*/
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
@end
#endif

View File

@@ -0,0 +1,21 @@
//
// Sparkle.h
// Sparkle
//
// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SPARKLE_H
#define SPARKLE_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 <Sparkle/SUUpdater.h>
#import <Sparkle/SUAppcast.h>
#import <Sparkle/SUAppcastItem.h>
#import <Sparkle/SUVersionComparisonProtocol.h>
#endif

View File

@@ -0,0 +1,24 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Sparkle</string>
<key>CFBundleIdentifier</key>
<string>org.andymatuschak.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.5 Beta 6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>313</string>
</dict>
</plist>

View File

@@ -0,0 +1,7 @@
Copyright (c) 2006 Andy Matuschak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,174 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ADP2,1</key>
<string>Developer Transition Kit</string>
<key>MacBook1,1</key>
<string>MacBook (Core Duo)</string>
<key>MacBook2,1</key>
<string>MacBook (Core 2 Duo)</string>
<key>MacBook4,1</key>
<string>MacBook (Core 2 Duo Feb 2008)</string>
<key>MacBookAir1,1</key>
<string>MacBook Air (January 2008)</string>
<key>MacBookPro1,1</key>
<string>MacBook Pro Core Duo (15-inch)</string>
<key>MacBookPro1,2</key>
<string>MacBook Pro Core Duo (17-inch)</string>
<key>MacBookPro2,1</key>
<string>MacBook Pro Core 2 Duo (17-inch)</string>
<key>MacBookPro2,2</key>
<string>MacBook Pro Core 2 Duo (15-inch)</string>
<key>MacBookPro3,1</key>
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
<key>MacBookPro3,2</key>
<string>MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)</string>
<key>MacBookPro4,1</key>
<string>MacBook Pro (Core 2 Duo Feb 2008)</string>
<key>MacPro1,1</key>
<string>Mac Pro (four-core)</string>
<key>MacPro2,1</key>
<string>Mac Pro (eight-core)</string>
<key>MacPro3,1</key>
<string>Mac Pro (January 2008 4- or 8- core "Harpertown")</string>
<key>Macmini1,1</key>
<string>Mac Mini (Core Solo/Duo)</string>
<key>PowerBook1,1</key>
<string>PowerBook G3</string>
<key>PowerBook2,1</key>
<string>iBook G3</string>
<key>PowerBook2,2</key>
<string>iBook G3 (FireWire)</string>
<key>PowerBook2,3</key>
<string>iBook G3</string>
<key>PowerBook2,4</key>
<string>iBook G3</string>
<key>PowerBook3,1</key>
<string>PowerBook G3 (FireWire)</string>
<key>PowerBook3,2</key>
<string>PowerBook G4</string>
<key>PowerBook3,3</key>
<string>PowerBook G4 (Gigabit Ethernet)</string>
<key>PowerBook3,4</key>
<string>PowerBook G4 (DVI)</string>
<key>PowerBook3,5</key>
<string>PowerBook G4 (1GHz / 867MHz)</string>
<key>PowerBook4,1</key>
<string>iBook G3 (Dual USB, Late 2001)</string>
<key>PowerBook4,2</key>
<string>iBook G3 (16MB VRAM)</string>
<key>PowerBook4,3</key>
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
<key>PowerBook5,1</key>
<string>PowerBook G4 (17 inch)</string>
<key>PowerBook5,2</key>
<string>PowerBook G4 (15 inch FW 800)</string>
<key>PowerBook5,3</key>
<string>PowerBook G4 (17-inch 1.33GHz)</string>
<key>PowerBook5,4</key>
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
<key>PowerBook5,5</key>
<string>PowerBook G4 (17-inch 1.5GHz)</string>
<key>PowerBook5,6</key>
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
<key>PowerBook5,7</key>
<string>PowerBook G4 (17-inch 1.67GHz)</string>
<key>PowerBook5,8</key>
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
<key>PowerBook5,9</key>
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
<key>PowerBook6,1</key>
<string>PowerBook G4 (12 inch)</string>
<key>PowerBook6,2</key>
<string>PowerBook G4 (12 inch, DVI)</string>
<key>PowerBook6,3</key>
<string>iBook G4</string>
<key>PowerBook6,4</key>
<string>PowerBook G4 (12 inch 1.33GHz)</string>
<key>PowerBook6,5</key>
<string>iBook G4 (Early-Late 2004)</string>
<key>PowerBook6,7</key>
<string>iBook G4 (Mid 2005)</string>
<key>PowerBook6,8</key>
<string>PowerBook G4 (12 inch 1.5GHz)</string>
<key>PowerMac1,1</key>
<string>Power Macintosh G3 (Blue &amp; White)</string>
<key>PowerMac1,2</key>
<string>Power Macintosh G4 (PCI Graphics)</string>
<key>PowerMac10,1</key>
<string>Mac Mini G4</string>
<key>PowerMac10,2</key>
<string>Mac Mini (Late 2005)</string>
<key>PowerMac11,2</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>PowerMac12,1</key>
<string>iMac G5 (iSight)</string>
<key>PowerMac2,1</key>
<string>iMac G3 (Slot-loading CD-ROM)</string>
<key>PowerMac2,2</key>
<string>iMac G3 (Summer 2000)</string>
<key>PowerMac3,1</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,2</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,3</key>
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
<key>PowerMac3,4</key>
<string>Power Macintosh G4 (Digital Audio)</string>
<key>PowerMac3,5</key>
<string>Power Macintosh G4 (Quick Silver)</string>
<key>PowerMac3,6</key>
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
<key>PowerMac4,1</key>
<string>iMac G3 (Early/Summer 2001)</string>
<key>PowerMac4,2</key>
<string>iMac G4 (Flat Panel)</string>
<key>PowerMac4,4</key>
<string>eMac</string>
<key>PowerMac4,5</key>
<string>iMac G4 (17-inch Flat Panel)</string>
<key>PowerMac5,1</key>
<string>Power Macintosh G4 Cube</string>
<key>PowerMac6,1</key>
<string>iMac G4 (USB 2.0)</string>
<key>PowerMac6,3</key>
<string>iMac G4 (20-inch Flat Panel)</string>
<key>PowerMac6,4</key>
<string>eMac (USB 2.0, 2005)</string>
<key>PowerMac7,2</key>
<string>Power Macintosh G5</string>
<key>PowerMac7,3</key>
<string>Power Macintosh G5</string>
<key>PowerMac8,1</key>
<string>iMac G5</string>
<key>PowerMac8,2</key>
<string>iMac G5 (Ambient Light Sensor)</string>
<key>PowerMac9,1</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>RackMac1,1</key>
<string>Xserve G4</string>
<key>RackMac1,2</key>
<string>Xserve G4 (slot-loading, cluster node)</string>
<key>RackMac3,1</key>
<string>Xserve G5</string>
<key>Xserve1,1</key>
<string>Xserve (Intel Xeon)</string>
<key>Xserve2,1</key>
<string>Xserve (January 2008 quad-core)</string>
<key>iMac1,1</key>
<string>iMac G3 (Rev A-D)</string>
<key>iMac4,1</key>
<string>iMac (Core Duo)</string>
<key>iMac4,2</key>
<string>iMac for Education (17-inch, Core Duo)</string>
<key>iMac5,1</key>
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
<key>iMac5,2</key>
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
<key>iMac6,1</key>
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
<key>iMac8,1</key>
<string>iMac (April 2008)</string>
</dict>
</plist>

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