MantisBT - Zandronum
View Issue Details
0004015Zandronum[All Projects] Suggestionpublic2022-07-03 14:022024-04-11 15:07
duke 
 
normalfeatureN/A
resolvedfixed 
MicrosoftWindowsXP/Vista/7
3.1 
3.23.2 
0004015: [installer] Associate zan:// links with Doomseeker
I would like to propose a feature (patch included) for the Zandronum installer: The installer would offer an option to associate links that start with "zan://" with Doomseeker, so that if a user opens a link that has the form "zan://<host>:<port>", Doomseeker would launch Zandronum to connect to that server. This is similar to what for example Steam does with "steam://..." links.

Doomseeker already supports running "doomseeker --connect'zan://<host>:<port>", [^]' so all that is needed is an extra checkbox in the installer to set up an association with Windows for the "zan" URL scheme by creating entries in the registry.

My motivation is to have working "click to play" server links on'https://doomlist.net/ [^]' without requiring manual configuration by the user. For now users need to edit the registry manually to have the links work ('https://doomlist.net/howto_address.html [^]' ).

I implemented this feature on top of the Github TorrSamaho/zandronum-installer repository and will make a pull request there (link in comment). The patch is also attached.

If you guys like the idea I would love to see it end up in the installer eventually.
No tags attached.
related to 0004145new  Associate a `zan://` URL protocol to Zandronum and `ds://` URL protocol to Doomseeker 
patch installer-add-zan-association.patch (6,140) 2022-07-03 14:02
https://zandronum.com/tracker/file_download.php?file_id=2756&type=bug
png installer-screenshot1.png (46,877) 2022-07-03 14:05
https://zandronum.com/tracker/file_download.php?file_id=2757&type=bug
png

