iceball icon indicating copy to clipboard operation
iceball copied to clipboard

iceball:// protocol handler registration

Open rakiru opened this issue 9 years ago • 8 comments

The windows builds previously came with a shouty-named executable to register Iceball as the iceball:// protocol handler. While this is less of an issue now that the game contains a launcher, this functionality should really be included in the game (since we don't have an installer), perhaps a button in the not-yet-existent options menu, and/or automatically on start up if not already registered.

I'm not sure how this is dealt with on OSX or any of the various *nix setups, but the same should be done there if possible.

rakiru avatar Apr 25 '15 21:04 rakiru

I don't want it to actually be part of the engine as the behaviour is different on each platform.

For Windows, you go through the registry. For non-OSX, you create a .desktop file and shove it in the right place and edit a config of some sort... and it's actually pretty damn flimsy. For OSX, I have no idea. sillesta, where are you?

I really do not want to have to make a futile attempt at automating the non-OSX version due to how bloody awful it is.

iamgreaser avatar Apr 25 '15 21:04 iamgreaser

My main concern with this is that most users won't do anything to enable this, and it should really be automatic where possible. I guess on non-OSX/Windows, it would be acceptable not to have it, due to the variance between systems and the fact that most people on those systems are capable of figuring it out themselves. Having it on Windows and OSX shouldn't be a problem though, right?

I'm not sure how exactly to handle it in that situation though. If there wasn't a Lua API method available for it, then the only option would be to do it on startup, in which case, would it override the existing one, or only apply it if it doesn't already exist? The former could be rather intrusive (although perhaps not something most people would notice), and the latter creates problems if the game is moved.

Hmm...

rakiru avatar Apr 25 '15 22:04 rakiru

@iamgreaser OS X solution seems pretty straightforward. All that's needed is some extra information in Info.plist and for the application bundle to be in the Applications folder.

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleURLName</key>
    <string>Iceball</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>iceball</string>
    </array>
  </dict>
</array>

Note that I haven't tested this at all, will do tomorrow!

fkaa avatar Apr 25 '15 23:04 fkaa

So the application just makes it known that it can handle a certain protocol rather than saying it should be the one that deals with it?

rakiru avatar Apr 25 '15 23:04 rakiru

Pretty much. I think if multiple applications handle the same protocol it will prompt the user to choose a default but I'm not entirely sure..

fkaa avatar Apr 25 '15 23:04 fkaa

I see. I guess we should do that then, whether we do it for anything else or not. I'm still not certain how to deal with Windows.

rakiru avatar Apr 25 '15 23:04 rakiru

From what @iamgreaser said you set some registry key. However it doesn't seem like this should be handled by the application, but rather some kind of installer.

Is it possible to make a .msi with mingw executables? I'm not well versed in the windows hemisphere at all. I think providing an installer would also mix well with #191.

I could possibly also change the OS X packaging process to create a .dmg containing the application, which is the preferred way to distribute applications.

fkaa avatar Apr 26 '15 00:04 fkaa

You can make an MSI with whatever you want. You could make one that installs a JPEG if you wanted.

However, Iceball is a portable application, so we don't have an installer. That's something that should probably be discussed (along with how users should update their game).

rakiru avatar Apr 26 '15 00:04 rakiru