Commit f2f92092 authored by Michal Policht's avatar Michal Policht

Update directory related properties in Qbs.

parent bf195d9d
......@@ -2,8 +2,6 @@ import qbs
Project {
property bool buildTests: false
property bool staticQMLExtensions: false
property bool staticModules: false
property bool staticExtensions: false
qbsSearchPaths: ["qbs"]
......@@ -17,7 +15,7 @@ Project {
AutotestRunner {
environment: {
var env = base;
env.push("QML2_IMPORT_PATH=" + qbs.installRoot + "/" + cutehmi.dirs.qmlExtensionInstallDirname);
env.push("QML2_IMPORT_PATH=" + qbs.installRoot + "/" + cutehmi.dirs.extensionInstallDirname);
env.push("QBS_INSTALL_ROOT=" + qbs.installRoot);
......
......@@ -11,19 +11,15 @@ Module {
else
Environment.putEnv("LD_LIBRARY_PATH", product.cutehmi.dirs.externalLibDir + product.qbs.pathListSeparator + Environment.getEnv("LD_LIBRARY_PATH"))
Environment.putEnv("QML2_IMPORT_PATH", product.qbs.installRoot + "/" + product.cutehmi.dirs.qmlExtensionInstallDirname)
Environment.putEnv("QML2_IMPORT_PATH", product.qbs.installRoot + "/" + product.cutehmi.dirs.extensionInstallDirname)
Environment.putEnv("CUTEHMI_INSTALL_ROOT", product.qbs.installRoot)
}
property bool generateHeaderFile: false
property string moduleInstallDirname: "bin"
property string toolInstallDirname: "bin"
property string testInstallDirname: "bin"
property string qmlExtensionInstallDirname: "QML"
property string qmlPluginInstallDirname: "plugins"
property string qmlSourceDir: project.sourceDirectory + "/QML"
property string extensionInstallDirname: "bin"
property string extensionsSourceDir: project.sourceDirectory + "/extensions"
......@@ -60,10 +56,8 @@ Module {
f.writeLine("// This file has been autogenerated by Qbs cutehmi.dirs module.")
f.writeLine("")
f.writeLine("#define " + prefix + "_MODULE_INSTALL_DIRNAME \"" + product.cutehmi.dirs.moduleInstallDirname + "\"")
f.writeLine("#define " + prefix + "_TOOL_INSTALL_DIRNAME \"" + product.cutehmi.dirs.toolInstallDirname + "\"")
f.writeLine("#define " + prefix + "_QML_EXTENSION_INSTALL_DIRNAME \"" + product.cutehmi.dirs.qmlExtensionInstallDirname + "\"")
f.writeLine("#define " + prefix + "_QML_PLUGIN_INSTALL_DIRNAME \"" + product.cutehmi.dirs.qmlPluginInstallDirname + "\"")
f.writeLine("#define " + prefix + "_TEST_INSTALL_DIRNAME \"" + product.cutehmi.dirs.testInstallDirname + "\"")
f.writeLine("#define " + prefix + "_EXTENSION_INSTALL_DIRNAME \"" + product.cutehmi.dirs.extensionDirname + "\"")
f.writeLine("")
f.writeLine("#endif")
......
......@@ -25,7 +25,7 @@ Module {
prepare: {
var dumpCmd = new Command(product.Qt.core.binPath + "/qmlplugindump", ["-nonrelocatable", product.baseName, product.major + "." + product.minor, product.cutehmi.dirs.extensionInstallDirname]);
dumpCmd.workingDirectory = product.qbs.installRoot
var paths = product.cpp.libraryPaths.concat([product.qbs.installRoot + "/" + product.cutehmi.dirs.moduleInstallDirname]).join(product.qbs.pathListSeparator)
var paths = product.cpp.libraryPaths.concat([product.qbs.installRoot + "/" + product.cutehmi.dirs.extensionInstallDirname]).join(product.qbs.pathListSeparator)
if (product.qbs.targetOS.contains("windows"))
dumpCmd.environment = ["PATH=" + Environment.getEnv("PATH") + product.qbs.pathListSeparator + paths]
else if (product.qbs.targetOS.contains("macos"))
......
......@@ -109,7 +109,7 @@ int main(int argc, char * argv[])
EngineThread engineThread;
std::unique_ptr<QQmlApplicationEngine> engine(new QQmlApplicationEngine);
engine->addImportPath(baseDirPath + CUTEHMI_DIRS_QML_EXTENSION_INSTALL_DIRNAME);
engine->addImportPath(baseDirPath + CUTEHMI_DIRS_EXTENSION_INSTALL_DIRNAME);
CUTEHMI_DEBUG("QML import paths: " << engine->importPathList());
if (!data.cmd->value(data.opt->project).isNull()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment