From 82858759f3ef6a7cdb6813f515b205c537cebd3d Mon Sep 17 00:00:00 2001 From: "Lin Yu-Chieh (Victor)" Date: Wed, 18 Dec 2024 11:35:32 +0800 Subject: [PATCH] Fix #140 --- .github/README.md | 14 +++++++------- .github/workflows/packageManagers.yml | 18 +++++++++--------- Everything.cs | 5 +++-- Main.cs | 2 +- plugin.json | 2 +- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/README.md b/.github/README.md index 3d21e54..4cc734a 100644 --- a/.github/README.md +++ b/.github/README.md @@ -6,7 +6,7 @@ [![GitHub release (release name instead of tag name)](https://img.shields.io/github/v/release/lin-ycv/everythingpowertoys?style=flat-square)](https://github.com/lin-ycv/EverythingPowerToys/releases/latest) [![GitHub all releases](https://img.shields.io/github/downloads/lin-ycv/EverythingPowerToys/total?style=flat-square)](https://github.com/lin-ycv/EverythingPowerToys/releases/) [![GitHub release (latest by date)](https://img.shields.io/github/downloads/lin-ycv/everythingpowertoys/latest/total?style=flat-square)](https://github.com/lin-ycv/EverythingPowerToys/releases/latest)
-[![Winget version](https://img.shields.io/badge/dynamic/xml?label=Winget&prefix=v&query=%2F%2Ftr%5B%40id%3D%27winget%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Feverythingpowertoys%2Fversions&color=orange&style=flat-square)](https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/lin-ycv/EverythingPowerToys) +[![Winget (Deprecated)](https://img.shields.io/badge/dynamic/xml?label=Winget%20%28Deprecated%29&prefix=v&query=%2F%2Ftr%5B%40id%3D%27winget%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Feverythingpowertoys%2Fversions&color=orange&style=flat-square)](https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/lin-ycv/EverythingPowerToys) [![Chocolatey version](https://img.shields.io/chocolatey/v/everythingpowertoys?style=flat-square)](https://community.chocolatey.org/packages/everythingpowertoys) [![Scoop version](https://img.shields.io/scoop/v/everything-powertoys?bucket=extras&color=orange&style=flat-square)](https://scoop.sh/#/apps?q=everything-powertoys) @@ -16,12 +16,12 @@ EverythingPowerToys (EPT) is a plugin for the program [PowerToys Run (PTR)](http This adds the ability to search the computer for files and folders using [Everything](https://www.voidtools.com/) inside PTR #### Install instructions -There are 5 different methods of installation, chose the one you prefer: -1) WinGet -2) Chocolatey -3) Scoop -4) Self-Extraction Installer (EXE) -5) Manual Installation (ZIP) +There are 4 different methods of installation, chose the one you prefer: +1) Chocolatey +2) Scoop +3) Self-Extraction Installer (EXE) +4) Manual Installation (ZIP) +5) ~~WinGet~~ (Deprecated) Detailed explanations and instructions are on the [wiki page](https://github.com/lin-ycv/EverythingPowerToys/wiki) diff --git a/.github/workflows/packageManagers.yml b/.github/workflows/packageManagers.yml index f556e5b..79076e3 100644 --- a/.github/workflows/packageManagers.yml +++ b/.github/workflows/packageManagers.yml @@ -45,15 +45,15 @@ jobs: choco push everythingpowertoys.$ver.nupkg --source https://push.chocolatey.org/ # winget - $wingetPackage = "lin-ycv.EverythingPowerToys" - echo $wingetPackage $ver $exe $exehash $exeARM $exeARMhash - rm -Path .\* -Recurse -Force - git clone -b winget https://github.com/lin-ycv/EverythingPowerToys.git --depth 1 - Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe - cd .\EverythingPowerToys - rm .git -Recurse -Force -Confirm:$false - Get-ChildItem *.* -Recurse | ForEach { (Get-Content $_) | ForEach {$_ -Replace '_VERSION_', $ver} | ForEach {$_ -Replace '_URL_', $exe} | ForEach {$_ -Replace '_CRC_', $exehash} | ForEach {$_ -Replace '_armURL_', $exeARM} | ForEach {$_ -Replace '_armCRC_', $exeARMhash} | Set-Content $_ } - ..\wingetcreate submit -p "New version: lin-ycv.EverythingPowerToys version $ver" -t ${{ secrets.EVERYTHINGPT }} . + # $wingetPackage = "lin-ycv.EverythingPowerToys" + # echo $wingetPackage $ver $exe $exehash $exeARM $exeARMhash + # rm -Path .\* -Recurse -Force + # git clone -b winget https://github.com/lin-ycv/EverythingPowerToys.git --depth 1 + # Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe + # cd .\EverythingPowerToys + # rm .git -Recurse -Force -Confirm:$false + # Get-ChildItem *.* -Recurse | ForEach { (Get-Content $_) | ForEach {$_ -Replace '_VERSION_', $ver} | ForEach {$_ -Replace '_URL_', $exe} | ForEach {$_ -Replace '_CRC_', $exehash} | ForEach {$_ -Replace '_armURL_', $exeARM} | ForEach {$_ -Replace '_armCRC_', $exeARMhash} | Set-Content $_ } + # ..\wingetcreate submit -p "New version: lin-ycv.EverythingPowerToys version $ver" -t ${{ secrets.EVERYTHINGPT }} . # scoop # cd .. diff --git a/Everything.cs b/Everything.cs index c2eb316..3929afa 100644 --- a/Everything.cs +++ b/Everything.cs @@ -54,11 +54,11 @@ namespace Community.PowerToys.Run.Plugin.Everything } #endif + string orgqry = query; + if (!string.IsNullOrEmpty(setting.Prefix)) query = setting.Prefix + query; - string orgqry = query; - if (setting.EnvVar && orgqry.Contains('%')) { query = Environment.ExpandEnvironmentVariables(query).Replace(';', '|'); @@ -142,6 +142,7 @@ namespace Community.PowerToys.Run.Plugin.Everything Log.Warn($"Result {i} is null for {name} and/or {path}, query: {query}", GetType()); continue; } + string fullPath = Path.Combine(path, name); #if DEBUG if (setting.Log > LogLevel.None) diff --git a/Main.cs b/Main.cs index de3be28..e0cbc1f 100644 --- a/Main.cs +++ b/Main.cs @@ -38,7 +38,7 @@ namespace Community.PowerToys.Run.Plugin.Everything DisplayLabel = Resources.Sort, DisplayDescription = Resources.Sort_Description, PluginOptionType = PluginAdditionalOption.AdditionalOptionType.Combobox, - ComboBoxItems = Enum.GetValues(typeof(Sort)).Cast().Select(v => new KeyValuePair(((Sort)v).ToString(), v + string.Empty)).ToList(), + ComboBoxItems = Enum.GetValues().Cast().Select(v => new KeyValuePair(((Sort)v).ToString(), v + string.Empty)).ToList(), ComboBoxValue = (int)_setting.Sort, }, new() diff --git a/plugin.json b/plugin.json index 1ccd6c0..95a18c6 100644 --- a/plugin.json +++ b/plugin.json @@ -4,7 +4,7 @@ "IsGlobal": true, "Name": "Everything", "Author": "Yu Chieh (Victor) Lin", - "Version": "0.86.0", + "Version": "0.87.0", "Language": "csharp", "Website": "https://github.com/Lin-ycv/EverythingPowerToys", "ExecuteFileName": "Community.PowerToys.Run.Plugin.Everything.dll",