Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

Commit

Permalink
added sparkle for auto-updating
Browse files Browse the repository at this point in the history
  • Loading branch information
shahruz committed May 27, 2014
1 parent 06554c1 commit bc810cb
Show file tree
Hide file tree
Showing 105 changed files with 2,444 additions and 2 deletions.
31 changes: 31 additions & 0 deletions Sketch Toolbox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
0E5D4F26192B15560084F30C /* STPluginCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E5D4F25192B15560084F30C /* STPluginCellView.m */; };
EA12D97F19354808000E5232 /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = EA12D97E19354808000E5232 /* dsa_pub.pem */; };
EA5913BD192D627E00FF4CC0 /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = EA5913BC192D627E00FF4CC0 /* Constants.m */; };
EA70F99C192AC88D00315D05 /* PluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EA70F99B192AC88D00315D05 /* PluginManager.m */; };
EA70F9AA192ACD5300315D05 /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = EA70F9A0192ACD5300315D05 /* ioapi.c */; };
Expand Down Expand Up @@ -51,11 +52,27 @@
EA86F5E4192AB55F00B834ED /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = EA86F5E2192AB55F00B834ED /* MainMenu.xib */; };
EA86F5E7192AB55F00B834ED /* Sketch_Toolbox.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = EA86F5E5192AB55F00B834ED /* Sketch_Toolbox.xcdatamodeld */; };
EA86F5E9192AB55F00B834ED /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EA86F5E8192AB55F00B834ED /* Images.xcassets */; };
EAA8CF521935347200F8AE07 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = EAA8CF4E19350E0400F8AE07 /* Sparkle.framework */; };
EAA8CF53193534BE00F8AE07 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAA8CF4E19350E0400F8AE07 /* Sparkle.framework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
EAA8CF511935346D00F8AE07 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
EAA8CF521935347200F8AE07 /* Sparkle.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
0E5D4F24192B15560084F30C /* STPluginCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STPluginCellView.h; sourceTree = "<group>"; };
0E5D4F25192B15560084F30C /* STPluginCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STPluginCellView.m; sourceTree = "<group>"; };
EA12D97E19354808000E5232 /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dsa_pub.pem; sourceTree = "<group>"; };
EA5913BC192D627E00FF4CC0 /* Constants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Constants.m; sourceTree = "<group>"; };
EA5913BE192D691200FF4CC0 /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = "<group>"; };
EA70F99A192AC88D00315D05 /* PluginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginManager.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -146,6 +163,7 @@
EA86F5E6192AB55F00B834ED /* Sketch_Toolbox.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Sketch_Toolbox.xcdatamodel; sourceTree = "<group>"; };
EA86F5E8192AB55F00B834ED /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
EA86F5EF192AB55F00B834ED /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
EAA8CF4E19350E0400F8AE07 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -155,6 +173,7 @@
files = (
EA70F9B0192ACEBA00315D05 /* libz.dylib in Frameworks */,
EA86F5CE192AB55F00B834ED /* Cocoa.framework in Frameworks */,
EAA8CF53193534BE00F8AE07 /* Sparkle.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -339,6 +358,7 @@
EA86F5CC192AB55F00B834ED /* Frameworks */ = {
isa = PBXGroup;
children = (
EAA8CF4E19350E0400F8AE07 /* Sparkle.framework */,
EA70F9AF192ACEBA00315D05 /* libz.dylib */,
EA86F5CD192AB55F00B834ED /* Cocoa.framework */,
EA86F5EF192AB55F00B834ED /* XCTest.framework */,
Expand Down Expand Up @@ -383,6 +403,7 @@
EA86F5D9192AB55F00B834ED /* main.m */,
EA86F5DB192AB55F00B834ED /* Sketch Toolbox-Prefix.pch */,
EA86F5DC192AB55F00B834ED /* Credits.rtf */,
EA12D97E19354808000E5232 /* dsa_pub.pem */,
);
name = "Supporting Files";
sourceTree = "<group>";
Expand All @@ -397,6 +418,7 @@
EA86F5C6192AB55F00B834ED /* Sources */,
EA86F5C7192AB55F00B834ED /* Frameworks */,
EA86F5C8192AB55F00B834ED /* Resources */,
EAA8CF511935346D00F8AE07 /* CopyFiles */,
);
buildRules = (
);
Expand Down Expand Up @@ -445,6 +467,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EA12D97F19354808000E5232 /* dsa_pub.pem in Resources */,
EA86F5D8192AB55F00B834ED /* InfoPlist.strings in Resources */,
EA86F5E9192AB55F00B834ED /* Images.xcassets in Resources */,
EA86F5DE192AB55F00B834ED /* Credits.rtf in Resources */,
Expand Down Expand Up @@ -605,6 +628,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Sketch Toolbox/Sketch Toolbox-Prefix.pch";
INFOPLIST_FILE = "Sketch Toolbox/Sketch Toolbox-Info.plist";
Expand All @@ -618,6 +645,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Sketch Toolbox/Sketch Toolbox-Prefix.pch";
INFOPLIST_FILE = "Sketch Toolbox/Sketch Toolbox-Info.plist";
Expand Down
13 changes: 13 additions & 0 deletions Sketch Toolbox/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
</subviews>
</view>
</window>
<customObject id="wxL-fS-6xB" customClass="SUUpdater"/>
<menu title="Main Menu" systemMenu="main" id="EIy-nK-C1y">
<items>
<menuItem title="Sketch Toolbox" id="8TN-Gh-ty4">
Expand All @@ -197,6 +198,18 @@
<action selector="orderFrontStandardAboutPanel:" target="-1" id="jqq-mE-mF0"/>
</connections>
</menuItem>
<menuItem title="Check for updates..." id="M66-4n-jO2">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="checkForUpdates:" target="wxL-fS-6xB" id="RDj-rO-vRs"/>
</connections>
</menuItem>
<menuItem title="Send feedback..." id="prn-vd-ce7">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="feedbackEmailClicked" target="Voe-Tx-rLC" id="gZO-d5-XYc"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="5Vv-wl-45a"/>
<menuItem title="Services" id="cgq-f0-Nqv">
<modifierMask key="keyEquivalentModifierMask"/>
Expand Down
1 change: 1 addition & 0 deletions Sketch Toolbox/STAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