png installer-screenshot2.png (20,036) 2022-07-03 14:05
https://zandronum.com/tracker/file_download.php?file_id=2758&type=bug
png
Issue History
2022-07-03 14:02dukeNew Issue
2022-07-03 14:02dukeFile Added: installer-add-zan-association.patch
2022-07-03 14:05dukeFile Added: installer-screenshot1.png
2022-07-03 14:05dukeFile Added: installer-screenshot2.png
2022-07-03 14:05dukeNote Added: 0022275
2022-07-15 16:10WubTheCaptainNote Added: 0022276
2022-07-15 16:39dukeNote Added: 0022277
2022-07-16 02:58WubTheCaptainNote Added: 0022278
2022-07-16 03:02WubTheCaptainNote Edited: 0022278bug_revision_view_page.php?bugnote_id=22278#r13644
2022-07-16 03:03WubTheCaptainNote Added: 0022279
2022-07-16 10:03dukeNote Added: 0022280
2022-07-16 11:03dukeNote Edited: 0022280bug_revision_view_page.php?bugnote_id=22280#r13646
2022-12-23 19:28dukeNote Added: 0022561
2022-12-23 19:28dukeNote Edited: 0022561bug_revision_view_page.php?bugnote_id=22561#r13814
2022-12-23 19:30dukeNote Edited: 0022561bug_revision_view_page.php?bugnote_id=22561#r13815
2023-01-26 15:32ZalewaNote Added: 0022744
2023-01-26 16:26dukeNote Added: 0022745
2023-01-26 16:53ZalewaNote Added: 0022747
2023-01-26 17:11dukeNote Added: 0022749
2023-07-19 07:16FusedNote Added: 0022868
2023-07-19 07:43WubTheCaptainNote Added: 0022869
2023-07-19 10:30dukeNote Added: 0022872
2023-07-19 11:08dukeNote Edited: 0022872bug_revision_view_page.php?bugnote_id=22872#r13970
2023-07-19 16:15dukeNote Added: 0022875
2023-07-20 12:22DrinkyBirdNote Added: 0022876
2023-07-20 12:24DrinkyBirdNote Edited: 0022876bug_revision_view_page.php?bugnote_id=22876#r13972
2023-07-21 10:43FusedNote Added: 0022877
2023-07-21 11:01DrinkyBirdNote Added: 0022880
2023-07-21 11:12FusedNote Added: 0022881
2023-07-21 11:14FusedNote Edited: 0022881bug_revision_view_page.php?bugnote_id=22881#r13976
2023-07-21 11:16FusedNote Edited: 0022881bug_revision_view_page.php?bugnote_id=22881#r13977
2023-07-21 11:16DrinkyBirdNote Added: 0022882
2023-07-21 11:23FusedNote Added: 0022883
2023-07-21 11:25FusedNote Edited: 0022883bug_revision_view_page.php?bugnote_id=22883#r13979
2023-07-21 11:25FusedNote Edited: 0022883bug_revision_view_page.php?bugnote_id=22883#r13980
2023-07-21 11:26FusedNote Edited: 0022883bug_revision_view_page.php?bugnote_id=22883#r13981
2023-07-21 11:35FusedNote Edited: 0022883bug_revision_view_page.php?bugnote_id=22883#r13982
2023-07-21 11:41FusedNote Edited: 0022881bug_revision_view_page.php?bugnote_id=22881#r13983
2023-07-21 11:50DrinkyBirdNote Added: 0022884
2023-07-21 11:52DrinkyBirdNote Edited: 0022884bug_revision_view_page.php?bugnote_id=22884#r13985
2023-07-21 11:52DrinkyBirdRelationship addedrelated to 0004145
2023-07-21 12:14DrinkyBirdNote Edited: 0022884bug_revision_view_page.php?bugnote_id=22884#r13988
2023-07-21 12:15FusedNote Added: 0022886
2023-07-21 12:16FusedNote Edited: 0022886bug_revision_view_page.php?bugnote_id=22886#r13990
2023-07-21 12:17FusedNote Edited: 0022886bug_revision_view_page.php?bugnote_id=22886#r13991
2023-07-21 12:30DrinkyBirdNote Added: 0022888
2023-07-21 12:31DrinkyBirdNote Edited: 0022888bug_revision_view_page.php?bugnote_id=22888#r13997
2023-07-21 12:31FusedNote Edited: 0022886bug_revision_view_page.php?bugnote_id=22886#r13998
2023-07-21 12:31DrinkyBirdNote Edited: 0022888bug_revision_view_page.php?bugnote_id=22888#r13999
2023-07-21 12:41FusedNote Added: 0022889
2023-07-21 13:15dukeNote Added: 0022890
2024-04-04 21:01dukeNote Added: 0023514
2024-04-04 21:39KaminskyStatusnew => needs review
2024-04-11 12:37dukeNote Added: 0023594
2024-04-11 15:07Ru5tK1ngNote Added: 0023597
2024-04-11 15:07Ru5tK1ngStatusneeds review => resolved
2024-04-11 15:07Ru5tK1ngResolutionopen => fixed
2024-04-11 15:07Ru5tK1ngProduct Version => 3.1
2024-04-11 15:07Ru5tK1ngFixed in Version => 3.2
2024-04-11 15:07Ru5tK1ngTarget Version => 3.2

Notes
(0022275)
duke   
2022-07-03 14:05   
Pull request:'https://github.com/TorrSamaho/zandronum-installer/pull/1 [^]'
(0022276)
WubTheCaptain   
2022-07-15 16:10   
Could be better if Zandronum could handle the URIs without the dependency on Doomseeker. My personal opinion.
(0022277)
duke   
2022-07-15 16:39   
The point of using Doomseeker here is that it can automatically find and load all the WADs for the server. Using Zandronum directly would make it very inconvenient.
(0022278)
WubTheCaptain   
2022-07-16 02:58   
(edited on: 2022-07-16 03:02)
Perhaps it would be more useful to Doomseeker's dynamically loaded doomseeker-zandronum plugin users in general, as a configuration option for that plugin. I don't like this configuration being tied to the Zandronum installer. Alternatively, use the system-provided configuration for application handling for schemes.

(0022279)
WubTheCaptain   
2022-07-16 03:03   
Heck, even Doomseeker can download Zandronum binaries (though it may not be the best practice) without using the Zandronum installer/bundle.
(0022280)
duke   
2022-07-16 10:03   
(edited on: 2022-07-16 11:03)
Personally I think the installer is the natural place to initially create the association. Consider:

