summary refs log tree commit diff
path: root/deploy/installer/gui/installscript.qs
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/installer/gui/installscript.qs')
-rw-r--r--deploy/installer/gui/installscript.qs32
1 files changed, 32 insertions, 0 deletions
diff --git a/deploy/installer/gui/installscript.qs b/deploy/installer/gui/installscript.qs
new file mode 100644
index 00000000..4cfa284f
--- /dev/null
+++ b/deploy/installer/gui/installscript.qs
@@ -0,0 +1,32 @@
+function Component()
+{
+}
+
+Component.prototype.createOperations = function()
+{
+    component.createOperations();
+
+    try
+    {
+        if( installer.value("os") === "win" )
+        {
+            /**
+             * Start Menu Shortcut
+             */
+            component.addOperation( "CreateShortcut", "@TargetDir@\\nheko.exe", "@StartMenuDir@\\nheko.lnk",
+                                    "workingDirectory=@TargetDir@", "iconPath=@TargetDir@\\nheko.exe",
+                                    "iconId=0", "description=Desktop client for the Matrix protocol");
+
+            /**
+             * Desktop Shortcut
+             */
+            component.addOperation( "CreateShortcut", "@TargetDir@\\nheko.exe", "@DesktopDir@\\nheko.lnk",
+                                    "workingDirectory=@TargetDir@", "iconPath=@TargetDir@\\nheko.exe",
+                                    "iconId=0", "description=Desktop client for the Matrix protocol");
+        }
+    }
+    catch( e )
+    {
+        print( e );
+    }
+}