diff --git a/OPENSSL-GUIDE b/OPENSSL-GUIDE deleted file mode 100644 index 42eaa8fe..00000000 --- a/OPENSSL-GUIDE +++ /dev/null @@ -1,15 +0,0 @@ -OpenSSL library guide for VS2017 - -# Read NOTES.WIN and NOTES.PERL - -# use Visual Studio native tools command prompt -# use activeperl, install NASM assembler -ppm install dmake - -# Win32 x86 -set PATH=D:\NASM-32;%PATH% -perl Configure VC-WIN32 --release --prefix=C:\Users\home\Downloads\openssl-1.1.0g\x86-build --openssldir=C:\Users\home\Downloads\openssl-1.1.0g\x86-install -nmake -nmake test -# to rebuild -nmake distclean diff --git a/appveyor.yml b/appveyor.yml index 3086bd28..bc8cb60d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -114,7 +114,7 @@ after_build: $text += 'SHA-256' + $newLine $text += (Get-FileHash $file -Algorithm SHA256).Hash + $newLine $text += 'SHA-512' + $newLine - $text += (Get-FileHash $file -Algorithm SHA512).Hash + $text += (Get-FileHash $file -Algorithm SHA512).Hash + $newLine return $text } diff --git a/shadowsocks-csharp/Controller/System/ProtocolHandler.cs b/shadowsocks-csharp/Controller/System/ProtocolHandler.cs index 2a0112cb..35bc4757 100644 --- a/shadowsocks-csharp/Controller/System/ProtocolHandler.cs +++ b/shadowsocks-csharp/Controller/System/ProtocolHandler.cs @@ -20,7 +20,6 @@ namespace Shadowsocks.Controller // see https://stackoverflow.com/questions/12945805/odd-c-sharp-path-issue private static readonly string ExecutablePath = Assembly.GetEntryAssembly().Location; - // TODO: Elevate when necessary public static bool Set(bool enabled) { RegistryKey ssURLAssociation = null; diff --git a/shadowsocks-csharp/Program.cs b/shadowsocks-csharp/Program.cs index 6674fd72..872e2f2a 100755 --- a/shadowsocks-csharp/Program.cs +++ b/shadowsocks-csharp/Program.cs @@ -26,32 +26,17 @@ namespace Shadowsocks public static MenuViewController MenuController { get; private set; } public static string[] Args { get; private set; } - [System.Runtime.InteropServices.DllImport("user32.dll")] - private static extern bool SetProcessDPIAware(); - /// /// 应用程序的主入口点。 /// - /// [STAThread] static void Main(string[] args) { // todo: initialize the NLog configuartion Model.NLogConfig.TouchAndApplyNLogConfig(); - // .NET Framework 4.7.2 on Win7 compatibility - System.Net.ServicePointManager.SecurityProtocol |= - System.Net.SecurityProtocolType.Tls | System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls12; - // store args for further use Args = args; - // Check OS since we are using dual-mode socket - if (!Utils.IsWinVistaOrHigher()) - { - MessageBox.Show(I18N.GetString("Unsupported operating system, use Windows Vista at least."), - "Shadowsocks Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } string pipename = $"Shadowsocks\\{Application.StartupPath.GetHashCode()}"; string addedUrl = null; @@ -125,7 +110,9 @@ namespace Shadowsocks Application.SetCompatibleTextRenderingDefault(false); AutoStartup.RegisterForRestart(true); - Directory.SetCurrentDirectory(Application.StartupPath); + // See https://github.com/dotnet/runtime/issues/13051 + // we have to do this for self-contained executables + Directory.SetCurrentDirectory(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName)); #if DEBUG // truncate privoxy log file while debugging