-
Notifications
You must be signed in to change notification settings - Fork 22
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
Document plugin manifests #25
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Setting Plugin Metadata | ||
|
||
Writing a plugin is all well and good, but you're also going to want some way to | ||
configure how it appears in the plugin installer: its name, description, icon, | ||
update changelogs, and so on. You do this by writing a _plugin manifest_, which | ||
is a JSON or YAML file named after your plugin's internal name (for example: | ||
`SamplePlugin.yaml`). | ||
|
||
:::info | ||
|
||
When using a YAML manifest, you should replace CamelCase keys with snake_case | ||
(for example, where a JSON manifest would contain `RepoUrl`, a YAML manifest | ||
would contain `repo_url`). | ||
|
||
::: | ||
|
||
## Example | ||
|
||
A very basic YAML manifest might look something like this: | ||
|
||
```yaml | ||
name: Test Plugin | ||
author: You | ||
punchline: Does nothing! # short summary that fits on one line | ||
description: |- # long description, shown when your plugin is clicked on | ||
This is a test plugin - this first line is a summary. | ||
|
||
Down here is a more detailed explanation of what the plugin | ||
does, manually wrapped to make sure it stays visible in the | ||
installer. | ||
repo_url: https://example.com # where can users find your plugin's source code? | ||
``` | ||
|
||
## Available manifest keys | ||
|
||
These keys are required: | ||
|
||
- Name | ||
- Author | ||
- Description | ||
- Punchline | ||
|
||
Optional keys include: | ||
|
||
- ApplicableVersion | ||
- RepoUrl | ||
- Tags | ||
- CategoryTags | ||
- LoadRequiredState | ||
- LoadSync | ||
- CanUnloadAsync | ||
- LoadPriority | ||
- ImageUrls | ||
- IconUrl | ||
- Changelog (see [Changelogs](#changelogs) below for alternatives) | ||
- AcceptsFeedback | ||
- FeedbackMessage | ||
|
||
See [the definition of `IPluginManifest`][] for further information. NB: some | ||
fields mentioned there, like `Dip17Channel`, are set automatically by the | ||
various plumbing that gets your plugins from GitHub to people's computers, and | ||
you should not include them in your manifest explicitly. (For a list of the keys | ||
you're allowed to set, see [the relevant part of DalamudPackager][].) | ||
|
||
Note that the following keys are also required for Dalamud to load a plugin, but | ||
if you're using [DalamudPackager][], it will automatically fill them in for you, | ||
so **you can and should ignore these**: | ||
|
||
- AssemblyVersion | ||
- InternalName | ||
- DalamudApiLevel | ||
|
||
## Changelogs | ||
|
||
You can set a plugin changelog in three separate ways: | ||
|
||
1. Include a `changelog` field in your `manifest.toml`, in the | ||
[DalamudPlugins17][] repository | ||
2. Write text in your Pull Request description | ||
3. Include the `Changelog` key in your plugin manifest | ||
|
||
These will be checked in order, and the first available changelog will be used. | ||
|
||
:::warning | ||
|
||
If you'd like your changelog to be visible in the plugin installer, you must | ||
include it in `manifest.toml` or your plugin manifest, not the PR description. | ||
|
||
::: | ||
|
||
### Discord webhook | ||
|
||
Plugin updates are usually automatically posted in the XIVLauncher & Dalamud | ||
Discord server. If you'd rather write an announcement message yourself, you can | ||
prevent the automatic post by starting your Pull Request description with the | ||
word `nofranz`. Note that any changelog you write in `manifest.toml` or the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's fine to remove this if we fix the behavior I mentioned above, to avoid confusion. The selected changelog at time of check-in should be what's displayed everywhere, and nothing if there is none. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather document the current state of things, rather than confuse the situation more by describing the way it should work in an ideal world. |
||
plugin manifest will still be visible to users via the plugin installer. | ||
|
||
[DalamudPackager]: https://github.com/goatcorp/DalamudPackager | ||
[the relevant part of DalamudPackager]: | ||
https://github.com/goatcorp/DalamudPackager/blob/084f66e6af7edbf8a45820590ca71765376b901c/DalamudPackager/DalamudPackager.cs#L303 | ||
[the definition of `IPluginManifest`]: | ||
https://github.com/goatcorp/Dalamud/blob/532781308d6291a2c0117e0e73a8252358e2d91a/Dalamud/Plugin/Internal/Types/Manifest/IPluginManifest.cs#L9 | ||
[DalamudPlugins17]: https://github.com/goatcorp/DalamudPluginsD17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't accurate, changelogs in PR descriptions will also show up in the installer. At the very least they will be in the changelogs tab, if they're not in the installed plugins menu, that would be a bug - should be a simple backend change though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out the situation is more complex than either of us thought.
Take Daily Duty v4.0.6.1 (goatcorp/DalamudPluginsD17#2930) as an example. There's no changelog in manifest.toml or in the plugin manifest, but there is a PR description, and it does not contain
nofranz
.Changelog
"_Dip17Channel": "testing-live"
, and it seems like DalamudChangelogManager uses that to figure out which changelogs to pull https://github.com/goatcorp/Dalamud/blob/22d27fbb192d2d9b746853cfe376b01c1ebb6492/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogManager.cs#L56-L59