mard Posted April 25 Report Share Posted April 25 (edited) vintagestorymodinstall:// is not RFC compliant, and that's a problem! I originally wanted to file this as a bug, because it's kind of a bug, but not quite. Let me explain. vintagestorymodinstall URIs should have a form that would be correct and in compliance with RFC 3986. Valid URIs will greatly help to bring 1-click mod installs on non-Windows systems. For compatibility reasons, a valid schema could be introduced under a different name, and the previous one could be still working but deprecated. Why they are not valid now? Let's take vintagestorymodinstall://modname@1.2.3 as an example. An application that expects this to be an URI will parse it like this (3.) 1. Scheme: vintagestorymodinstall 2. Authority: modname@1.2.3 3. User Information: modname 4. Host: 1.2.3 As you can see, it's not quite accurate. While vintagestorymodinstall is a valid name for a scheme, modname@1.2.3 is not an authority, modname is not user information, 1.2.3 is not a valid host either. In my opinion, the URI should look different so it conveys accurate information about its nature. Why it should be valid? Some applications will rightfully expect that vintagestorymodinstall://modname@1.2.3 is a valid URI. For example, an internet browser in which this URI is clicked, or a shell component that passes it as a parameter to an application. If the URI is wrong, something along the chain might also go wrong. This is exactly what happens on Linux. Consider the following XDG Desktop Entry: [Desktop Entry] MimeType=x-scheme-handler/vintagestorymodinstall Exec=vintagestory -i %u (...) According to the XDG desktop entry specification, there is no way to pass a parameter to the application if it's not a valid URI or file. When xdg-open vintagestorymodinstall://modname@1.2.3 is run on my KDE Deskop, 1.2.3 subcomponent is actually parsed as a host and turns it into a valid IP number, 1.2.0.3. So I guess it's only coincidental that those URIs work correctly on Windows, somehow. My suggestion for an alternative Consider this URI, which, to my eye, looks valid: vintagestorymodinstallv2:modname/1.2.3 There are two major differences here: We get rid of //, turning it into a mailto: style URI. This is an information for the parser that authority is not present (3.3.), and everything that happens after the colon is a path. The path, modname/1.2.3, actually "contains data in hierarchical form", which is compliant with section 3.3. If Vintage Story will be able to parse vintagestorymodinstallv2:modname/1.2.3 correctly, getting it working on Linux will require writing just a small XDG desktop entry. Otherwise, I don't know how to do achieve the same result as on Windows, without using standardized tools that are non-native to standard Linux desktop environments. That's all. I'd love to hear your opinion, especially if you're a Linux user. Edited April 30 by mard 5 Link to comment Share on other sites More sharing options...
Recommended Posts