1) It is analogous to how association of PWAD files is currently done in the installer.

2) How does Steam associate steam:// links? The installer does it (without even asking).

3) In theory nothing is preventing Doomseeker or system-provided tools from managing the association after the installer offers the option first, or setting it up if the installer wasn't used.

3a) In practice in the case of Windows the system-provided tools are not helpful and Doomseeker would require a bunch of extra platform-specific code to request admin permissions (not otherwise needed for Doomseeker) and edit the registry.

3b) On Linux the natural way would be to handle this in packaging, so eg. the DEB packages would set up the association. Not many people are using those so I decided to leave this for later and see how this proposal works out first.

(0022561)
duke   
2022-12-23 19:28   
(edited on: 2022-12-23 19:30)
I want to point out that merging the proposed patch for the Zandronum installer would provide a simple workaround for users suffering from issue 0004064 (and other issues with querying servers). They could simply use the links on'https://doomlist.net [^]' to join servers and avoid the need for full server querying from their computer.

(0022744)
Zalewa   
2023-01-26 15:32   
The statement in duke's 0004015:0022561 comment is incorrect as explained in comment 0004064:0022743 for 0004064.
(0022745)
duke   
2023-01-26 16:26   
My mistake. You are right that a server with a large number of wads may go over the packet size limit and prevent the affected people from joining even when using the website links.

I still think associating zan:// links would be a nice feature to have and that my patch for the installer is a good way to make it happen.

I wonder how you feel about WubTheCaptain's suggestion to manage the association in Doomseeker.
(0022747)
Zalewa   
2023-01-26 16:53   
Ackchually Doomseeker already has some code to handle this in place, but it's not associated within the system, only internally:
'https://bitbucket.org/Doomseeker/doomseeker/src/d47a53624a9b477c084d132599809bb7d06aed7f/src/core/connectionhandler.cpp#lines-221 [^]'

As the entries do not exist in the registry, the browsers simply say that the scheme is unrecognized or that the protocol is not recognized.

I could look into this. Provide a button in the options to associate the program, for example?
(0022749)
duke   
2023-01-26 17:11   
A button in options sounds good to me. Having the association "just work" by default would be best in my opinion, but an explicit option would still make it easier for users, so that would be great.
(0022868)
Fused   
2023-07-19 07:16   
I understand that Doomlist wants to directly start up a server from the website, but given the fact that the user is required to have Doomseeker, it kind of defeats the purpose of joining through Doomlist, right?

I would like this feature to be accessible with a prefix such as `ds://` rather than `zan://`, and instead associate that prefix for linking Zandronum. I think having the ability to start up Zandronum using this prefix is much more useful, and I'll make a ticket for it.
(0022869)
WubTheCaptain   
2023-07-19 07:43   
(Related: 0004145)
(0022872)
duke   
2023-07-19 10:30   
(edited on: 2023-07-19 11:08)
To answer Fused, I disagree that using Doomseeker defeats the purpose. The purpose of doomlist.net is not to replace Doomseeker. Some kind of a launcher is necessary to connect to a server if the link only contains the IP address and port. The WAD auto-download functionality of Doomseeker is also still very useful here.

Doomseeker already recognizes and handles the zan:// scheme, but it doesn't recognise the ds:// scheme, so to use that we would need to also modify Doomseeker, while the proposed patch works as-is.

(0022875)
duke   
2023-07-19 16:15   
I'll also add that users can choose which app they want to associate with zan:// links, so I don't see a point in avoiding the zan:// prefix in favor of something like'ds://, [^]' at least while Zandronum itself isn't able to directly handle links. Doomseeker is currently as close to an official Zandronum launcher as it gets.

I'm a bit saddened to see all this (in my opinion misguided) opposition to a simple, fully implemented, immediately useful feature while getting zero response from actual Zandronum devs for more than a year.
(0022876)
DrinkyBird   
2023-07-20 12:22   
(edited on: 2023-07-20 12:24)
FWIW I think this exposing the protocol URL functionality is a good idea, and that both the installer and Doomseeker itself are good places to do this.

