Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8778

The variable used to generate the application name on the phone screen should be different one used to generate the application .exe filename

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 4.6.2
    • None
    • None

    Description

      For the moment the same variable is used to generate both for the name of the application on the phone screen (the name visible under the icon), and for the name of the application .exe file in the filesystem.

      However, both should be different, since purposes are different:

      • Application name on screen is used for marketing purposes and should be a nice looking name, including spaces, branding, etc... ("My App" for exemple)
      • Application exe filename is a technical name following Symbian Signed guidelines : it must not contains any space and should end with "_<UID>" ("MyApp_0x00000000.exe" for exemple).

      We easily see both set of rules are in opposition. We should be able to set 2 different names for those.
      However, in the qmake code, we can see both are using the same name:

      void SymbianMakefileGenerator::init()
      {
      ...
      fixedTarget = escapeFilePath(fileFixify(project->first("TARGET")));
      fixedTarget = removePathSeparators(fixedTarget);
      removeSpecialCharacters(fixedTarget);
      ...
      }
      [...]
      oid SymbianMakefileGenerator::writeLocFile(QStringList &symbianLangCodes)
      {
      QString filename(fixedTarget);
      filename.append(".loc");
      QFile ft(filename);
      if (ft.open(QIODevice::WriteOnly)) {
      generatedFiles << ft.fileName();
      QTextStream t(&ft);
      t << "// ============================================================================" << endl;
      t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
      t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
      t << "// * This file is generated by qmake and should not be modified by the" << endl;
      t << "// * user." << endl;
      t << "// ============================================================================" << endl;
      t << endl;
      t << "#ifdef LANGUAGE_SC" << endl;
      t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
      t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
      foreach(QString lang, symbianLangCodes)

      { t << "#elif defined LANGUAGE_" << lang << endl; t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl; t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl; }

      t << "#else" << endl;
      t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
      t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
      t << "#endif" << endl;
      } else

      { PRINT_FILE_CREATE_ERROR(filename); }

      }
      [...]
      void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList)
      {
      ...
      if (targetType == TypeExe)

      { // deploy .exe file t << "; Executable and default resource files" << endl; QString exeFile = fixedTarget + ".exe"; t << QString("\"%1/%2\" - \"%3\\%4\"") .arg(epocReleasePath) .arg(exeFile) .arg(installPathBin) .arg(exeFile) << endl; }

      ...
      }

      --------------------------------
      We propose the following behaviour :

      • Add a STRING_CAPTION statement (maybe also a STRING_SHORT_CAPTION) in the PRO file for Symbian.
      • Change the writeLocFile method getting the STRING_CAPTION (and STRING_SHORT_CAPTION if added too) text (keeping spaces) instead of the current fixedTarget value.
      • Change the generatePkgFile method setting "QString exeFile = fixedTarget + "_" + uid + ".exe";" instead of "QString exeFile = fixedTarget + ".exe";" (same for dll and others binary that falls in Symbian Signed requirement).
      • In writeMmpFileTargetPart method add fixedTarget << "_" << uid3 << ... (.exe, .dll, ...)

      Attachments

        Issue Links

          Activity

            People

              fenglich Frans Englich (closed Nokia identity)
              gregoire_gueret Gregoire Gueret
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: