URI Scheme
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 766
- Forks
- 51
- Avg merge
- 16d 14h
- Merged PRs (30d)
- 1
Description
Instead of directing your users to the thcrap download site, you would simply have a custom URL like
thcrap:bootstrap:https://raw.githubusercontent.com/Gamer251/thcrap-gamer251/master/mima/
and clicking that would automatically download a patch and create shortcuts.
This has the advantage of true decentralization: We would no longer need the approval of another node in the network that lists a certain repository. Instead, people can download the patch directly from your site.
The basic code to register such an URI scheme is very simple. You just have to add a bunch of registry keys and make thcrap respond to those parameters. This can be done automatically each time you run thcrap.
This might seem to forgo patch stack configuration entirely in favor of usability, but I can think of two ways to fix that:
One way would simply run thcrap_configure normally, but ensure the given repository to be present in the patch list:
thcrap_configure:https://raw.githubusercontent.com/Gamer251/thcrap-gamer251/
In fact, since all required functionality for this is already present in thcrap_configure, I could add this scheme immediately.
Another way would be to provide multiple pre-configured stacks on your site, which all would be able to be set up with one click:
thcrap:bootstrap:thpatch/lang_en https://raw.githubusercontent.com/Gamer251/thcrap-gamer251/master/mima/
This would automatically add the English patch below the Mima patch.
As you see, you can either give the complete URL to a patch, or its repo/patch ID.
With the repo/patch ID combination, thcrap would of course need a way to actually locate the patch download. For "well-known" repositories like thpatch or nmlgc, this is no problem - these are always included in the distribution. Otherwise, thcrap will do a recursive neighbor search across all the servers it knows - and, what makes this really powerful, also all the servers directly specified as URLs in the link.
This means that repositories simply need to list URLs of all the servers they need as its neighbors (which is best practice anyway), and you're guaranteed to get the right patches.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing thcrap_configure functionality and the linked Windows URI-scheme registration guidance. Trace how a URI would provide a repository or patch ID and how patch stacks are configured. Done means thcrap can register the scheme, accept the proposed parameters, and set up the requested patch or stack.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100