aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata-windows/innosetupDependencies/innosetupDependencies.qbs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox/testdata-windows/innosetupDependencies/innosetupDependencies.qbs')
-rw-r--r--tests/auto/blackbox/testdata-windows/innosetupDependencies/innosetupDependencies.qbs76
1 files changed, 76 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata-windows/innosetupDependencies/innosetupDependencies.qbs b/tests/auto/blackbox/testdata-windows/innosetupDependencies/innosetupDependencies.qbs
new file mode 100644
index 000000000..ab68d3011
--- /dev/null
+++ b/tests/auto/blackbox/testdata-windows/innosetupDependencies/innosetupDependencies.qbs
@@ -0,0 +1,76 @@
+import qbs.TextFile
+
+Project {
+ InnoSetup {
+ property bool _test: {
+ var present = qbs.targetOS.contains("windows") && innosetup.present;
+ console.info("has innosetup: " + present);
+ }
+ Depends { name: "app" }
+ Depends { name: "lib" }
+ name: "QbsSetup"
+ targetName: "qbs.setup.test"
+ version: "1.5"
+ files: [
+ "test.iss"
+ ]
+ innosetup.verboseOutput: true
+ innosetup.defines: [
+ "MyProgram=" + name,
+ "MyProgramVersion=" + version,
+ "buildDirectory=" + project.buildDirectory
+ ]
+ innosetup.compilerFlags: ["/V9"]
+ destinationDirectory: project.buildDirectory
+ }
+ Application {
+ Depends { name: "cpp" }
+ name: "app"
+ files: ["main.c"]
+ Group {
+ fileTagsFilter: product.type
+ qbs.install: true
+ }
+ destinationDirectory: project.buildDirectory
+ }
+ DynamicLibrary {
+ Depends { name: "cpp" }
+ name: "lib"
+ files: ["main.c"]
+ Group {
+ fileTagsFilter: product.type
+ qbs.install: true
+ }
+ Rule {
+ // This rule tries to provoke the installer into building too early (and the test
+ // verifies that it does not) by causing the build of the installables to take
+ // a lot longer.
+ multiplex: true
+ outputFileTags: ["c"]
+ outputArtifacts: {
+ var artifacts = [];
+ for (var i = 0; i < 96; ++i)
+ artifacts.push({ filePath: "c" + i + ".c", fileTags: ["c"] });
+ return artifacts;
+ }
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.silent = true;
+ cmd.sourceCode = function() {
+ for (var i = 0; i < outputs["c"].length; ++i) {
+ var tf;
+ try {
+ tf = new TextFile(outputs["c"][i].filePath, TextFile.WriteOnly);
+ tf.writeLine("int main" + i + "() { return 0; }");
+ } finally {
+ if (tf)
+ tf.close();
+ }
+ }
+ };
+ return [cmd];
+ }
+ }
+ destinationDirectory: project.buildDirectory
+ }
+}