summaryrefslogtreecommitdiffstats
path: root/examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract
diff options
context:
space:
mode:
Diffstat (limited to 'examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract')
-rw-r--r--examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/data/my_content/test.txt1
-rw-r--r--examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/installscript.js12
-rw-r--r--examples/modifyextract/packages/org.qtproject.ifw.example.modifyextract/meta/package.xml8
3 files changed, 21 insertions, 0 deletions
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 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>modify extract operation</DisplayName>
+ <Description>A component that uses a hook to modify the extract operation.</Description>
+ <Version>1.0.1</Version>
+ <ReleaseDate>2013-02-27</ReleaseDate>
+ <Script>installscript.js</Script>
+</Package>