mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Merge pull request #510 from Jedi18/master
Add matrix uri handler registry values in windows installer
This commit is contained in:
commit
dea7680604
1 changed files with 12 additions and 0 deletions
|
@ -23,6 +23,18 @@ Component.prototype.createOperations = function()
|
|||
component.addOperation( "CreateShortcut", "@TargetDir@\\nheko.exe", "@DesktopDir@\\nheko.lnk",
|
||||
"workingDirectory=@TargetDir@", "iconPath=@TargetDir@\\nheko.exe",
|
||||
"iconId=0", "description=Desktop client for the Matrix protocol");
|
||||
|
||||
var reg = installer.environmentVariable("SystemRoot") + "\\System32\\reg.exe";
|
||||
var key= "HKEY_CLASSES_ROOT\\matrix";
|
||||
component.addOperation("Execute", reg, "ADD", key, "/f", "/t", "REG_SZ", "/d", "URL:Matrix Protocol");
|
||||
component.addOperation("Execute", reg, "ADD", key, "/f", "/v", "URL Protocol", "/t", "REG_SZ");
|
||||
var iconkey = "HKEY_CLASSES_ROOT\\matrix\\DefaultIcon";
|
||||
component.addOperation("Execute", reg, "ADD", iconkey, "/f", "/t", "REG_SZ", "/d", "@TargetDir@\\nheko.exe,1");
|
||||
component.addOperation("Execute", reg, "ADD", "HKEY_CLASSES_ROOT\\matrix\\shell", "/f");
|
||||
component.addOperation("Execute", reg, "ADD", "HKEY_CLASSES_ROOT\\matrix\\shell\\open", "/f");
|
||||
var commandkey = "HKEY_CLASSES_ROOT\\matrix\\shell\\open\\command"
|
||||
component.addOperation("Execute", reg, "ADD", commandkey, "/f");
|
||||
component.addOperation("Execute", reg, "ADD", commandkey, "/f", "/t", "REG_SZ", "/d", "\"@TargetDir@\\nheko.exe\" \"%1\"");
|
||||
}
|
||||
}
|
||||
catch( e )
|
||||
|
|
Loading…
Reference in a new issue