From aefc90dc192513af115853393eb8b17cd674d1dd Mon Sep 17 00:00:00 2001 From: Amir Tepper Date: Sun, 20 Oct 2019 15:43:50 +0300 Subject: [PATCH] revert the change so you need declare an IGNORE_UWP in order to not use the windwos SDK --- Plugins/Wox.Plugin.Program/Main.cs | 18 +++++++++--------- Plugins/Wox.Plugin.Program/Programs/UWP.cs | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Plugins/Wox.Plugin.Program/Main.cs b/Plugins/Wox.Plugin.Program/Main.cs index 9fb69bf7fb..f842bfdbc0 100644 --- a/Plugins/Wox.Plugin.Program/Main.cs +++ b/Plugins/Wox.Plugin.Program/Main.cs @@ -17,7 +17,7 @@ namespace Wox.Plugin.Program { private static readonly object IndexLock = new object(); private static Win32[] _win32s; -#if SDK +#if !IGNORE_UWP private static UWP.Application[] _uwps; private static BinaryStorage _uwpStorage; #endif @@ -38,13 +38,13 @@ namespace Wox.Plugin.Program { _win32Storage = new BinaryStorage("Win32"); _win32s = _win32Storage.TryLoad(new Win32[] { }); -#if SDK +#if !IGNORE_UWP _uwpStorage = new BinaryStorage("UWP"); _uwps = _uwpStorage.TryLoad(new UWP.Application[] { }); #endif }); Log.Info($"|Wox.Plugin.Program.Main|Number of preload win32 programs <{_win32s.Length}>"); -#if SDK +#if !IGNORE_UWP Log.Info($"|Wox.Plugin.Program.Main|Number of preload uwps <{_uwps.Length}>"); #endif Task.Run(() => @@ -57,7 +57,7 @@ namespace Wox.Plugin.Program { _settingsStorage.Save(); _win32Storage.Save(_win32s); -#if SDK +#if !IGNORE_UWP _uwpStorage.Save(_uwps); #endif } @@ -67,11 +67,11 @@ namespace Wox.Plugin.Program lock (IndexLock) { var results1 = _win32s.AsParallel().Select(p => p.Result(query.Search, _context.API)); -#if SDK +#if !IGNORE_UWP var results2 = _uwps.AsParallel().Select(p => p.Result(query.Search, _context.API)); #endif var result = results1 -#if SDK +#if !IGNORE_UWP .Concat(results2) #endif .Where(r => r.Score > 0).ToList(); @@ -87,13 +87,13 @@ namespace Wox.Plugin.Program public static void IndexPrograms() { Win32[] w = { }; -#if SDK +#if !IGNORE_UWP UWP.Application[] u = { }; var t1 = Task.Run(() => { #endif w = Win32.All(_settings); -#if SDK +#if !IGNORE_UWP }); var t2 = Task.Run(() => { @@ -113,7 +113,7 @@ namespace Wox.Plugin.Program lock (IndexLock) { _win32s = w; -#if SDK +#if !IGNORE_UWP _uwps = u; #endif } diff --git a/Plugins/Wox.Plugin.Program/Programs/UWP.cs b/Plugins/Wox.Plugin.Program/Programs/UWP.cs index 82b15738f5..e2104fcb0b 100644 --- a/Plugins/Wox.Plugin.Program/Programs/UWP.cs +++ b/Plugins/Wox.Plugin.Program/Programs/UWP.cs @@ -1,4 +1,4 @@ -#if SDK +#if !IGNORE_UWP using System; using System.Collections.Generic; using System.Diagnostics;