qmake/generators/symbian/symmake_sbsv2.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   184         foreach(QString item, releasePlatforms) {
   184         foreach(QString item, releasePlatforms) {
   185             t << "\t$(SBS) -c " << item << "_urel" << testClause << endl;
   185             t << "\t$(SBS) -c " << item << "_urel" << testClause << endl;
   186         }
   186         }
   187         t << endl;
   187         t << endl;
   188 
   188 
       
   189         QString winscw("winscw");
   189         // For more specific builds, targets are in this form: build-platform, e.g. release-armv5
   190         // For more specific builds, targets are in this form: build-platform, e.g. release-armv5
   190         foreach(QString item, debugPlatforms) {
   191         foreach(QString item, debugPlatforms) {
   191             t << "debug-" << item << ": " << BLD_INF_FILENAME << endl;
   192             t << "debug-" << item << ": " << BLD_INF_FILENAME << endl;
   192             t << "\t$(SBS) -c " << item << "_udeb" << testClause << endl;
   193             if(QString::compare(item, winscw) == 0)
       
   194                 t << "\t$(SBS) -c " << item << "_udeb.mwccinc" << testClause << endl;
       
   195             else
       
   196                 t << "\t$(SBS) -c " << item << "_udeb" << testClause << endl;
   193         }
   197         }
   194 
   198 
   195         foreach(QString item, releasePlatforms) {
   199         foreach(QString item, releasePlatforms) {
   196             t << "release-" << item << ": " << BLD_INF_FILENAME << endl;
   200             t << "release-" << item << ": " << BLD_INF_FILENAME << endl;
   197             t << "\t$(SBS) -c " << item << "_urel" << testClause << endl;
   201             if(QString::compare(item, winscw) == 0)
       
   202                 t << "\t$(SBS) -c " << item << "_urel.mwccinc" << testClause << endl;
       
   203             else
       
   204                 t << "\t$(SBS) -c " << item << "_urel" << testClause << endl;
   198         }
   205         }
   199 
   206 
   200         t << endl;
   207         t << endl;
   201         t << "export: " << BLD_INF_FILENAME << endl;
   208         t << "export: " << BLD_INF_FILENAME << endl;
   202         t << "\t$(SBS) export" << endl;
   209         t << "\t$(SBS) export" << endl;
   229     t << endl;
   236     t << endl;
   230 
   237 
   231     // create execution target
   238     // create execution target
   232     if (debugPlatforms.contains("winscw") && targetType == TypeExe) {
   239     if (debugPlatforms.contains("winscw") && targetType == TypeExe) {
   233         t << "run:" << endl;
   240         t << "run:" << endl;
   234         t << "\t-call " << epocRoot() << "epoc32/release/winscw/udeb/" << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".exe")) << endl << endl;
   241         t << "\t-call " << epocRoot() << "epoc32/release/winscw/udeb/" << fixedTarget << ".exe" << endl << endl;
   235     }
   242     }
   236 }
   243 }
   237 
   244 
   238 void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t)
   245 void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile)
   239 {
   246 {
   240     // Makes sure we have needed FLMs in place.
   247     // Makes sure we have needed FLMs in place.
   241     exportFlm();
   248     exportFlm();
   242 
   249 
   243     // Parse extra compilers data
   250     // Parse extra compilers data
   328             }
   335             }
   329         }
   336         }
   330     }
   337     }
   331 
   338 
   332     t << endl;
   339     t << endl;
       
   340 
       
   341     QString translationFilename = project->first("TRANSLATIONS");
       
   342     if (!project->values("SYMBIANTRANSLATIONS").isEmpty() && !translationFilename.isEmpty()) {
       
   343         QStringList symbianTranslations = project->values("SYMBIANTRANSLATIONS");
       
   344         QString symbianTrPath = project->first("SYMBIANTRANSLATIONDIR");
       
   345         foreach (const QString &symbianTrans, symbianTranslations) {
       
   346             QString translationTsFilename(translationFilename);
       
   347             translationTsFilename.chop(3);
       
   348             translationTsFilename.insert(0,symbianTrPath);
       
   349             translationTsFilename.append(QString::fromLatin1("_"));
       
   350             translationTsFilename.append(symbianTrans);
       
   351             QString translationQmFilename(translationTsFilename);
       
   352             translationTsFilename.append(QString::fromLatin1(".ts"));
       
   353             translationQmFilename.append(QString::fromLatin1(".qm"));
       
   354             t << "START EXTENSION qt/ts2qm" << endl;
       
   355             t << "OPTION TSFILE " << translationTsFilename << endl;
       
   356             t << "OPTION QMFILE " << translationQmFilename << endl;
       
   357             t << "END" << endl;
       
   358             t << endl;
       
   359         }
       
   360     }
   333 
   361 
   334     // Write winscw deployment rules
   362     // Write winscw deployment rules
   335     QString remoteTestPath = epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid;
   363     QString remoteTestPath = epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid;
   336     DeploymentList depList;
   364     DeploymentList depList;
   337     initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles);
   365     initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles);
   368             fprintf(stderr, "Warning: Only first icon specified in ICON variable is used: '%s'.", qPrintable(icon));
   396             fprintf(stderr, "Warning: Only first icon specified in ICON variable is used: '%s'.", qPrintable(icon));
   369 
   397 
   370         t << "START EXTENSION s60/mifconv" << endl;
   398         t << "START EXTENSION s60/mifconv" << endl;
   371 
   399 
   372         QFileInfo iconInfo = fileInfo(icon);
   400         QFileInfo iconInfo = fileInfo(icon);
   373         QString iconPath = iconInfo.path();
   401 
       
   402         QFileInfo bldinf(project->values("MAKEFILE").first());
       
   403         QString iconPath = bldinf.dir().relativeFilePath(iconInfo.path());
       
   404 
   374         QString iconFile = iconInfo.baseName();
   405         QString iconFile = iconInfo.baseName();
       
   406 
       
   407         QFileInfo iconTargetInfo = fileInfo(iconTargetFile);
       
   408         QString iconTarget = iconTargetInfo.fileName();
   375 
   409 
   376         t << "OPTION SOURCES -c32 " << iconFile << endl;
   410         t << "OPTION SOURCES -c32 " << iconFile << endl;
   377         t << "OPTION SOURCEDIR " << iconPath << endl;
   411         t << "OPTION SOURCEDIR " << iconPath << endl;
   378         t << "OPTION TARGETFILE " << uid3 << ".mif" << endl;
   412         t << "OPTION TARGETFILE " << iconTarget << endl;
   379         t << "OPTION SVGENCODINGVERSION 3" << endl; // Compatibility with S60 3.1 devices and up
   413         t << "OPTION SVGENCODINGVERSION 3" << endl; // Compatibility with S60 3.1 devices and up
   380         t << "END" << endl;
   414         t << "END" << endl;
   381     }
   415     }
   382 
       
   383     // Generate temp dirs
       
   384     QString tempDirs;
       
   385     for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
       
   386         QStringList values = it.value();
       
   387         for (int i = 0; i < values.size(); ++i) {
       
   388             QString value = values.at(i);
       
   389             if (value.endsWith("/" QT_EXTRA_INCLUDE_DIR)) {
       
   390                 value = fileInfo(value).absoluteFilePath();
       
   391                 tempDirs.append(value);
       
   392                 tempDirs.append(" ");
       
   393             }
       
   394         }
       
   395     }
       
   396 
       
   397     if (tempDirs.size())
       
   398         tempDirs.chop(1); // Remove final space
       
   399 
       
   400     t << "START EXTENSION qt/qmake_generate_temp_dirs" << endl;
       
   401     t << "OPTION DIRS " << tempDirs << endl;
       
   402     t << "END" << endl;
       
   403     t << endl;
       
   404 
   416 
   405     /* :QTP:QTPROD-155: Don't write .make.cache during the compilation, it causes dependency problems in
   417     /* :QTP:QTPROD-155: Don't write .make.cache during the compilation, it causes dependency problems in
   406      * the parallel build clusters
   418      * the parallel build clusters
   407     t << "START EXTENSION qt/qmake_store_build" << endl;
   419     t << "START EXTENSION qt/qmake_store_build" << endl;
   408     t << "END" << endl;
   420     t << "END" << endl;
   416 {
   428 {
   417     // We don't generate extension makefile in sbsb2
   429     // We don't generate extension makefile in sbsb2
   418     Q_UNUSED(t);
   430     Q_UNUSED(t);
   419     Q_UNUSED(addDeploymentExtension);
   431     Q_UNUSED(addDeploymentExtension);
   420 }
   432 }
       
   433 
       
   434 void SymbianSbsv2MakefileGenerator::appendAbldTempDirs(QStringList& sysincspaths, QString includepath)
       
   435 {
       
   436     //Do nothing
       
   437     Q_UNUSED(sysincspaths);
       
   438     Q_UNUSED(includepath);
       
   439 }