Changeset 29 for trunk/qmake/option.cpp
- Timestamp:
- Jun 12, 2009, 1:32:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qmake/option.cpp
r27 r29 343 343 } 344 344 345 #if def Q_OS_WIN345 #if defined(Q_OS_WIN) 346 346 static QStringList detectShellPath() 347 347 { … … 356 356 } 357 357 return paths; 358 } 359 #elif defined(Q_OS_OS2) 360 static QStringList detectShellPath() 361 { 362 /* @todo check if sh is actually the active shell of the process; relying on 363 * the presence of sh.exe in PATH as done for Windows above is obviously not 364 * enough */ 365 return QStringList(); 358 366 } 359 367 #endif … … 375 383 Option::h_ext << ".h" << ".hpp" << ".hh" << ".hxx"; 376 384 Option::c_ext << ".c"; 377 #if ndef Q_OS_WIN385 #if !defined(Q_OS_WIN) && !defined(Q_OS_OS2) 378 386 Option::h_ext << ".H"; 379 387 #endif … … 381 389 Option::h_moc_ext = ".cpp"; 382 390 Option::cpp_ext << ".cpp" << ".cc" << ".cxx"; 383 #if ndef Q_OS_WIN391 #if !defined(Q_OS_WIN) && !defined(Q_OS_OS2) 384 392 Option::cpp_ext << ".C"; 385 393 #endif … … 387 395 Option::yacc_ext = ".y"; 388 396 Option::pro_ext = ".pro"; 389 #if def Q_OS_WIN397 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 390 398 Option::dirlist_sep = ";"; 391 399 Option::shellPath = detectShellPath(); … … 404 412 Option::qmake_abslocation = argv0; 405 413 } else if (argv0.contains(QLatin1Char('/')) 406 #if def Q_OS_WIN414 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 407 415 || argv0.contains(QLatin1Char('\\')) 408 416 #endif … … 412 420 QByteArray pEnv = qgetenv("PATH"); 413 421 QDir currentDir = QDir::current(); 414 #if def Q_OS_WIN422 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 415 423 QStringList paths = QString::fromLocal8Bit(pEnv).split(QLatin1String(";")); 416 424 #else … … 421 429 continue; 422 430 QString candidate = currentDir.absoluteFilePath(*p + QLatin1Char('/') + argv0); 423 #if def Q_OS_WIN431 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 424 432 candidate += ".exe"; 425 433 #endif … … 625 633 Q_ASSERT(!((flags & Option::FixPathToLocalSeparators) && (flags & Option::FixPathToTargetSeparators))); 626 634 if(flags & Option::FixPathToLocalSeparators) { 627 #if defined(Q_OS_WIN 32)635 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 628 636 string = string.replace('/', '\\'); 629 637 #else … … 719 727 #endif 720 728 729 #ifdef Q_OS_OS2 730 # include <qt_os2.h> 731 732 QT_USE_NAMESPACE 733 #endif 734 721 735 QString qmake_libraryInfoFile() 722 736 { 723 737 QString ret; 724 #if defined( Q_OS_WIN)738 #if defined(Q_OS_WIN) 725 739 QFileInfo filePath; 726 740 QT_WA({ … … 733 747 filePath = QString::fromLocal8Bit(module_name); 734 748 }); 749 ret = filePath.filePath(); 750 #elif defined(Q_OS_OS2) 751 QFileInfo filePath; 752 static char appFileName[CCHMAXPATH] = "\0"; 753 if (!appFileName[0]) { 754 PPIB ppib; 755 DosGetInfoBlocks(NULL, &ppib); 756 DosQueryModuleName(ppib->pib_hmte, sizeof(appFileName), appFileName); 757 } 758 filePath = QString::fromLocal8Bit(appFileName); 735 759 ret = filePath.filePath(); 736 760 #else
Note:
See TracChangeset
for help on using the changeset viewer.