diff --git a/Doc/app.ico b/Doc/app.ico index 38c401c8c..362c8747f 100644 Binary files a/Doc/app.ico and b/Doc/app.ico differ diff --git a/Doc/app.png b/Doc/app.png index 8c9ca7971..ba17c1a66 100644 Binary files a/Doc/app.png and b/Doc/app.png differ diff --git a/Doc/app.psd b/Doc/app.psd deleted file mode 100644 index 833fd6529..000000000 Binary files a/Doc/app.psd and /dev/null differ diff --git a/Doc/app_error.png b/Doc/app_error.png index 5106d6e8a..4c035da0c 100644 Binary files a/Doc/app_error.png and b/Doc/app_error.png differ diff --git a/Doc/app_error.psd b/Doc/app_error.psd deleted file mode 100644 index 174e9cb62..000000000 Binary files a/Doc/app_error.psd and /dev/null differ diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index fa3f10fa7..87c390d34 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -57,10 +57,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Flow.Launcher.Core/Plugin/PluginsLoader.cs b/Flow.Launcher.Core/Plugin/PluginsLoader.cs index 35486e794..513d85c96 100644 --- a/Flow.Launcher.Core/Plugin/PluginsLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginsLoader.cs @@ -1,11 +1,12 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.Loader; +using System.Threading.Tasks; +using System.Windows.Forms; using Flow.Launcher.Infrastructure; -using Flow.Launcher.Infrastructure.Exception; using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; @@ -29,6 +30,8 @@ namespace Flow.Launcher.Core.Plugin public static IEnumerable DotNetPlugins(List source) { + var erroredPlugins = new List(); + var plugins = new List(); var metadatas = source.Where(o => AllowedLanguage.IsDotNet(o.Language)); @@ -50,20 +53,34 @@ namespace Flow.Launcher.Core.Plugin } catch (Exception e) { - Log.Exception($"|PluginsLoader.DotNetPlugins|Couldn't load assembly for {metadata.Name}", e); + erroredPlugins.Add(metadata.Name); + + Log.Exception($"|PluginsLoader.DotNetPlugins|Couldn't load assembly for the plugin: {metadata.Name}", e); return; } - var types = assembly.GetTypes(); + Type type; try { + var types = assembly.GetTypes(); + type = types.First(o => o.IsClass && !o.IsAbstract && o.GetInterfaces().Contains(typeof(IPlugin))); } catch (InvalidOperationException e) { - Log.Exception($"|PluginsLoader.DotNetPlugins|Can't find class implement IPlugin for <{metadata.Name}>", e); + erroredPlugins.Add(metadata.Name); + + Log.Exception($"|PluginsLoader.DotNetPlugins|Can't find the required IPlugin interface for the plugin: <{metadata.Name}>", e); return; } + catch (ReflectionTypeLoadException e) + { + erroredPlugins.Add(metadata.Name); + + Log.Exception($"|PluginsLoader.DotNetPlugins|The GetTypes method was unable to load assembly types for the plugin: <{metadata.Name}>", e); + return; + } + IPlugin plugin; try { @@ -71,7 +88,9 @@ namespace Flow.Launcher.Core.Plugin } catch (Exception e) { - Log.Exception($"|PluginsLoader.DotNetPlugins|Can't create instance for <{metadata.Name}>", e); + erroredPlugins.Add(metadata.Name); + + Log.Exception($"|PluginsLoader.DotNetPlugins|The following plugin has errored and can not be loaded: <{metadata.Name}>", e); return; } #endif @@ -85,6 +104,26 @@ namespace Flow.Launcher.Core.Plugin metadata.InitTime += milliseconds; } + + if (erroredPlugins.Count > 0) + { + var errorPluginString = ""; + + var errorMessage = "The following " + + (erroredPlugins.Count > 1 ? "plugins have " : "plugin has ") + + "errored and cannot be loaded:"; + + erroredPlugins.ForEach(x => errorPluginString += x + Environment.NewLine); + + Task.Run(() => + { + MessageBox.Show($"{errorMessage}{Environment.NewLine}{Environment.NewLine}" + + $"{errorPluginString}{Environment.NewLine}{Environment.NewLine}" + + $"Please refer to the logs for more information","", + MessageBoxButtons.OK, MessageBoxIcon.Warning); + }); + } + return plugins; } diff --git a/Flow.Launcher.CrashReporter/Images/app_error.png b/Flow.Launcher.CrashReporter/Images/app_error.png index 5106d6e8a..4c035da0c 100644 Binary files a/Flow.Launcher.CrashReporter/Images/app_error.png and b/Flow.Launcher.CrashReporter/Images/app_error.png differ diff --git a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj index 82fbb31d5..ff4700e94 100644 --- a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj +++ b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -12,7 +12,26 @@ false false - + + + 1.0.0 + 1.0.0-beta3 + 1.0.0 + 1.0.0 + Flow.Launcher.Plugin + Flow-Launcher + MIT + https://github.com/Flow-Launcher/Flow.Launcher + Reference this library if you want to develop a Flow Launcher plugin + flowlauncher + true + true + + + + true + + true full @@ -26,7 +45,7 @@ - pdbonly + embedded true ..\Output\Release\ TRACE @@ -37,28 +56,15 @@ - - - - - - - - - - - - + + - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index e5ca36289..e970c47b9 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -57,8 +57,4 @@ - - - - \ No newline at end of file diff --git a/Flow.Launcher.sln b/Flow.Launcher.sln index c242932ea..5bdbc3270 100644 --- a/Flow.Launcher.sln +++ b/Flow.Launcher.sln @@ -64,7 +64,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md SolutionAssemblyInfo.cs = SolutionAssemblyInfo.cs Scripts\flowlauncher.nuspec = Scripts\flowlauncher.nuspec - Scripts\flowlauncher.plugin.nuspec = Scripts\flowlauncher.plugin.nuspec EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloWorldCSharp", "Plugins\HelloWorldCSharp\HelloWorldCSharp.csproj", "{03FFA443-5F50-48D5-8869-F3DF316803AA}" diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index b8eb79370..987a685ac 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -54,6 +54,22 @@ + + + MSBuild:Compile + Designer + PreserveNewest + + + + + + MSBuild:Compile + Designer + PreserveNewest + + + @@ -66,10 +82,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Flow.Launcher/Images/app.png b/Flow.Launcher/Images/app.png index 8c9ca7971..ba17c1a66 100644 Binary files a/Flow.Launcher/Images/app.png and b/Flow.Launcher/Images/app.png differ diff --git a/Flow.Launcher/Images/app_error.png b/Flow.Launcher/Images/app_error.png index 5106d6e8a..4c035da0c 100644 Binary files a/Flow.Launcher/Images/app_error.png and b/Flow.Launcher/Images/app_error.png differ diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index a292599b5..1b69c1b90 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -68,6 +68,9 @@ Add Please select an item Are you sure you want to delete {0} plugin hotkey? + Query window shadow effect + Shadow effect has a substantial usage of GPU. + Not recommended if you computer performance is limited. HTTP Proxy diff --git a/Flow.Launcher/Resources/app.ico b/Flow.Launcher/Resources/app.ico index 38c401c8c..362c8747f 100644 Binary files a/Flow.Launcher/Resources/app.ico and b/Flow.Launcher/Resources/app.ico differ diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml index 7f9fd95e3..a8560c263 100644 --- a/Flow.Launcher/ResultListBox.xaml +++ b/Flow.Launcher/ResultListBox.xaml @@ -41,7 +41,7 @@ - @@ -91,7 +91,7 @@ Value="True"> - + diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index fde804f2b..1708a5172 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -227,12 +227,12 @@ - + - - diff --git a/Flow.Launcher/app.png b/Flow.Launcher/app.png index 8c9ca7971..5b75521c8 100644 Binary files a/Flow.Launcher/app.png and b/Flow.Launcher/app.png differ diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj index b59b114fe..13daddf10 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -80,8 +80,4 @@ - - - - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml index 075f3b039..3beccb5e7 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/en.xaml @@ -6,4 +6,10 @@ Browser Bookmarks Search your browser bookmarks + + Open bookmarks in: + New window + New tab + Set browser from path: + Choose \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml index 900d51a1c..0aea8f04e 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml @@ -18,15 +18,22 @@ -