-
Notifications
You must be signed in to change notification settings - Fork 7
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
DIP17: Move images
into the plugin repo
#45
Conversation
Is the plan to have plugin images held within If the former, I'd like to recommend that As far as I can tell, the system was designed this way to allow developers to simply copy-paste the generated release folder into their local As an example, the following stanza will become impossible under the proposed solution:
While the validity of using such a stanza can certainly be questioned, it still structures things appropriately in the final output in such a way that DalamudPackager is happy with and would have produced a valid (and image-loaded) artifact. |
Seems like a reasonable change, can you propose a change to the DIP text to explain what the behaviour would be? |
I do not think I get Kaz's suggestion, you are no longer PRing the output of DalamudPackager, so why would it matter if images are copied over or not?
Isn't it the latter? Well, not exactly, as it will be relative to the base repository: cf proposed change. |
In response to @philpax, I'd propose something along the lines of the following for the template file.
Additional documentation reflecting the following point should also be added.
I would lastly propose the following additional constraints:
I will note (in response to @Aireil) that currently image loading behavior seems completely undefined. From a read of the DIP (especially now that
If this is indeed the desired outcome, I believe it additionally makes sense to officially define that the icon and marketing images for plugins be downloaded from the If this is actually implemented, we circle back to Aireil's second point: we're already going to be copying the images from the source repository. We can either allow the user to define a fixed path for where these images will live, or default to reading from the |
OK I get it now, I misunderstood what you suggested. Suggestion itself sounds good. |
I think the change is reasonable. I' not sure about @KazWolfe proposed additional change to use the packagers output as a fallback. Flexibility adds complexity and in case of D17 developers already have to modify their projects, thus its also a good chance for unifying the approach of how things are done. This will also make things easier in the long run. How about only allowing one specific way of setting the images? |
I will admit freely that part of my own reasoning for requesting the change to continue using Packager is because I have a bit of an unusual configuration in XIVDeck. Due to requirements with Stream Deck plugin packaging, I opted to place my icon file as Updating this process is a moderate pain, and I'd rather not have to redo my assets structure, my Dalamud plugin configuration, and my Stream Deck packaging unless absolutely necessary. Any such solution would just involve creating duplicate versions of images (not great), doing a lot more file moves and renames at build time (also not great), or having assets spread all over my project tree and then moved (also also not great). There's already enough complexity dealing with one system wanting assets in a specific place and structure; having to comply with two systems that need things structured a certain way will be extra (and unnecessary) pain. If we have to have a single specific way, my vote is still in favor of sticking with existing DalamudPackager compatibility. A lot of plugins are already set up for it, it allows devs that need more complex processes at build times to do what they need, and I don't really think it adds that much extra pain. The builder is already copying |
I can live with DalamudPackager being the source of truth for the images, as its already part of the build process. This would also add all the flexibility one might need, including the post processing of images inside the build (like creating different sized images from an source image). |
Another option comes to mind as well: allow developers to specify individual files rather than just a folder. This reduces build complexity by no longer requiring any changes to be made to the # A path to the icon, relative to the repository root.
icon_path = "/assets/images/[email protected]"
# Optional: Allows specifying screenshots or other marketing images to be included in the
# plugin listing. If not included, marketing images will not be used for this plugin.
marketing_images = [
"/assets/images/marketing/hero.png",
"/assets/images/marketing/screenshot1.png",
"/assets/images/marketing/screenshot2.png"
] All of the above may also actually be served better as values inside the proposed If modifying DalamudPackager is in scope, DalamudPackager can read from <ProjectExtensions>
<DalamudPlugin>
...
<Name>My Awesome Plugin</Name>
<Punchline>It's a plugin. And it's awesome.</Punchline>
<Description>This plugin is super ultra cool and awesome and it has like a million lasers and it drives a super fast car and everyone likes it and it's awesome and stuff.</Description>
<IconPath>../assets/images/[email protected]</IconPath>
<MarketingImage>../assets/images/marketing/hero.png</MarketingImage>
<MarketingImage>../assets/images/marketing/screenshot1.png</MarketingImage>
<MarketingImage>../assets/images/marketing/screenshot2.png</MarketingImage>
...
</DalamudPlugin>
</ProjectExtensions> |
I'm happy with using <ProjectExtensions>
<DalamudPlugin>
...
<Name>My Awesome Plugin</Name>
<Punchline>It's a plugin. And it's awesome.</Punchline>
<Description>This plugin is super ultra cool and awesome and it has like a million lasers and it drives a super fast car and everyone likes it and it's awesome and stuff.</Description>
<Images>
<Icon>../assets/images/[email protected]</Icon>
<Marketing>../assets/images/marketing/hero.png</Marketing>
<Marketing>../assets/images/marketing/screenshot1.png</Marketing>
<Marketing>../assets/images/marketing/screenshot2.png</Marketing>
</Images>
...
</DalamudPlugin>
</ProjectExtensions> Are there any objections to
edit: this is unlikely to be ready by Monday, but that's fine. We'll encourage the use of this and disable |
I'm fine with @philpax proposal; will add it to Plogon's image handling (aka copy images from packages out) once this PR is merged. |
Okay, I've made the proposed change. Can everyone weigh in, and if there's no objections, we'll merge it in a week's time and start implementing? |
Last call, one day left! |
it is done |
With the current implementation of DIP17, images are currently stored alongside the manifest. I think this doesn't really make sense if we're pulling the repo at a given revision anyway; we might as well pull the images from the repo.
This should make the submission process even more smooth, especially once
SamplePlugin
is updated for it.Might need to add some words to make it explicit that the images are coming from the repo, if it's not obvious enough already.