From 0bda027c3431bd8e5c2681cdafeb5cf3d9baf362 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Tue, 5 Mar 2013 13:48:33 +0100 Subject: add a modify extract operation example Change-Id: Ia7fea3c3e827c67a03ff4d5bdf5cb464deeeef5c Reviewed-by: Niels Weber Reviewed-by: Karsten Heimrich Reviewed-by: Kai Koehne --- examples/modifyextract/README | 6 ++++++ examples/modifyextract/config/config.xml | 9 +++++++++ .../data/my_content/test.txt | 1 + .../meta/installscript.js | 12 ++++++++++++ .../org.qtproject.ifw.example.modifyextract/meta/package.xml | 8 ++++++++ 5 files changed, 36 insertions(+) create mode 100644 examples/modifyextract/README create mode 100644 examples/modifyextract/config/config.xml create mode 100644 examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/data/my_content/test.txt create mode 100644 examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/installscript.js create mode 100644 examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/package.xml (limited to 'examples/modifyextract') diff --git a/examples/modifyextract/README b/examples/modifyextract/README new file mode 100644 index 000000000..60c3588d4 --- /dev/null +++ b/examples/modifyextract/README @@ -0,0 +1,6 @@ +Create an installer that uses the extract archive hook to modify the target path. + +Generate installer with + +binarycreator --offline-only -c config/config.xml -p packages installer + diff --git a/examples/modifyextract/config/config.xml b/examples/modifyextract/config/config.xml new file mode 100644 index 000000000..bb2c18ce4 --- /dev/null +++ b/examples/modifyextract/config/config.xml @@ -0,0 +1,9 @@ + + + Modify extract Installer Example + 1.0.0 + Modify extract Installer Example + Qt-Project + Qt Installer Framework Example + @homeDir@/IFWModifyExtractInstallerExample + diff --git a/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/data/my_content/test.txt b/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/data/my_content/test.txt new file mode 100644 index 000000000..4be609dcc --- /dev/null +++ b/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/data/my_content/test.txt @@ -0,0 +1 @@ +test test test test test test test test \ No newline at end of file diff --git a/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/installscript.js b/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/installscript.js new file mode 100644 index 000000000..59f5ee2bc --- /dev/null +++ b/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/installscript.js @@ -0,0 +1,12 @@ +function Component() +{ +} + +Component.prototype.createOperationsForArchive = function(archive) +{ + // don't use the default operation + // component.createOperationsForArchive(archive); + + // add an extract operation with a modified path + component.addOperation("Extract", archive, "@TargetDir@/extractToAnotherPath"); +} diff --git a/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/package.xml b/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/package.xml new file mode 100644 index 000000000..b6b007067 --- /dev/null +++ b/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/package.xml @@ -0,0 +1,8 @@ + + + modify extract operation + A component that uses a hook to modify the extract operation. + 1.0.1 + 2013-02-27 + + -- cgit v1.2.3