Skip to content

Commit

Permalink
Release version v1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuyuzhou committed Sep 16, 2017
2 parents 9cae12a + b31452e commit 959c824
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ShadowsocksX-NG

Current version is 1.6.0
Current version is 1.6.1

[![Build Status](https://travis-ci.org/shadowsocks/ShadowsocksX-NG.svg?branch=develop)](https://travis-ci.org/shadowsocks/ShadowsocksX-NG)

Expand Down Expand Up @@ -63,8 +63,6 @@ so that you could configure your apps to use the SOCKS5 proxy manually.

## Contributing

[![gitter](https://badges.gitter.im/Join%20Chat.svg)](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`.

ref: [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/)
Expand Down
2 changes: 1 addition & 1 deletion ShadowsocksX-NG/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
if attrs[FileAttributeKey.ownerAccountName] as! String != NSUserName() {
//try fileMgr.setAttributes([FileAttributeKey.ownerAccountName: NSUserName()], ofItemAtPath: dirPath)
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) {
var err: NSDictionary? = nil
appleScript.executeAndReturnError(&err)
Expand Down
2 changes: 1 addition & 1 deletion ShadowsocksX-NG/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.6.0</string>
<string>1.6.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
4 changes: 2 additions & 2 deletions ShadowsocksX-NG/ProxyConfHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ + (void)install {
NSString *helperPath = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] resourcePath], @"install_helper.sh"];
NSLog(@"run install script: %@", helperPath);
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];
if ([appleScript executeAndReturnError:&error]) {
NSLog(@"installation success");
} else {
NSLog(@"installation failure");
NSLog(@"installation failure: %@", error);
}
}
}
Expand Down
13 changes: 4 additions & 9 deletions ShadowsocksX-NG/SWBQRCodeWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ - (void)windowDidLoad {
[super windowDidLoad];

// 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 {
Expand All @@ -35,14 +35,9 @@ - (void)setQRCode:(NSString*) qrCode withOverlayText: (NSString*) text {
};
NSMutableAttributedString* attrsText = [[NSMutableAttributedString alloc] initWithString: text
attributes: attrs];
[attrsText setAttributes:@{
NSForegroundColorAttributeName: [NSColor darkGrayColor],
NSBackgroundColorAttributeName: [NSColor whiteColor],
NSFontAttributeName: [NSFont fontWithName:@"Helvetica" size:(CGFloat)16],
} range: NSMakeRange(0, 14)];

[image lockFocus];
[attrsText drawAtPoint: NSMakePoint(45, 8)];
[attrsText drawAtPoint: NSMakePoint(100, 5)];
[image unlockFocus];
}
self.imageView.image = image;
Expand Down Expand Up @@ -108,9 +103,9 @@ - (IBAction) copyQRCode: (id) sender{
- (void)flagsChanged:(NSEvent *)event {
NSUInteger modifiers = event.modifierFlags & NSDeviceIndependentModifierFlagsMask;
if (modifiers & NSAlternateKeyMask) {
[self setQRCode:self.legacyQRCode withOverlayText:@"Shadowsocks-NG Legacy"];
[self setQRCode:self.legacyQRCode withOverlayText:@"Legacy"];
} else {
[self setQRCode:self.qrCode withOverlayText:@"Shadowsocks-NG SIP002"];
[self setQRCode:self.qrCode withOverlayText:@"SIP002"];
}
}

Expand Down

0 comments on commit 959c824

Please sign in to comment.