aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-02-25 15:39:22 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2014-02-25 18:17:37 +0100
commiteac4bba41ed9e68dee9a019e0fedc51d220ef112 (patch)
tree97f728cccb9c52e94060d0d6ec4ae55d51b0cabe /share/qbs/modules/cpp
parent11a04709f4282a399c75e7ef6cc6624733de4c71 (diff)
use filePath instead of fileName where applicable
This fixes the recently introduced deprecation warnings. Task-number: QBS-258 Change-Id: I10660270895ec89a1444d596922c22e9658ca3ab Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'share/qbs/modules/cpp')
-rw-r--r--share/qbs/modules/cpp/DarwinGCC.qbs20
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs32
-rw-r--r--share/qbs/modules/cpp/gcc.js12
-rw-r--r--share/qbs/modules/cpp/ios-gcc.qbs4
-rw-r--r--share/qbs/modules/cpp/msvc.js34
-rw-r--r--share/qbs/modules/cpp/windows-mingw.qbs4
-rw-r--r--share/qbs/modules/cpp/windows-msvc.qbs12
7 files changed, 59 insertions, 59 deletions
diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs
index 7804f521a..f9530da55 100644
--- a/share/qbs/modules/cpp/DarwinGCC.qbs
+++ b/share/qbs/modules/cpp/DarwinGCC.qbs
@@ -119,7 +119,7 @@ UnixGCC {
cmd.description = "generating PkgInfo";
cmd.highlight = "codegen";
cmd.sourceCode = function() {
- var infoPlist = BundleTools.infoPlistContents(inputs.infoplist[0].fileName);
+ var infoPlist = BundleTools.infoPlistContents(inputs.infoplist[0].filePath);
var pkgType = infoPlist['CFBundlePackageType'];
if (!pkgType)
@@ -129,7 +129,7 @@ UnixGCC {
if (!pkgSign)
throw("CFBundleSignature not found in Info.plist; this should not happen");
- var pkginfo = new TextFile(outputs.pkginfo[0].fileName, TextFile.WriteOnly);
+ var pkginfo = new TextFile(outputs.pkginfo[0].filePath, TextFile.WriteOnly);
pkginfo.write(pkgType + pkgSign);
pkginfo.close();
}
@@ -269,7 +269,7 @@ UnixGCC {
}
// Write the plist contents as JSON
- var infoplist = new TextFile(outputs.infoplist[0].fileName, TextFile.WriteOnly);
+ var infoplist = new TextFile(outputs.infoplist[0].filePath, TextFile.WriteOnly);
infoplist.write(JSON.stringify(aggregatePlist));
infoplist.close();
@@ -283,7 +283,7 @@ UnixGCC {
// Convert the written file to the format appropriate for the current platform
process = new Process();
- process.exec("plutil", ["-convert", infoPlistFormat, outputs.infoplist[0].fileName], true);
+ process.exec("plutil", ["-convert", infoPlistFormat, outputs.infoplist[0].filePath], true);
process.close();
}
return cmd;
@@ -301,8 +301,8 @@ UnixGCC {
prepare: {
var cmd = new Command("dsymutil", [
- "--out=" + outputs.application_dsym[0].fileName,
- input.fileName
+ "--out=" + outputs.application_dsym[0].filePath,
+ input.filePath
]);
cmd.description = "generating dsym";
cmd.highlight = "codegen";
@@ -341,23 +341,23 @@ UnixGCC {
prepare: {
var commands = [];
var cmd = new Command("ln", ["-sf", BundleTools.frameworkVersion(product), "Current"]);
- cmd.workingDirectory = output.fileName + "/Versions";
+ cmd.workingDirectory = output.filePath + "/Versions";
cmd.description = "creating framework " + product.targetName;
cmd.highlight = "codegen";
commands.push(cmd);
cmd = new Command("ln", ["-sf", "Versions/Current/Headers", "Headers"]);
- cmd.workingDirectory = output.fileName;
+ cmd.workingDirectory = output.filePath;
cmd.silent = true;
commands.push(cmd);
cmd = new Command("ln", ["-sf", "Versions/Current/Resources", "Resources"]);
- cmd.workingDirectory = output.fileName;
+ cmd.workingDirectory = output.filePath;
cmd.silent = true;
commands.push(cmd);
cmd = new Command("ln", ["-sf", "Versions/Current/" + product.targetName, product.targetName]);
- cmd.workingDirectory = output.fileName;
+ cmd.workingDirectory = output.filePath;
cmd.silent = true;
commands.push(cmd);
return commands;
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index 0f4c2ca17..795b61155 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -102,7 +102,7 @@ CppModule {
for (var i in inputs.dynamiclibrary_copy) {
var lib = inputs.dynamiclibrary_copy[i]
var impliedLibs = ModUtils.moduleProperties(lib, 'transitiveSOs')
- var libsToAdd = [lib.fileName].concat(impliedLibs);
+ var libsToAdd = [lib.filePath].concat(impliedLibs);
result = result.concat(libsToAdd);
}
result = Gcc.concatLibs([], result);
@@ -112,7 +112,7 @@ CppModule {
prepare: {
// Actual linker command.
- var libFilePath = outputs["dynamiclibrary"][0].fileName;
+ var libFilePath = outputs["dynamiclibrary"][0].filePath;
var platformLinkerFlags = ModUtils.moduleProperties(product, 'platformLinkerFlags');
var linkerFlags = ModUtils.moduleProperties(product, 'linkerFlags');
var commands = [];
@@ -136,7 +136,7 @@ CppModule {
for (i in linkerFlags)
args.push(linkerFlags[i])
for (i in inputs.obj)
- args.push(inputs.obj[i].fileName);
+ args.push(inputs.obj[i].filePath);
var sysroot = ModUtils.moduleProperty(product, "sysroot")
if (sysroot) {
if (product.moduleProperty("qbs", "targetOS").contains('darwin'))
@@ -159,8 +159,8 @@ CppModule {
cmd = new JavaScriptCommand();
cmd.silent = true;
cmd.sourceCode = function() {
- var sourceFilePath = outputs.dynamiclibrary[0].fileName;
- var targetFilePath = outputs.dynamiclibrary_copy[0].fileName;
+ var sourceFilePath = outputs.dynamiclibrary[0].filePath;
+ var targetFilePath = outputs.dynamiclibrary_copy[0].filePath;
if (!File.exists(targetFilePath)) {
File.copy(sourceFilePath, targetFilePath);
return;
@@ -208,10 +208,10 @@ CppModule {
var symlinkCount = links.length;
for (var i = 0; i < symlinkCount; ++i) {
cmd = new Command("ln", ["-sf", FileInfo.fileName(libFilePath),
- links[i].fileName]);
+ links[i].filePath]);
cmd.highlight = "filegen";
cmd.description = "creating symbolic link '"
- + FileInfo.fileName(links[i].fileName) + "'";
+ + FileInfo.fileName(links[i].filePath) + "'";
cmd.workingDirectory = FileInfo.path(libFilePath);
commands.push(cmd);
}
@@ -233,7 +233,7 @@ CppModule {
var result = []
for (var i in inputs.staticlibrary) {
var lib = inputs.staticlibrary[i]
- result.push(lib.fileName)
+ result.push(lib.filePath)
var impliedLibs = ModUtils.moduleProperties(lib, 'staticLibraries')
result = Gcc.concatLibs(result, impliedLibs);
}
@@ -242,17 +242,17 @@ CppModule {
cpp.dynamicLibraries: {
var result = []
for (var i in inputs.dynamiclibrary)
- result.push(inputs.dynamiclibrary[i].fileName);
+ result.push(inputs.dynamiclibrary[i].filePath);
return result
}
}
prepare: {
- var args = ['rcs', output.fileName];
+ var args = ['rcs', output.filePath];
for (var i in inputs.obj)
- args.push(inputs.obj[i].fileName);
+ args.push(inputs.obj[i].filePath);
var cmd = new Command(ModUtils.moduleProperty(product, "archiverPath"), args);
- cmd.description = 'creating ' + FileInfo.fileName(output.fileName);
+ cmd.description = 'creating ' + FileInfo.fileName(output.filePath);
cmd.highlight = 'linker'
cmd.responseFileUsagePrefix = '@';
return cmd;
@@ -282,7 +282,7 @@ CppModule {
var linkerFlags = ModUtils.moduleProperties(product, 'linkerFlags');
var args = Gcc.configFlags(product);
for (var i in inputs.obj)
- args.push(inputs.obj[i].fileName)
+ args.push(inputs.obj[i].filePath)
var sysroot = ModUtils.moduleProperty(product, "sysroot")
if (sysroot) {
if (product.moduleProperty("qbs", "targetOS").contains('darwin'))
@@ -318,16 +318,16 @@ CppModule {
}
}
args.push('-o');
- args.push(output.fileName);
+ args.push(output.filePath);
if (inputs.infoplist) {
- args = args.concat(["-sectcreate", "__TEXT", "__info_plist", inputs.infoplist[0].fileName]);
+ args = args.concat(["-sectcreate", "__TEXT", "__info_plist", inputs.infoplist[0].filePath]);
}
args = args.concat(Gcc.linkerFlags(product, inputs));
args = args.concat(Gcc.additionalCompilerAndLinkerFlags(product));
var cmd = new Command(ModUtils.moduleProperty(product, "linkerPath"), args);
- cmd.description = 'linking ' + FileInfo.fileName(output.fileName);
+ cmd.description = 'linking ' + FileInfo.fileName(output.filePath);
cmd.highlight = 'linker'
cmd.responseFileUsagePrefix = '@';
return cmd;
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index a44465132..cc6505d4a 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -15,11 +15,11 @@ function linkerFlags(product, inputs)
// Add filenames of internal library dependencies to the lists
for (i in inputs.staticlibrary)
- staticLibraries.unshift(inputs.staticlibrary[i].fileName);
+ staticLibraries.unshift(inputs.staticlibrary[i].filePath);
for (i in inputs.dynamiclibrary_copy)
- dynamicLibraries.unshift(inputs.dynamiclibrary_copy[i].fileName);
+ dynamicLibraries.unshift(inputs.dynamiclibrary_copy[i].filePath);
for (i in inputs.frameworkbundle)
- frameworks.unshift(inputs.frameworkbundle[i].fileName);
+ frameworks.unshift(inputs.frameworkbundle[i].filePath);
// Flags for library search paths
if (libraryPaths)
@@ -217,9 +217,9 @@ function additionalCompilerFlags(product, input, output)
}
args.push('-c');
- args.push(input.fileName);
+ args.push(input.filePath);
args.push('-o');
- args.push(output.fileName);
+ args.push(output.filePath);
return args
}
@@ -336,7 +336,7 @@ function prepareCompiler(project, product, inputs, outputs, input, output)
}
var cmd = new Command(compilerPath, args);
- cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.fileName);
+ cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.filePath);
if (pchOutput)
cmd.description += ' (' + tag + ')';
cmd.highlight = "compiler";
diff --git a/share/qbs/modules/cpp/ios-gcc.qbs b/share/qbs/modules/cpp/ios-gcc.qbs
index 02af5b6d9..626995653 100644
--- a/share/qbs/modules/cpp/ios-gcc.qbs
+++ b/share/qbs/modules/cpp/ios-gcc.qbs
@@ -37,7 +37,7 @@ DarwinGCC {
cmd.highlight = "codegen";
cmd.sysroot = product.moduleProperty("qbs","sysroot");
cmd.sourceCode = function() {
- File.copy(sysroot + "/ResourceRules.plist", outputs.resourcerules[0].fileName);
+ File.copy(sysroot + "/ResourceRules.plist", outputs.resourcerules[0].filePath);
}
return cmd;
}
@@ -66,7 +66,7 @@ DarwinGCC {
var args = ["-sdk", product.moduleProperty("cpp", "xcodeSdkName"), "PackageApplication",
"-v", product.buildDirectory + "/" + BundleTools.wrapperName(product),
- "-o", outputs.ipa[0].fileName, "--sign", signingIdentity,
+ "-o", outputs.ipa[0].filePath, "--sign", signingIdentity,
"--embed", provisioningProfile];
var command = "/usr/bin/xcrun";
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js
index 0df17a25e..9208540e0 100644
--- a/share/qbs/modules/cpp/msvc.js
+++ b/share/qbs/modules/cpp/msvc.js
@@ -57,8 +57,8 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl
}
var objOutput = outputs.obj ? outputs.obj[0] : undefined
- args.push('/Fo' + FileInfo.toWindowsSeparators(objOutput.fileName))
- args.push(FileInfo.toWindowsSeparators(input.fileName))
+ args.push('/Fo' + FileInfo.toWindowsSeparators(objOutput.filePath))
+ args.push(FileInfo.toWindowsSeparators(input.filePath))
var prefixHeaders = ModUtils.moduleProperty(product, "prefixHeaders");
for (i in prefixHeaders)
@@ -76,9 +76,9 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl
if (pchOutput) {
// create PCH
args.push("/Yc");
- args.push("/Fp" + FileInfo.toWindowsSeparators(pchOutput.fileName));
- args.push("/Fo" + FileInfo.toWindowsSeparators(objOutput.fileName));
- args.push(FileInfo.toWindowsSeparators(input.fileName));
+ args.push("/Fp" + FileInfo.toWindowsSeparators(pchOutput.filePath));
+ args.push("/Fo" + FileInfo.toWindowsSeparators(objOutput.filePath));
+ args.push(FileInfo.toWindowsSeparators(input.filePath));
} else {
// use PCH
var pchHeaderName = FileInfo.toWindowsSeparators(pch);
@@ -103,7 +103,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl
args = wrapperArgs.concat(args);
}
var cmd = new Command(compilerPath, args)
- cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.fileName);
+ cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.filePath);
if (pchOutput)
cmd.description += ' (' + tag + ')';
cmd.highlight = "compiler";
@@ -112,7 +112,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl
// cl.exe outputs the cpp file name. We filter that out.
cmd.stdoutFilterFunction = "function(output) {";
cmd.stdoutFilterFunction += "return output.replace(/"
- + FileInfo.fileName(input.fileName) + "\\r\\n/g, '');";
+ + FileInfo.fileName(input.filePath) + "\\r\\n/g, '');";
cmd.stdoutFilterFunction += "}";
return cmd;
}
@@ -128,7 +128,7 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries,
var args = ['/nologo']
if (linkDLL) {
args.push('/DLL');
- args.push('/IMPLIB:' + FileInfo.toWindowsSeparators(outputs.dynamiclibrary_import[0].fileName));
+ args.push('/IMPLIB:' + FileInfo.toWindowsSeparators(outputs.dynamiclibrary_import[0].filePath));
}
if (debugInformation)
@@ -162,19 +162,19 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries,
if (generateManifestFiles) {
linkerOutputNativeFilePath
= FileInfo.toWindowsSeparators(
- FileInfo.path(primaryOutput.fileName) + "/intermediate."
- + FileInfo.fileName(primaryOutput.fileName));
+ FileInfo.path(primaryOutput.filePath) + "/intermediate."
+ + FileInfo.fileName(primaryOutput.filePath));
manifestFileName = linkerOutputNativeFilePath + ".manifest";
args.push('/MANIFEST', '/MANIFESTFILE:' + manifestFileName)
} else {
- linkerOutputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.fileName);
+ linkerOutputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.filePath);
}
var allInputs = inputs.obj.concat(inputs.staticlibrary || [])
if (inputs.dynamiclibrary_import)
allInputs = allInputs.concat(inputs.dynamiclibrary_import);
for (i in allInputs) {
- var fileName = FileInfo.toWindowsSeparators(allInputs[i].fileName)
+ var fileName = FileInfo.toWindowsSeparators(allInputs[i].filePath)
args.push(fileName)
}
for (i in staticLibraries) {
@@ -200,9 +200,9 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries,
var commands = [];
var cmd = new Command(product.moduleProperty("cpp", "linkerPath"), args)
- cmd.description = 'linking ' + FileInfo.fileName(primaryOutput.fileName)
+ cmd.description = 'linking ' + FileInfo.fileName(primaryOutput.filePath)
cmd.highlight = 'linker';
- cmd.workingDirectory = FileInfo.path(primaryOutput.fileName)
+ cmd.workingDirectory = FileInfo.path(primaryOutput.filePath)
cmd.responseFileUsagePrefix = '@';
cmd.stdoutFilterFunction =
function(output)
@@ -212,7 +212,7 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries,
commands.push(cmd);
if (generateManifestFiles) {
- var outputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.fileName);
+ var outputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.filePath);
cmd = new JavaScriptCommand();
cmd.src = linkerOutputNativeFilePath;
cmd.dst = outputNativeFilePath;
@@ -226,9 +226,9 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries,
"/outputresource:" + outputNativeFilePath + ";#" + (linkDLL ? "2" : "1")
]
cmd = new Command("mt.exe", args)
- cmd.description = 'embedding manifest into ' + FileInfo.fileName(primaryOutput.fileName)
+ cmd.description = 'embedding manifest into ' + FileInfo.fileName(primaryOutput.filePath)
cmd.highlight = 'linker';
- cmd.workingDirectory = FileInfo.path(primaryOutput.fileName)
+ cmd.workingDirectory = FileInfo.path(primaryOutput.filePath)
commands.push(cmd);
}
diff --git a/share/qbs/modules/cpp/windows-mingw.qbs b/share/qbs/modules/cpp/windows-mingw.qbs
index 72172328e..5e6fb40ae 100644
--- a/share/qbs/modules/cpp/windows-mingw.qbs
+++ b/share/qbs/modules/cpp/windows-mingw.qbs
@@ -68,9 +68,9 @@ GenericGCC {
args.push(systemIncludePaths[i]);
}
- args = args.concat(['-i', input.fileName, '-o', output.fileName]);
+ args = args.concat(['-i', input.filePath, '-o', output.filePath]);
var cmd = new Command(ModUtils.moduleProperty(product, "windresPath"), args);
- cmd.description = 'compiling ' + FileInfo.fileName(input.fileName);
+ cmd.description = 'compiling ' + FileInfo.fileName(input.filePath);
cmd.highlight = 'compiler';
return cmd;
}
diff --git a/share/qbs/modules/cpp/windows-msvc.qbs b/share/qbs/modules/cpp/windows-msvc.qbs
index 0137970d1..4e74ad034 100644
--- a/share/qbs/modules/cpp/windows-msvc.qbs
+++ b/share/qbs/modules/cpp/windows-msvc.qbs
@@ -217,16 +217,16 @@ CppModule {
prepare: {
var args = ['/nologo']
- var nativeOutputFileName = FileInfo.toWindowsSeparators(output.fileName)
+ var nativeOutputFileName = FileInfo.toWindowsSeparators(output.filePath)
args.push('/OUT:' + nativeOutputFileName)
for (var i in inputs.obj) {
- var fileName = FileInfo.toWindowsSeparators(inputs.obj[i].fileName)
+ var fileName = FileInfo.toWindowsSeparators(inputs.obj[i].filePath)
args.push(fileName)
}
var cmd = new Command("lib.exe", args);
- cmd.description = 'creating ' + FileInfo.fileName(output.fileName)
+ cmd.description = 'creating ' + FileInfo.fileName(output.filePath)
cmd.highlight = 'linker';
- cmd.workingDirectory = FileInfo.path(output.fileName)
+ cmd.workingDirectory = FileInfo.path(output.filePath)
cmd.responseFileUsagePrefix = '@';
return cmd;
}
@@ -269,9 +269,9 @@ CppModule {
args.push(systemIncludePaths[i]);
}
- args = args.concat(['/fo', output.fileName, input.fileName]);
+ args = args.concat(['/fo', output.filePath, input.filePath]);
var cmd = new Command('rc', args);
- cmd.description = 'compiling ' + FileInfo.fileName(input.fileName);
+ cmd.description = 'compiling ' + FileInfo.fileName(input.filePath);
cmd.highlight = 'compiler';
// Remove the first two lines of stdout. That's the logo.