Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 deleted
13 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/qmake/generators/win32/borland_bmake.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    116116        if(project->values("MAKEFILE").isEmpty())
    117117            project->values("MAKEFILE").append("Makefile");
    118         if(project->values("QMAKE_QMAKE").isEmpty())
    119             project->values("QMAKE_QMAKE").append("qmake");
    120118        return;
    121119    }
  • trunk/qmake/generators/win32/borland_bmake.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/qmake/generators/win32/mingw_make.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    144144       project->first("TEMPLATE") == "lib") {
    145145        if(Option::mkfile::do_stub_makefile) {
    146             t << "QMAKE    = "        << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
     146            t << "QMAKE    = " << var("QMAKE_QMAKE") << endl;
    147147            QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
    148148            for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
     
    192192        t << "CREATE " << target << endl;
    193193        for (QStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) {
    194             if (QDir::isRelativePath(*it))
    195                 t << "ADDMOD " << *it << endl;
    196             else
    197                 t << *it << endl;
     194            t << "ADDMOD " << *it << endl;
    198195        }
    199196        t << "SAVE" << endl;
     
    249246        if(project->values("MAKEFILE").isEmpty())
    250247            project->values("MAKEFILE").append("Makefile");
    251         if(project->values("QMAKE_QMAKE").isEmpty())
    252             project->values("QMAKE_QMAKE").append("qmake");
    253248        return;
    254249    }
     
    374369        }
    375370        createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS"));
    376         objectsLinkLine = "ar -M < " + ar_script_file;
     371        // QMAKE_LIB is used for win32, including mingw, whereas QMAKE_AR is used on Unix.
     372        // Strip off any options since the ar commands will be read from file.
     373        QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);;
     374        if (ar_cmd.isEmpty())
     375            ar_cmd = "ar";
     376        objectsLinkLine = ar_cmd + " -M < " + ar_script_file;
    377377    } else {
    378378        QString ld_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET");
     
    418418        t << escapeDependencyPath(var("RES_FILE")) << ": " << rc_file << "\n\t"
    419419          << var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE")
    420           << " --include-dir=" << incPathStr << endl << endl;
     420          << " --include-dir=" << incPathStr << " $(DEFINES)" << endl << endl;
    421421    }
    422422}
  • trunk/qmake/generators/win32/mingw_make.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/qmake/generators/win32/msvc_nmake.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    157157        if(project->values("MAKEFILE").isEmpty())
    158158            project->values("MAKEFILE").append("Makefile");
    159         if(project->values("QMAKE_QMAKE").isEmpty())
    160             project->values("QMAKE_QMAKE").append("qmake");
    161159        if(project->isEmpty("QMAKE_COPY_FILE"))
    162160            project->values("QMAKE_COPY_FILE").append("$(COPY)");
     
    216214    }
    217215    if(project->isActiveConfig("debug")) {
    218         project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb");
     216        project->values("QMAKE_DISTCLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb");
    219217        project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk");
    220218        project->values("QMAKE_CLEAN").append("vc*.pdb");
     
    313311    }
    314312    if(!project->isEmpty("QMAKE_POST_LINK")) {
    315         if (useSignature)
    316             t << " && " << var("QMAKE_POST_LINK");
    317         else
    318             t << "\n\t" << var("QMAKE_POST_LINK");
     313        t << "\n\t" << var("QMAKE_POST_LINK");
    319314    }
    320315    t << endl;
  • trunk/qmake/generators/win32/msvc_nmake.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/qmake/generators/win32/msvc_objectmodel.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4242#include "msvc_objectmodel.h"
    4343#include "msvc_vcproj.h"
     44#include "msvc_vcxproj.h"
    4445#include <qstringlist.h>
    4546#include <qfileinfo.h>
     
    280281}
    281282
     283// VCToolBase -------------------------------------------------
     284QStringList VCToolBase::fixCommandLine(const QString &input)
     285{
     286    // The splitting regexp is a bit bizarre for backwards compat reasons (why else ...).
     287    return input.split(QRegExp(QLatin1String("\n\t|\r\\\\h|\r\n")));
     288}
     289
     290static QString vcCommandSeparator()
     291{
     292    // MSVC transforms the build tree into a single batch file, simply pasting the contents
     293    // of the custom commands into it, and putting an "if errorlevel goto" statement behind it.
     294    // As we want every sub-command to be error-checked (as is done by makefile-based
     295    // backends), we insert the checks ourselves, using the undocumented jump target.
     296    static QString cmdSep =
     297            QLatin1String("&#x000D;&#x000A;if errorlevel 1 goto VCReportError&#x000D;&#x000A;");
     298    return cmdSep;
     299}
     300
    282301// VCCLCompilerTool -------------------------------------------------
    283302VCCLCompilerTool::VCCLCompilerTool()
     
    673692            if(third == 'd')
    674693                RuntimeLibrary = rtMultiThreadedDebug;
     694            break;
     695        } else if (second == 'P') {
     696            if (config->CompilerVersion >= NET2005)
     697                AdditionalOptions += option;
     698            else
     699                warn_msg(WarnLogic, "/MP option is not supported in Visual C++ < 2005, ignoring.");
    675700            break;
    676701        }
     
    14241449    case 0x0034160: // /MAP[:filename]
    14251450        GenerateMapFile = _True;
    1426         MapFileName = option+5;
     1451        if (option[4] == ':')
     1452            MapFileName = option+5;
    14271453        break;
    14281454    case 0x164e1ef: // /MAPINFO:{EXPORTS|LINES}
     
    19061932XmlOutput &operator<<(XmlOutput &xml, const VCCustomBuildTool &tool)
    19071933{
    1908     // The code below offers two ways to split custom build step commands.
    1909     // Normally the $$escape_expand(\n\t) is used in a project file, which is correctly translated
    1910     // in all generators. However, if you use $$escape_expand(\n\r) (or \n\h) instead, the VCPROJ
    1911     // generator will instead of binding the commands with " && " will insert a proper newline into
    1912     // the VCPROJ file. We sometimes use this method of splitting commands if the custom buildstep
    1913     // contains a command-line which is too big to run on certain OS.
    1914     QString cmds;
    1915     int end = tool.CommandLine.count();
    1916     for(int i = 0; i < end; ++i) {
    1917         QString cmdl = tool.CommandLine.at(i);
    1918         if (cmdl.contains("\r\t")) {
    1919             if (i == end - 1)
    1920                 cmdl = cmdl.trimmed();
    1921             cmdl.replace("\r\t", " && ");
    1922         } else if (cmdl.contains("\r\n")) {
    1923             ;
    1924         } else if (cmdl.contains("\r\\h")) {
    1925             // The above \r\n should work, but doesn't, so we have this hack
    1926             cmdl.replace("\r\\h", "\r\n");
    1927         } else {
    1928             if (i < end - 1)
    1929                 cmdl += " && ";
    1930         }
    1931         cmds += cmdl;
    1932     }
    19331934    return xml
    19341935        << tag(_Tool)
    19351936            << attrS(_Name, tool.ToolName)
    19361937            << attrX(_AdditionalDependencies, tool.AdditionalDependencies, ";")
    1937             << attrS(_CommandLine, cmds)
     1938            << attrS(_CommandLine, tool.CommandLine.join(vcCommandSeparator()))
    19381939            << attrS(_Description, tool.Description)
    19391940            << attrX(_Outputs, tool.Outputs, ";")
     
    19951996            << attrS(_Name, tool.ToolName)
    19961997            << attrS(_Path, tool.ToolPath)
    1997             << attrS(_CommandLine, tool.CommandLine)
     1998            << attrS(_CommandLine, tool.CommandLine.join(vcCommandSeparator()))
    19981999            << attrS(_Description, tool.Description)
    19992000            << attrT(_ExcludedFromBuild, tool.ExcludedFromBuild)
     
    22892290            CustomBuildTool.Description += " & ";
    22902291        CustomBuildTool.Description += cmd_name;
    2291         CustomBuildTool.CommandLine += cmd.trimmed().split("\n", QString::SkipEmptyParts);
     2292        CustomBuildTool.CommandLine += VCToolBase::fixCommandLine(cmd.trimmed());
    22922293        int space = cmd.indexOf(' ');
    22932294        QFileInfo finf(cmd.left(space));
  • trunk/qmake/generators/win32/msvc_objectmodel.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    5959    NET2003 = 0x71,
    6060    NET2005 = 0x80,
    61     NET2008 = 0x90
     61    NET2008 = 0x90,
     62    NET2010 = 0xa0
    6263};
    6364
     
    475476            parseOption((*it).toLatin1());
    476477    }
     478    static QStringList fixCommandLine(const QString &input);
    477479};
    478480
     
    746748public:
    747749    // Variables
    748     QString                 CommandLine;
     750    QStringList             CommandLine;
    749751    QString                 Description;
    750752    triState                ExcludedFromBuild;
     
    868870    customBuildCheck        CustomBuild;
    869871
    870     bool                    useCustomBuildTool;
     872    bool                    useCustomBuildTool;
    871873    VCCustomBuildTool       CustomBuildTool;
    872874
  • trunk/qmake/generators/win32/msvc_vcproj.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    6868#ifdef Q_OS_WIN32
    6969#include <qt_windows.h>
    70 #include <windows/registry.h>
     70#include <windows/registry_p.h>
    7171
    7272QT_BEGIN_NAMESPACE
     
    7878} dotNetCombo[] = {
    7979#ifdef Q_OS_WIN64
     80    {NET2010, "MSVC.NET 2010 (10.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\10.0\\Setup\\VC\\ProductDir"},
     81    {NET2010, "MSVC.NET 2010 Express Edition (10.0)", "Software\\Wow6432Node\\Microsoft\\VCExpress\\10.0\\Setup\\VC\\ProductDir"},
    8082    {NET2008, "MSVC.NET 2008 (9.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir"},
    8183    {NET2008, "MSVC.NET 2008 Express Edition (9.0)", "Software\\Wow6432Node\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir"},
     
    8587    {NET2002, "MSVC.NET 2002 (7.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir"},
    8688#else
     89    {NET2010, "MSVC.NET 2010 (10.0)", "Software\\Microsoft\\VisualStudio\\10.0\\Setup\\VC\\ProductDir"},
     90    {NET2010, "MSVC.NET 2010 Express Edition (10.0)", "Software\\Microsoft\\VCExpress\\10.0\\Setup\\VC\\ProductDir"},
    8791    {NET2008, "MSVC.NET 2008 (9.0)", "Software\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir"},
    8892    {NET2008, "MSVC.NET 2008 Express Edition (9.0)", "Software\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir"},
     
    116120    int i = 0;
    117121    for(; dotNetCombo[i].version; ++i) {
    118         QString path = readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey);
     122        QString path = qt_readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey);
    119123        if(!path.isEmpty()) {
    120124            ++installed;
     
    133137    i = installed = 0;
    134138    for(; dotNetCombo[i].version; ++i) {
    135         QString productPath = readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey).toLower();
     139        QString productPath = qt_readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey).toLower();
    136140                if (productPath.isEmpty())
    137141                        continue;
     
    166170const char _slnHeader70[]       = "Microsoft Visual Studio Solution File, Format Version 7.00";
    167171const char _slnHeader71[]       = "Microsoft Visual Studio Solution File, Format Version 8.00";
    168 const char _slnHeader80[]       = "Microsoft Visual Studio Solution File, Format Version 9.00";
    169 const char _slnHeader90[]       = "Microsoft Visual Studio Solution File, Format Version 10.00";
     172const char _slnHeader80[]       = "Microsoft Visual Studio Solution File, Format Version 9.00"
     173                                  "\n# Visual Studio 2005";
     174const char _slnHeader90[]       = "Microsoft Visual Studio Solution File, Format Version 10.00"
     175                                  "\n# Visual Studio 2008";
     176const char _slnHeader100[]      = "Microsoft Visual Studio Solution File, Format Version 11.00"
     177                                  "\n# Visual Studio 2010";
    170178                                  // The following UUID _may_ change for later servicepacks...
    171179                                  // If so we need to search through the registry at
     
    355363
    356364    switch(which_dotnet_version()) {
     365    case NET2010:
     366        t << _slnHeader100;
     367        break;
    357368    case NET2008:
    358369        t << _slnHeader90;
     
    890901    conf.compiler.ProgramDataBaseFileName = ".\\" ;
    891902    conf.compiler.ObjectFile = placement ;
     903    conf.compiler.ExceptionHandling = ehNone;
    892904    // PCH
    893905    if (usePCH) {
     
    907919    if(project->isActiveConfig("debug")){
    908920        // Debug version
    909         conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_DEBUG"));
    910921        if((projectTarget == Application) || (projectTarget == StaticLib))
    911922            conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DBG"));
     
    914925    } else {
    915926        // Release version
    916         conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_RELEASE"));
    917927        conf.compiler.PreprocessorDefinitions += "QT_NO_DEBUG";
    918928        conf.compiler.PreprocessorDefinitions += "NDEBUG";
     
    924934
    925935    // Common for both release and debug
    926     if(project->isActiveConfig("warn_off"))
    927         conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_WARN_OFF"));
    928     else if(project->isActiveConfig("warn_on"))
    929         conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_WARN_ON"));
    930936    if(project->isActiveConfig("windows"))
    931937        conf.compiler.PreprocessorDefinitions += project->values("MSVCPROJ_WINCONDEF");
     
    990996    conf.linker.OutputFile += project->first("MSVCPROJ_TARGET");
    991997
    992     if(project->isActiveConfig("debug")){
    993         conf.linker.parseOptions(project->values("QMAKE_LFLAGS_DEBUG"));
    994     } else {
    995         conf.linker.parseOptions(project->values("QMAKE_LFLAGS_RELEASE"));
    996     }
    997 
    998998    if(project->isActiveConfig("dll")){
    999999        conf.linker.parseOptions(project->values("QMAKE_LFLAGS_QT_DLL"));
    10001000    }
    1001 
    1002     if(project->isActiveConfig("console")){
    1003         conf.linker.parseOptions(project->values("QMAKE_LFLAGS_CONSOLE"));
    1004     } else {
    1005         conf.linker.parseOptions(project->values("QMAKE_LFLAGS_WINDOWS"));
    1006     }
    1007 
    10081001}
    10091002
     
    10351028}
    10361029
    1037 QString VcprojGenerator::fixCommandLine(DotNET version, const QString &input) const
    1038 {
    1039     QString result = input;
    1040 
    1041     if (version >= NET2005)
    1042         result = result.replace(QLatin1Char('\n'), QLatin1String("&#x000D;&#x000A;"));
    1043 
    1044     return result;
    1045 }
    1046 
    10471030void VcprojGenerator::initPostBuildEventTools()
    10481031{
    10491032    VCConfiguration &conf = vcProject.Configuration;
    10501033    if(!project->values("QMAKE_POST_LINK").isEmpty()) {
    1051         QString cmdline = fixCommandLine(conf.CompilerVersion, var("QMAKE_POST_LINK"));
     1034        QStringList cmdline = VCToolBase::fixCommandLine(var("QMAKE_POST_LINK"));
    10521035        conf.postBuild.CommandLine = cmdline;
    1053         if (conf.CompilerVersion < NET2005)
    1054             cmdline = cmdline.replace("\n", "&&");
    1055         conf.postBuild.Description = cmdline;
     1036        conf.postBuild.Description = cmdline.join(QLatin1String("\r\n"));
    10561037    }
    10571038
     
    10601041                        !project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH");
    10611042    if(useSignature)
    1062         conf.postBuild.CommandLine.prepend(QLatin1String("signtool sign /F ") + signature + " \"$(TargetPath)\"\n" +
    1063             (!conf.postBuild.CommandLine.isEmpty() ? " && " : ""));
     1043        conf.postBuild.CommandLine.prepend(
     1044                QLatin1String("signtool sign /F ") + signature + QLatin1String(" \"$(TargetPath)\""));
    10641045
    10651046    if(!project->values("MSVCPROJ_COPY_DLL").isEmpty()) {
    1066         if(!conf.postBuild.CommandLine.isEmpty())
    1067             conf.postBuild.CommandLine += " && ";
    10681047        conf.postBuild.Description += var("MSVCPROJ_COPY_DLL_DESC");
    10691048        conf.postBuild.CommandLine += var("MSVCPROJ_COPY_DLL");
     
    11941173    VCConfiguration &conf = vcProject.Configuration;
    11951174    if(!project->values("QMAKE_PRE_LINK").isEmpty()) {
    1196         QString cmdline = fixCommandLine(conf.CompilerVersion, var("QMAKE_PRE_LINK"));
    1197         conf.preLink.Description = cmdline;
     1175        QStringList cmdline = VCToolBase::fixCommandLine(var("QMAKE_PRE_LINK"));
    11981176        conf.preLink.CommandLine = cmdline;
     1177        conf.preLink.Description = cmdline.join(QLatin1String("\r\n"));
    11991178    }
    12001179}
     
    16091588        ofile = ofile.replace('-', '_');
    16101589    } else {
    1611         int hypenfind = ofile.indexOf('-', slashfind);
    1612         while (hypenfind != -1 && slashfind < hypenfind) {
    1613             ofile = ofile.replace(hypenfind, 1, '_');
    1614             hypenfind = ofile.indexOf('-', hypenfind + 1);
     1590        int hyphenfind = ofile.indexOf('-', slashfind);
     1591        while (hyphenfind != -1 && slashfind < hyphenfind) {
     1592            ofile = ofile.replace(hyphenfind, 1, '_');
     1593            hyphenfind = ofile.indexOf('-', hyphenfind + 1);
    16151594        }
    16161595    }
     
    16271606       !exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2003/" + file))) &&
    16281607       !exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2005/" + file))) &&
    1629        !exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2008/" + file))) &&
    1630        !exists((ret = (QString(qgetenv("HOME")) + "/.tmake/" + file))))
     1608       !exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2008/" + file))))
    16311609        return "";
    16321610    debug_msg(1, "Generator: MSVC.NET: Found template \'%s\'", ret.toLatin1().constData());
  • trunk/qmake/generators/win32/msvc_vcproj.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    6262    bool writeMakefile(QTextStream &);
    6363    bool writeProjectMakefile();
    64     void writeSubDirs(QTextStream &t);
    6564
    6665    QString findTemplate(QString file);
     
    120119    void initExtraCompilerOutputs();
    121120
     121    void writeSubDirs(QTextStream &t); // Called from VCXProj backend
     122    QUuid getProjectUUID(const QString &filename=QString()); // Called from VCXProj backend
     123
    122124    Target projectTarget;
    123125
     
    129131
    130132private:
    131     QString fixCommandLine(DotNET version, const QString &input) const;
    132     QUuid getProjectUUID(const QString &filename=QString());
    133133    QUuid increaseUUID(const QUuid &id);
    134134    friend class VCFilter;
  • trunk/qmake/generators/win32/winmakefile.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    473473        project->values("RES_FILE").prepend(fileInfo(resFile).fileName());
    474474        if (!project->values("OBJECTS_DIR").isEmpty()) {
    475             if(project->isActiveConfig("staticlib"))
    476                 project->values("RES_FILE").first().prepend(fileInfo(project->values("DESTDIR").first()).absoluteFilePath() + Option::dir_sep);
     475            QString resDestDir;
     476            if (project->isActiveConfig("staticlib"))
     477                resDestDir = fileInfo(project->first("DESTDIR")).absoluteFilePath();
    477478            else
    478               project->values("RES_FILE").first().prepend(project->values("OBJECTS_DIR").first() + Option::dir_sep);
     479                resDestDir = project->first("OBJECTS_DIR");
     480            resDestDir.append(Option::dir_sep);
     481            project->values("RES_FILE").first().prepend(resDestDir);
    479482        }
    480483        project->values("RES_FILE").first() = Option::fixPathToTargetOS(project->values("RES_FILE").first(), false, false);
     
    605608    writeLibsPart(t);
    606609
    607     t << "QMAKE         = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") :
    608                               Option::fixPathToTargetOS(var("QMAKE_QMAKE"), false)) << endl;
     610    t << "QMAKE         = " << var("QMAKE_QMAKE") << endl;
    609611    t << "IDC           = " << (project->isEmpty("QMAKE_IDC") ? QString("idc") :
    610612                              Option::fixPathToTargetOS(var("QMAKE_IDC"), false)) << endl;
     
    658660    t << "DIST          = " << varList("DISTFILES") << endl;
    659661    t << "QMAKE_TARGET  = " << var("QMAKE_ORIG_TARGET") << endl;
    660     // The comment is important to maintain variable compatability with Unix
     662    // The comment is important to maintain variable compatibility with Unix
    661663    // Makefiles, while not interpreting a trailing-slash as a linebreak
    662664    t << "DESTDIR        = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak" << endl;
     
    789791        target = project->first("TARGET");
    790792    return QString(target + project->first("TARGET_VERSION_EXT") + ".lib");
     793}
     794
     795QString Win32MakefileGenerator::getPdbTarget()
     796{
     797    return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".pdb");
    791798}
    792799
     
    841848            uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"" + del_suffix);
    842849        }
     850        if(project->isActiveConfig("shared") && project->isActiveConfig("debug")) {
     851            QString pdb_target = getPdbTarget();
     852            pdb_target.remove('"');
     853            QString src_targ = (project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR")) + pdb_target;
     854            QString dst_targ = filePrefixRoot(root, fileFixify(targetdir + pdb_target, FileFixifyAbsolute));
     855            if(!ret.isEmpty())
     856                ret += "\n\t";
     857            ret += QString("-$(INSTALL_FILE)") + " \"" + src_targ + "\" \"" + dst_targ + "\"";
     858            if(!uninst.isEmpty())
     859                uninst.append("\n\t");
     860            uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
     861        }
    843862    }
    844863
  • trunk/qmake/generators/win32/winmakefile.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    8585    virtual void processFileTagsVar();
    8686    virtual QString getLibTarget();
     87    virtual QString getPdbTarget();
    8788};
    8889
Note: See TracChangeset for help on using the changeset viewer.