From 8fdb9a96d3d0a9c87b041e894533c5d8c2bca7f1 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Mon, 19 Jul 2021 15:51:37 +0800 Subject: [PATCH 01/32] add some space to the end of the scrollviewer --- Flow.Launcher/SettingWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 478e114f9ff..38168a66c92 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -38,7 +38,7 @@ - + From 69d1d83226117e23b6395255c2e8c1d72e951eca Mon Sep 17 00:00:00 2001 From: kubalav Date: Tue, 20 Jul 2021 13:11:19 +0200 Subject: [PATCH 02/32] Update Slovak translation --- Flow.Launcher/Languages/sk.xaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index ec1b015daa6..346c708377c 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -31,12 +31,15 @@ Ignorovať klávesové skratky v režime na celú obrazovku Priečinok s Pythonom Automatická aktualizácia + Automaticky skryť posuvník + Automaticky skrývať posuvník v okne nastavení a zobraziť ho, keď naň prejdete myšou Vybrať Schovať Flow Launcher po spustení Schovať ikonu z oblasti oznámení Presnosť vyhľadávania Použiť Pinyin Umožňuje vyhľadávanie pomocou Pinyin. Pinyin je štandardný systém romanizovaného pravopisu pre transliteráciu čínštiny + Efekt tieňa nie je povolený, kým má aktuálny motív povolený efekt rozostrenia Plugin @@ -48,6 +51,7 @@ Nová akcia skratky: Aktuálna priorita: Nová priorita: + Priorita: Priečinok s pluginmi Autor Príprava: @@ -70,6 +74,7 @@ Modifikáčné klávesy na otvorenie výsledkov Zobraziť klávesovú skratku Vlastná klávesová skratka na vyhľadávanie + Dopyt Odstrániť Upraviť Pridať From edff7742617686e975a7b2dab59ea420dbeafeb4 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Wed, 21 Jul 2021 19:06:31 +1000 Subject: [PATCH 03/32] add WinGet update CD --- appveyor.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 9961a9111e8..35753abf244 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,6 +20,12 @@ skip_commits: files: - '*.md' +environment: + winget_token: + secure: HbH4/yvdMmNLUUwN/VEbsJiGLoXNheJpXK4XQbTXVtjcpWSiOBSFeJ2KaE1n9wHs + auth_token: + secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv + image: Visual Studio 2019 platform: Any CPU configuration: Release @@ -67,3 +73,19 @@ deploy: force_update: true on: APPVEYOR_REPO_TAG: true + +deploy_script: # this doesnt seem to run at all + - ps: | + if ($env:APPVEYOR_REPO_BRANCH -eq "dev") #swich to master for release + { + iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe + .\wingetcreate.exe update Flow-Launcher.Flow-Launcher -s true -u https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$env:flowVersion/Flow-Launcher-v$env:flowVersion.exe -v $env:flowVersion -t $env:winget_token + } + +on_success: + - ps: | + if ($env:APPVEYOR_REPO_BRANCH -eq "dev") + { + iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe + .\wingetcreate.exe update Flow-Launcher.Flow-Launcher -s true -u https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$env:flowVersion/Flow-Launcher-v$env:flowVersion.exe -v $env:flowVersion -t $env:auth_token + } From 5a55273f3d60ed86fc09ff98c30edfdc6942eddf Mon Sep 17 00:00:00 2001 From: Jeremy Date: Wed, 21 Jul 2021 20:47:17 +1000 Subject: [PATCH 04/32] run on master branch only --- appveyor.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 35753abf244..01bacea0b43 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,12 +20,6 @@ skip_commits: files: - '*.md' -environment: - winget_token: - secure: HbH4/yvdMmNLUUwN/VEbsJiGLoXNheJpXK4XQbTXVtjcpWSiOBSFeJ2KaE1n9wHs - auth_token: - secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv - image: Visual Studio 2019 platform: Any CPU configuration: Release @@ -74,18 +68,14 @@ deploy: on: APPVEYOR_REPO_TAG: true -deploy_script: # this doesnt seem to run at all - - ps: | - if ($env:APPVEYOR_REPO_BRANCH -eq "dev") #swich to master for release - { - iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe - .\wingetcreate.exe update Flow-Launcher.Flow-Launcher -s true -u https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$env:flowVersion/Flow-Launcher-v$env:flowVersion.exe -v $env:flowVersion -t $env:winget_token - } +environment: + winget_token: + secure: HKfVT2FYZITAG0qqMCePYhIem5a/gzvAgYDSlr6RlXfGmeBUOANUtgJ9X6fNroxN on_success: - ps: | - if ($env:APPVEYOR_REPO_BRANCH -eq "dev") + if ($env:APPVEYOR_REPO_BRANCH -eq "master") { iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe - .\wingetcreate.exe update Flow-Launcher.Flow-Launcher -s true -u https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$env:flowVersion/Flow-Launcher-v$env:flowVersion.exe -v $env:flowVersion -t $env:auth_token + .\wingetcreate.exe update Flow-Launcher.Flow-Launcher -s true -u https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$env:flowVersion/Flow-Launcher-v$env:flowVersion.exe -v $env:flowVersion -t $env:winget_token } From d71d18852332861eef3b5f1f1170f3fd29b8f77c Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 22 Jul 2021 13:36:04 +1000 Subject: [PATCH 05/32] reduce magnifying glass icon size --- Flow.Launcher/MainWindow.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 8b81bb94abe..fcc3af5c502 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -1,4 +1,4 @@ - - Date: Sat, 24 Jul 2021 14:16:11 +0800 Subject: [PATCH 06/32] fix logic --- Flow.Launcher/MainWindow.xaml.cs | 81 ++++++++++++++++---------------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index d97e020dc16..7521c65d250 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -77,54 +77,53 @@ private void OnLoaded(object sender, RoutedEventArgs _) switch (e.PropertyName) { case nameof(MainViewModel.MainWindowVisibility): - { - if (_viewModel.MainWindowVisibility == Visibility.Visible) { - Activate(); - QueryTextBox.Focus(); - UpdatePosition(); - _settings.ActivateTimes++; - if (!_viewModel.LastQuerySelected) + if (_viewModel.MainWindowVisibility == Visibility.Visible) { - QueryTextBox.SelectAll(); - _viewModel.LastQuerySelected = true; + Activate(); + QueryTextBox.Focus(); + UpdatePosition(); + _settings.ActivateTimes++; + if (!_viewModel.LastQuerySelected) + { + QueryTextBox.SelectAll(); + _viewModel.LastQuerySelected = true; + } + + if (_viewModel.ProgressBarVisibility == Visibility.Visible && isProgressBarStoryboardPaused) + { + _progressBarStoryboard.Begin(ProgressBar, true); + isProgressBarStoryboardPaused = false; + } } - - if (_viewModel.ProgressBarVisibility == Visibility.Visible && isProgressBarStoryboardPaused) + else if (!isProgressBarStoryboardPaused) { - _progressBarStoryboard.Begin(ProgressBar, true); - isProgressBarStoryboardPaused = false; + _progressBarStoryboard.Stop(ProgressBar); + isProgressBarStoryboardPaused = true; } - } - if (!isProgressBarStoryboardPaused) - { - _progressBarStoryboard.Stop(ProgressBar); - isProgressBarStoryboardPaused = true; + break; } - - break; - } case nameof(MainViewModel.ProgressBarVisibility): - { - Dispatcher.Invoke(async () => { - if (_viewModel.ProgressBarVisibility == Visibility.Hidden && !isProgressBarStoryboardPaused) + Dispatcher.Invoke(async () => { - await Task.Delay(50); - _progressBarStoryboard.Stop(ProgressBar); - isProgressBarStoryboardPaused = true; - } - else if (_viewModel.MainWindowVisibility == Visibility.Visible && - isProgressBarStoryboardPaused) - { - _progressBarStoryboard.Begin(ProgressBar, true); - isProgressBarStoryboardPaused = false; - } - }, System.Windows.Threading.DispatcherPriority.Render); - - break; - } + if (_viewModel.ProgressBarVisibility == Visibility.Hidden && !isProgressBarStoryboardPaused) + { + await Task.Delay(50); + _progressBarStoryboard.Stop(ProgressBar); + isProgressBarStoryboardPaused = true; + } + else if (_viewModel.MainWindowVisibility == Visibility.Visible && + isProgressBarStoryboardPaused) + { + _progressBarStoryboard.Begin(ProgressBar, true); + isProgressBarStoryboardPaused = false; + } + }, System.Windows.Threading.DispatcherPriority.Render); + + break; + } case nameof(MainViewModel.QueryTextCursorMovedToEnd): if (_viewModel.QueryTextCursorMovedToEnd) { @@ -230,10 +229,10 @@ private void OnPreviewMouseButtonDown(object sender, MouseButtonEventArgs e) { if (sender != null && e.OriginalSource != null) { - var r = (ResultListBox) sender; - var d = (DependencyObject) e.OriginalSource; + var r = (ResultListBox)sender; + var d = (DependencyObject)e.OriginalSource; var item = ItemsControl.ContainerFromElement(r, d) as ListBoxItem; - var result = (ResultViewModel) item?.DataContext; + var result = (ResultViewModel)item?.DataContext; if (result != null) { if (e.ChangedButton == MouseButton.Left) From 3a8cd8cbbb371ccccadc16a3afba2bbdd5bb9276 Mon Sep 17 00:00:00 2001 From: Kevin Zhang <45326534+taooceros@users.noreply.github.com> Date: Sat, 24 Jul 2021 14:38:18 +0800 Subject: [PATCH 07/32] save setting after startup (#594) * save setting after startup * Revert "save setting after startup" This reverts commit bb9c7a1b8417c2d0ae9a8b2bcc16209e765f96d8. * Update App.xaml.cs Save Setting After Startup --- Flow.Launcher/App.xaml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index b3e9052fc54..c2a32100dbb 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -75,7 +75,7 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () => Http.API = API; Http.Proxy = _settings.Proxy; - + await PluginManager.InitializePlugins(API); var window = new MainWindow(_settings, _mainVM); @@ -99,6 +99,8 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () => AutoStartup(); AutoUpdates(); + API.SaveAppAllSettings(); + _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible; Log.Info("|App.OnStartup|End Flow Launcher startup ---------------------------------------------------- "); }); From 6ed83aaa6c2f1f5ddf0341863183018872ea4a20 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sat, 24 Jul 2021 18:08:25 +1000 Subject: [PATCH 08/32] add portable release --- Scripts/post_build.ps1 | 9 +++++++++ appveyor.yml | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 093f92768b4..afd8f199849 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -107,6 +107,13 @@ function Publish-Self-Contained ($p) { dotnet publish -c Release $csproj /p:PublishProfile=$profile } +function Publish-Portable ($outputLocation, $version) { + + & $outputLocation\Flow-Launcher-v$v.exe --silent | Out-Null + mkdir "$env:LocalAppData\FlowLauncher\app-$version\UserData" + Compress-Archive -Path $env:LocalAppData\FlowLauncher -DestinationPath $outputLocation\Flow-Launcher-v$version-Portable.zip +} + function Main { $p = Build-Path $v = Build-Version @@ -123,6 +130,8 @@ function Main { $o = "$p\Output\Packages" Validate-Directory $o Pack-Squirrel-Installer $p $v $o + + Publish-Portable $o $v } } diff --git a/appveyor.yml b/appveyor.yml index 01bacea0b43..27a9b9dba6a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,6 +36,8 @@ artifacts: name: Plugin nupkg - path: 'Output\Packages\Flow-Launcher-*.exe' name: Squirrel Installer +- path: 'Output\Packages\Flow-Launcher-v$env:flowVersion-Portable.zip' + name: Portable Version - path: 'Output\Packages\FlowLauncher-*-full.nupkg' name: Squirrel nupkg - path: 'Output\Packages\RELEASES' @@ -53,7 +55,7 @@ deploy: release: v$(flowVersion) auth_token: secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv - artifact: Squirrel Installer, Squirrel nupkg, Squirrel RELEASES + artifact: Squirrel Installer, Portable Version, Squirrel nupkg, Squirrel RELEASES draft: true force_update: true on: @@ -63,7 +65,7 @@ deploy: release: v$(flowVersion) auth_token: secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv - artifact: Squirrel Installer, Squirrel nupkg, Squirrel RELEASES + artifact: Squirrel Installer, Portable Version, Squirrel nupkg, Squirrel RELEASES force_update: true on: APPVEYOR_REPO_TAG: true From be7179d3f0578507826555ec776d55b65b9ac7b2 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sat, 24 Jul 2021 18:47:29 +1000 Subject: [PATCH 09/32] use AppVeyor environment variable --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 27a9b9dba6a..c490de2fe7d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,7 +36,7 @@ artifacts: name: Plugin nupkg - path: 'Output\Packages\Flow-Launcher-*.exe' name: Squirrel Installer -- path: 'Output\Packages\Flow-Launcher-v$env:flowVersion-Portable.zip' +- path: Output\Packages\Flow-Launcher-v$(flowVersion)-Portable.zip name: Portable Version - path: 'Output\Packages\FlowLauncher-*-full.nupkg' name: Squirrel nupkg From cc09f33655a1846226d833756ef4004ca0652734 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sat, 24 Jul 2021 19:10:07 +1000 Subject: [PATCH 10/32] change portable release with out appending the version makes it easier to link download --- README.md | 4 ++-- Scripts/post_build.ps1 | 2 +- appveyor.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e9c7e33606f..d78e7352b9d 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,8 @@ Flow Launcher. Dedicated to make your workflow flow more seamlessly. Aimed at be ### Installation -| [Windows 7 and up installer](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest) | `WinGet install "Flow Launcher"` | -| -------------------------------------------------------------------------------------------- | -------------------------------- | +| [Windows 7 and up installer](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest) | [Portable](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest/Flow-Launcher-Portable.zip) | `WinGet install "Flow Launcher"` | +| --------------------------------- | --------------------------------- | --------------------------------- | Windows may complain about security due to code not being signed, this will be completed at a later stage. If you downloaded from this repo, you are good to continue the set up. diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index afd8f199849..b573b984b64 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -111,7 +111,7 @@ function Publish-Portable ($outputLocation, $version) { & $outputLocation\Flow-Launcher-v$v.exe --silent | Out-Null mkdir "$env:LocalAppData\FlowLauncher\app-$version\UserData" - Compress-Archive -Path $env:LocalAppData\FlowLauncher -DestinationPath $outputLocation\Flow-Launcher-v$version-Portable.zip + Compress-Archive -Path $env:LocalAppData\FlowLauncher -DestinationPath $outputLocation\Flow-Launcher-Portable.zip } function Main { diff --git a/appveyor.yml b/appveyor.yml index c490de2fe7d..f00c8aefe6b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,7 +36,7 @@ artifacts: name: Plugin nupkg - path: 'Output\Packages\Flow-Launcher-*.exe' name: Squirrel Installer -- path: Output\Packages\Flow-Launcher-v$(flowVersion)-Portable.zip +- path: Output\Packages\Flow-Launcher-Portable.zip name: Portable Version - path: 'Output\Packages\FlowLauncher-*-full.nupkg' name: Squirrel nupkg From 44d8666e271939737c5abe8bebc70ab7119a333b Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 25 Jul 2021 17:48:57 +1000 Subject: [PATCH 11/32] add warning for Windows Search service not turned on --- .../Languages/en.xaml | 2 + .../Search/SearchManager.cs | 18 ++++---- .../Search/WindowsIndex/IndexSearch.cs | 43 +++++++++++++++---- 3 files changed, 46 insertions(+), 17 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml index a989327be26..031cb108b41 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml @@ -10,6 +10,8 @@ Deletion successful Successfully deleted the {0} Assigning the global action keyword could bring up too many results during search. Please choose a specific action keyword + The required service for Windows Index Search does not appear to be running + To fix this, start the Windows Search service. Select here to remove this warning Delete diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index 2aa389f8950..c7b1b6180b0 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -12,13 +12,13 @@ namespace Flow.Launcher.Plugin.Explorer.Search { public class SearchManager { - private readonly PluginInitContext context; + internal static PluginInitContext Context; private readonly Settings settings; public SearchManager(Settings settings, PluginInitContext context) { - this.context = context; + Context = context; this.settings = settings; } @@ -99,7 +99,7 @@ public async Task> PathSearchAsync(Query query, CancellationToken t var isEnvironmentVariable = EnvironmentVariables.IsEnvironmentVariableSearch(querySearch); if (isEnvironmentVariable) - return EnvironmentVariables.GetEnvironmentStringPathSuggestions(querySearch, query, context); + return EnvironmentVariables.GetEnvironmentStringPathSuggestions(querySearch, query, Context); // Query is a location path with a full environment variable, eg. %appdata%\somefolder\ var isEnvironmentVariablePath = querySearch[1..].Contains("%\\"); @@ -141,8 +141,9 @@ private async Task> WindowsIndexFileContentSearchAsync(Query query, if (string.IsNullOrEmpty(querySearchString)) return new List(); - return await IndexSearch.WindowsIndexSearchAsync(querySearchString, - queryConstructor.CreateQueryHelper().ConnectionString, + return await IndexSearch.WindowsIndexSearchAsync( + querySearchString, + queryConstructor.CreateQueryHelper, queryConstructor.QueryForFileContentSearch, settings.IndexSearchExcludedSubdirectoryPaths, query, @@ -178,8 +179,9 @@ private async Task> WindowsIndexFilesAndFoldersSearchAsync(Query qu { var queryConstructor = new QueryConstructor(settings); - return await IndexSearch.WindowsIndexSearchAsync(querySearchString, - queryConstructor.CreateQueryHelper().ConnectionString, + return await IndexSearch.WindowsIndexSearchAsync( + querySearchString, + queryConstructor.CreateQueryHelper, queryConstructor.QueryForAllFilesAndFolders, settings.IndexSearchExcludedSubdirectoryPaths, query, @@ -192,7 +194,7 @@ private async Task> WindowsIndexTopLevelFolderSearchAsync(Query que var queryConstructor = new QueryConstructor(settings); return await IndexSearch.WindowsIndexSearchAsync(path, - queryConstructor.CreateQueryHelper().ConnectionString, + queryConstructor.CreateQueryHelper, queryConstructor.QueryForTopLevelDirectorySearch, settings.IndexSearchExcludedSubdirectoryPaths, query, diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs index cfb564924c0..c22b489e29e 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs @@ -1,10 +1,9 @@ -using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks; using Microsoft.Search.Interop; using System; using System.Collections.Generic; using System.Data.OleDb; -using System.Linq; +using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; @@ -84,7 +83,8 @@ internal static async Task> ExecuteWindowsIndexSearchAsync(string i return results; } - internal async static Task> WindowsIndexSearchAsync(string searchString, string connectionString, + internal async static Task> WindowsIndexSearchAsync(string searchString, + Func queryHelper, Func constructQuery, List exclusionList, Query query, @@ -94,12 +94,29 @@ internal async static Task> WindowsIndexSearchAsync(string searchSt if (regexMatch.Success) return new List(); + + try + { + var constructedQuery = constructQuery(searchString); - var constructedQuery = constructQuery(searchString); - return RemoveResultsInExclusionList( - await ExecuteWindowsIndexSearchAsync(constructedQuery, connectionString, query, token).ConfigureAwait(false), + return RemoveResultsInExclusionList( + await ExecuteWindowsIndexSearchAsync(constructedQuery, queryHelper().ConnectionString, query, token).ConfigureAwait(false), exclusionList, token); + } + catch (COMException) + { + // Occurs because the Windows Indexing (WSearch) is turned off in services and unable to be used by Explorer plugin + return new List + { + new Result + { + Title = SearchManager.Context.API.GetTranslation("plugin_explorer_windowsSearchServiceNotRunning"), + SubTitle = SearchManager.Context.API.GetTranslation("plugin_explorer_windowsSearchServiceFix"), + IcoPath = Constants.ExplorerIconImagePath + } + }; + } } private static List RemoveResultsInExclusionList(List results, List exclusionList, CancellationToken token) @@ -137,9 +154,17 @@ private static List RemoveResultsInExclusionList(List results, L internal static bool PathIsIndexed(string path) { - var csm = new CSearchManager(); - var indexManager = csm.GetCatalog("SystemIndex").GetCrawlScopeManager(); - return indexManager.IncludedInCrawlScope(path) > 0; + try + { + var csm = new CSearchManager(); + var indexManager = csm.GetCatalog("SystemIndex").GetCrawlScopeManager(); + return indexManager.IncludedInCrawlScope(path) > 0; + } + catch(COMException) + { + // Occurs because the Windows Indexing (WSearch) is turned off in services and unable to be used by Explorer plugin + return false; + } } private static void LogException(string message, Exception e) From 86fe66440423b9afbefe2a43e5a04524028696e6 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 25 Jul 2021 19:58:21 +1000 Subject: [PATCH 12/32] add option to remove warning msg and install Everything plugin --- .../Languages/en.xaml | 2 + .../Search/SearchManager.cs | 40 +++++++++---------- .../Search/WindowsIndex/IndexSearch.cs | 37 ++++++++++++++++- .../Flow.Launcher.Plugin.Explorer/Settings.cs | 4 +- 4 files changed, 60 insertions(+), 23 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml index 031cb108b41..b23931fcf78 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml @@ -12,6 +12,8 @@ Assigning the global action keyword could bring up too many results during search. Please choose a specific action keyword The required service for Windows Index Search does not appear to be running To fix this, start the Windows Search service. Select here to remove this warning + The warning message has been switched off. As an alternative for searching files and folders, would you like to install Everything plugin?{0}{0}Select 'Yes' to install Everything plugin, or 'No' to return + Explorer Alternative Delete diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index c7b1b6180b0..d86007e747b 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -14,12 +14,12 @@ public class SearchManager { internal static PluginInitContext Context; - private readonly Settings settings; + internal static Settings Settings; public SearchManager(Settings settings, PluginInitContext context) { Context = context; - this.settings = settings; + Settings = settings; } private class PathEqualityComparator : IEqualityComparer @@ -71,14 +71,14 @@ private bool ActionKeywordMatch(Query query, Settings.ActionKeyword allowedActio return allowedActionKeyword switch { - Settings.ActionKeyword.SearchActionKeyword => settings.SearchActionKeywordEnabled && - keyword == settings.SearchActionKeyword, - Settings.ActionKeyword.PathSearchActionKeyword => settings.PathSearchKeywordEnabled && - keyword == settings.PathSearchActionKeyword, + Settings.ActionKeyword.SearchActionKeyword => Settings.SearchActionKeywordEnabled && + keyword == Settings.SearchActionKeyword, + Settings.ActionKeyword.PathSearchActionKeyword => Settings.PathSearchKeywordEnabled && + keyword == Settings.PathSearchActionKeyword, Settings.ActionKeyword.FileContentSearchActionKeyword => keyword == - settings.FileContentSearchActionKeyword, - Settings.ActionKeyword.IndexSearchActionKeyword => settings.IndexOnlySearchKeywordEnabled && - keyword == settings.IndexSearchActionKeyword + Settings.FileContentSearchActionKeyword, + Settings.ActionKeyword.IndexSearchActionKeyword => Settings.IndexOnlySearchKeywordEnabled && + keyword == Settings.IndexSearchActionKeyword }; } @@ -88,11 +88,11 @@ public async Task> PathSearchAsync(Query query, CancellationToken t // This allows the user to type the assigned action keyword and only see the list of quick folder links if (string.IsNullOrEmpty(query.Search)) - return QuickAccess.AccessLinkListAll(query, settings.QuickAccessLinks); + return QuickAccess.AccessLinkListAll(query, Settings.QuickAccessLinks); var results = new HashSet(PathEqualityComparator.Instance); - var quickaccessLinks = QuickAccess.AccessLinkListMatched(query, settings.QuickAccessLinks); + var quickaccessLinks = QuickAccess.AccessLinkListMatched(query, Settings.QuickAccessLinks); results.UnionWith(quickaccessLinks); @@ -136,7 +136,7 @@ public async Task> PathSearchAsync(Query query, CancellationToken t private async Task> WindowsIndexFileContentSearchAsync(Query query, string querySearchString, CancellationToken token) { - var queryConstructor = new QueryConstructor(settings); + var queryConstructor = new QueryConstructor(Settings); if (string.IsNullOrEmpty(querySearchString)) return new List(); @@ -145,14 +145,14 @@ private async Task> WindowsIndexFileContentSearchAsync(Query query, querySearchString, queryConstructor.CreateQueryHelper, queryConstructor.QueryForFileContentSearch, - settings.IndexSearchExcludedSubdirectoryPaths, + Settings.IndexSearchExcludedSubdirectoryPaths, query, token).ConfigureAwait(false); } public bool IsFileContentSearch(string actionKeyword) { - return actionKeyword == settings.FileContentSearchActionKeyword; + return actionKeyword == Settings.FileContentSearchActionKeyword; } private List DirectoryInfoClassSearch(Query query, string querySearch, CancellationToken token) @@ -177,13 +177,13 @@ public async Task> TopLevelDirectorySearchBehaviourAsync( private async Task> WindowsIndexFilesAndFoldersSearchAsync(Query query, string querySearchString, CancellationToken token) { - var queryConstructor = new QueryConstructor(settings); + var queryConstructor = new QueryConstructor(Settings); return await IndexSearch.WindowsIndexSearchAsync( querySearchString, queryConstructor.CreateQueryHelper, queryConstructor.QueryForAllFilesAndFolders, - settings.IndexSearchExcludedSubdirectoryPaths, + Settings.IndexSearchExcludedSubdirectoryPaths, query, token).ConfigureAwait(false); } @@ -191,12 +191,12 @@ private async Task> WindowsIndexFilesAndFoldersSearchAsync(Query qu private async Task> WindowsIndexTopLevelFolderSearchAsync(Query query, string path, CancellationToken token) { - var queryConstructor = new QueryConstructor(settings); + var queryConstructor = new QueryConstructor(Settings); return await IndexSearch.WindowsIndexSearchAsync(path, queryConstructor.CreateQueryHelper, queryConstructor.QueryForTopLevelDirectorySearch, - settings.IndexSearchExcludedSubdirectoryPaths, + Settings.IndexSearchExcludedSubdirectoryPaths, query, token).ConfigureAwait(false); } @@ -205,10 +205,10 @@ private bool UseWindowsIndexForDirectorySearch(string locationPath) { var pathToDirectory = FilesFolders.ReturnPreviousDirectoryIfIncompleteString(locationPath); - if (!settings.UseWindowsIndexForDirectorySearch) + if (!Settings.UseWindowsIndexForDirectorySearch) return false; - if (settings.IndexSearchExcludedSubdirectoryPaths + if (Settings.IndexSearchExcludedSubdirectoryPaths .Any(x => FilesFolders.ReturnPreviousDirectoryIfIncompleteString(pathToDirectory) .StartsWith(x.Path, StringComparison.OrdinalIgnoreCase))) return false; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs index c22b489e29e..7890209db8f 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs @@ -3,10 +3,12 @@ using System; using System.Collections.Generic; using System.Data.OleDb; +using System.Linq; using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; +using System.Windows; namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex { @@ -107,12 +109,43 @@ await ExecuteWindowsIndexSearchAsync(constructedQuery, queryHelper().ConnectionS catch (COMException) { // Occurs because the Windows Indexing (WSearch) is turned off in services and unable to be used by Explorer plugin + if (!SearchManager.Settings.WarnWindowsSearchServiceOff) + return new List(); + + var api = SearchManager.Context.API; + return new List { new Result { - Title = SearchManager.Context.API.GetTranslation("plugin_explorer_windowsSearchServiceNotRunning"), - SubTitle = SearchManager.Context.API.GetTranslation("plugin_explorer_windowsSearchServiceFix"), + Title = api.GetTranslation("plugin_explorer_windowsSearchServiceNotRunning"), + SubTitle = api.GetTranslation("plugin_explorer_windowsSearchServiceFix"), + Action = c => + { + SearchManager.Settings.WarnWindowsSearchServiceOff = false; + + if (MessageBox.Show(string.Format(api.GetTranslation("plugin_explorer_alternative"), Environment.NewLine), + api.GetTranslation("plugin_explorer_alternative_title"), + MessageBoxButton.YesNo) == MessageBoxResult.Yes) + { + var pluginsManagerPlugins= api.GetAllPlugins().FirstOrDefault(x => x.Metadata.ID == "9f8f9b14-2518-4907-b211-35ab6290dee7"); + + api.ChangeQuery(string.Format("{0} install everything", pluginsManagerPlugins.Metadata.ActionKeywords[0])); + } + else + { + // Clears the warning message because same query string will not alter the displayed result list + api.ChangeQuery(string.Empty); + + api.ChangeQuery(query.RawQuery); + } + + var mainWindow = Application.Current.MainWindow; + mainWindow.Visibility = Visibility.Visible; + mainWindow.Focus(); + + return false; + }, IcoPath = Constants.ExplorerIconImagePath } }; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs index 13f938dea1c..88656a40172 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs @@ -1,4 +1,4 @@ -using Flow.Launcher.Plugin.Explorer.Search; +using Flow.Launcher.Plugin.Explorer.Search; using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks; using Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption; using System; @@ -33,6 +33,8 @@ public class Settings public bool IndexOnlySearchKeywordEnabled { get; set; } + public bool WarnWindowsSearchServiceOff { get; set; } = true; + internal enum ActionKeyword { SearchActionKeyword, From 8df4bb2e8d84b3fd447764f25a82c9094d1d1d32 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 25 Jul 2021 20:12:15 +1000 Subject: [PATCH 13/32] version bump for Explorer plugin --- Plugins/Flow.Launcher.Plugin.Explorer/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json index 5bd49949f48..36467428639 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json @@ -9,7 +9,7 @@ "Name": "Explorer", "Description": "Search and manage files and folders. Explorer utilises Windows Index Search", "Author": "Jeremy Wu", - "Version": "1.8.0", + "Version": "1.8.1", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll", From 10a30f4abe1ec29861add5e921cd0948844668e3 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 25 Jul 2021 20:16:30 +1000 Subject: [PATCH 14/32] move exception result into its own method --- .../Search/WindowsIndex/IndexSearch.cs | 79 ++++++++++--------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs index 7890209db8f..19c2b24d63d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs @@ -112,43 +112,7 @@ await ExecuteWindowsIndexSearchAsync(constructedQuery, queryHelper().ConnectionS if (!SearchManager.Settings.WarnWindowsSearchServiceOff) return new List(); - var api = SearchManager.Context.API; - - return new List - { - new Result - { - Title = api.GetTranslation("plugin_explorer_windowsSearchServiceNotRunning"), - SubTitle = api.GetTranslation("plugin_explorer_windowsSearchServiceFix"), - Action = c => - { - SearchManager.Settings.WarnWindowsSearchServiceOff = false; - - if (MessageBox.Show(string.Format(api.GetTranslation("plugin_explorer_alternative"), Environment.NewLine), - api.GetTranslation("plugin_explorer_alternative_title"), - MessageBoxButton.YesNo) == MessageBoxResult.Yes) - { - var pluginsManagerPlugins= api.GetAllPlugins().FirstOrDefault(x => x.Metadata.ID == "9f8f9b14-2518-4907-b211-35ab6290dee7"); - - api.ChangeQuery(string.Format("{0} install everything", pluginsManagerPlugins.Metadata.ActionKeywords[0])); - } - else - { - // Clears the warning message because same query string will not alter the displayed result list - api.ChangeQuery(string.Empty); - - api.ChangeQuery(query.RawQuery); - } - - var mainWindow = Application.Current.MainWindow; - mainWindow.Visibility = Visibility.Visible; - mainWindow.Focus(); - - return false; - }, - IcoPath = Constants.ExplorerIconImagePath - } - }; + return ResultForWindexSearchOff(query.RawQuery); } } @@ -200,6 +164,47 @@ internal static bool PathIsIndexed(string path) } } + private static List ResultForWindexSearchOff(string rawQuery) + { + var api = SearchManager.Context.API; + + return new List + { + new Result + { + Title = api.GetTranslation("plugin_explorer_windowsSearchServiceNotRunning"), + SubTitle = api.GetTranslation("plugin_explorer_windowsSearchServiceFix"), + Action = c => + { + SearchManager.Settings.WarnWindowsSearchServiceOff = false; + + if (MessageBox.Show(string.Format(api.GetTranslation("plugin_explorer_alternative"), Environment.NewLine), + api.GetTranslation("plugin_explorer_alternative_title"), + MessageBoxButton.YesNo) == MessageBoxResult.Yes) + { + var pluginsManagerPlugins= api.GetAllPlugins().FirstOrDefault(x => x.Metadata.ID == "9f8f9b14-2518-4907-b211-35ab6290dee7"); + + api.ChangeQuery(string.Format("{0} install everything", pluginsManagerPlugins.Metadata.ActionKeywords[0])); + } + else + { + // Clears the warning message because same query string will not alter the displayed result list + api.ChangeQuery(string.Empty); + + api.ChangeQuery(rawQuery); + } + + var mainWindow = Application.Current.MainWindow; + mainWindow.Visibility = Visibility.Visible; + mainWindow.Focus(); + + return false; + }, + IcoPath = Constants.ExplorerIconImagePath + } + }; + } + private static void LogException(string message, Exception e) { #if DEBUG // Please investigate and handle error from index search From 0f9fd943122dabe39ca0a847682465154406d389 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 25 Jul 2021 20:42:26 +1000 Subject: [PATCH 15/32] handle future scenario where PluginsManager's action keyword increased --- .../Search/WindowsIndex/IndexSearch.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs index 19c2b24d63d..15251fcfb65 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs @@ -1,3 +1,4 @@ +using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks; using Microsoft.Search.Interop; using System; @@ -178,12 +179,20 @@ private static List ResultForWindexSearchOff(string rawQuery) { SearchManager.Settings.WarnWindowsSearchServiceOff = false; + var pluginsManagerPlugins= api.GetAllPlugins().FirstOrDefault(x => x.Metadata.ID == "9f8f9b14-2518-4907-b211-35ab6290dee7"); + + var actionKeywordCount = pluginsManagerPlugins.Metadata.ActionKeywords.Count; + + if (actionKeywordCount > 1) + LogException("PluginsManager's action keyword has increased to more than 1, this does not allow for determining the " + + "right action keyword. Explorer's code for managing Windows Search service not running exception needs to be updated", + new InvalidOperationException()); + if (MessageBox.Show(string.Format(api.GetTranslation("plugin_explorer_alternative"), Environment.NewLine), api.GetTranslation("plugin_explorer_alternative_title"), - MessageBoxButton.YesNo) == MessageBoxResult.Yes) + MessageBoxButton.YesNo) == MessageBoxResult.Yes + && actionKeywordCount == 1) { - var pluginsManagerPlugins= api.GetAllPlugins().FirstOrDefault(x => x.Metadata.ID == "9f8f9b14-2518-4907-b211-35ab6290dee7"); - api.ChangeQuery(string.Format("{0} install everything", pluginsManagerPlugins.Metadata.ActionKeywords[0])); } else From f588f2a763caaca4f6b7fe9774084b4ae40489d2 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 25 Jul 2021 20:44:04 +1000 Subject: [PATCH 16/32] fix typo --- .../Search/WindowsIndex/IndexSearch.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs index 15251fcfb65..d429894570c 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs @@ -179,9 +179,9 @@ private static List ResultForWindexSearchOff(string rawQuery) { SearchManager.Settings.WarnWindowsSearchServiceOff = false; - var pluginsManagerPlugins= api.GetAllPlugins().FirstOrDefault(x => x.Metadata.ID == "9f8f9b14-2518-4907-b211-35ab6290dee7"); + var pluginsManagerPlugin= api.GetAllPlugins().FirstOrDefault(x => x.Metadata.ID == "9f8f9b14-2518-4907-b211-35ab6290dee7"); - var actionKeywordCount = pluginsManagerPlugins.Metadata.ActionKeywords.Count; + var actionKeywordCount = pluginsManagerPlugin.Metadata.ActionKeywords.Count; if (actionKeywordCount > 1) LogException("PluginsManager's action keyword has increased to more than 1, this does not allow for determining the " + @@ -193,7 +193,7 @@ private static List ResultForWindexSearchOff(string rawQuery) MessageBoxButton.YesNo) == MessageBoxResult.Yes && actionKeywordCount == 1) { - api.ChangeQuery(string.Format("{0} install everything", pluginsManagerPlugins.Metadata.ActionKeywords[0])); + api.ChangeQuery(string.Format("{0} install everything", pluginsManagerPlugin.Metadata.ActionKeywords[0])); } else { From 8330dd356fef6079057695f3a80215510bd5f038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BC=98=E9=9F=AC?= Date: Mon, 26 Jul 2021 12:18:49 +0800 Subject: [PATCH 17/32] Add a MemoryStream buffer to ReadStream first --- Flow.Launcher.Core/Flow.Launcher.Core.csproj | 1 + Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 55 +++++++++++++++----- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index d7df11f8303..9e932a5085b 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -55,6 +55,7 @@ + diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index 431458881ec..5e44bef8697 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -12,6 +12,7 @@ using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Plugin; using JetBrains.Annotations; +using Microsoft.IO; namespace Flow.Launcher.Core.Plugin { @@ -33,9 +34,11 @@ internal abstract class JsonRPCPlugin : IAsyncPlugin, IContextMenu protected abstract string ExecuteCallback(JsonRPCRequestModel rpcRequest); protected abstract string ExecuteContextMenu(Result selectedResult); + private static readonly RecyclableMemoryStreamManager BufferManager = new(); + public List LoadContextMenus(Result selectedResult) { - string output = ExecuteContextMenu(selectedResult); + var output = ExecuteContextMenu(selectedResult); try { return DeserializedResult(output); @@ -61,12 +64,23 @@ private async Task> DeserializedResultAsync(Stream output) { if (output == Stream.Null) return null; - var queryResponseModel = await - JsonSerializer.DeserializeAsync(output, options); + try + { + var queryResponseModel = + await JsonSerializer.DeserializeAsync(output, options); - await output.DisposeAsync(); - - return ParseResults(queryResponseModel); + return ParseResults(queryResponseModel); + } + catch (JsonException e) + { + Log.Exception(GetType().FullName, "Unexpected Json Input", e); + } + finally + { + await output.DisposeAsync(); + } + + return null; } private List DeserializedResult(string output) @@ -81,7 +95,6 @@ private List DeserializedResult(string output) private List ParseResults(JsonRPCQueryResponseModel queryResponseModel) { - var results = new List(); if (queryResponseModel.Result == null) return null; if (!string.IsNullOrEmpty(queryResponseModel.DebugMessage)) @@ -89,7 +102,7 @@ private List ParseResults(JsonRPCQueryResponseModel queryResponseModel) context.API.ShowMsg(queryResponseModel.DebugMessage); } - foreach (JsonRPCResult result in queryResponseModel.Result) + foreach (var result in queryResponseModel.Result) { result.Action = c => { @@ -114,7 +127,8 @@ private List ParseResults(JsonRPCQueryResponseModel queryResponseModel) return !result.JsonRPCAction.DontHideAfterAction; } - var jsonRpcRequestModel = JsonSerializer.Deserialize(actionResponse, options); + var jsonRpcRequestModel = + JsonSerializer.Deserialize(actionResponse, options); if (jsonRpcRequestModel?.Method?.StartsWith("Flow.Launcher.") ?? false) { @@ -125,9 +139,12 @@ private List ParseResults(JsonRPCQueryResponseModel queryResponseModel) return !result.JsonRPCAction.DontHideAfterAction; }; - results.Add(result); } + var results = new List(); + + results.AddRange(queryResponseModel.Result); + return results; } @@ -226,7 +243,21 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati return Stream.Null; } - var result = process.StandardOutput.BaseStream; + var source = process.StandardOutput.BaseStream; + + var buffer = BufferManager.GetStream(); + + try + { + await source.CopyToAsync(buffer, token); + } + catch (OperationCanceledException) + { + await buffer.DisposeAsync(); + throw; + } + + buffer.Seek(0, SeekOrigin.Begin); token.ThrowIfCancellationRequested(); @@ -245,7 +276,7 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati return Stream.Null; } - return result; + return buffer; } catch (Exception e) { From 2818b023d8cefb48bf167b769bb312cf5527e5fe Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Mon, 26 Jul 2021 19:33:16 +1000 Subject: [PATCH 18/32] version bump --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f00c8aefe6b..f3b4ad39b82 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: '1.8.0.{build}' +version: '1.8.1.{build}' init: - ps: | From 755a68783061329f77da6836ae4366f20c3eb13f Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Mon, 26 Jul 2021 20:22:27 +1000 Subject: [PATCH 19/32] fix portable readme download link --- README.md | 2 +- appveyor.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d78e7352b9d..e89558d5705 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Flow Launcher. Dedicated to make your workflow flow more seamlessly. Aimed at be ### Installation -| [Windows 7 and up installer](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest) | [Portable](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest/Flow-Launcher-Portable.zip) | `WinGet install "Flow Launcher"` | +| [Windows 7 and up installer](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest) | [Portable](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest/download/Flow-Launcher-Portable.zip) | `WinGet install "Flow Launcher"` | | --------------------------------- | --------------------------------- | --------------------------------- | Windows may complain about security due to code not being signed, this will be completed at a later stage. If you downloaded from this repo, you are good to continue the set up. diff --git a/appveyor.yml b/appveyor.yml index f00c8aefe6b..3b726458610 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -76,6 +76,7 @@ environment: on_success: - ps: | + echo APPVEYOR_PULL_REQUEST_NUMBER if ($env:APPVEYOR_REPO_BRANCH -eq "master") { iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe From 268cde137430bcefb98a3261c4b45603032078ab Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Mon, 26 Jul 2021 21:12:57 +1000 Subject: [PATCH 20/32] fix WinGet deployment to only occur for non-pr master branch build --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3b726458610..32479026ad3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -76,8 +76,7 @@ environment: on_success: - ps: | - echo APPVEYOR_PULL_REQUEST_NUMBER - if ($env:APPVEYOR_REPO_BRANCH -eq "master") + if ($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null) # branch only builds pr request number will be null, this ensures deployment only when it's non-pr master branch build { iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe .\wingetcreate.exe update Flow-Launcher.Flow-Launcher -s true -u https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$env:flowVersion/Flow-Launcher-v$env:flowVersion.exe -v $env:flowVersion -t $env:winget_token From 3e0ac6dacfa1f3271a57ffaf63268900b3eb29c9 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 27 Jul 2021 09:14:33 +1000 Subject: [PATCH 21/32] switch to publish WinGet on master branch tag build --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 32479026ad3..6d989b24e34 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -76,7 +76,7 @@ environment: on_success: - ps: | - if ($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null) # branch only builds pr request number will be null, this ensures deployment only when it's non-pr master branch build + if ($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG) { iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe .\wingetcreate.exe update Flow-Launcher.Flow-Launcher -s true -u https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$env:flowVersion/Flow-Launcher-v$env:flowVersion.exe -v $env:flowVersion -t $env:winget_token From 4e3746f77d6355ce6e2798258a9cb2e74e5ac42d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BC=98=E9=9F=AC?= Date: Tue, 27 Jul 2021 11:15:27 +0800 Subject: [PATCH 22/32] Don't rethrow OperationCanceledException --- Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index 5e44bef8697..58bd40807e6 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -254,7 +254,7 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati catch (OperationCanceledException) { await buffer.DisposeAsync(); - throw; + return Stream.Null; } buffer.Seek(0, SeekOrigin.Begin); @@ -289,11 +289,15 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati public async Task> QueryAsync(Query query, CancellationToken token) { - var output = await ExecuteQueryAsync(query, token); try { + var output = await ExecuteQueryAsync(query, token); return await DeserializedResultAsync(output); } + catch (OperationCanceledException) + { + return null; + } catch (Exception e) { Log.Exception($"|JsonRPCPlugin.Query|Exception when query <{query}>", e); From 220db44a6c42ced03fbdf2cbbbe065143d07e2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BC=98=E9=9F=AC?= Date: Tue, 27 Jul 2021 13:54:13 +0800 Subject: [PATCH 23/32] Manually kill process when token is canceled --- Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index 58bd40807e6..59980a611b6 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -243,9 +243,18 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati return Stream.Null; } - var source = process.StandardOutput.BaseStream; + await using var source = process.StandardOutput.BaseStream; var buffer = BufferManager.GetStream(); + bool disposed = false; + process.Disposed += (_, _) => { disposed = true; }; + token.Register(() => + { + if (!disposed) + // ReSharper disable once AccessToDisposedClosure + // Manually Check whether disposed + process.Kill(); + }); try { @@ -260,7 +269,7 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati buffer.Seek(0, SeekOrigin.Begin); token.ThrowIfCancellationRequested(); - + if (!process.StandardError.EndOfStream) { using var standardError = process.StandardError; From d7c037d1562237757f293637731a089bd174bd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BC=98=E9=9F=AC?= Date: Tue, 27 Jul 2021 14:11:48 +0800 Subject: [PATCH 24/32] fix dispose issue by manually dispose --- Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index 59980a611b6..08836b56f7c 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -11,6 +11,7 @@ using System.Windows.Forms; using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Plugin; +using ICSharpCode.SharpZipLib.Zip; using JetBrains.Annotations; using Microsoft.IO; @@ -234,9 +235,11 @@ protected string Execute(ProcessStartInfo startInfo) protected async Task ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token = default) { + Process process = null; + bool disposed = false; try { - using var process = Process.Start(startInfo); + process = Process.Start(startInfo); if (process == null) { Log.Error("|JsonRPCPlugin.ExecuteAsync|Can't start new process"); @@ -246,18 +249,21 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati await using var source = process.StandardOutput.BaseStream; var buffer = BufferManager.GetStream(); - bool disposed = false; - process.Disposed += (_, _) => { disposed = true; }; + token.Register(() => { - if (!disposed) + // ReSharper disable once AccessToDisposedClosure + // ReSharper disable once AccessToModifiedClosure + // Manually Check whether disposed + if (!disposed && !process.HasExited) // ReSharper disable once AccessToDisposedClosure - // Manually Check whether disposed process.Kill(); }); try { + // token expire won't instantly trigger the exception, + // manually kill process at before await source.CopyToAsync(buffer, token); } catch (OperationCanceledException) @@ -269,7 +275,7 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati buffer.Seek(0, SeekOrigin.Begin); token.ThrowIfCancellationRequested(); - + if (!process.StandardError.EndOfStream) { using var standardError = process.StandardError; @@ -294,6 +300,11 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati e); return Stream.Null; } + finally + { + process?.Dispose(); + disposed = true; + } } public async Task> QueryAsync(Query query, CancellationToken token) From bd15aa7ef912f7ded36d4fecd85e25d775e1145b Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 27 Jul 2021 18:55:52 +1000 Subject: [PATCH 25/32] pass query helper object --- .../Search/SearchManager.cs | 9 +++++---- .../Search/WindowsIndex/IndexSearch.cs | 15 ++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index d86007e747b..9995f45d380 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -143,7 +143,7 @@ private async Task> WindowsIndexFileContentSearchAsync(Query query, return await IndexSearch.WindowsIndexSearchAsync( querySearchString, - queryConstructor.CreateQueryHelper, + queryConstructor.CreateQueryHelper(), queryConstructor.QueryForFileContentSearch, Settings.IndexSearchExcludedSubdirectoryPaths, query, @@ -181,7 +181,7 @@ private async Task> WindowsIndexFilesAndFoldersSearchAsync(Query qu return await IndexSearch.WindowsIndexSearchAsync( querySearchString, - queryConstructor.CreateQueryHelper, + queryConstructor.CreateQueryHelper(), queryConstructor.QueryForAllFilesAndFolders, Settings.IndexSearchExcludedSubdirectoryPaths, query, @@ -193,8 +193,9 @@ private async Task> WindowsIndexTopLevelFolderSearchAsync(Query que { var queryConstructor = new QueryConstructor(Settings); - return await IndexSearch.WindowsIndexSearchAsync(path, - queryConstructor.CreateQueryHelper, + return await IndexSearch.WindowsIndexSearchAsync( + path, + queryConstructor.CreateQueryHelper(), queryConstructor.QueryForTopLevelDirectorySearch, Settings.IndexSearchExcludedSubdirectoryPaths, query, diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs index d429894570c..010a19b583a 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs @@ -86,12 +86,13 @@ internal static async Task> ExecuteWindowsIndexSearchAsync(string i return results; } - internal async static Task> WindowsIndexSearchAsync(string searchString, - Func queryHelper, - Func constructQuery, - List exclusionList, - Query query, - CancellationToken token) + internal async static Task> WindowsIndexSearchAsync( + string searchString, + CSearchQueryHelper queryHelper, + Func constructQuery, + List exclusionList, + Query query, + CancellationToken token) { var regexMatch = Regex.Match(searchString, reservedStringPattern); @@ -103,7 +104,7 @@ internal async static Task> WindowsIndexSearchAsync(string searchSt var constructedQuery = constructQuery(searchString); return RemoveResultsInExclusionList( - await ExecuteWindowsIndexSearchAsync(constructedQuery, queryHelper().ConnectionString, query, token).ConfigureAwait(false), + await ExecuteWindowsIndexSearchAsync(constructedQuery, queryHelper.ConnectionString, query, token).ConfigureAwait(false), exclusionList, token); } From 466b825611d5c43866da6b79dcb02369f48d0020 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 27 Jul 2021 19:01:27 +1000 Subject: [PATCH 26/32] fix comment formatting --- Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index 08836b56f7c..22f547a5a75 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -252,18 +252,16 @@ protected async Task ExecuteAsync(ProcessStartInfo startInfo, Cancellati token.Register(() => { - // ReSharper disable once AccessToDisposedClosure // ReSharper disable once AccessToModifiedClosure // Manually Check whether disposed if (!disposed && !process.HasExited) - // ReSharper disable once AccessToDisposedClosure process.Kill(); }); try { // token expire won't instantly trigger the exception, - // manually kill process at before + // manually kill process at before await source.CopyToAsync(buffer, token); } catch (OperationCanceledException) From cfb2ca117186cb0d10f96bcac242ba35c7cc5148 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 27 Jul 2021 20:32:53 +1000 Subject: [PATCH 27/32] fix PluginsManager context menu crashing --- .../Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs | 3 +++ .../Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs | 8 +++++++- Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs index 90ce19db44a..12989a603c1 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs @@ -19,6 +19,9 @@ public List LoadContextMenus(Result selectedResult) { var pluginManifestInfo = selectedResult.ContextData as UserPlugin; + if (pluginManifestInfo == null) + return new List(); + return new List { new Result diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs index 1aa39469b11..995ac0fedfe 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs @@ -269,7 +269,13 @@ await Http.DownloadAsync(x.PluginNewUserPlugin.UrlDownload, downloadToFilePath) } return false; - } + }, + ContextData = + new UserPlugin + { + Website = x.PluginNewUserPlugin.Website, + UrlSourceCode = x.PluginNewUserPlugin.UrlSourceCode + } }); return Search(results, uninstallSearch); diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json b/Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json index 2555466860f..fa916a29d03 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": "1.8.3", + "Version": "1.8.4", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll", From 2155602a9cf9f46977983113e876e335f0e43cc0 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 27 Jul 2021 21:20:37 +1000 Subject: [PATCH 28/32] update per suggestion Co-authored-by: Kevin Zhang <45326534+taooceros@users.noreply.github.com> --- Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs index 12989a603c1..364216778bd 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs @@ -17,9 +17,7 @@ public ContextMenu(PluginInitContext context) public List LoadContextMenus(Result selectedResult) { - var pluginManifestInfo = selectedResult.ContextData as UserPlugin; - - if (pluginManifestInfo == null) + if(selectedResult.ContextData is not UserPlugin pluginManifestInfo) return new List(); return new List From 7f1c735365b3828910aeb9ba41c51a6b6220f8ed Mon Sep 17 00:00:00 2001 From: Jeremy Date: Wed, 28 Jul 2021 08:01:29 +1000 Subject: [PATCH 29/32] set nuget publish on tag only --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 6d989b24e34..f2b2c1308be 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -49,7 +49,7 @@ deploy: api_key: secure: n80IeWR3pN81p0w4uXq4mO0TdTXoJSHHFL+yTB9YBJ0Wni2DjZGYwOFdaWzW4hRi on: - branch: master + APPVEYOR_REPO_TAG: true - provider: GitHub release: v$(flowVersion) From 1fb45981d5445f0029472019835a552cdb0451c5 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Wed, 28 Jul 2021 08:45:10 +1000 Subject: [PATCH 30/32] fix to string --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f2b2c1308be..46ae3bdd471 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -76,7 +76,7 @@ environment: on_success: - ps: | - if ($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG) + if ($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG -eq "true") { iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe .\wingetcreate.exe update Flow-Launcher.Flow-Launcher -s true -u https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$env:flowVersion/Flow-Launcher-v$env:flowVersion.exe -v $env:flowVersion -t $env:winget_token From 98be93c076bd5d0612fa0c9d01e06dce9465af21 Mon Sep 17 00:00:00 2001 From: kubalav Date: Wed, 28 Jul 2021 09:29:53 +0200 Subject: [PATCH 31/32] Add Slovak translation for Explorer plugin --- .../Languages/sk.xaml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml new file mode 100644 index 00000000000..cab8520bca1 --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/sk.xaml @@ -0,0 +1,66 @@ + + + + Najprv vyberte položku + Vyberte odkaz na priečinok + Naozaj chcete odstrániť {0}? + Naozaj chcete natrvalo odstrániť túto položku {0}? + Odstránenie bolo úspešné + Úspešne odstránené {0} + Priradenie globálnej skratky akcie by mohlo počas vyhľadávania poskytnúť príliš veľa výsledkov. Vyberte si konkrétne kľúčové slovo akcie + Zdá sa, že požadovaná služba Windows Index Search nie je spustená + Ak to chcete opraviť, spustite službu Windows Search. Ak chcete odstrániť toto upozornenie, kliknite sem + Upozornenie bolo vypnuté. Chceli by ste ako alternatívu na vyhľadávanie súborov a priečinkov nainštalovať plugin Everything?{0}{0}Ak chcete nainštalovať plugin Everything, zvoľte 'Áno', pre návrat zvoľte 'Nie' + Alternatíva pre Explorer + + + Odstrániť + Upraviť + Pridať + Upraviť skratku akcie + Odkazy Rýchleho prístupu + Vylúčené umiestnenia indexovania + Možnosti indexovania + Vyhľadávanie: + Vyhľadávanie umiestnenia: + Vyhľadávanie obsahu súborov: + Vyhľadávanie v indexe: + Aktuálna skratka: + Hotovo + Povolené + Ak je vypnuté, Flow túto možnosť vyhľadávania nevykoná a následne sa vráti späť na "*", aby sa uvoľnila skratka akcie. + + + Explorer + Vyhľadáva a spravuje súbory a priečinky. Explorer používa indexovanie vyhľadávania vo Windowse + + + Kopírovať cestu + Kopírovať + Odstrániť + Umiestnenie: + Odstrániť vybrané + Spustiť ako iný používateľ + Spustí vybranú položku ako používateľ s iným kontom + Otvoriť umiestnenie priečinka + Otvorí umiestnenie, ktoré obsahuje súbor alebo priečinok + Otvoriť editorom: + Vylúčiť položku a jej podpriečinky z indexu vyhľadávania + Vylúčiť z indexu vyhľadávania + Otvoriť možnosti vyhľadávania vo Windowse + Správa indexovaných súborov a priečinkov + Nepodarilo sa otvoriť možnosti indexu vyhľadávania + Pridať do Rýchleho prístupu + Pridať tento {0} do Rýchleho prístupu + Úspešne pridané + Úspešne pridané do Rýchleho prístupu + Úspešne odstránené + Úspešne odstránené z Rýchleho prístupu + Pridať do Rýchleho prístupu, aby ho bolo možné otvoriť pomocou skratky akcie pluginu Explorer + Odstráni z Rýchleho prístupu + Odstrániť z Rýchleho prístupu + Odstráni {0} z Rýchleho prístupu + + \ No newline at end of file From 41a72fb70577bd71a17be1adbd7a416ca2079251 Mon Sep 17 00:00:00 2001 From: kubalav Date: Wed, 28 Jul 2021 09:31:00 +0200 Subject: [PATCH 32/32] Version bump for Explorer plugin --- Plugins/Flow.Launcher.Plugin.Explorer/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json index 36467428639..59a31ec139c 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json @@ -9,7 +9,7 @@ "Name": "Explorer", "Description": "Search and manage files and folders. Explorer utilises Windows Index Search", "Author": "Jeremy Wu", - "Version": "1.8.1", + "Version": "1.8.2", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll",