diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index beb2925bf..107992647 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -1,7 +1,7 @@  - net6.0-windows + net7.0-windows true true Library diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index 80c3bbec5..f4d7511c6 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -1,7 +1,7 @@  - net6.0-windows + net7.0-windows {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3} Library true diff --git a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs index 500b0829e..45456ddeb 100644 --- a/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs +++ b/Flow.Launcher.Infrastructure/Storage/JsonStorage.cs @@ -13,12 +13,17 @@ namespace Flow.Launcher.Infrastructure.Storage public class JsonStorage where T : new() { protected T? Data; + // need a new directory name public const string DirectoryName = "Settings"; public const string FileSuffix = ".json"; + protected string FilePath { get; init; } = null!; + private string TempFilePath => $"{FilePath}.tmp"; + private string BackupFilePath => $"{FilePath}.bak"; + protected string DirectoryPath { get; init; } = null!; @@ -35,7 +40,7 @@ namespace Flow.Launcher.Infrastructure.Storage { try { - Data = JsonSerializer.Deserialize(serialized)?? TryLoadBackup() ?? LoadDefault(); + Data = JsonSerializer.Deserialize(serialized) ?? TryLoadBackup() ?? LoadDefault(); } catch (JsonException) { @@ -46,6 +51,7 @@ namespace Flow.Launcher.Infrastructure.Storage { Data = TryLoadBackup() ?? LoadDefault(); } + return Data.NonNull(); } @@ -67,12 +73,19 @@ namespace Flow.Launcher.Infrastructure.Storage try { var data = JsonSerializer.Deserialize(File.ReadAllText(BackupFilePath)); + if (data != null) { Log.Info($"|JsonStorage.Load|Failed to load settings.json, {BackupFilePath} restored successfully"); - File.Replace(BackupFilePath, FilePath, null); + + if(File.Exists(FilePath)) + File.Replace(BackupFilePath, FilePath, null); + else + File.Move(BackupFilePath, FilePath); + return data; } + return default; } catch (JsonException) @@ -94,14 +107,22 @@ namespace Flow.Launcher.Infrastructure.Storage public void Save() { - string serialized = JsonSerializer.Serialize(Data, new JsonSerializerOptions - { - WriteIndented = true - }); + string serialized = JsonSerializer.Serialize(Data, + new JsonSerializerOptions + { + WriteIndented = true + }); File.WriteAllText(TempFilePath, serialized); - File.Replace(TempFilePath, FilePath, BackupFilePath); - File.Delete(TempFilePath); + + if (!File.Exists(FilePath)) + { + File.Move(TempFilePath, FilePath); + } + else + { + File.Replace(TempFilePath, FilePath, BackupFilePath); + } } } } diff --git a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj index fb07f8255..f3fc31ed8 100644 --- a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj +++ b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj @@ -1,7 +1,7 @@ - net6.0-windows + net7.0-windows {8451ECDD-2EA4-4966-BB0A-7BBC40138E80} true Library @@ -14,10 +14,10 @@ - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 + 4.0.0 + 4.0.0 + 4.0.0 + 4.0.0 Flow.Launcher.Plugin Flow-Launcher MIT @@ -65,7 +65,7 @@ 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 31b71a1dc..039947a9f 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -1,7 +1,7 @@  - net6.0-windows10.0.19041.0 + net7.0-windows10.0.19041.0 {FF742965-9A80-41A5-B042-D6C7D3A21708} Library Properties @@ -54,7 +54,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index a36668fc4..1143f7f72 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -2,7 +2,7 @@ WinExe - net6.0-windows10.0.19041.0 + net7.0-windows10.0.19041.0 true true Flow.Launcher.App diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs index 15feae6cc..b71df9758 100644 --- a/Flow.Launcher/HotkeyControl.xaml.cs +++ b/Flow.Launcher/HotkeyControl.xaml.cs @@ -103,7 +103,7 @@ namespace Flow.Launcher private void tbHotkey_LostFocus(object sender, RoutedEventArgs e) { - tbHotkey.Text = CurrentHotkey.ToString(); + tbHotkey.Text = CurrentHotkey?.ToString() ?? ""; tbHotkey.Select(tbHotkey.Text.Length, 0); } diff --git a/Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml b/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml similarity index 90% rename from Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml rename to Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml index 23867d894..0e5cf4489 100644 --- a/Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml +++ b/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml @@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release Any CPU - net6.0-windows10.0.19041.0 + net7.0-windows10.0.19041.0 ..\Output\Release\ win-x64 true diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 927055971..b2487693e 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -1,4 +1,4 @@ -using System; + using System; using System.Collections.Generic; using System.Linq; using System.Net; 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 4596acb4c..c42378a9a 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows + net7.0-windows true {9B130CC5-14FB-41FF-B310-0A95B6894C37} Properties diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json index b25996af7..302ce819b 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json @@ -4,7 +4,7 @@ "Name": "Browser Bookmarks", "Description": "Search your browser bookmarks", "Author": "qianlifeng, Ioannis G.", - "Version": "2.0.0", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj index e65e7d497..db731fb2c 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows + net7.0-windows {59BD9891-3837-438A-958D-ADC7F91F6F7E} Properties Flow.Launcher.Plugin.Caculator diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json b/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json index c2b098dda..51f29aa14 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json @@ -4,7 +4,7 @@ "Name": "Calculator", "Description": "Provide mathematical calculations.(Try 5*3-2 in Flow Launcher)", "Author": "cxfksword", - "Version": "2.0.1", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Caculator.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index 4cbe01c97..f5733bbb5 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -177,7 +177,7 @@ namespace Flow.Launcher.Plugin.Explorer try { if (MessageBox.Show( - Context.API.GetTranslation("plugin_explorer_deletefilefolderconfirm"), + string.Format(Context.API.GetTranslation("plugin_explorer_delete_folder_link"), record.FullPath), string.Empty, MessageBoxButton.YesNo, MessageBoxIcon.Warning) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj index 62cb599a1..1c0bdaad7 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows + net7.0-windows true true true @@ -45,7 +45,7 @@ - + diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml index 2ed421ca9..82029e8c5 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml @@ -7,8 +7,8 @@ Please make a selection first Please select a folder link Are you sure you want to delete {0}? - Are you sure you want to permanently delete this folder? Are you sure you want to permanently delete this file? + Are you sure you want to permanently delete this file/folder? Deletion successful Successfully deleted {0} Assigning the global action keyword could bring up too many results during search. Please choose a specific action keyword diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs index 5381d729d..3efd09c4d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs @@ -13,13 +13,12 @@ using Flow.Launcher.Plugin.Explorer.Exceptions; namespace Flow.Launcher.Plugin.Explorer.Search.Everything { - public static class EverythingApi { - private const int BufferSize = 4096; private static SemaphoreSlim _semaphore = new(1, 1); + // cached buffer to remove redundant allocations. private static readonly StringBuilder buffer = new(BufferSize); @@ -35,46 +34,6 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything InvalidCallError } - /// - /// Gets or sets a value indicating whether [match path]. - /// - /// true if [match path]; otherwise, false. - public static bool MatchPath - { - get => EverythingApiDllImport.Everything_GetMatchPath(); - set => EverythingApiDllImport.Everything_SetMatchPath(value); - } - - /// - /// Gets or sets a value indicating whether [match case]. - /// - /// true if [match case]; otherwise, false. - public static bool MatchCase - { - get => EverythingApiDllImport.Everything_GetMatchCase(); - set => EverythingApiDllImport.Everything_SetMatchCase(value); - } - - /// - /// Gets or sets a value indicating whether [match whole word]. - /// - /// true if [match whole word]; otherwise, false. - public static bool MatchWholeWord - { - get => EverythingApiDllImport.Everything_GetMatchWholeWord(); - set => EverythingApiDllImport.Everything_SetMatchWholeWord(value); - } - - /// - /// Gets or sets a value indicating whether [enable regex]. - /// - /// true if [enable regex]; otherwise, false. - public static bool EnableRegex - { - get => EverythingApiDllImport.Everything_GetRegex(); - set => EverythingApiDllImport.Everything_SetRegex(value); - } - /// /// Checks whether the sort option is Fast Sort. /// @@ -95,7 +54,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything try { - EverythingApiDllImport.Everything_GetMajorVersion(); + EverythingApiDllImport.Everything_GetMajorVersion(); var result = EverythingApiDllImport.Everything_GetLastError() != StateCode.IPCError; return result; } @@ -122,7 +81,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything await _semaphore.WaitAsync(token); - + try { if (token.IsCancellationRequested) @@ -152,6 +111,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything EverythingApiDllImport.Everything_SetMax(option.MaxCount); EverythingApiDllImport.Everything_SetSort(option.SortOption); + EverythingApiDllImport.Everything_SetMatchPath(option.IsFullPathSearch); if (token.IsCancellationRequested) yield break; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchOption.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchOption.cs index 6839822a4..0b1bbd0ec 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchOption.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchOption.cs @@ -3,12 +3,15 @@ using Flow.Launcher.Plugin.Everything.Everything; namespace Flow.Launcher.Plugin.Explorer.Search.Everything { - public record struct EverythingSearchOption(string Keyword, + public record struct EverythingSearchOption( + string Keyword, SortOption SortOption, - bool IsContentSearch = false, + bool IsContentSearch = false, string ContentSearchKeyword = default, string ParentPath = default, bool IsRecursive = true, - int Offset = 0, - int MaxCount = 100); + int Offset = 0, + int MaxCount = 100, + bool IsFullPathSearch = true + ); } diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json index 0d94d60d9..d21da8d2b 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json @@ -10,7 +10,7 @@ "Name": "Explorer", "Description": "Find and manage files and folders via Windows Search or Everything", "Author": "Jeremy Wu", - "Version": "2.2.0", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll", diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj index 4176d2d50..21d964c11 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj +++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows + net7.0-windows {FDED22C8-B637-42E8-824A-63B5B6E05A3A} Properties Flow.Launcher.Plugin.PluginIndicator diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/plugin.json b/Plugins/Flow.Launcher.Plugin.PluginIndicator/plugin.json index 084779ef9..f4a21f8e8 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/plugin.json @@ -1,10 +1,10 @@ { "ID": "6A122269676E40EB86EB543B945932B9", - "ActionKeyword": "*", + "ActionKeyword": "?", "Name": "Plugin Indicator", "Description": "Provides plugin action keyword suggestions", "Author": "qianlifeng", - "Version": "2.0.1", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.PluginIndicator.dll", diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj index 2b773bee4..e056beb07 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj @@ -1,7 +1,7 @@  Library - net6.0-windows + net7.0-windows true true true @@ -38,6 +38,6 @@ - + \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/en.xaml index 361ce989b..1f74a49a2 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/en.xaml @@ -5,7 +5,7 @@ Downloading plugin - Successfully downloaded + Successfully downloaded {0} Error: Unable to download the plugin {0} by {1} {2}{3}Would you like to uninstall this plugin? After the uninstallation Flow will automatically restart. {0} by {1} {2}{3}Would you like to install this plugin? After the installation Flow will automatically restart. @@ -13,7 +13,7 @@ Installing Plugin Download and install {0} Plugin Uninstall - Plugin successfully installed. Restarting Flow, please wait... + Plugin {0} successfully installed. Restarting Flow, please wait... Unable to find the plugin.json metadata file from the extracted zip file. Error: A plugin which has the same or greater version with {0} already exists. Error installing plugin diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs index 4d29f7651..d74ec70b5 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs @@ -157,7 +157,7 @@ namespace Flow.Launcher.Plugin.PluginsManager await Http.DownloadAsync(plugin.UrlDownload, filePath).ConfigureAwait(false); Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"), - Context.API.GetTranslation("plugin_pluginsmanager_download_success")); + string.Format(Context.API.GetTranslation("plugin_pluginsmanager_download_success"), plugin.Name)); Install(plugin, filePath); } @@ -177,7 +177,7 @@ namespace Flow.Launcher.Plugin.PluginsManager } Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_installing_plugin"), - Context.API.GetTranslation("plugin_pluginsmanager_install_success_restart")); + string.Format(Context.API.GetTranslation("plugin_pluginsmanager_install_success_restart"), plugin.Name)); Context.API.RestartApp(); } @@ -245,7 +245,7 @@ namespace Flow.Launcher.Plugin.PluginsManager Context.API.ShowMsg( Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"), - Context.API.GetTranslation("plugin_pluginsmanager_download_success")); + string.Format(Context.API.GetTranslation("plugin_pluginsmanager_download_success"), x.Name)); Install(x.PluginNewUserPlugin, downloadToFilePath); diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json b/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json index 0d1ee5b16..ea69e9916 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json @@ -6,7 +6,7 @@ "Name": "Plugins Manager", "Description": "Management of installing, uninstalling or updating Flow Launcher plugins", "Author": "Jeremy Wu", - "Version": "2.0.1", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll", diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj index 80642c8a3..861fc3197 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows + net7.0-windows Flow.Launcher.Plugin.ProcessKiller Flow.Launcher.Plugin.ProcessKiller Flow-Launcher diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/plugin.json b/Plugins/Flow.Launcher.Plugin.ProcessKiller/plugin.json index 60235cfe5..1a73d24e1 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/plugin.json @@ -4,7 +4,7 @@ "Name":"Process Killer", "Description":"Kill running processes from Flow", "Author":"Flow-Launcher", - "Version":"2.0.0", + "Version":"3.0.0", "Language":"csharp", "Website":"https://github.com/Flow-Launcher/Flow.Launcher.Plugin.ProcessKiller", "IcoPath":"Images\\app.png", diff --git a/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj b/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj index 83f9464c4..02555cf1f 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj +++ b/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows10.0.19041.0 + net7.0-windows10.0.19041.0 {FDB3555B-58EF-4AE6-B5F1-904719637AB4} Properties Flow.Launcher.Plugin.Program diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs index 023eea042..8ba3ba800 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWP.cs @@ -408,6 +408,7 @@ namespace Flow.Launcher.Plugin.Program.Programs var result = new Result { Title = title, + AutoCompleteText = Name, SubTitle = Main._settings.HideAppsPath ? string.Empty : Location, IcoPath = LogoPath, Preview = new Result.PreviewInfo diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index e0079967b..4afedb9e4 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -25,23 +25,29 @@ namespace Flow.Launcher.Plugin.Program.Programs public string Name { get; set; } public string UniqueIdentifier { get => _uid; set => _uid = value == null ? string.Empty : value.ToLowerInvariant(); } // For path comparison public string IcoPath { get; set; } + /// /// Path of the file. It's the path of .lnk and .url for .lnk and .url files. /// public string FullPath { get; set; } + /// /// Path of the executable for .lnk, or the URL for .url. Arguments are included if any. /// public string LnkResolvedPath { get; set; } + /// /// Path of the actual executable file. Args are included. /// public string ExecutablePath => LnkResolvedPath ?? FullPath; + public string ParentDirectory { get; set; } + /// /// Name of the executable for .lnk files /// public string ExecutableName { get; set; } + public string Description { get; set; } public bool Valid { get; set; } public bool Enabled { get; set; } @@ -155,6 +161,7 @@ namespace Flow.Launcher.Plugin.Program.Programs var result = new Result { Title = title, + AutoCompleteText = resultName, SubTitle = subtitle, IcoPath = IcoPath, Score = matchResult.Score, @@ -198,8 +205,8 @@ namespace Flow.Launcher.Plugin.Program.Programs { var info = new ProcessStartInfo { - FileName = FullPath, - WorkingDirectory = ParentDirectory, + FileName = FullPath, + WorkingDirectory = ParentDirectory, UseShellExecute = true }; @@ -362,6 +369,7 @@ namespace Flow.Launcher.Plugin.Program.Programs { return program; } + foreach (var protocol in protocols) { if (url.StartsWith(protocol)) @@ -417,10 +425,10 @@ namespace Flow.Launcher.Plugin.Program.Programs if (!Directory.Exists(directory)) return Enumerable.Empty(); - return Directory.EnumerateFiles(directory, "*", new EnumerationOptions - { - IgnoreInaccessible = true, RecurseSubdirectories = recursive - }).Where(x => suffixes.Contains(Extension(x))); + return Directory.EnumerateFiles( + directory, "*", + new EnumerationOptions { IgnoreInaccessible = true, RecurseSubdirectories = recursive }) + .Where(x => suffixes.Contains(Extension(x))); } private static string Extension(string path) @@ -449,14 +457,11 @@ namespace Flow.Launcher.Plugin.Program.Programs private static IEnumerable StartMenuPrograms(string[] suffixes, string[] protocols) { - var directory1 = Environment.GetFolderPath(Environment.SpecialFolder.Programs); - var directory2 = Environment.GetFolderPath(Environment.SpecialFolder.CommonPrograms); - var paths1 = EnumerateProgramsInDir(directory1, suffixes); - var paths2 = EnumerateProgramsInDir(directory2, suffixes); + var allPrograms = GetStartMenuPaths() + .SelectMany(p => EnumerateProgramsInDir(p, suffixes)) + .Distinct(); - var toFilter = paths1.Concat(paths2); - - var programs = ExceptDisabledSource(toFilter.Distinct()) + var programs = ExceptDisabledSource(allPrograms) .Select(x => GetProgramFromPath(x, protocols)); return programs; } @@ -470,7 +475,7 @@ namespace Flow.Launcher.Plugin.Program.Programs } var paths = pathEnv.Split(";", StringSplitOptions.RemoveEmptyEntries).DistinctBy(p => p.ToLowerInvariant()); - + var toFilter = paths.Where(x => commonParents.All(parent => !FilesFolders.PathContains(parent, x))) .AsParallel() .SelectMany(p => EnumerateProgramsInDir(p, suffixes, recursive: false)); @@ -694,12 +699,10 @@ namespace Flow.Launcher.Plugin.Program.Programs private static IEnumerable GetStartMenuPaths() { - var directory1 = Environment.GetFolderPath(Environment.SpecialFolder.Programs); - var directory2 = Environment.GetFolderPath(Environment.SpecialFolder.CommonPrograms); - return new[] - { - directory1, directory2 - }; + var userStartMenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu); + var commonStartMenu = Environment.GetFolderPath(Environment.SpecialFolder.CommonStartMenu); + + return new[] { userStartMenu, commonStartMenu }; } public static void WatchProgramUpdate(Settings settings) diff --git a/Plugins/Flow.Launcher.Plugin.Program/plugin.json b/Plugins/Flow.Launcher.Plugin.Program/plugin.json index 3d20c0a48..2acf255eb 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Program/plugin.json @@ -4,7 +4,7 @@ "Name": "Program", "Description": "Search programs in Flow.Launcher", "Author": "qianlifeng", - "Version": "2.2.0", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Program.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj b/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj index c3f63eeb5..dfbf54c3a 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj +++ b/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows + net7.0-windows {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0} Properties Flow.Launcher.Plugin.Shell diff --git a/Plugins/Flow.Launcher.Plugin.Shell/plugin.json b/Plugins/Flow.Launcher.Plugin.Shell/plugin.json index 2b80e5138..8efe810e7 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Shell/plugin.json @@ -4,7 +4,7 @@ "Name": "Shell", "Description": "Provide executing commands from Flow Launcher", "Author": "qianlifeng", - "Version": "2.0.1", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Shell.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj index ce4773908..c7a722189 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj +++ b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows + net7.0-windows {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} Properties Flow.Launcher.Plugin.Sys diff --git a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json index 74c9d9030..9192fdf75 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json @@ -4,7 +4,7 @@ "Name": "System Commands", "Description": "Provide System related commands. e.g. shutdown,lock, setting etc.", "Author": "qianlifeng", - "Version": "2.0.1", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj b/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj index 8d50a80e2..c03acefae 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj +++ b/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows + net7.0-windows {A3DCCBCA-ACC1-421D-B16E-210896234C26} true Properties diff --git a/Plugins/Flow.Launcher.Plugin.Url/plugin.json b/Plugins/Flow.Launcher.Plugin.Url/plugin.json index 48c184ec2..5493280b0 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Url/plugin.json @@ -4,7 +4,7 @@ "Name": "URL", "Description": "Open the typed URL from Flow Launcher", "Author": "qianlifeng", - "Version": "2.0.1", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Url.dll", diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj b/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj index f238c4e93..55d69d526 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj @@ -2,7 +2,7 @@ Library - net6.0-windows + net7.0-windows {403B57F2-1856-4FC7-8A24-36AB346B763E} Properties true diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json index fb1e31c12..c4f8ce143 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json @@ -26,7 +26,7 @@ "Name": "Web Searches", "Description": "Provide the web search ability", "Author": "qianlifeng", - "Version": "2.0.2", + "Version": "3.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll", diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj index aa3eb8e6f..47ab3b2ba 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj @@ -1,7 +1,7 @@  Library - net6.0-windows + net7.0-windows true true false diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/plugin.json b/Plugins/Flow.Launcher.Plugin.WindowsSettings/plugin.json index 428a96923..c76585da7 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/plugin.json @@ -4,7 +4,7 @@ "Description": "Search settings inside Control Panel and Settings App", "Name": "Windows Settings", "Author": "TobiasSekan", - "Version": "3.0.2", + "Version": "4.0.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.WindowsSettings.dll", diff --git a/README.md b/README.md index ef78e3cd0..471e0a45d 100644 --- a/README.md +++ b/README.md @@ -364,8 +364,11 @@ Get in touch if you like to join the Flow-Launcher Team and help build this grea ### Developing/Debugging -- Flow Launcher's target framework is .Net 6 +- Flow Launcher's target framework is .Net 7 - Install Visual Studio 2022 -- Install .Net 6 SDK via Visual Studio installer or manually from [here](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.300-windows-x64-installer) +- Install .Net 7 SDK + - via Visual Studio installer + - via winget `winget install Microsoft.DotNet.SDK.7` + - Manually from [here](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) diff --git a/Scripts/flowlauncher.nuspec b/Scripts/flowlauncher.nuspec index aeb29d1f1..8d753bc8c 100644 --- a/Scripts/flowlauncher.nuspec +++ b/Scripts/flowlauncher.nuspec @@ -11,6 +11,6 @@ Flow Launcher - Quick file search and app launcher for Windows with community-made plugins - + diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index d937c5732..23eabedfd 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -100,7 +100,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) { function Publish-Self-Contained ($p) { $csproj = Join-Path "$p" "Flow.Launcher/Flow.Launcher.csproj" -Resolve - $profile = Join-Path "$p" "Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml" -Resolve + $profile = Join-Path "$p" "Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml" -Resolve # we call dotnet publish on the main project. # The other projects should have been built in Release at this point. diff --git a/appveyor.yml b/appveyor.yml index a327fa3a9..5a61e83ce 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: '1.12.0.{build}' +version: '1.13.0.{build}' init: - ps: | diff --git a/global.json b/global.json index 6ff5b35d3..1ee79d7a2 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.*", + "version": "7.0.*", "rollForward": "latestPatch" } -} \ No newline at end of file +}