Skip to content

Commit 71e4793

Browse files
authored
Update docs and examples (#505)
1 parent 2882727 commit 71e4793

File tree

16 files changed

+136
-38
lines changed

16 files changed

+136
-38
lines changed

.github/ISSUE_TEMPLATE/Bug_Report.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,10 @@ body:
4343
attributes:
4444
label: Environment
4545
placeholder: |
46-
[wingetcreate --help]
46+
[wingetcreate info]
4747
Windows Package Manager Manifest Creator version
48-
49-
[winget --info]
50-
Windows Package Manager version
48+
Operating System: Windows.Desktop version
5149
System Architecture: CPU architecture
52-
Windows: Windows.Desktop version
53-
Package: Microsoft.DesktopAppInstaller version
5450
5551
Any other software?
5652
render: shell

NOTICE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,28 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
521521
SOFTWARE.
522522

523523

524+
---------------------------------------------------------
525+
526+
---------------------------------------------------------
527+
528+
Microsoft.WindowsPackageManager.Utils 1.7.2 - MIT
529+
530+
531+
(c) Microsoft Corporation
532+
CopyrightUrl ShortDescription
533+
Copyright (c) Microsoft Corporation
534+
Copyright PackageUrl ShortDescription CopyrightUrl
535+
536+
MIT License
537+
538+
Copyright (c) <year> <copyright holders>
539+
540+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
541+
542+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
543+
544+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
545+
524546
---------------------------------------------------------
525547

526548
---------------------------------------------------------

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ You can use WingetCreate to update your existing app manifest as part of your CI
6868
- [PowerToys](https://github.com/microsoft/PowerToys/blob/main/.github/workflows/package-submissions.yml)
6969
- [Terminal](https://github.com/microsoft/terminal/blob/main/.github/workflows/winget.yml)
7070

71+
You can also check out this [episode of Open at Microsoft](https://learn.microsoft.com/en-us/shows/open-at-microsoft/wingetcreate-keeping-winget-packages-up-to-date) where we cover the same topic.
7172

7273
### Using the standalone exe:
7374

@@ -89,7 +90,8 @@ Or you can utilize a PowerShell task and run the following script.
8990
.\dotnet-install.ps1 -Runtime dotnet -Architecture x64 -Version 6.0.13 -InstallDir $env:ProgramFiles\dotnet
9091
```
9192

92-
> **Note**: Make sure your build machine has the [Microsoft Visual C++ Redistributable for Visual Studio](https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0) already installed. Without this, the standalone WingetCreate exe will fail to execute and likely show a "DllNotFoundException" error.
93+
> [!IMPORTANT]
94+
> Make sure your build machine has the [Microsoft Visual C++ Redistributable for Visual Studio](https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0) already installed. Without this, the standalone WingetCreate exe will fail to execute and likely show a "DllNotFoundException" error.
9395
9496
To execute the standalone exe, add another PowerShell task to download and run the ./wingetcreate.exe to update your existing manifest. You will need a GitHub personal access token if you would like to submit your updated manifest. It is not recommended to hardcode your PAT in your script as this poses as a security threat. You should instead store your PAT as a [secret pipeline variable](https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables) or a [repository secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) in case of GitHub Actions.
9597

@@ -102,7 +104,8 @@ To execute the standalone exe, add another PowerShell task to download and run t
102104

103105
Windows Server 2022 now supports App Execution Aliases, which means the alias `wingetcreate` can be used to run the tool after installing the msixbundle. The latest version of the msixbundle can be found at https://aka.ms/wingetcreate/latest/msixbundle. Similar to the standalone exe steps, download the msixbundle, add the package, and run `wingetcreate` to update your manifest.
104106

105-
> **Note**: Winget-Create has a dependency on the [C++ Runtime Desktop framework package](https://docs.microsoft.com/en-us/troubleshoot/developer/visualstudio/cpp/libraries/c-runtime-packages-desktop-bridge). Be sure to also download and install this package prior to installing wingetcreate as shown in the steps below.
107+
> [!IMPORTANT]
108+
> Winget-Create has a dependency on the [C++ Runtime Desktop framework package](https://docs.microsoft.com/en-us/troubleshoot/developer/visualstudio/cpp/libraries/c-runtime-packages-desktop-bridge). Be sure to also download and install this package prior to installing wingetcreate as shown in the steps below.
106109
107110
```yaml
108111
- powershell: |
@@ -136,10 +139,14 @@ You can install the prerequisites in one of two ways:
136139
137140
#### Using the configuration file
138141
139-
1. Clone the repository.
140-
2. Configure the system using the [configuration file](.configurations/configuration.dsc.yaml). This can be applied by either:
141-
- [Dev Home](https://github.com/microsoft/devhome)'s machine configuration tool
142-
- [WinGet configuration](https://learn.microsoft.com/windows/package-manager/configuration/). If you have the [experimental feature](https://aka.ms/winget-settings#configuration) enabled, run `winget configure -f .configurations/configuration.dsc.yaml` from an elevated shell.
142+
1. Clone the repository
143+
2. Configure your system
144+
* Please use the [configuration file](.configurations/configuration.dsc.yaml). This can be applied by either:
145+
* [Dev Home](https://github.com/microsoft/devhome)'s machine configuration tool
146+
* WinGet configuration. If you have WinGet version [v1.6.2631 or later](https://github.com/microsoft/winget-cli/releases), run `winget configure .configurations/configuration.dsc.yaml` in an elevated shell from the project root so relative paths resolve correctly
147+
* Alternatively, if you already are running the minimum OS version, have Visual Studio installed, and have developer mode enabled, you may configure your Visual Studio directly via the .vsconfig file. To do this:
148+
* Open the Visual Studio Installer, select “More” on your product card and then "Import configuration"
149+
* Specify the .vsconfig file at the root of the repo and select “Review Details”
143150

144151
#### Manual set up
145152

@@ -176,7 +183,8 @@ Running unit and E2E tests are a great way to ensure that functionality is prese
176183
* Set the solution wide runsettings file for the tests
177184
* Go to `Test` menu > `Configure Run Settings` -> `Select Solution Wide runsettings File` -> Choose your configured runsettings file
178185

179-
> **Warning**: You should treat your access token like a password. To avoid exposing your PAT, be sure to reset changes to the `WingetCreateTests/Test.runsettings` file before committing your changes. You can also use the command `git update-index --skip-worktree src/WingetCreateTests/WingetCreateTests/Test.runsettings` command to untrack changes to the file and prevent it from being committed.
186+
> [!CAUTION]
187+
> You should treat your access token like a password. To avoid exposing your PAT, be sure to reset changes to the `WingetCreateTests/Test.runsettings` file before committing your changes. You can also use the command `git update-index --skip-worktree src/WingetCreateTests/WingetCreateTests/Test.runsettings` command to untrack changes to the file and prevent it from being committed.
180188

181189
## Contributing
182190

@@ -212,3 +220,5 @@ You can also opt-out of telemetry by configuring the `settings.json` file and se
212220
See the [privacy statement](/PRIVACY.md) for more details.
213221

214222
## Known Issues
223+
224+
Certain functionalities of wingetcreate, particularly input prompting, may not be fully supported on certain shells such as PowerShell ISE. The supported shells for the prompting package utilized by wingetcreate are specified [here](https://github.com/shibayan/Sharprompt#supported-platforms)

doc/cache.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ The following arguments are available:
1515
| **-c, --clean** | Deletes all downloaded installers in the cache folder |
1616
| **-l, --list** | Lists out all the downloaded installers stored in cache |
1717
| **-o, --open** | Opens the cache folder storing the downloaded installers |
18+
| **-?, --help** | Gets additional help on this command. |

doc/help.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@ The **help** command of the [Winget-Create](../README.md) tool displays help for
66

77
* Display help for all commands: `wingetcreate.exe -?`
88
* View options for a command: `wingetcreate.exe <command> -?`
9-
10-

doc/new.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# new command (Winget-Create)
2-
3-
The **new** command of the [Winget-Create](../README.md) tool begins the process of generating a manifest file. This command is used if you need to create a [manifest file](https://docs.microsoft.com/windows/package-manager/package/manifest) for submitting software to the **Microsoft Community Package Manifest Repository** on GitHub.
2+
3+
The **new** command of the [Winget-Create](../README.md) tool begins the process of generating a manifest file. This command is used if you need to create a [manifest file](https://docs.microsoft.com/windows/package-manager/package/manifest) for submitting software to the **Microsoft Community Package Manifest Repository** on GitHub.
44

55
## Usage
66

77
`wingetcreate.exe new [<urls>] [\<options>]`
88

9-
The **new** command can be called with the optional URL(s). **Winget-Create** will download each provided installer as it begins. If the URL is not included, the user will need to add it when prompted.
9+
The **new** command can be called with the optional URL(s). **Winget-Create** will download each provided installer as it begins. If the URL is not included, the user will need to add it when prompted.
1010

1111
### Multiple URLs in command line:
1212

@@ -32,9 +32,9 @@ The following arguments are available:
3232

3333
## Winget-Create New Command flow
3434

35-
### Downloading the installer
35+
### Downloading the installer
3636

37-
The first action **Winget-Create** will take is to download the installer. **Winget-Create** will attempt to access the meta data associated with the installer. If the metadata is discovered, it will pre-populate the default strings.
37+
The first action **Winget-Create** will take is to download the installer. **Winget-Create** will attempt to access the meta data associated with the installer. If the metadata is discovered, it will pre-populate the default strings.
3838
As can be seen in this image, the Windows SDK was used as the URL and the PackageIdentifier is pre-populated.
3939

4040
![new command](./images/create-new.png)
@@ -45,26 +45,27 @@ By typing **ENTER** you will accept the string, and the wizard will move on.
4545

4646
![new command PackageIdentifier](./images/create-packageidentifier.png)
4747

48-
### Remaining required fields
48+
### Remaining required fields
4949

5050
Like the **PackageIdentifier** you will have the opportunity to accept or modify the remaining fields.
5151

5252
![new command default values](./images/create-defaults.png)
5353

5454
### Review Changes
55-
Once you have successfully filled in the details, fields, **Winget-Create** will display the results for you to review.
55+
Once you have successfully filled in the details, fields, **Winget-Create** will display the results for you to review.
5656

5757
![new command review](./images/create-review.png)
5858

59-
If you would like to make changes, **Winget-Create** will walk you through the fields again allowing you to change them.
59+
If you would like to make changes, **Winget-Create** will walk you through the fields again allowing you to change them.
6060

6161
If you are content with the changes, choose **no** and the manifest will be saved.
6262

63-
### Submit
63+
### Submit
6464

65-
The last option **Winget-Create** will offer is for you to submit the manifest to the [Windows Package Manager repository](https://github.com/microsoft/winget-pkgs).
65+
The last option **Winget-Create** will offer is for you to submit the manifest to the [Windows Package Manager repository](https://github.com/microsoft/winget-pkgs).
6666
If you choose yes, you will automatically submit your Pull Request (PR) to the [Windows Package Manager repository](https://github.com/microsoft/winget-pkgs).
6767

6868
If you have provided your [GitHub token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) on the command line, you can skip the login process. Instructions on setting up GitHub Token for Winget-Create can be found [here](../README.md#github-personal-access-token-classic-permissions).
6969

70-
> **Note**: If you have not logged on to GitHub, you will be taken to the GitHub authentication web page before allowing you to submit your manifest.
70+
> [!NOTE]
71+
> If you have not logged on to GitHub, you will be taken to the GitHub authentication web page before allowing you to submit your manifest.

doc/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The `intervalInDays` setting specifies how often Winget-Create will remove tempo
4545

4646
## WindowsPackageManagerRepository
4747

48-
The `WindowsPackageManagerRepository` setting specifies which repository Winget-Create targets. By default, this setting targets the main [`microsoft/winget-pkgs`](https://github.com/microsoft/winget-pkgs) repository but can be changed to target a forked copy of the main repository like a [test](https://github.com/microsoft/winget-pkgs-submission-test) or private production repository.
48+
The `WindowsPackageManagerRepository` setting specifies which repository Winget-Create targets. By default, this setting targets the main [`microsoft/winget-pkgs`](https://github.com/microsoft/winget-pkgs) repository but can be changed to target a forked copy of the main repository like a [test](https://github.com/microsoft/winget-pkgs-submission-test) or private production repository.
4949

5050
### Owner
5151
The `owner` setting specifies who owns the targeted GitHub repository. By default, this is set to `microsoft`.

doc/show.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ The following arguments are available:
2828
| **-l, --locale-manifests** | Switch to display all locale manifests.
2929
| **--version-manifest** | Switch to display the version manifest.
3030
| **-t, --token** | GitHub personal access token used for authenticated access to the GitHub API. It is recommended to provide a token to get a higher [API rate limit](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).
31+
| **-?, --help** | Gets additional help on this command. |
3132

3233
Instructions on setting up GitHub Token for Winget-Create can be found [here](../README.md#github-personal-access-token-classic-permissions).

doc/submit.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The following arguments are available:
1818
| **-p, --prtitle** | The title of the pull request submitted to GitHub.
1919
| **-r, --replace** | Boolean value for replacing an existing manifest from the Windows Package Manager repo. Optionally provide a version or else the latest version will be replaced. Default is false.
2020
| **-t, --token** | GitHub personal access token used for direct submission to the Windows Package Manager repo. If no token is provided, tool will prompt for GitHub login credentials.
21+
| **-?, --help** | Gets additional help on this command. |
2122

2223
If you have provided your [GitHub token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) on the command line with the **submit** command and the device is registered with GitHub, **Winget-Create** will submit your PR to [Windows Package Manager repo](https://docs.microsoft.com/windows/package-manager/).
2324

doc/token.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# token command (Winget-Create)
22

3-
The **token** command of the [Winget-Create](../README.md) tool is designed to manage cached GitHub personal access tokens used by the tool for interacting with the [Windows Package Manager repo](https://docs.microsoft.com/windows/package-manager/) automatically.
3+
The **token** command of the [Winget-Create](../README.md) tool is designed to manage cached GitHub personal access tokens used by the tool for interacting with the [Windows Package Manager repo](https://docs.microsoft.com/windows/package-manager/) automatically.
44
To use the **token** command, you can specify whether you want to store a new [GitHub token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) or clear any existing cached tokens. If you choose not to provide a token when storing, the tool will initiate an OAuth flow and prompt for your GitHub login credentials.
55

66
Instructions on setting up GitHub Token for Winget-Create can be found [here](../README.md#github-personal-access-token-classic-permissions).
@@ -9,6 +9,14 @@ Instructions on setting up GitHub Token for Winget-Create can be found [here](..
99

1010
`wingetcreate.exe token [\<options>]`
1111

12+
### Store a new GitHub token in your local cache
13+
14+
`wingetcreate.exe token --store --token <GitHubPersonalAccessToken>`
15+
16+
### Clear the cached GitHub token
17+
18+
`wingetcreate.exe token --clear`
19+
1220
## Arguments
1321

1422
The following arguments are available:
@@ -17,4 +25,5 @@ The following arguments are available:
1725
|---------------- |-------------|
1826
| **-c, --clear** | Required. Clear the cached GitHub token
1927
| **-s, --store** | Required. Set the cached GitHub token. Can specify token to cache with --token parameter, otherwise will initiate OAuth flow.
20-
| **-t, --token** | GitHub personal access token used for direct submission to the Windows Package Manager repo. If no token is provided, tool will prompt for GitHub login credentials.
28+
| **-t, --token** | GitHub personal access token used for direct submission to the Windows Package Manager repo. If no token is provided, tool will prompt for GitHub login credentials.
29+
| **-?, --help** | Gets additional help on this command. |

0 commit comments

Comments
 (0)