Release version v1.6.1
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
# ShadowsocksX-NG
|
# ShadowsocksX-NG
|
||||||
|
|
||||||
Current version is 1.6.0
|
Current version is 1.6.1
|
||||||
|
|
||||||
[](https://travis-ci.org/shadowsocks/ShadowsocksX-NG)
|
[](https://travis-ci.org/shadowsocks/ShadowsocksX-NG)
|
||||||
|
|
||||||
@ -63,8 +63,6 @@ so that you could configure your apps to use the SOCKS5 proxy manually.
|
|||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
[](https://gitter.im/ShadowsocksX-NG/Lobby)
|
|
||||||
|
|
||||||
Contributions must be available on a separately named branch based on the latest version of the main branch `develop`.
|
Contributions must be available on a separately named branch based on the latest version of the main branch `develop`.
|
||||||
|
|
||||||
ref: [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/)
|
ref: [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/)
|
||||||
|
@ -57,7 +57,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
|||||||
if attrs[FileAttributeKey.ownerAccountName] as! String != NSUserName() {
|
if attrs[FileAttributeKey.ownerAccountName] as! String != NSUserName() {
|
||||||
//try fileMgr.setAttributes([FileAttributeKey.ownerAccountName: NSUserName()], ofItemAtPath: dirPath)
|
//try fileMgr.setAttributes([FileAttributeKey.ownerAccountName: NSUserName()], ofItemAtPath: dirPath)
|
||||||
let bashFilePath = Bundle.main.path(forResource: "fix_dir_owner.sh", ofType: nil)!
|
let bashFilePath = Bundle.main.path(forResource: "fix_dir_owner.sh", ofType: nil)!
|
||||||
let script = "do shell script \"bash \(bashFilePath) \(NSUserName()) \" with administrator privileges"
|
let script = "do shell script \"bash \\\"(bashFilePath)\\\" \(NSUserName()) \" with administrator privileges"
|
||||||
if let appleScript = NSAppleScript(source: script) {
|
if let appleScript = NSAppleScript(source: script) {
|
||||||
var err: NSDictionary? = nil
|
var err: NSDictionary? = nil
|
||||||
appleScript.executeAndReturnError(&err)
|
appleScript.executeAndReturnError(&err)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.6.0</string>
|
<string>1.6.1</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
|
@ -51,12 +51,12 @@ GCDWebServer *webServer =nil;
|
|||||||
NSString *helperPath = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] resourcePath], @"install_helper.sh"];
|
NSString *helperPath = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] resourcePath], @"install_helper.sh"];
|
||||||
NSLog(@"run install script: %@", helperPath);
|
NSLog(@"run install script: %@", helperPath);
|
||||||
NSDictionary *error;
|
NSDictionary *error;
|
||||||
NSString *script = [NSString stringWithFormat:@"do shell script \"bash %@\" with administrator privileges", helperPath];
|
NSString *script = [NSString stringWithFormat:@"do shell script \"/bin/bash \\\"%@\\\"\" with administrator privileges", helperPath];
|
||||||
NSAppleScript *appleScript = [[NSAppleScript new] initWithSource:script];
|
NSAppleScript *appleScript = [[NSAppleScript new] initWithSource:script];
|
||||||
if ([appleScript executeAndReturnError:&error]) {
|
if ([appleScript executeAndReturnError:&error]) {
|
||||||
NSLog(@"installation success");
|
NSLog(@"installation success");
|
||||||
} else {
|
} else {
|
||||||
NSLog(@"installation failure");
|
NSLog(@"installation failure: %@", error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
[super windowDidLoad];
|
[super windowDidLoad];
|
||||||
|
|
||||||
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
|
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
|
||||||
[self setQRCode:self.qrCode withOverlayText:@"Shadowsocks-NG SIP002"];
|
[self setQRCode:self.qrCode withOverlayText:@"SIP002"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setQRCode:(NSString*) qrCode withOverlayText: (NSString*) text {
|
- (void)setQRCode:(NSString*) qrCode withOverlayText: (NSString*) text {
|
||||||
@ -35,14 +35,9 @@
|
|||||||
};
|
};
|
||||||
NSMutableAttributedString* attrsText = [[NSMutableAttributedString alloc] initWithString: text
|
NSMutableAttributedString* attrsText = [[NSMutableAttributedString alloc] initWithString: text
|
||||||
attributes: attrs];
|
attributes: attrs];
|
||||||
[attrsText setAttributes:@{
|
|
||||||
NSForegroundColorAttributeName: [NSColor darkGrayColor],
|
|
||||||
NSBackgroundColorAttributeName: [NSColor whiteColor],
|
|
||||||
NSFontAttributeName: [NSFont fontWithName:@"Helvetica" size:(CGFloat)16],
|
|
||||||
} range: NSMakeRange(0, 14)];
|
|
||||||
|
|
||||||
[image lockFocus];
|
[image lockFocus];
|
||||||
[attrsText drawAtPoint: NSMakePoint(45, 8)];
|
[attrsText drawAtPoint: NSMakePoint(100, 5)];
|
||||||
[image unlockFocus];
|
[image unlockFocus];
|
||||||
}
|
}
|
||||||
self.imageView.image = image;
|
self.imageView.image = image;
|
||||||
@ -108,9 +103,9 @@
|
|||||||
- (void)flagsChanged:(NSEvent *)event {
|
- (void)flagsChanged:(NSEvent *)event {
|
||||||
NSUInteger modifiers = event.modifierFlags & NSDeviceIndependentModifierFlagsMask;
|
NSUInteger modifiers = event.modifierFlags & NSDeviceIndependentModifierFlagsMask;
|
||||||
if (modifiers & NSAlternateKeyMask) {
|
if (modifiers & NSAlternateKeyMask) {
|
||||||
[self setQRCode:self.legacyQRCode withOverlayText:@"Shadowsocks-NG Legacy"];
|
[self setQRCode:self.legacyQRCode withOverlayText:@"Legacy"];
|
||||||
} else {
|
} else {
|
||||||
[self setQRCode:self.qrCode withOverlayText:@"Shadowsocks-NG SIP002"];
|
[self setQRCode:self.qrCode withOverlayText:@"SIP002"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user