diff options
Diffstat (limited to 'examples')
5 files changed, 41 insertions, 0 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Installer> + <Name>Start Menu Shortcut Example</Name> + <Version>1.0.0</Version> + <Title>Start Menu Shortcut Example</Title> + <Publisher>Qt-Project</Publisher> + <!-- Directory name is used in component.xml --> + <StartMenuDir>Qt Installer Framework Example</StartMenuDir> + <TargetDir>@homeDir@/IFWStartMenuExample</TargetDir> +</Installer> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Package> + <Name>org.qtproject.ifw.example</Name> + <DisplayName>README.txt</DisplayName> + <Description>A README.txt, accessible through a start menu entry.</Description> + <ReleaseDate>2013-01-01</ReleaseDate> + <Version>1.0.0-1</Version> + <Script>installscript.qs</Script> +</Package> |