summary refs log tree commit diff
path: root/deploy
diff options
context:
space:
mode:
authorJedi18 <targetakhil@gmail.com>2021-03-03 00:02:21 +0530
committerJedi18 <targetakhil@gmail.com>2021-03-03 00:02:21 +0530
commitfe6d990ad32c56354e105950a779b2476d9d9ddc (patch)
treee37ae1ca17ab77f5bf6915be6e0577a95b7a20a4 /deploy
parentEnsure we ask for confirmation when clicking on a matrix uri (diff)
downloadnheko-fe6d990ad32c56354e105950a779b2476d9d9ddc.tar.xz
add matrix uri handler registry values in installer
Diffstat (limited to 'deploy')
-rw-r--r--deploy/installer/gui/installscript.qs12
1 files changed, 12 insertions, 0 deletions
diff --git a/deploy/installer/gui/installscript.qs b/deploy/installer/gui/installscript.qs
index 4cfa284f..d3a51f34 100644
--- a/deploy/installer/gui/installscript.qs
+++ b/deploy/installer/gui/installscript.qs
@@ -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 )