tractordev / wanix

Experimental, local-first, web-native, Unix-like development environment
https://wanix.sh
MIT License
205 stars 11 forks source link

Look into winget for CLI wanix #140

Closed taramk closed 2 months ago

taramk commented 3 months ago

Find out where the docs are to set that up and create an outline of what's necessary to set it up

Parzival-3141 commented 2 months ago

Winget Package Submission: CliffsNotes edition

winget uses a repository of manifest files to query package information. There's two repositories which are pertinent to submission:

Manifests submitted to the GitHub repository are automatically validated and, if accepted, pushed to the public-facing catalog.

Create package manifest

Manifests are written in YAML. Microsoft supplies some tools to help create manifests (winget-create and YAMLCreate), but you can always create one by hand.

If your package contains one installer and locale, only one YAML file is necessary. Otherwise multiple must be used. Here's the minimum number of files for the latter case:

And here are the currently supported installer types:

See the documentation for more details.

Submit manifest

After creating your manifest, you can submit it by creating a pull-request on the winget-pkgs repository. A GitHub workflow will automatically validate the manifest and ensure it complies with their policies. You should validate your package locally before submission.

It seems that the submission process should be relatively quick, as validated manifests are merged automatically. The publishing pipeline runs as long as there are new valid manifests to publish. From start to finish, it shouldn't take more than a few hours.

1. Validate locally

Manifests must adhere to Microsoft's policies. For example:

The winget cli provides a tool for validating manifests locally:

winget validate <path-to-manifests>

If your manifest is deemed valid, move on to the next step.

Optionally, you can also test your manifest in the Windows Sandbox.

2. Add manifest to local repository

Fork and clone the winget-pkgs repository.

You must add your manifest files to the repository in the following folder structure:

manifests / letter / publisher / application / version

The PackageIdentifier and the PackageVersion values in the manifest must match the publisher, application names and version in the manifest folder path. For more information, see Create package manifest.

3. Create pull request

Commit and push your changes, then create a PR on winget-pkgs repository. Once the automated validation process has completed, your package will be manually reviewed by a moderator. If accepted, it will then be added to the public-facing winget catalog.

The GitHub bot will add labels to your PR to communicate progress. You'll be notified if there are errors during the validation process, and the labels and bot will help you fix your submission. Here's the list of common errors.

progrium commented 2 months ago

Presumably if installer type is exe it can just be an executable?

Parzival-3141 commented 2 months ago

It seems so. The only requirement seems to be options for silent installs, i.e. bypassing the GUI wizard

progrium commented 2 months ago

But is the exe expected to be an installer or can it be the executable that's installed? How do we get a wanix binary put somewhere it can be called (PATH or whatever)? Can you see what some other simple CLI utilities are doing?