Skip to content

Commit

Permalink
Show more in Everything
Browse files Browse the repository at this point in the history
Add ARM to winget and scoop
Re-add scoop to releases
Match EPL-2.0
  • Loading branch information
lin-ycv committed Jul 20, 2024
1 parent 07871a3 commit e4d6a00
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 286 deletions.
27 changes: 16 additions & 11 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
<div align="center">

# Everything for PowerToys Run
[![GitHub repo size](https://img.shields.io/github/repo-size/lin-ycv/everythingpowertoys)](#)
[![GitHub release (release name instead of tag name)](https://img.shields.io/github/v/release/lin-ycv/everythingpowertoys)](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)](https://github.com/microsoft/winget-pkgs/tree/master/manifests/l/lin-ycv/EverythingPowerToys)
[![Chocolatey Version](https://img.shields.io/chocolatey/v/everythingpowertoys
)](https://community.chocolatey.org/packages/everythingpowertoys)
[![GitHub all releases](https://img.shields.io/github/downloads/lin-ycv/EverythingPowerToys/total)](https://github.com/lin-ycv/EverythingPowerToys/releases/)
[![GitHub release (latest by date)](https://img.shields.io/github/downloads/lin-ycv/everythingpowertoys/latest/total)](https://github.com/lin-ycv/EverythingPowerToys/releases/latest)
<!--- [![Scoop Version](https://img.shields.io/scoop/v/EverythingPowerToys?bucket=extras&color=orange)](https://scoop.sh/#/apps?q=EverythingPowerToys) -->

[![GitHub repo size](https://img.shields.io/github/repo-size/lin-ycv/everythingpowertoys?style=flat-square)](#)
[![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)<br>
[![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)
[![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)

</div>

This plugin adds Everything search results to PowerToys Run.<br>
This repo is to be used with the [PowerToys repo](https://github.com/microsoft/PowerToys), this will not compile when used standalone, as it's missing references from PowerToys.<br>
Dev instructions are in the wiki.
Dev instructions are in the [wiki](/wiki).

#### Install instructions
There are 4 different methods of installation, chose the one you prefer:
There are 5 different methods of installation, chose the one you prefer:
1) WinGet : `winget install lin-ycv.EverythingPowerToys`
2) Chocolatey : `choco install everythingpowertoys`
3) Self-Extraction Installer (EXE) : [Download from release page](https://github.com/lin-ycv/EverythingPowerToys/releases/latest)
3) Scoop : `scoop bucket add extras | scoop install extras/everything-powertoys`
4) Self-Extraction Installer (EXE) : [Download from release page](https://github.com/lin-ycv/EverythingPowerToys/releases/latest)
5) Manual Installation (ZIP) : [Download from release page](https://github.com/lin-ycv/EverythingPowerToys/releases/latest)

Detailed explanations and instructions are on the [release page](https://github.com/lin-ycv/EverythingPowerToys/releases/latest)
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/packageManagers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ jobs:
$ver = ($response | select-string '"tag_name":').Line.split("`"")[3].Trim('v')
$zip = ($response | Where-Object { $_ -like "*x64.zip`"" } | Select-Object -Last 1).Split("`"")[3]
$zipARM = ($response | Where-Object { $_ -like "*ARM64.zip`"" } | Select-Object -Last 1).Split("`"")[3]
$exe = ($response | Where-Object { $_ -like "*x64.exe`"" } | Select-Object -Last 1).Split("`"")[3]
$exeARM = ($response | Where-Object { $_ -like "*ARM64.exe`"" } | Select-Object -Last 1).Split("`"")[3]
$pattern = '(?s)(?<=<!--HASH-->).*?(?=<!--ENDHASH-->)'
$hash = (($response | select-string '"body"').Line | Select-String -Pattern $pattern | ForEach-Object { $_.Matches.Value.Trim() }).Split("\r\n")
$ziphash = ($hash | select-string "x64-ZIP").Line.Split('|')[1]
$zipARMhash = ($hash | select-string "ARM64-ZIP").Line.Split('|')[1]
$exehash = ($hash | select-string "x64-EXE").Line.Split('|')[1]
$exeARMhash = ($hash | select-string "ARM64-EXE").Line.Split('|')[1]
# chocolatey
echo $ver $zip $ziphash
Expand All @@ -42,24 +46,24 @@ jobs:
# winget
$wingetPackage = "lin-ycv.EverythingPowerToys"
echo $wingetPackage $ver $exe $exehash
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} | Set-Content $_ }
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 # takes too long to get approvaed, impractical to implement
# cd ..
# rm -Path .\* -Recurse -Force
# git clone -b EverythingPowerToys https://github.com/lin-ycv/ScoopExtras.git --depth 1
# cd .\bucket
# rm EverythingPowerToys.json -Force
# Invoke-WebRequest https://github.com/lin-ycv/EverythingPowerToys/raw/scoop/EverythingPowerToys.json -OutFile EverythingPowerToys.json
# (Get-Content EverythingPowerToys.json) | ForEach-Object {$_ -Replace '_VERSION_', $ver} | ForEach-Object {$_ -Replace '_URL_', $zip} | ForEach-Object {$_ -Replace '_CRC_', $ziphash} | Set-Content EverythingPowerToys.json
# git add .
# git commit -m "EverythingPowerToys@$ver: Update"
# git push -f
# gh pr create --base main --head EverythingPowerToys --title "EverythingPowerToys@$ver: Update" --body "- [X] I have read the [Contributing Guide](https://github.com/ScoopInstaller/.github/blob/main/.github/CONTRIBUTING.md).`r`n`r`n/verify"
# scoop
cd ..
rm -Path .\* -Recurse -Force
git clone -b EverythingPowerToys https://github.com/lin-ycv/ScoopExtras.git --depth 1
cd .\ScoopExtras\bucket
rm everything-powertoys.json -Force
Invoke-WebRequest https://github.com/lin-ycv/EverythingPowerToys/raw/scoop/everything-powertoys.json -OutFile everything-powertoys.json
(Get-Content everything-powertoys.json) | ForEach-Object {$_ -Replace '_VERSION_', $ver} | ForEach-Object {$_ -Replace '_URL_', $zip} | ForEach-Object {$_ -Replace '_CRC_', $ziphash} | ForEach-Object {$_ -Replace '_armURL_', $zipARM} | ForEach-Object {$_ -Replace '_armCRC_', $zipARMhash} | Set-Content everything-powertoys.json
git add .
git commit -m "everything-powertoys@$ver: Update"
git push -f
gh pr create --base main --head EverythingPowerToys --title "everything-powertoys@$ver: Update" --body "- [X] I have read the [Contributing Guide](https://github.com/ScoopInstaller/.github/blob/main/.github/CONTRIBUTING.md).`r`n`r`n/verify"
2 changes: 1 addition & 1 deletion Community.PowerToys.Run.Plugin.Everything.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(Platform) == ARM64 (&#xD;&#xA;del /Q &quot;$(TargetDir)Everything64.dll&quot;&#xD;&#xA;copy /y &quot;$(TargetDir)EverythingARM64.dll&quot; &quot;$(TargetDir)Everything64.dll&quot;&#xD;&#xA;)&#xD;&#xA;del /Q &quot;$(TargetDir)EverythingARM64.dll&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)*.pdb&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)PowerToys*.dll&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)Wox*.dll&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)Ijwhost.dll&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)*.xml&quot;&#xD;&#xA;del/ Q &quot;$(TargetDir)backup_restore_settings.json&quot;&#xD;&#xA;del /Q &quot;.\bin\CHECKSUM.txt&quot;&#xD;&#xA;copy /y &quot;.\NSIS\MIT.txt&quot; &quot;$(TargetDir)LICENSE.txt&quot;&#xD;&#xA;powershell Compress-Archive -Path $(TargetDir) -DestinationPath .\bin\EverythingPT-$(Version)-$(Platform).zip -Force&#xD;&#xA;&quot;C:\Program Files (x86)\NSIS\makensis&quot; /Dver=$(Version) /Ddirect=$(TargetDir) /Dplatform=$(Platform) .\NSIS\exeCreator.nsi&#xD;&#xA;certUtil -hashfile .\bin\EverythingPT-$(Version)-$(Platform).zip SHA256 &gt;&gt; .\bin\CHECKSUM.txt&#xD;&#xA;certUtil -hashfile .\bin\EverythingPT-$(Version)-$(Platform).exe SHA256 &gt;&gt; .\bin\CHECKSUM.txt&#xD;&#xA;rd /Q /S &quot;$(TargetDir)&quot;&#xD;&#xA;rd /Q /S &quot;$(ProjectDir)obj&quot;" />
<Exec Command="if $(Platform) == ARM64 (&#xD;&#xA;del /Q &quot;$(TargetDir)Everything64.dll&quot;&#xD;&#xA;copy /y &quot;$(TargetDir)EverythingARM64.dll&quot; &quot;$(TargetDir)Everything64.dll&quot;&#xD;&#xA;)&#xD;&#xA;del /Q &quot;$(TargetDir)EverythingARM64.dll&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)*.pdb&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)PowerToys*.dll&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)Wox*.dll&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)Ijwhost.dll&quot;&#xD;&#xA;del /Q &quot;$(TargetDir)*.xml&quot;&#xD;&#xA;del/ Q &quot;$(TargetDir)backup_restore_settings.json&quot;&#xD;&#xA;del /Q &quot;.\bin\$(Platform)_CHECKSUM.txt&quot;&#xD;&#xA;copy /y &quot;LICENSE&quot; &quot;$(TargetDir)LICENSE.txt&quot;&#xD;&#xA;powershell Compress-Archive -Path $(TargetDir) -DestinationPath .\bin\EverythingPT-$(Version)-$(Platform).zip -Force&#xD;&#xA;&quot;C:\Program Files (x86)\NSIS\makensis&quot; /Dver=$(Version) /Ddirect=$(TargetDir) /Dplatform=$(Platform) .\NSIS\exeCreator.nsi&#xD;&#xA;certUtil -hashfile .\bin\EverythingPT-$(Version)-$(Platform).zip SHA256 &gt;&gt; .\bin\$(Platform)_CHECKSUM.txt&#xD;&#xA;certUtil -hashfile .\bin\EverythingPT-$(Version)-$(Platform).exe SHA256 &gt;&gt; .\bin\$(Platform)_CHECKSUM.txt&#xD;&#xA;rd /Q /S &quot;$(TargetDir)&quot;&#xD;&#xA;rd /Q /S &quot;$(ProjectDir)obj&quot;" />
</Target>

</Project>
2 changes: 1 addition & 1 deletion Everything.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ internal IEnumerable<Result> Query(string query, Settings setting)
if (setting.Log > LogLevel.None)
Debugger.Write($"Results: {resultCount}");

bool showMore = !string.IsNullOrEmpty(exe) && resultCount == setting.Max;
bool showMore = setting.ShowMore && !string.IsNullOrEmpty(exe) && resultCount == setting.Max;
if (showMore)
{
var more = new Result()
Expand Down
Loading

0 comments on commit e4d6a00

Please sign in to comment.