Skip to content

Commit

Permalink
Merge branch 'bao'
Browse files Browse the repository at this point in the history
  • Loading branch information
bao-qian committed Apr 24, 2020
2 parents d46882c + d9a1824 commit c0be6ee
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.BrowserBookmark/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.Folder/ContextMenuLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 0 additions & 1 deletion Plugins/Wox.Plugin.Program/Programs/Win32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Wox.Plugin.Shell/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Plugins/Wox.Plugin.Url/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -90,7 +90,7 @@ public List<Result> 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;
Expand Down
1 change: 0 additions & 1 deletion Plugins/Wox.Plugin.WebSearch/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Windows.Controls;
using Wox.Infrastructure;
using Wox.Infrastructure.Storage;
using Wox.Plugin.SharedCommands;

namespace Wox.Plugin.WebSearch
{
Expand Down
6 changes: 4 additions & 2 deletions Scripts/wox.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
<version>$version$</version>
<authors>Wox</authors>
<projectUrl>https://github.com/Wox-launcher/Wox</projectUrl>
<PackageIcon>Images/app.png</PackageIcon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Wox - a launcher for windows</description>
<dependencies>
<group targetFramework=".NETFramework4.6.2" />
</dependencies>
</metadata>
<files>
<file src="**\*.*" exclude="Wox.vshost.exe;Wox.vshost.exe.config;Wox.vshost.exe.manifest;*.nupkg;Setup.exe;RELEASES"/>
<file src="**\*.*" target="lib\net462\" exclude="Wox.vshost.exe;Wox.vshost.exe.config;Wox.vshost.exe.manifest;*.nupkg;Setup.exe;RELEASES"/>
</files>
</package>
4 changes: 3 additions & 1 deletion Scripts/wox.plugin.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
<id>Wox.Plugin</id>
<version>$version$</version>
<authors>Wox</authors>
<licenseUrl>https://github.com/Wox-launcher/Wox/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/Wox-launcher/Wox</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Reference this library if you want to develop a wox plugin</description>
<tags>wox</tags>
<dependencies>
<group targetFramework=".NETFramework4.6.2" />
</dependencies>
</metadata>
<files>
<file src="..\Output\Release\Wox.Plugin.dll" target="lib\net462" />
Expand Down
1 change: 0 additions & 1 deletion Wox.Core/Configuration/Portable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Wox.Infrastructure;
using Wox.Infrastructure.Logger;
using Wox.Infrastructure.UserSettings;
using Wox.Plugin.SharedCommands;

namespace Wox.Core.Configuration
{
Expand Down
1 change: 1 addition & 0 deletions Wox.Core/Plugin/QueryBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static Query Build(string text, Dictionary<string, PluginPair> nonGlobalP

var query = new Query
{

Terms = terms,
RawQuery = rawQuery,
ActionKeyword = actionKeyword,
Expand Down
1 change: 0 additions & 1 deletion Wox.Core/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
}

}
Expand All @@ -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
}

}
Expand All @@ -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);
}
}

Expand All @@ -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);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Wox.Infrastructure/Wox.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<Link>Properties\SolutionAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Exception\ExceptionFormatter.cs" />
<Compile Include="FilesFolders.cs" />
<Compile Include="Helper.cs" />
<Compile Include="Hotkey\InterceptKeys.cs" />
<Compile Include="Hotkey\KeyEvent.cs" />
Expand Down
2 changes: 1 addition & 1 deletion Wox.Plugin/SharedCommands/SearchWeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.IO;
using System.Linq;

namespace Wox.Plugin.SharedCommands
namespace Wox.Infrastructure
{
public static class SearchWeb
{
Expand Down
2 changes: 1 addition & 1 deletion Wox.Plugin/SharedCommands/ShellCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Threading;
using System.Threading.Tasks;

namespace Wox.Plugin.SharedCommands
namespace Wox.Infrastructure
{
public static class ShellCommand
{
Expand Down
4 changes: 3 additions & 1 deletion Wox.Plugin/Wox.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
<Compile Include="Query.cs" />
<Compile Include="Result.cs" />
<Compile Include="ActionContext.cs" />
<Compile Include="SharedCommands\FilesFolders.cs" />
<Compile Include="SharedCommands\SearchWeb.cs" />
<Compile Include="SharedCommands\ShellCommand.cs" />
</ItemGroup>
Expand All @@ -90,6 +89,9 @@
<PackageReference Include="Newtonsoft.Json">
<Version>9.0.1</Version>
</PackageReference>
<PackageReference Include="NLog">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>3.2.8</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0be6ee

Please sign in to comment.