public static void RegisterForBloomUrlProtocol(bool allUsers)
{
if (SIL.PlatformUtilities.Platform.IsLinux)
{
// This will be done by the package installer.
// To manually install it:
// sudo cp debian/bloom.desktop /usr/share/applications
// sudo update-desktop-database
// (and bloom startup wrapper needs to be in the path)
return;
}
var whereToInstall = allUsers ? Registry.LocalMachine : Registry.CurrentUser;
var root = whereToInstall.CreateSubKey(@"Software\Classes");
if (AlreadyRegistered(root))
return;
var key = root.CreateSubKey(@"bloom\shell\open\command");
key.SetValue("", CommandToLaunchBloomOnWindows);
key = root.CreateSubKey("bloom");
key.SetValue("", "BLOOM:URL Protocol");
key.SetValue("URL Protocol", "");
}