From e5055c0a7c3db96a816b85070b366fa1675f0680 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 27 Feb 2013 12:26:18 +0100 Subject: Example for registering a Start Menu entry Change-Id: I993d1e8b64ea9265d8e06b1f565d5d0504aedd61 Reviewed-by: Karsten Heimrich Reviewed-by: Niels Weber --- examples/startmenu/README | 6 ++++++ examples/startmenu/config/config.xml | 10 ++++++++++ .../packages/org.qtproject.ifw.example/data/README.txt | 2 ++ .../org.qtproject.ifw.example/meta/installscript.qs | 14 ++++++++++++++ .../packages/org.qtproject.ifw.example/meta/package.xml | 9 +++++++++ 5 files changed, 41 insertions(+) create mode 100644 examples/startmenu/README create mode 100644 examples/startmenu/config/config.xml create mode 100644 examples/startmenu/packages/org.qtproject.ifw.example/data/README.txt create mode 100644 examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs create mode 100644 examples/startmenu/packages/org.qtproject.ifw.example/meta/package.xml (limited to 'examples') diff --git a/examples/startmenu/README b/examples/startmenu/README new file mode 100644 index 000000000..aa0a0268b --- /dev/null +++ b/examples/startmenu/README @@ -0,0 +1,6 @@ +Shows how to add an entry to the Windows start menu. + +Generate installer with + +binarycreator --offline-only -c config/config.xml -p packages start_menu_installer + diff --git a/examples/startmenu/config/config.xml b/examples/startmenu/config/config.xml new file mode 100644 index 000000000..9a06186d3 --- /dev/null +++ b/examples/startmenu/config/config.xml @@ -0,0 +1,10 @@ + + + Start Menu Shortcut Example + 1.0.0 + Start Menu Shortcut Example + Qt-Project + + Qt Installer Framework Example + @homeDir@/IFWStartMenuExample + diff --git a/examples/startmenu/packages/org.qtproject.ifw.example/data/README.txt b/examples/startmenu/packages/org.qtproject.ifw.example/data/README.txt new file mode 100644 index 000000000..e35ab831d --- /dev/null +++ b/examples/startmenu/packages/org.qtproject.ifw.example/data/README.txt @@ -0,0 +1,2 @@ +This file can be opened through the start menu, "Qt Installer Framework Example" section! + diff --git a/examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs b/examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs new file mode 100644 index 000000000..d3ed7edec --- /dev/null +++ b/examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs @@ -0,0 +1,14 @@ +function Component() +{ + // default constructor +} + +Component.prototype.createOperations = function() +{ + // call default implementation to actually install README.txt! + component.createOperations(); + + if (installer.value("os") === "win") { + component.addOperation("CreateShortcut", "@TargetDir@/README.txt", "@StartMenuDir@/README.lnk"); + } +} diff --git a/examples/startmenu/packages/org.qtproject.ifw.example/meta/package.xml b/examples/startmenu/packages/org.qtproject.ifw.example/meta/package.xml new file mode 100644 index 000000000..31a2beb6a --- /dev/null +++ b/examples/startmenu/packages/org.qtproject.ifw.example/meta/package.xml @@ -0,0 +1,9 @@ + + + org.qtproject.ifw.example + README.txt + A README.txt, accessible through a start menu entry. + 2013-01-01 + 1.0.0-1 + + -- cgit v1.2.3