92 } |
92 } |
93 flmExportDone = true; |
93 flmExportDone = true; |
94 } |
94 } |
95 } |
95 } |
96 |
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 |
97 void SymbianSbsv2MakefileGenerator::writeMkFile(const QString& wrapperFileName, bool deploymentOnly) |
114 void SymbianSbsv2MakefileGenerator::writeMkFile(const QString& wrapperFileName, bool deploymentOnly) |
98 { |
115 { |
99 // Can't use extension makefile with sbsv2 |
116 // Can't use extension makefile with sbsv2 |
100 Q_UNUSED(wrapperFileName); |
117 Q_UNUSED(wrapperFileName); |
101 Q_UNUSED(deploymentOnly); |
118 Q_UNUSED(deploymentOnly); |
111 QStringList debugPlatforms = allPlatforms; |
128 QStringList debugPlatforms = allPlatforms; |
112 QStringList releasePlatforms = allPlatforms; |
129 QStringList releasePlatforms = allPlatforms; |
113 releasePlatforms.removeAll("winscw"); // No release for emulator |
130 releasePlatforms.removeAll("winscw"); // No release for emulator |
114 |
131 |
115 QString testClause; |
132 QString testClause; |
116 if (project->isActiveConfig("symbian_test")) |
133 if (project->isActiveConfig(SYMBIAN_TEST_CONFIG)) |
117 testClause = QLatin1String(".test"); |
134 testClause = QLatin1String(".test"); |
118 else |
135 else |
119 testClause = QLatin1String(""); |
136 testClause = QLatin1String(""); |
120 |
137 |
121 QTextStream t(&wrapperFile); |
138 QTextStream t(&wrapperFile); |
132 t << endl; |
149 t << endl; |
133 t << "MAKEFILE = " << wrapperFile.fileName() << endl; |
150 t << "MAKEFILE = " << wrapperFile.fileName() << endl; |
134 t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; |
151 t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; |
135 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; |
152 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; |
136 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; |
137 t << "MOVE = " << var("QMAKE_MOVE") << endl; |
156 t << "MOVE = " << var("QMAKE_MOVE") << endl; |
138 t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; |
157 t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; |
139 t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; |
158 t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; |
140 t << "MAKE = make" << endl; |
159 t << "MAKE = make" << endl; |
141 t << "SBS = sbs" << endl; |
160 t << "SBS = sbs" << endl; |
347 absoluteDeps.append(fileInfo(depItem).absoluteFilePath()); |
366 absoluteDeps.append(fileInfo(depItem).absoluteFilePath()); |
348 absoluteDeps.append(" "); |
367 absoluteDeps.append(" "); |
349 } |
368 } |
350 } |
369 } |
351 |
370 |
352 t << "START EXTENSION qt/qmake_extra_pre_targetdep" << endl; |
371 t << "START EXTENSION qt/qmake_extra_pre_targetdep.export" << endl; |
353 t << "OPTION PREDEP_TARGET " << absoluteTarget << endl; |
372 t << "OPTION PREDEP_TARGET " << absoluteTarget << endl; |
354 t << "OPTION DEPS " << absoluteDeps << endl; |
373 t << "OPTION DEPS " << absoluteDeps << endl; |
355 |
374 |
356 if (commandItem.indexOf("$(INCPATH)") != -1) |
375 if (commandItem.indexOf("$(INCPATH)") != -1) |
357 commandItem.replace("$(INCPATH)", incPath.join(" ")); |
376 commandItem.replace("$(INCPATH)", incPath.join(" ")); |
431 t << "END" << endl; |
450 t << "END" << endl; |
432 t << endl; |
451 t << endl; |
433 } |
452 } |
434 } |
453 } |
435 |
454 |
436 // Write winscw deployment rules |
455 // Write deployment rules |
437 QString remoteTestPath = epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid; |
456 QString remoteTestPath = epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid; |
438 DeploymentList depList; |
457 DeploymentList depList; |
439 initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles); |
458 |
440 |
459 //write emulator deployment |
441 //:QTP:QTPROD-92 Deployment of plugins requires WINSCW build before ARM build |
|
442 t << "#if defined(WINSCW)" << endl; |
460 t << "#if defined(WINSCW)" << endl; |
443 //write WINSCW deployment |
461 initProjectDeploySymbian(project, depList, remoteTestPath, false, |
444 writeSbsDeploymentList(depList, t); |
462 QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM), QString(), generatedDirs, generatedFiles); |
445 t << "#else" << endl; |
|
446 //write ARMV5 deployment |
|
447 remoteTestPath = epocRoot() + QLatin1String("epoc32/data/z/private/") + privateDirUid; |
|
448 depList.clear(); |
|
449 generatedDirs.clear(); |
|
450 generatedFiles.clear(); |
|
451 initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("armv5"), QLatin1String("urel"), generatedDirs, generatedFiles); |
|
452 writeSbsDeploymentList(depList, t); |
463 writeSbsDeploymentList(depList, t); |
453 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); |
454 t << endl; |
472 t << endl; |
455 |
473 |
456 // Write post link rules |
474 // Write post link rules |
457 if (!project->isEmpty("QMAKE_POST_LINK")) { |
475 if (!project->isEmpty("QMAKE_POST_LINK")) { |
458 t << "START EXTENSION qt/qmake_post_link" << endl; |
476 t << "START EXTENSION qt/qmake_post_link" << endl; |