45 #include <qstring.h> |
45 #include <qstring.h> |
46 #include <qstringlist.h> |
46 #include <qstringlist.h> |
47 #include <qdir.h> |
47 #include <qdir.h> |
48 #include <qdatetime.h> |
48 #include <qdatetime.h> |
49 #include <qdebug.h> |
49 #include <qdebug.h> |
|
50 |
|
51 // Included from tools/shared |
|
52 #include <symbian/epocroot.h> |
50 |
53 |
51 SymbianSbsv2MakefileGenerator::SymbianSbsv2MakefileGenerator() : SymbianMakefileGenerator() { } |
54 SymbianSbsv2MakefileGenerator::SymbianSbsv2MakefileGenerator() : SymbianMakefileGenerator() { } |
52 SymbianSbsv2MakefileGenerator::~SymbianSbsv2MakefileGenerator() { } |
55 SymbianSbsv2MakefileGenerator::~SymbianSbsv2MakefileGenerator() { } |
53 |
56 |
54 #define FLM_DEST_DIR "epoc32/tools/makefile_templates/qt" |
57 #define FLM_DEST_DIR "epoc32/tools/makefile_templates/qt" |
89 } |
92 } |
90 flmExportDone = true; |
93 flmExportDone = true; |
91 } |
94 } |
92 } |
95 } |
93 |
96 |
|
97 void SymbianSbsv2MakefileGenerator::writeSbsDeploymentList(const DeploymentList& depList, QTextStream& t) |
|
98 { |
|
99 for (int i = 0; i < depList.size(); ++i) { |
|
100 t << "START EXTENSION qt/qmake_emulator_deployment" << endl; |
|
101 QString fromItem = depList.at(i).from; |
|
102 QString toItem = depList.at(i).to; |
|
103 fromItem.replace("\\", "/"); |
|
104 toItem.replace("\\", "/"); |
|
105 #if defined(Q_OS_WIN) |
|
106 toItem.prepend(QDir::current().absolutePath().left(2)); // add drive |
|
107 #endif |
|
108 t << "OPTION DEPLOY_SOURCE " << fromItem << endl; |
|
109 t << "OPTION DEPLOY_TARGET " << toItem << endl; |
|
110 t << "END" << endl; |
|
111 } |
|
112 } |
|
113 |
94 void SymbianSbsv2MakefileGenerator::writeMkFile(const QString& wrapperFileName, bool deploymentOnly) |
114 void SymbianSbsv2MakefileGenerator::writeMkFile(const QString& wrapperFileName, bool deploymentOnly) |
95 { |
115 { |
96 // Can't use extension makefile with sbsv2 |
116 // Can't use extension makefile with sbsv2 |
97 Q_UNUSED(wrapperFileName); |
117 Q_UNUSED(wrapperFileName); |
98 Q_UNUSED(deploymentOnly); |
118 Q_UNUSED(deploymentOnly); |
108 QStringList debugPlatforms = allPlatforms; |
128 QStringList debugPlatforms = allPlatforms; |
109 QStringList releasePlatforms = allPlatforms; |
129 QStringList releasePlatforms = allPlatforms; |
110 releasePlatforms.removeAll("winscw"); // No release for emulator |
130 releasePlatforms.removeAll("winscw"); // No release for emulator |
111 |
131 |
112 QString testClause; |
132 QString testClause; |
113 if (project->isActiveConfig("symbian_test")) |
133 if (project->isActiveConfig(SYMBIAN_TEST_CONFIG)) |
114 testClause = QLatin1String(".test"); |
134 testClause = QLatin1String(".test"); |
115 else |
135 else |
116 testClause = QLatin1String(""); |
136 testClause = QLatin1String(""); |
117 |
137 |
118 QTextStream t(&wrapperFile); |
138 QTextStream t(&wrapperFile); |
129 t << endl; |
149 t << endl; |
130 t << "MAKEFILE = " << wrapperFile.fileName() << endl; |
150 t << "MAKEFILE = " << wrapperFile.fileName() << endl; |
131 t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; |
151 t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; |
132 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; |
152 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; |
133 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; |
153 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; |
|
154 t << "CHK_DIR_EXISTS = " << var("QMAKE_CHK_DIR_EXISTS") << endl; |
|
155 t << "MKDIR = " << var("QMAKE_MKDIR") << endl; |
134 t << "MOVE = " << var("QMAKE_MOVE") << endl; |
156 t << "MOVE = " << var("QMAKE_MOVE") << endl; |
135 t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; |
157 t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; |
136 t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; |
158 t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; |
137 t << "MAKE = make" << endl; |
159 t << "MAKE = make" << endl; |
138 t << "SBS = sbs" << endl; |
160 t << "SBS = sbs" << endl; |
344 absoluteDeps.append(fileInfo(depItem).absoluteFilePath()); |
366 absoluteDeps.append(fileInfo(depItem).absoluteFilePath()); |
345 absoluteDeps.append(" "); |
367 absoluteDeps.append(" "); |
346 } |
368 } |
347 } |
369 } |
348 |
370 |
349 t << "START EXTENSION qt/qmake_extra_pre_targetdep" << endl; |
371 t << "START EXTENSION qt/qmake_extra_pre_targetdep.export" << endl; |
350 t << "OPTION PREDEP_TARGET " << absoluteTarget << endl; |
372 t << "OPTION PREDEP_TARGET " << absoluteTarget << endl; |
351 t << "OPTION DEPS " << absoluteDeps << endl; |
373 t << "OPTION DEPS " << absoluteDeps << endl; |
352 |
374 |
353 if (commandItem.indexOf("$(INCPATH)") != -1) |
375 if (commandItem.indexOf("$(INCPATH)") != -1) |
354 commandItem.replace("$(INCPATH)", incPath.join(" ")); |
376 commandItem.replace("$(INCPATH)", incPath.join(" ")); |
428 t << "END" << endl; |
450 t << "END" << endl; |
429 t << endl; |
451 t << endl; |
430 } |
452 } |
431 } |
453 } |
432 |
454 |
433 // Write winscw deployment rules |
455 // Write deployment rules |
434 QString remoteTestPath = epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid; |
456 QString remoteTestPath = epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid; |
435 DeploymentList depList; |
457 DeploymentList depList; |
436 initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles); |
458 |
437 |
459 //write emulator deployment |
438 //:QTP:QTPROD-92 Deployment of plugins requires WINSCW build before ARM build |
|
439 t << "#if defined(WINSCW)" << endl; |
460 t << "#if defined(WINSCW)" << endl; |
440 //write WINSCW deployment |
461 initProjectDeploySymbian(project, depList, remoteTestPath, false, |
441 writeSbsDeploymentList(depList, t); |
462 QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM), QString(), generatedDirs, generatedFiles); |
442 t << "#else" << endl; |
|
443 //write ARMV5 deployment |
|
444 remoteTestPath = epocRoot() + QLatin1String("epoc32/data/z/private/") + privateDirUid; |
|
445 depList.clear(); |
|
446 generatedDirs.clear(); |
|
447 generatedFiles.clear(); |
|
448 initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("armv5"), QLatin1String("urel"), generatedDirs, generatedFiles); |
|
449 writeSbsDeploymentList(depList, t); |
463 writeSbsDeploymentList(depList, t); |
450 t << "#endif" << endl; |
464 t << "#endif" << endl; |
|
465 |
|
466 //write ROM deployment |
|
467 remoteTestPath = epocRoot() + QLatin1String("epoc32/data/z/private/") + privateDirUid; |
|
468 depList.clear(); |
|
469 initProjectDeploySymbian(project, depList, remoteTestPath, false, |
|
470 QLatin1String(ROM_DEPLOYMENT_PLATFORM), QString(), generatedDirs, generatedFiles); |
|
471 writeSbsDeploymentList(depList, t); |
451 t << endl; |
472 t << endl; |
452 |
473 |
453 // Write post link rules |
474 // Write post link rules |
454 if (!project->isEmpty("QMAKE_POST_LINK")) { |
475 if (!project->isEmpty("QMAKE_POST_LINK")) { |
455 t << "START EXTENSION qt/qmake_post_link" << endl; |
476 t << "START EXTENSION qt/qmake_post_link" << endl; |
483 t << "OPTION TARGETFILE " << iconTarget << endl; |
504 t << "OPTION TARGETFILE " << iconTarget << endl; |
484 t << "OPTION SVGENCODINGVERSION 3" << endl; // Compatibility with S60 3.1 devices and up |
505 t << "OPTION SVGENCODINGVERSION 3" << endl; // Compatibility with S60 3.1 devices and up |
485 t << "END" << endl; |
506 t << "END" << endl; |
486 } |
507 } |
487 |
508 |
488 /* :QTP:QTPROD-155: Don't write .make.cache during the compilation, it causes dependency problems in |
|
489 * the parallel build clusters |
|
490 t << "START EXTENSION qt/qmake_store_build" << endl; |
509 t << "START EXTENSION qt/qmake_store_build" << endl; |
491 t << "END" << endl; |
510 t << "END" << endl; |
492 t << endl; |
511 t << endl; |
493 */ |
|
494 |
512 |
495 t << endl; |
513 t << endl; |
496 } |
514 } |
497 |
515 |
498 void SymbianSbsv2MakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension) |
516 void SymbianSbsv2MakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension) |