/META-INF/MANAFEST.MF Format issue
dwightdurmon opened this issue ยท 2 comments
Background / Overview
So... this is a rather obscure bug and not exactly related to the functionality of the mod itself, but rather the metadata. I am using a custom launcher based off of HeliosLauncher. As part of building the config file for that, it reads the /META-INF/MANAFEST.MF from mods to build out a JSON file. In the SophisticatedBackpacks jar file (specifically sophisticatedbackpacks-1.16.4-2.5.0.271.jar
, the MANIFEST.MF has property(class java.lang.String, provider(?))
listed for the version as shown in the code below. This breaks the JSON parsing and has to be manually corrected in the JSON.
Manifest-Version: 1.0
Specification-Title: sophisticatedbackpacks
Specification-Vendor: p3pp3rf1y
Specification-Version: 1
Implementation-Title: SophisticatedBackpacks
Implementation-Version: property(class java.lang.String, provider(?))
Implementation-Vendor: p3pp3rf1y
Implementation-Timestamp: 2021-06-04T22:11:18+0000
To Reproduce
Steps to reproduce the behavior:
For the launcher, it's somewhat complicated... but basically you:
- Add the mod to the mods directory
- Run Nebula (from HeliosLauncher) to generate the JSON
- See the improper string
Expected behavior
If the Implementation-Version:
string could be fixed to show the proper version (e.g. 1.16.4-2.5.0.271
) instead of the java property string (e.g. property(class java.lang.String, provider(?))
) then that would save me a little bit of work. On the grand scheme of things, this is probably one of the lowest priority tickets ever and can be worked around. In probably 99% of other use cases, the version string is probably not even an issue.
Versions
1.16.4-2.5.0.271
36.1.32
Thanks so much for taking the time to read this!
For anyone else experiencing a similar issue with Nebula and Helios Launcher, you probably already know, but to fix the json, you need to correct this:
"id": "net.p3pp3rf1y:sophisticatedbackpacks:property(class java.lang.String, provider(?))@jar",
to this:
"id": "net.p3pp3rf1y:sophisticatedbackpacks:1.16.4-2.5.0.271@jar",
in your distribution.json file (updating the version as appropriate) so that the client launcher will parse it correctly.
I was fixing an issue in mods.toml just yesterday which this is related to. And just checked the manifest file which seems to have been fixed by it as well.
This is what it looks like now after that fix (just not that the version is missing a final build number which it will get once built on github and -alpha
only applies to in dev version, release version won't have that at the end)
Manifest-Version: 1.0
Implementation-Title: SophisticatedBackpacks
Implementation-Version: 1.16.4-2.5.0.-alpha
Specification-Vendor: p3pp3rf1y
Specification-Title: sophisticatedbackpacks
Implementation-Timestamp: 2021-07-03T11:37:43+0200
Specification-Version: 1
Implementation-Vendor: p3pp3rf1y