diff --git a/Plugins/Wox.Plugin.BrowserBookmark/Main.cs b/Plugins/Wox.Plugin.BrowserBookmark/Main.cs index a616edce0..b07191584 100644 --- a/Plugins/Wox.Plugin.BrowserBookmark/Main.cs +++ b/Plugins/Wox.Plugin.BrowserBookmark/Main.cs @@ -5,7 +5,7 @@ using Wox.Plugin.BrowserBookmark.Commands; using Wox.Plugin.BrowserBookmark.Models; using Wox.Plugin.BrowserBookmark.Views; -using Wox.Plugin.SharedCommands; +using Wox.Infrastructure; namespace Wox.Plugin.BrowserBookmark { diff --git a/Plugins/Wox.Plugin.Folder/ContextMenuLoader.cs b/Plugins/Wox.Plugin.Folder/ContextMenuLoader.cs index 616a4d0ed..edd0fd8df 100644 --- a/Plugins/Wox.Plugin.Folder/ContextMenuLoader.cs +++ b/Plugins/Wox.Plugin.Folder/ContextMenuLoader.cs @@ -7,7 +7,7 @@ using NLog; using Wox.Infrastructure.Logger; using Wox.Infrastructure.Image; -using Wox.Plugin.SharedCommands; +using Wox.Infrastructure; namespace Wox.Plugin.Folder { diff --git a/Plugins/Wox.Plugin.Program/Programs/Win32.cs b/Plugins/Wox.Plugin.Program/Programs/Win32.cs index c52720b8c..b0a6c01ed 100644 --- a/Plugins/Wox.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Wox.Plugin.Program/Programs/Win32.cs @@ -13,7 +13,6 @@ using Wox.Infrastructure; using Wox.Infrastructure.Logger; using Wox.Plugin.Program.Logger; -using Wox.Plugin.SharedCommands; namespace Wox.Plugin.Program.Programs { diff --git a/Plugins/Wox.Plugin.Shell/Main.cs b/Plugins/Wox.Plugin.Shell/Main.cs index f62059b39..09285a6a5 100644 --- a/Plugins/Wox.Plugin.Shell/Main.cs +++ b/Plugins/Wox.Plugin.Shell/Main.cs @@ -12,7 +12,7 @@ using Wox.Infrastructure.Hotkey; using Wox.Infrastructure.Logger; using Wox.Infrastructure.Storage; -using Wox.Plugin.SharedCommands; +using Wox.Infrastructure; using Application = System.Windows.Application; using Control = System.Windows.Controls.Control; using Keys = System.Windows.Forms.Keys; diff --git a/Plugins/Wox.Plugin.Url/Main.cs b/Plugins/Wox.Plugin.Url/Main.cs index ed4e55b86..da50d5dab 100644 --- a/Plugins/Wox.Plugin.Url/Main.cs +++ b/Plugins/Wox.Plugin.Url/Main.cs @@ -3,7 +3,7 @@ using System.Text.RegularExpressions; using System.Windows.Controls; using Wox.Infrastructure.Storage; -using Wox.Plugin.SharedCommands; +using Wox.Infrastructure; namespace Wox.Plugin.Url { @@ -90,7 +90,7 @@ public List Query(Query query) return true; } - catch(Exception ex) + catch(Exception) { context.API.ShowMsg(string.Format(context.API.GetTranslation("wox_plugin_url_canot_open_url"), raw)); return false; diff --git a/Plugins/Wox.Plugin.WebSearch/Main.cs b/Plugins/Wox.Plugin.WebSearch/Main.cs index d8c6ccafb..24c657e64 100644 --- a/Plugins/Wox.Plugin.WebSearch/Main.cs +++ b/Plugins/Wox.Plugin.WebSearch/Main.cs @@ -8,7 +8,6 @@ using System.Windows.Controls; using Wox.Infrastructure; using Wox.Infrastructure.Storage; -using Wox.Plugin.SharedCommands; namespace Wox.Plugin.WebSearch { diff --git a/Scripts/wox.nuspec b/Scripts/wox.nuspec index afb179039..e409cbdcf 100644 --- a/Scripts/wox.nuspec +++ b/Scripts/wox.nuspec @@ -6,11 +6,13 @@ $version$ Wox https://github.com/Wox-launcher/Wox - Images/app.png false Wox - a launcher for windows + + + - + diff --git a/Scripts/wox.plugin.nuspec b/Scripts/wox.plugin.nuspec index 2dc3d283a..ca448efd1 100644 --- a/Scripts/wox.plugin.nuspec +++ b/Scripts/wox.plugin.nuspec @@ -4,11 +4,13 @@ Wox.Plugin $version$ Wox - https://github.com/Wox-launcher/Wox/blob/master/LICENSE https://github.com/Wox-launcher/Wox false Reference this library if you want to develop a wox plugin wox + + + diff --git a/Wox.Core/Configuration/Portable.cs b/Wox.Core/Configuration/Portable.cs index a52ce143b..7dddb843c 100644 --- a/Wox.Core/Configuration/Portable.cs +++ b/Wox.Core/Configuration/Portable.cs @@ -8,7 +8,6 @@ using Wox.Infrastructure; using Wox.Infrastructure.Logger; using Wox.Infrastructure.UserSettings; -using Wox.Plugin.SharedCommands; namespace Wox.Core.Configuration { diff --git a/Wox.Core/Plugin/QueryBuilder.cs b/Wox.Core/Plugin/QueryBuilder.cs index b01a93291..e70331669 100644 --- a/Wox.Core/Plugin/QueryBuilder.cs +++ b/Wox.Core/Plugin/QueryBuilder.cs @@ -35,6 +35,7 @@ public static Query Build(string text, Dictionary nonGlobalP var query = new Query { + Terms = terms, RawQuery = rawQuery, ActionKeyword = actionKeyword, diff --git a/Wox.Core/Updater.cs b/Wox.Core/Updater.cs index c78e99354..e948db1e2 100644 --- a/Wox.Core/Updater.cs +++ b/Wox.Core/Updater.cs @@ -10,7 +10,6 @@ using Squirrel; using Newtonsoft.Json; using Wox.Core.Resource; -using Wox.Plugin.SharedCommands; using Wox.Infrastructure; using Wox.Infrastructure.Http; using Wox.Infrastructure.Logger; diff --git a/Wox.Plugin/SharedCommands/FilesFolders.cs b/Wox.Infrastructure/FilesFolders.cs similarity index 73% rename from Wox.Plugin/SharedCommands/FilesFolders.cs rename to Wox.Infrastructure/FilesFolders.cs index 9e221fe61..7207d8efb 100644 --- a/Wox.Plugin/SharedCommands/FilesFolders.cs +++ b/Wox.Infrastructure/FilesFolders.cs @@ -1,12 +1,16 @@ -using System; +using NLog; +using System; using System.Diagnostics; using System.IO; using System.Windows; +using Wox.Infrastructure.Logger; -namespace Wox.Plugin.SharedCommands +namespace Wox.Infrastructure { public static class FilesFolders { + private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); + public static void Copy(this string sourcePath, string targetPath) { // Get the subdirectories for the specified directory. @@ -43,14 +47,12 @@ public static void Copy(this string sourcePath, string targetPath) Copy(subdir.FullName, temppath); } } - catch (Exception e) + catch (System.Exception e) { -#if DEBUG - throw e; -#else - MessageBox.Show(string.Format("Copying path {0} has failed, it will now be deleted for consistency", targetPath)); + string message = $"Copying path {targetPath} has failed, it will now be deleted for consistency"; + Logger.WoxError(message, e); + MessageBox.Show(message); RemoveFolderIfExists(targetPath); -#endif } } @@ -70,14 +72,12 @@ public static bool VerifyBothFolderFilesEqual(this string fromPath, string toPat return true; } - catch (Exception e) + catch (System.Exception e) { -#if DEBUG - throw e; -#else - MessageBox.Show(string.Format("Unable to verify folders and files between {0} and {1}", fromPath, toPath)); + string message = $"Unable to verify folders and files between {fromPath} and {toPath}"; + Logger.WoxError(message, e); + MessageBox.Show(message); return false; -#endif } } @@ -89,13 +89,11 @@ public static void RemoveFolderIfExists(this string path) if (Directory.Exists(path)) Directory.Delete(path, true); } - catch (Exception e) + catch (System.Exception e) { -#if DEBUG - throw e; -#else - MessageBox.Show(string.Format("Not able to delete folder {0}, please go to the location and manually delete it", path)); -#endif + string message = $"Not able to delete folder { (object)path}, please go to the location and manually delete it"; + Logger.WoxError(message, e); + MessageBox.Show(message); } } @@ -116,13 +114,11 @@ public static void OpenLocationInExporer(string location) if (LocationExists(location)) Process.Start(location); } - catch (Exception e) + catch (System.Exception e) { -#if DEBUG - throw e; -#else - MessageBox.Show(string.Format("Unable to open location {0}, please check if it exists", location)); -#endif + string message = $"Unable to open location { (object)location}, please check if it exists"; + Logger.WoxError(message, e); + MessageBox.Show(message); } } } diff --git a/Wox.Infrastructure/Wox.Infrastructure.csproj b/Wox.Infrastructure/Wox.Infrastructure.csproj index 2545ffbbc..53728d8a2 100644 --- a/Wox.Infrastructure/Wox.Infrastructure.csproj +++ b/Wox.Infrastructure/Wox.Infrastructure.csproj @@ -51,6 +51,7 @@ Properties\SolutionAssemblyInfo.cs + diff --git a/Wox.Plugin/SharedCommands/SearchWeb.cs b/Wox.Plugin/SharedCommands/SearchWeb.cs index f91025bff..8ae431fa8 100644 --- a/Wox.Plugin/SharedCommands/SearchWeb.cs +++ b/Wox.Plugin/SharedCommands/SearchWeb.cs @@ -3,7 +3,7 @@ using System.IO; using System.Linq; -namespace Wox.Plugin.SharedCommands +namespace Wox.Infrastructure { public static class SearchWeb { diff --git a/Wox.Plugin/SharedCommands/ShellCommand.cs b/Wox.Plugin/SharedCommands/ShellCommand.cs index 9da535150..b3fb4bf92 100644 --- a/Wox.Plugin/SharedCommands/ShellCommand.cs +++ b/Wox.Plugin/SharedCommands/ShellCommand.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Wox.Plugin.SharedCommands +namespace Wox.Infrastructure { public static class ShellCommand { diff --git a/Wox.Plugin/Wox.Plugin.csproj b/Wox.Plugin/Wox.Plugin.csproj index aaa868f2e..80104547c 100644 --- a/Wox.Plugin/Wox.Plugin.csproj +++ b/Wox.Plugin/Wox.Plugin.csproj @@ -65,7 +65,6 @@ - @@ -90,6 +89,9 @@ 9.0.1 + + 4.7.0 + 3.2.8 runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/appveyor.yml b/appveyor.yml index 44bfdce48..123586133 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,7 @@ build: project: Wox.sln after_test: - ps: Copy-Item $env:APPDATA\Wox\Logs\*\*.txt . +- ps: ls Output\Packages artifacts: - path: 'Output\Packages\Wox-*.zip' name: installer