mirror of
https://github.com/ksherlock/ample.git
synced 2026-10-26 04:02:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
405e802176 | ||
|
|
d352e7c45d | ||
|
|
5af5e2e300 | ||
|
|
afc3ac608a | ||
|
|
c200672650 |
No files matched your search
@@ -1518,7 +1518,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Ample/Ample.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 22;
|
||||
CURRENT_PROJECT_VERSION = 23;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1529,7 +1529,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 0.237;
|
||||
MARKETING_VERSION = 0.238;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ksherlock.ample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
@@ -1542,7 +1542,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Ample/Ample.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 22;
|
||||
CURRENT_PROJECT_VERSION = 23;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1553,7 +1553,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 0.237;
|
||||
MARKETING_VERSION = 0.238;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ksherlock.ample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>MameComponentsDate</key>
|
||||
<date>2021-10-27T16:00:00Z</date>
|
||||
<date>2021-11-23T16:00:00Z</date>
|
||||
<key>UseCustomMame</key>
|
||||
<false/>
|
||||
<key>AutoCloseLogWindow</key>
|
||||
@@ -15,7 +15,7 @@
|
||||
<key>NSQuitAlwaysKeepsWindows</key>
|
||||
<true/>
|
||||
<key>DefaultDownloadURL</key>
|
||||
<string>https://archive.org/download/mame-0.236-romset</string>
|
||||
<string>https://archive.org/download/mame-0.231-merged</string>
|
||||
<key>DefaultDownloadExtension</key>
|
||||
<string>7z</string>
|
||||
</dict>
|
||||
|
||||
@@ -373,6 +373,10 @@ enum {
|
||||
#endif
|
||||
}
|
||||
|
||||
-(void) defocus {
|
||||
[[self window] makeFirstResponder: nil];
|
||||
}
|
||||
|
||||
#pragma mark - IBActions
|
||||
|
||||
-(IBAction)cancelAll:(id)sender {
|
||||
@@ -390,6 +394,7 @@ enum {
|
||||
|
||||
- (IBAction)downloadMissing:(id)sender {
|
||||
|
||||
[self defocus];
|
||||
BOOL delta = NO;
|
||||
for (DownloadItem *item in _items) {
|
||||
NSURL *url = [item localURL];
|
||||
@@ -452,6 +457,8 @@ enum {
|
||||
DownloadItem *item = [self clickedItem];
|
||||
if (!item) return;
|
||||
|
||||
[self defocus];
|
||||
|
||||
[self downloadItem: item];
|
||||
[self setActive: YES];
|
||||
}
|
||||
@@ -586,6 +593,76 @@ static NSInteger TaskStatusCode(NSURLSessionTask *task) {
|
||||
NSLog(@"%@", src);
|
||||
}
|
||||
|
||||
|
||||
|
||||
-(NSURLCredential *)credentialForChallenge: (NSURLAuthenticationChallenge *)challenge {
|
||||
|
||||
|
||||
//if ([challenge previousFailureCount]) return nil;
|
||||
|
||||
NSURLCredential *credential = nil;
|
||||
NSURLProtectionSpace *space = [challenge protectionSpace];
|
||||
|
||||
|
||||
OSStatus status;
|
||||
NSDictionary *query;
|
||||
CFTypeRef item = nil;
|
||||
|
||||
|
||||
query = @{
|
||||
(id)kSecClass: (id)kSecClassInternetPassword,
|
||||
(id)kSecReturnData: (id)kCFBooleanTrue,
|
||||
(id)kSecReturnAttributes: (id)kCFBooleanTrue,
|
||||
(id)kSecAttrServer: [space host],
|
||||
//(id)kSecAttrProtocol: [space protocol],
|
||||
(id)kSecMatchLimit: (id)kSecMatchLimitOne,
|
||||
};
|
||||
|
||||
status = SecItemCopyMatching((CFDictionaryRef)query, &item);
|
||||
NSLog(@"%@", query);
|
||||
if (status != 0) return nil;
|
||||
|
||||
NSDictionary *d = (__bridge NSDictionary *)item;
|
||||
NSLog(@"%@", d);
|
||||
|
||||
NSString *account = [d objectForKey: (id)kSecAttrAccount];
|
||||
NSData *passwordData = [d objectForKey: (id)kSecValueData];
|
||||
NSString *password = [[NSString alloc] initWithData: passwordData encoding: NSUTF8StringEncoding];
|
||||
|
||||
|
||||
credential = [NSURLCredential credentialWithUser: account password: password persistence: NSURLCredentialPersistenceForSession];
|
||||
|
||||
return credential;
|
||||
|
||||
}
|
||||
|
||||
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler {
|
||||
|
||||
NSLog(@"challenge: %@", challenge);
|
||||
|
||||
if ([challenge previousFailureCount]) {
|
||||
completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);
|
||||
return;
|
||||
}
|
||||
|
||||
NSURLProtectionSpace *space = [challenge protectionSpace];
|
||||
NSString *method = [space authenticationMethod];
|
||||
|
||||
if ([NSURLAuthenticationMethodHTTPBasic isEqualToString: method] ||
|
||||
[NSURLAuthenticationMethodNTLM isEqualToString: method] ||
|
||||
[NSURLAuthenticationMethodHTTPDigest isEqualToString: method]) {
|
||||
|
||||
NSURLCredential *credential = [self credentialForChallenge: challenge];
|
||||
|
||||
if (credential) {
|
||||
completionHandler(NSURLSessionAuthChallengeUseCredential, credential);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -594,11 +594,15 @@ static NSString *ShellQuote(NSString *s) {
|
||||
//return [super validateMenuItem: menuItem]; // not implemented?
|
||||
}
|
||||
|
||||
-(void)defocus {
|
||||
[[self window] makeFirstResponder: nil]; // in case text is being edited...
|
||||
}
|
||||
|
||||
# pragma mark - IBActions
|
||||
|
||||
- (IBAction)launchAction:(id)sender {
|
||||
|
||||
[[self window] makeFirstResponder: nil]; // in case text is being edited...
|
||||
[self defocus];
|
||||
if (![_args count]) return;
|
||||
|
||||
[LogWindowController controllerForArgs: _args];
|
||||
@@ -608,7 +612,7 @@ static NSString *ShellQuote(NSString *s) {
|
||||
|
||||
- (IBAction)listMedia:(id)sender {
|
||||
|
||||
[[self window] makeFirstResponder: nil]; // in case text is being edited...
|
||||
[self defocus];
|
||||
if (!_machine) return;
|
||||
|
||||
NSMutableArray *argv = [NSMutableArray new];
|
||||
@@ -635,7 +639,7 @@ static NSString *ShellQuote(NSString *s) {
|
||||
|
||||
- (IBAction)listSlots:(id)sender {
|
||||
|
||||
[[self window] makeFirstResponder: nil]; // in case text is being edited...
|
||||
[self defocus];
|
||||
if (!_machine) return;
|
||||
|
||||
NSMutableArray *argv = [NSMutableArray new];
|
||||
@@ -935,7 +939,7 @@ static NSString *ShellQuote(NSString *s) {
|
||||
|
||||
-(NSDictionary *)makeBookmark {
|
||||
|
||||
[[self window] makeFirstResponder: nil];
|
||||
[self defocus];
|
||||
|
||||
NSMutableDictionary *dict = [NSMutableDictionary new];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
VERSION=1.26.0
|
||||
VERSION=1.27.1
|
||||
TAR=Sparkle-${VERSION}.tar.xz
|
||||
URL=https://github.com/sparkle-project/Sparkle/releases/download/${VERSION}/Sparkle-${VERSION}.tar.xz
|
||||
FRAMEWORK=Sparkle.framework
|
||||
|
||||
Reference in new issue
Block a user