diff --git a/README.md b/README.md index 8fd5a50..d84c4cb 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,56 @@ -# Winget Plugin for PowerToys Run - -This is a plugin for [PowerToys Run](https://github.com/microsoft/PowerToys/wiki/PowerToys-Run-Overview) that allows you to search and install packages from the [Winget](https://github.com/microsoft/winget-cli) package manager. - -![image](https://user-images.githubusercontent.com/7342321/225170051-a6b4bb62-caac-4b12-b9b1-b71681d39954.png) - -## Features - -- Search for packages from the Winget repository -- Install packages directly from PowerToys Run -- View package details and version information - -## Installation - -Use the installation script `release.ps1`: - -```powershell -.\release.ps1 -``` - -Then restart PowerToys - -**Or manually:** - -1. Download the latest release of the Winget Plugin from the [releases page](https://github.com/bostrot/PowerToysRunPluginWinget/releases). -2. Extract the zip file's contents to your PowerToys modules directory (usually `%LOCALAPPDATA%\Microsoft\PowerToys\RunPlugins`). -3. Restart PowerToys. - -## Usage - -1. Open PowerToys Run (default shortcut is `Alt+Space`). -2. Type `winget` followed by your search query. -3. Select a package from the search results and press `Enter` to install it. - -## Build - -1. Clone the [PowerToys repo](https://github.com/microsoft/PowerToys). -2. cd into the `PowerToys` directory. -3. Initialize the submodules: `git submodule update --init --recursive` -4. Clone this repo into the `PowerToys/src/modules/launcher/Plugins` directory. (`git clone https://github.com/bostrot/PowerToysRunPluginWinget PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.Winget`) -5. Open the `PowerToys.sln` solution in Visual Studio. -6. Add this project to the `PowerToys.sln` solution. (Right-click on the `PowerToys` solution in the Solution Explorer (under the path PowerToys/src/modules/launcher/Plugins) and select `Add > Existing Project...` and select the `Community.PowerToys.Run.Plugin.Winget.csproj` file.) -7. Build the solution. -8. Run the `PowerToys` project. - -## Contributing - -Contributions are welcome! Please see our [contributing guidelines](CONTRIBUTING.md) for more information. - -## License - -This project is licensed under the [MIT License](LICENSE). - -## Create your own PowerToys Run Plugin - -I wrote an article about that in my blog which might help you to get started: [How to create a PowerToys Run plugin](https://senpai.club/how-to-create-a-powertoys-run-plugin/index.html) +# Winget Plugin for PowerToys Run + +This is a plugin for [PowerToys Run](https://github.com/microsoft/PowerToys/wiki/PowerToys-Run-Overview) that allows you to search and install packages from the [Winget](https://github.com/microsoft/winget-cli) package manager. + +![image](https://user-images.githubusercontent.com/7342321/225170051-a6b4bb62-caac-4b12-b9b1-b71681d39954.png) + +## Features + +- Search for packages from the Winget repository +- Install packages directly from PowerToys Run +- View package details and version information + +## Installation + +Use the installation script `release.ps1`: + +```powershell +.\installer.ps1 +``` + +Then restart PowerToys + +**Or manually:** + +1. Download the latest release of the Winget Plugin from the [releases page](https://github.com/bostrot/PowerToysRunPluginWinget/releases). +2. Extract the zip file's contents to your PowerToys modules directory (usually `%LOCALAPPDATA%\Microsoft\PowerToys\RunPlugins`). +3. Restart PowerToys. + +## Usage + +1. Open PowerToys Run (default shortcut is `Alt+Space`). +2. Type `winget` followed by your search query. +3. Select a package from the search results and press `Enter` to install it. + +## Build + +1. Clone the [PowerToys repo](https://github.com/microsoft/PowerToys). +2. cd into the `PowerToys` directory. +3. Initialize the submodules: `git submodule update --init --recursive` +4. Clone this repo into the `PowerToys/src/modules/launcher/Plugins` directory. (`git clone https://github.com/bostrot/PowerToysRunPluginWinget PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.Winget`) +5. Open the `PowerToys.sln` solution in Visual Studio. +6. Add this project to the `PowerToys.sln` solution. (Right-click on the `PowerToys` solution in the Solution Explorer (under the path PowerToys/src/modules/launcher/Plugins) and select `Add > Existing Project...` and select the `Community.PowerToys.Run.Plugin.Winget.csproj` file.) +7. Build the solution. +8. Run the `PowerToys` project. + +## Contributing + +Contributions are welcome! Please see our [contributing guidelines](CONTRIBUTING.md) for more information. + +## License + +This project is licensed under the [MIT License](LICENSE). + +## Create your own PowerToys Run Plugin + +I wrote an article about that in my blog which might help you to get started: [How to create a PowerToys Run plugin](https://senpai.club/how-to-create-a-powertoys-run-plugin/index.html) diff --git a/installer_local.ps1 b/installer_local.ps1 index a11cebd..b332387 100644 --- a/installer_local.ps1 +++ b/installer_local.ps1 @@ -3,7 +3,7 @@ $version = "1.3.0" -$release = "C:\Users\erict\Downloads\winget-powertoys-$version.zip" +$release = "$env:USERPROFILE\Downloads\winget-powertoys-$version.zip" $installLocation = "$env:LOCALAPPDATA\PowerToys\RunPlugins\Winget" # Unzip latest release diff --git a/release.ps1 b/release.ps1 index dbfc1a4..d73140a 100644 --- a/release.ps1 +++ b/release.ps1 @@ -1,8 +1,11 @@ # Script for copying the release files and creating the release zip file # C:\Users\erict\PowerToys-dev\x64\Release\RunPlugins\Winget $version = "1.3.0" -$release = "C:\Users\erict\Downloads\winget-powertoys-$version.zip" -$zip = "C:\Program Files\7-Zip\7z.exe" +$release = "$env:USERPROFILE\Downloads\winget-powertoys-$version.zip" +$zip = "$env:ProgramFiles\7-Zip\7z.exe" +if (-not (Test-Path $zip)) { + winget install 7zip.7zip -h --disable-interactivity --accept-source-agreements --accept-package-agreements +} $path = "D:\erict\PowerToys-dev\x64\Release\RunPlugins\Winget" # pack the files from path and excluding