-(IBAction)filterPlugins:(NSSearchField *)searchField;
-(IBAction)segmentSelected:(NSSegmentedControl*)sender;
-(IBAction)feedbackEmailClicked:(id)sender;

- (NSString *)applicationFilesDirectory;

Expand Down
5 changes: 5 additions & 0 deletions Sketch Toolbox/STAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ -(void)startApp {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadTableData) name:@"pluginStatusUpdated" object:nil];
}

-(IBAction)feedbackEmailClicked:(id)sender {
NSString *mailtoAddress = [[NSString stringWithFormat:@"mailto:sketch@shahr.uz?Subject=[Sketch Toolbox] Feedback on version %@",[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]] stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:mailtoAddress]];
}

#pragma mark - Plugins Table

-(void)reloadTableData {
Expand Down
8 changes: 6 additions & 2 deletions Sketch Toolbox/Sketch Toolbox-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.4</string>
<string>0.0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4</string>
<string>5</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.graphics-design</string>
<key>LSMinimumSystemVersion</key>
Expand All @@ -32,5 +32,9 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>SUFeedURL</key>
<string>http://sketchtoolbox.com/updates/appcast.xml</string>
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
</dict>
</plist>
20 changes: 20 additions & 0 deletions Sketch Toolbox/dsa_pub.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN PUBLIC KEY-----
MIIDOzCCAi0GByqGSM44BAEwggIgAoIBAQDH/Nfs1nHCVqQFP5qF2bB0kRPEL6JY
2mrzg2B3uUWzDVzlRYOz2K2OEubsq/K5xlJUC7SIUlOAdBGL9CfTXhNdbN2Wd99b
xp/db68HCoLHmjnzn36bHo6EQps4Pu/yL0GxflClUFN+3cP0MLX4unhhfhr1mCNp
STPzgFvpaSTicz6GV5en1KN3xu3QmtJAYk5778r4N8c/31Z4zJTtJwURlksZJpZD
Q0foZqLZpu5Lnj7zwGvrBBvd40+Lh1YD5oeK2v4GO7+LXoAakA0oCDSNMG4zr2VK
IWeLG/4we7f8lsGlJ7u2qlUkbwuy7T1nIbH18UsS11wylQSTdpSDmUz1AhUAzXWe
y5WTOm7lc4DlI6PCxQswCe8CggEAK6dDiEc1F5dOjTaSZMQB5VPBT9ka4DBt0AzY
KWcexnvtpuG8HGH2AFl3xhz/2sWmKDk7xg9MhxibC9dHO9JQ9yhFCuzbnuLDaIq7
DUTncUxn3p7FCdmDjXPmvSbgTadS44CvONUzMagpWmGXK8qAXsD+rq2MA+J+fxio
ZbGC0EUAxEFOJD2Me9TGpCOGpb8HXlDMKgN4/OmX74338ZRz8taR8AdsZ2Z4oKZb
bIhJwRY5cis2APM7hBVZ66h10dEYrSI6Useuf0o3pw9sCAVD1TehkVKkqYbSNmah
XKJvxmfpbZtBZ8LuanuN7b37D6u808EzeHVfVH0T1hegojiqwQOCAQYAAoIBAQCi
kgdJD+MljkepHQ/pKwmMqc+l6UwRmMjXCI36SD5wrymRb0IKk33ik9J4oHAKaQvn
+Gafry1tu7p0rve/OQaNpwE6qqdGIcmQiisz1tupnGuPh+QvMPKEiAYGJzgBzg76
dXRvWGeyND4W2NHYpHdj2FdCqShWyemeSsORSMJiGvAnJAvYYFQI17WJOlRRc5QP
rBlue0zAnaTx84WvwuuEGU+aKPbIDShoygATj1Iz80kZCl9E2N53rcdejBfS4wNx
w+0qhRJpPrZgIAvU5wIusf+zMLUh7SQD0DzigGxphDkTdKBgxZSMZmgzxw/deDB2
3aLCw29geckZOvVY0CvQ
-----END PUBLIC KEY-----
1 change: 1 addition & 0 deletions Sparkle.framework/Headers
1 change: 1 addition & 0 deletions Sparkle.framework/Resources
1 change: 1 addition & 0 deletions Sparkle.framework/Sparkle
33 changes: 33 additions & 0 deletions Sparkle.framework/Versions/A/Headers/SUAppcast.h
Original file line number Diff line number Diff line change
@@ -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
47 changes: 47 additions & 0 deletions Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit bc810cb

Please sign in to comment.