This patch having a dependency on Doomseeker is not a problem - the installer installs both Zandronum and Doomseeker, with no option to install just one or the other, meaning the user is guaranteed to have Doomseeker, and making the installer a natural place to add this association.
Doomseeker itself is also a good place to add this setting by virtue of being the application actually implementing the feature; this would also allow existing users to start using the URL protocols.

Using a protocol Doomseeker-specific ds:// instead of a generic zan:// would also mean that anything using that protocol would have an actual dependency on Doomseeker, and would not be able to launch with any other server browser implementing the zan:// protocol but not'ds://. [^]'

(0022877)
Fused   
2023-07-21 10:43   
That actually sounds like a very good compromise considering there's no guarantee that an application actually implements "--connect". For example, Zandronum implements `-connect` which despite the slight difference already prevents the protocol from working properly. If there's ever the idea to extend the functionality you basically have no way to support these other applications.

And as per my last note, I see good use by supporting one for Zandronum itself, and I have plans to make use of it. Whilst the installation process installs Doomseeker by default, it is also possible to download just Zandronum using the Archive option. I will support this ticket as soon as the prefix is changed.
(0022880)
DrinkyBird   
2023-07-21 11:01   
What does --connect have to do with it? This is about the URL protocols; any application registered those protocol should be able to support it, obviously, and the exact command-line registered to the protocol doesn't matter.

I still see no point in Zan supporting any protocol handlers because the most common use for this would be joining a server from a website. For that, Zandronum would need to be able to query the server, download all the WADs needed, and restart itself with the WADs. And downloading WADs would be a considerable amount of effort to do it cross-platform with no dependencies. Fortunately, there exists software that has solved all of this for us already. They're called server browsers...
(0022881)
Fused   
2023-07-21 11:12   
(edited on: 2023-07-21 11:41)
You are correct, the way you connect actually does not matter.

I never mentioned Zandronum needing to download anything. My proposal is supporting the ability to launch Zandronum. The rest of the work (querying the servers, downloading the PWADS) can be done by the website, so that's outside of the scope of this ticket, and so is the fact that we already have server browsers...

EDIT: I'd like to add that I do see the point of having the ability to launch Doomseeker. I just oppose of the prefix, due to the aforementioned reasons.

(0022882)
DrinkyBird   
2023-07-21 11:16   
No it can't: websites can't download files to arbitary locations on the user's filesystem, and can't detect where a user downloaded a file to. So it would be impossible for the website to launch the game without the user explicitly setting their paths to everything.

The scope of this ticket is the installer registering zan:// links with Doomseeker.
(0022883)
Fused   
2023-07-21 11:23   
(edited on: 2023-07-21 11:35)
A web application can download files, and that's enough to make this work. This functionality can be extended by keeping track of the user's downloaded PWADs location and also providing a way to keep track of what the user downloaded.
Considering the web application I'm developing basically already has all of the functionalities to query servers, download files, and generate multiple join commands to start join a server through both Zandronum and Doomseeker, I once again ask we stick to the actual topic since I don't want to defense myself on something else.

I'd like the prefix to stick to Doomseeker and have it changed to `ds:` so that the related ticket (https://zandronum.com/tracker/view.php?id=4145) might be able to be implemented. I also don't think there should be a hard dependency on Doomseeker in general.

(0022884)
DrinkyBird   
2023-07-21 11:50   
(edited on: 2023-07-21 12:14)
* There is already a protocol that does what you want:'zds://. [^]' Except ZD stands for ZDaemon, and Doomseeker doesn't support ZDaemon, but does support'zds://. [^]' So someone who uses ZDaemon and Zandronum can't use zds:// to launch both. The same could happen to a new all-ports protocol, especially if Doom Explorer added support, which does support ZDaemon.
* Doomseeker has support zan:// for 11 years now, and people have used it for just as long. Changing the meaning of the protocol now would be a rug-pull.
* Web applications cannot download to arbitrary locations on a user's system. I want all my WADs stored in D:\Doom\WADs; to do this I would have to manually move each file there since browsers just dump files in the downloaders folder automatically nowadays.
* Stands to reason that anyone with a Zandronum client probably also has a server browser installed. The only exception is Delta Touch, and for that you could just ask the user to copypaste the command-line you're already generating.
* Your suggestion would also require we bring in a URL parser into Zandronum, since Windows just provides the URL to the application. This requires no code changes, preserves existing behaviour, and a patch has already been made for it.

