Added optional OS field for App Manifests #1605
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #1587
However, this patch is incomplete, Itch debug log shows:
I don't know how to stop those error messages. I tried adding an entry to
src/types/index.ts
but it didn't work.I suggest you merge and apply the (hopefully simple) fix.What this patch doesn't do is automatically start if only one option for your OS is available. Itch already launches if only one option in total exists.
I'm not sure how to best implement that, but it's a low priority, because as you said, "if it doesn't [require actions besides "play"], you don't need a manifest at all".
This is what my test manifest looks like. Actions like "Red Alert" actually exist thrice, once for each OS, but only the action for the relevant OS appears. The "manual" action at the bottom does not contain an OS property, it only exists once in the manifest, and should show up everywhere.
Additionally, Itch will warn devs if the OS property contains something invalid.
Also, I have not tested this on MacOS, as I do not own a Mac.
I hope that
cave-commands
is an appropriate branch. I noticed that this is the branch you've been working on, so I figured I would push it there.