Changeset 846 for trunk/qmake/generators/win32
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 13 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/qmake/generators/win32/borland_bmake.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 116 116 if(project->values("MAKEFILE").isEmpty()) 117 117 project->values("MAKEFILE").append("Makefile"); 118 if(project->values("QMAKE_QMAKE").isEmpty())119 project->values("QMAKE_QMAKE").append("qmake");120 118 return; 121 119 } -
trunk/qmake/generators/win32/borland_bmake.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/qmake/generators/win32/mingw_make.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 144 144 project->first("TEMPLATE") == "lib") { 145 145 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; 147 147 QStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); 148 148 for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) … … 192 192 t << "CREATE " << target << endl; 193 193 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; 198 195 } 199 196 t << "SAVE" << endl; … … 249 246 if(project->values("MAKEFILE").isEmpty()) 250 247 project->values("MAKEFILE").append("Makefile"); 251 if(project->values("QMAKE_QMAKE").isEmpty())252 project->values("QMAKE_QMAKE").append("qmake");253 248 return; 254 249 } … … 374 369 } 375 370 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; 377 377 } else { 378 378 QString ld_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET"); … … 418 418 t << escapeDependencyPath(var("RES_FILE")) << ": " << rc_file << "\n\t" 419 419 << var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE") 420 << " --include-dir=" << incPathStr << endl << endl;420 << " --include-dir=" << incPathStr << " $(DEFINES)" << endl << endl; 421 421 } 422 422 } -
trunk/qmake/generators/win32/mingw_make.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/qmake/generators/win32/msvc_nmake.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 157 157 if(project->values("MAKEFILE").isEmpty()) 158 158 project->values("MAKEFILE").append("Makefile"); 159 if(project->values("QMAKE_QMAKE").isEmpty())160 project->values("QMAKE_QMAKE").append("qmake");161 159 if(project->isEmpty("QMAKE_COPY_FILE")) 162 160 project->values("QMAKE_COPY_FILE").append("$(COPY)"); … … 216 214 } 217 215 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"); 219 217 project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk"); 220 218 project->values("QMAKE_CLEAN").append("vc*.pdb"); … … 313 311 } 314 312 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"); 319 314 } 320 315 t << endl; -
trunk/qmake/generators/win32/msvc_nmake.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) -
trunk/qmake/generators/win32/msvc_objectmodel.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 42 42 #include "msvc_objectmodel.h" 43 43 #include "msvc_vcproj.h" 44 #include "msvc_vcxproj.h" 44 45 #include <qstringlist.h> 45 46 #include <qfileinfo.h> … … 280 281 } 281 282 283 // VCToolBase ------------------------------------------------- 284 QStringList 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 290 static 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("
if errorlevel 1 goto VCReportError
"); 298 return cmdSep; 299 } 300 282 301 // VCCLCompilerTool ------------------------------------------------- 283 302 VCCLCompilerTool::VCCLCompilerTool() … … 673 692 if(third == 'd') 674 693 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."); 675 700 break; 676 701 } … … 1424 1449 case 0x0034160: // /MAP[:filename] 1425 1450 GenerateMapFile = _True; 1426 MapFileName = option+5; 1451 if (option[4] == ':') 1452 MapFileName = option+5; 1427 1453 break; 1428 1454 case 0x164e1ef: // /MAPINFO:{EXPORTS|LINES} … … 1906 1932 XmlOutput &operator<<(XmlOutput &xml, const VCCustomBuildTool &tool) 1907 1933 { 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 translated1910 // in all generators. However, if you use $$escape_expand(\n\r) (or \n\h) instead, the VCPROJ1911 // generator will instead of binding the commands with " && " will insert a proper newline into1912 // the VCPROJ file. We sometimes use this method of splitting commands if the custom buildstep1913 // 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 hack1926 cmdl.replace("\r\\h", "\r\n");1927 } else {1928 if (i < end - 1)1929 cmdl += " && ";1930 }1931 cmds += cmdl;1932 }1933 1934 return xml 1934 1935 << tag(_Tool) 1935 1936 << attrS(_Name, tool.ToolName) 1936 1937 << attrX(_AdditionalDependencies, tool.AdditionalDependencies, ";") 1937 << attrS(_CommandLine, cmds)1938 << attrS(_CommandLine, tool.CommandLine.join(vcCommandSeparator())) 1938 1939 << attrS(_Description, tool.Description) 1939 1940 << attrX(_Outputs, tool.Outputs, ";") … … 1995 1996 << attrS(_Name, tool.ToolName) 1996 1997 << attrS(_Path, tool.ToolPath) 1997 << attrS(_CommandLine, tool.CommandLine )1998 << attrS(_CommandLine, tool.CommandLine.join(vcCommandSeparator())) 1998 1999 << attrS(_Description, tool.Description) 1999 2000 << attrT(_ExcludedFromBuild, tool.ExcludedFromBuild) … … 2289 2290 CustomBuildTool.Description += " & "; 2290 2291 CustomBuildTool.Description += cmd_name; 2291 CustomBuildTool.CommandLine += cmd.trimmed().split("\n", QString::SkipEmptyParts);2292 CustomBuildTool.CommandLine += VCToolBase::fixCommandLine(cmd.trimmed()); 2292 2293 int space = cmd.indexOf(' '); 2293 2294 QFileInfo finf(cmd.left(space)); -
trunk/qmake/generators/win32/msvc_objectmodel.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 59 59 NET2003 = 0x71, 60 60 NET2005 = 0x80, 61 NET2008 = 0x90 61 NET2008 = 0x90, 62 NET2010 = 0xa0 62 63 }; 63 64 … … 475 476 parseOption((*it).toLatin1()); 476 477 } 478 static QStringList fixCommandLine(const QString &input); 477 479 }; 478 480 … … 746 748 public: 747 749 // Variables 748 QString 750 QStringList CommandLine; 749 751 QString Description; 750 752 triState ExcludedFromBuild; … … 868 870 customBuildCheck CustomBuild; 869 871 870 bool 872 bool useCustomBuildTool; 871 873 VCCustomBuildTool CustomBuildTool; 872 874 -
trunk/qmake/generators/win32/msvc_vcproj.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 68 68 #ifdef Q_OS_WIN32 69 69 #include <qt_windows.h> 70 #include <windows/registry .h>70 #include <windows/registry_p.h> 71 71 72 72 QT_BEGIN_NAMESPACE … … 78 78 } dotNetCombo[] = { 79 79 #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"}, 80 82 {NET2008, "MSVC.NET 2008 (9.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir"}, 81 83 {NET2008, "MSVC.NET 2008 Express Edition (9.0)", "Software\\Wow6432Node\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir"}, … … 85 87 {NET2002, "MSVC.NET 2002 (7.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir"}, 86 88 #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"}, 87 91 {NET2008, "MSVC.NET 2008 (9.0)", "Software\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir"}, 88 92 {NET2008, "MSVC.NET 2008 Express Edition (9.0)", "Software\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir"}, … … 116 120 int i = 0; 117 121 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); 119 123 if(!path.isEmpty()) { 120 124 ++installed; … … 133 137 i = installed = 0; 134 138 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(); 136 140 if (productPath.isEmpty()) 137 141 continue; … … 166 170 const char _slnHeader70[] = "Microsoft Visual Studio Solution File, Format Version 7.00"; 167 171 const 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"; 172 const char _slnHeader80[] = "Microsoft Visual Studio Solution File, Format Version 9.00" 173 "\n# Visual Studio 2005"; 174 const char _slnHeader90[] = "Microsoft Visual Studio Solution File, Format Version 10.00" 175 "\n# Visual Studio 2008"; 176 const char _slnHeader100[] = "Microsoft Visual Studio Solution File, Format Version 11.00" 177 "\n# Visual Studio 2010"; 170 178 // The following UUID _may_ change for later servicepacks... 171 179 // If so we need to search through the registry at … … 355 363 356 364 switch(which_dotnet_version()) { 365 case NET2010: 366 t << _slnHeader100; 367 break; 357 368 case NET2008: 358 369 t << _slnHeader90; … … 890 901 conf.compiler.ProgramDataBaseFileName = ".\\" ; 891 902 conf.compiler.ObjectFile = placement ; 903 conf.compiler.ExceptionHandling = ehNone; 892 904 // PCH 893 905 if (usePCH) { … … 907 919 if(project->isActiveConfig("debug")){ 908 920 // Debug version 909 conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_DEBUG"));910 921 if((projectTarget == Application) || (projectTarget == StaticLib)) 911 922 conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DBG")); … … 914 925 } else { 915 926 // Release version 916 conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_RELEASE"));917 927 conf.compiler.PreprocessorDefinitions += "QT_NO_DEBUG"; 918 928 conf.compiler.PreprocessorDefinitions += "NDEBUG"; … … 924 934 925 935 // 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"));930 936 if(project->isActiveConfig("windows")) 931 937 conf.compiler.PreprocessorDefinitions += project->values("MSVCPROJ_WINCONDEF"); … … 990 996 conf.linker.OutputFile += project->first("MSVCPROJ_TARGET"); 991 997 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 998 998 if(project->isActiveConfig("dll")){ 999 999 conf.linker.parseOptions(project->values("QMAKE_LFLAGS_QT_DLL")); 1000 1000 } 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 1008 1001 } 1009 1002 … … 1035 1028 } 1036 1029 1037 QString VcprojGenerator::fixCommandLine(DotNET version, const QString &input) const1038 {1039 QString result = input;1040 1041 if (version >= NET2005)1042 result = result.replace(QLatin1Char('\n'), QLatin1String("
"));1043 1044 return result;1045 }1046 1047 1030 void VcprojGenerator::initPostBuildEventTools() 1048 1031 { 1049 1032 VCConfiguration &conf = vcProject.Configuration; 1050 1033 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")); 1052 1035 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")); 1056 1037 } 1057 1038 … … 1060 1041 !project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH"); 1061 1042 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)\"")); 1064 1045 1065 1046 if(!project->values("MSVCPROJ_COPY_DLL").isEmpty()) { 1066 if(!conf.postBuild.CommandLine.isEmpty())1067 conf.postBuild.CommandLine += " && ";1068 1047 conf.postBuild.Description += var("MSVCPROJ_COPY_DLL_DESC"); 1069 1048 conf.postBuild.CommandLine += var("MSVCPROJ_COPY_DLL"); … … 1194 1173 VCConfiguration &conf = vcProject.Configuration; 1195 1174 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")); 1198 1176 conf.preLink.CommandLine = cmdline; 1177 conf.preLink.Description = cmdline.join(QLatin1String("\r\n")); 1199 1178 } 1200 1179 } … … 1609 1588 ofile = ofile.replace('-', '_'); 1610 1589 } else { 1611 int hyp enfind = ofile.indexOf('-', slashfind);1612 while (hyp enfind != -1 && slashfind < hypenfind) {1613 ofile = ofile.replace(hyp enfind, 1, '_');1614 hyp enfind = 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); 1615 1594 } 1616 1595 } … … 1627 1606 !exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2003/" + file))) && 1628 1607 !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)))) 1631 1609 return ""; 1632 1610 debug_msg(1, "Generator: MSVC.NET: Found template \'%s\'", ret.toLatin1().constData()); -
trunk/qmake/generators/win32/msvc_vcproj.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 62 62 bool writeMakefile(QTextStream &); 63 63 bool writeProjectMakefile(); 64 void writeSubDirs(QTextStream &t);65 64 66 65 QString findTemplate(QString file); … … 120 119 void initExtraCompilerOutputs(); 121 120 121 void writeSubDirs(QTextStream &t); // Called from VCXProj backend 122 QUuid getProjectUUID(const QString &filename=QString()); // Called from VCXProj backend 123 122 124 Target projectTarget; 123 125 … … 129 131 130 132 private: 131 QString fixCommandLine(DotNET version, const QString &input) const;132 QUuid getProjectUUID(const QString &filename=QString());133 133 QUuid increaseUUID(const QUuid &id); 134 134 friend class VCFilter; -
trunk/qmake/generators/win32/winmakefile.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 473 473 project->values("RES_FILE").prepend(fileInfo(resFile).fileName()); 474 474 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(); 477 478 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); 479 482 } 480 483 project->values("RES_FILE").first() = Option::fixPathToTargetOS(project->values("RES_FILE").first(), false, false); … … 605 608 writeLibsPart(t); 606 609 607 t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : 608 Option::fixPathToTargetOS(var("QMAKE_QMAKE"), false)) << endl; 610 t << "QMAKE = " << var("QMAKE_QMAKE") << endl; 609 611 t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? QString("idc") : 610 612 Option::fixPathToTargetOS(var("QMAKE_IDC"), false)) << endl; … … 658 660 t << "DIST = " << varList("DISTFILES") << endl; 659 661 t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl; 660 // The comment is important to maintain variable compat ability with Unix662 // The comment is important to maintain variable compatibility with Unix 661 663 // Makefiles, while not interpreting a trailing-slash as a linebreak 662 664 t << "DESTDIR = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak" << endl; … … 789 791 target = project->first("TARGET"); 790 792 return QString(target + project->first("TARGET_VERSION_EXT") + ".lib"); 793 } 794 795 QString Win32MakefileGenerator::getPdbTarget() 796 { 797 return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".pdb"); 791 798 } 792 799 … … 841 848 uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"" + del_suffix); 842 849 } 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 } 843 862 } 844 863 -
trunk/qmake/generators/win32/winmakefile.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 85 85 virtual void processFileTagsVar(); 86 86 virtual QString getLibTarget(); 87 virtual QString getPdbTarget(); 87 88 }; 88 89
Note:
See TracChangeset
for help on using the changeset viewer.