(0022886)
Fused   
2023-07-21 12:15   
(edited on: 2023-07-21 12:31)
I found this ticket related to `zds:`:'https://zandronum.com/tracker/view.php?id=1737 [^]'
According to the ticket, prepending `za` to the `zds://` query would launch Doomseeker using Zandronum. What is wrong with this existing feature? Has this been added after `zan://` was added? Am I misunderstanding something?

Right now, neither `zds` nor `zan` are registered when you install Zandronum bundled with Doomseeker, apart from a registry key that appears unrelated. Whilst I completely understand that changing something that has been supported for over a decade, it is hardly a rug pull considering you literally need to manually add the key. There is however a massive risk as this is a breaking change, so this is definitely an issue I did not foresee.

> "Web applications cannot download to arbitrary locations on a user's system. I want all my WADs stored in D:\Doom\WADs; to do this I would have to manually move each file there since browsers just dump files in the downloaders folder automatically nowadays."
Once again unrelated, this is up to me to implement.

> "Stands to reason that anyone with a Zandronum client probably also has a server browser installed. The only exception is Delta Touch, and for that you could just ask the user to copypaste the command-line you're already generating."
Even if they have a browser, it might not be Doomseeker, or IDE. There's is absolutely no guarantee. This is also unrelated.

> "Your suggestion would also require we bring in a URL parser into Zandronum, since Windows just provides the URL without the protocol part to the application. This requires no code changes, preserves existing behaviour, and a patch has already been made for it."
I'm not sure what you mean? What patch?

EDIT: rewording

(0022888)
DrinkyBird   
2023-07-21 12:30   
(edited on: 2023-07-21 12:31)
Quote

According to the ticket, prepending `za` to the `zds://` query would launch Doomseeker using Zandronum. What is wrong with this that requires `zan::/` if you can already launch with Zandronum? Am I mistunderstanding something?

Only one program can handle a protocol. If zds: is assigned to Doomseeker, it cannot launch ZDaemon. If zds: is assigned to the ZDaemon launcher, it cannot launch Zandronum. If the ZDaemon launcher decides to support ds:, the same problem happens.

Quote

Right now, neither `zds` nor `zan` are registered when you install Zandronum bundled with Doomseeker, apart from a registry key that appears unrelated.

This is the point of this ticket, to easily expose functionality that already exists.

Quote

Even if they have a browser, it might not be Doomseeker, or IDE.

Of course. But if that browser supports zan: then it doesn't matter - it should be able to respond by launching Zandronum with everything set up to connect to a server.

Quote

I'm not sure what you mean? What patch?

The one attached to this ticket. Scroll up.

(0022889)
Fused   
2023-07-21 12:41   
Alright, I rest my case. I understand that modifying an existing feature that has existed for such a long time should not be changed. I did not realize the fact that this has existed for over a decade, and if the ticket mentioned this I would have not initially opposed of this. The related ticket will the continue for a different feature request.
(0022890)
duke   
2023-07-21 13:15   
Thanks for the support DrinkyBird, and thanks to Fused for choosing to support the patch after the discussion.

I wonder who can give the final verdict to merge or close the issue. It would be great to decide this before 3.2 release.
(0023514)
duke   
2024-04-04 21:01   
I created a Merge request for this feature on the new Heptapod repository:
'https://foss.heptapod.net/zandronum/zandronum-installer/-/merge_requests/1 [^]'
(0023594)
duke   
2024-04-11 12:37   
MR has been merged so this issue can be closed
(0023597)
Ru5tK1ng   
2024-04-11 15:07   
Sean Baggaley
@DrinkyBird ยท 3 days ago
Developer

I tested it and it seems to work as intended.