Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #31, small script adjustments for better maintainability #32

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 56 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion installer_local.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions release.ps1
Original file line number Diff line number Diff line change
@@ -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
Expand Down