mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Merge pull request #119 from theClueless/deploymentUpdates
Auto update improvements: Updater
This commit is contained in:
@@ -13,6 +13,16 @@ namespace Wox.Infrastructure.Http
|
||||
{
|
||||
private const string UserAgent = @"Mozilla/5.0 (Trident/7.0; rv:11.0) like Gecko";
|
||||
|
||||
static Http()
|
||||
{
|
||||
// need to be added so it would work on a win10 machine
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12
|
||||
| SecurityProtocolType.Ssl3;
|
||||
}
|
||||
|
||||
public static HttpProxy Proxy { private get; set; }
|
||||
public static IWebProxy WebProxy()
|
||||
{
|
||||
|
||||
@@ -11,18 +11,20 @@ namespace Wox.Infrastructure.Logger
|
||||
{
|
||||
public const string DirectoryName = "Logs";
|
||||
|
||||
public static string CurrentLogDirectory { get; private set; }
|
||||
|
||||
static Log()
|
||||
{
|
||||
var path = Path.Combine(Constant.DataDirectory, DirectoryName, Constant.Version);
|
||||
if (!Directory.Exists(path))
|
||||
CurrentLogDirectory = Path.Combine(Constant.DataDirectory, DirectoryName, Constant.Version);
|
||||
if (!Directory.Exists(CurrentLogDirectory))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
Directory.CreateDirectory(CurrentLogDirectory);
|
||||
}
|
||||
|
||||
var configuration = new LoggingConfiguration();
|
||||
var target = new FileTarget();
|
||||
configuration.AddTarget("file", target);
|
||||
target.FileName = path.Replace(@"\", "/") + "/${shortdate}.txt";
|
||||
target.FileName = CurrentLogDirectory.Replace(@"\", "/") + "/${shortdate}.txt";
|
||||
#if DEBUG
|
||||
var rule = new LoggingRule("*", LogLevel.Debug, target);
|
||||
#else
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace Wox.Infrastructure
|
||||
public static readonly string DataDirectory = DetermineDataDirectory();
|
||||
public static readonly string PluginsDirectory = Path.Combine(DataDirectory, Plugins);
|
||||
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
|
||||
public const string Repository = "https://github.com/Wox-launcher/Wox";
|
||||
public const string Issue = "https://github.com/Wox-launcher/Wox/issues/new";
|
||||
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user