- Timestamp:
- Nov 28, 2009, 8:49:40 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
configure.cmd (modified) (7 diffs)
-
doc/src/qt-conf.qdoc (modified) (3 diffs)
-
src/corelib/global/qlibraryinfo.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.cmd
r315 r357 299 299 G.CFG_GRAPHICS_SYSTEM = "default" 300 300 301 /* initalize variables used for installation*/301 /* */ 302 302 G.QT_INSTALL_PREFIX = "" 303 303 G.QT_INSTALL_DOCS = "" … … 545 545 /* prefix */ 546 546 if (G.QT_INSTALL_PREFIX == "") then 547 G.QT_INSTALL_PREFIX = G.OutPath547 G.QT_INSTALL_PREFIX = 548 548 /* docs */ 549 549 if (G.QT_INSTALL_DOCS == "") then 550 G.QT_INSTALL_DOCS = FixDirNoSlash(G.QT_INSTALL_PREFIX)"\docs"550 G.QT_INSTALL_DOCS = " 551 551 /* headers */ 552 552 if (G.QT_INSTALL_HEADERS == "") then 553 G.QT_INSTALL_HEADERS = FixDirNoSlash(G.QT_INSTALL_PREFIX)"\include"553 G.QT_INSTALL_HEADERS = include" 554 554 /* libs */ 555 555 if (G.QT_INSTALL_LIBS == "") then 556 G.QT_INSTALL_LIBS = FixDirNoSlash(G.QT_INSTALL_PREFIX)"\lib"556 G.QT_INSTALL_LIBS = lib" 557 557 /* bins */ 558 558 if (G.QT_INSTALL_BINS == "") then 559 G.QT_INSTALL_BINS = FixDirNoSlash(G.QT_INSTALL_PREFIX)"\bin"559 G.QT_INSTALL_BINS = bin" 560 560 /* plugins */ 561 561 if (G.QT_INSTALL_PLUGINS == "") then 562 G.QT_INSTALL_PLUGINS = FixDirNoSlash(G.QT_INSTALL_PREFIX)"\plugins"562 G.QT_INSTALL_PLUGINS = plugins" 563 563 /* data */ 564 564 if (G.QT_INSTALL_DATA == "") then 565 G.QT_INSTALL_DATA = FixDirNoSlash(G.QT_INSTALL_PREFIX)565 G.QT_INSTALL_DATA = 566 566 /* translations */ 567 567 if (G.QT_INSTALL_TRANSLATIONS == "") then 568 G.QT_INSTALL_TRANSLATIONS = FixDirNoSlash(G.QT_INSTALL_PREFIX)"\translations"568 G.QT_INSTALL_TRANSLATIONS = translations" 569 569 /* settings */ 570 570 if (G.QT_INSTALL_SETTINGS == "") then 571 G.QT_INSTALL_SETTINGS = SysBootDrive()"\OS2\xdg"571 G.QT_INSTALL_SETTINGS = " 572 572 /* examples */ 573 573 if (G.QT_INSTALL_EXAMPLES == "") then 574 G.QT_INSTALL_EXAMPLES = FixDirNoSlash(G.QT_INSTALL_PREFIX)"\examples"574 G.QT_INSTALL_EXAMPLES = examples" 575 575 /* demos */ 576 576 if (G.QT_INSTALL_DEMOS == "") then 577 G.QT_INSTALL_DEMOS = FixDirNoSlash(G.QT_INSTALL_PREFIX)"\demos"577 G.QT_INSTALL_DEMOS = demos" 578 578 579 579 /*-------------------------------------------------------------------------- … … 634 634 --------------------------------------------------------------------------*/ 635 635 636 if (\DirExists(G.OutPath"\src\corelib\global")) then 637 call MakeDir G.OutPath"\src\corelib\global" 636 call MakeDir G.OutPath"\src\corelib\global" 638 637 639 638 qconfig_cpp = G.OutPath"\src\corelib\global\qconfig.cpp" … … 641 640 config_cpp_str =, 642 641 '/* License Info */'G.EOL||, 643 'static const char qt_configure_licensee_str [260 + 12] = "qt_lcnsuser='CPPPath(MaxLen(G.Licensee,259))'";'G.EOL||, 644 'static const char qt_configure_licensed_products_str [260 + 12] = "qt_lcnsprod='CPPPath(MaxLen(G.Edition,259))'";'G.EOL||, 645 '/* Installation Info */'G.EOL||, 646 'static const char qt_configure_prefix_path_str [260 + 12] = "qt_prfxpath='CPPPath(MaxLen(G.QT_INSTALL_PREFIX,259))'";'G.EOL||, 647 'static const char qt_configure_documentation_path_str[260 + 12] = "qt_docspath='CPPPath(MaxLen(G.QT_INSTALL_DOCS,259))'";'G.EOL||, 648 'static const char qt_configure_headers_path_str [260 + 12] = "qt_hdrspath='CPPPath(MaxLen(G.QT_INSTALL_HEADERS,259))'";'G.EOL||, 649 'static const char qt_configure_libraries_path_str [260 + 12] = "qt_libspath='CPPPath(MaxLen(G.QT_INSTALL_LIBS,259))'";'G.EOL||, 650 'static const char qt_configure_binaries_path_str [260 + 12] = "qt_binspath='CPPPath(MaxLen(G.QT_INSTALL_BINS,259))'";'G.EOL||, 651 'static const char qt_configure_plugins_path_str [260 + 12] = "qt_plugpath='CPPPath(MaxLen(G.QT_INSTALL_PLUGINS,259))'";'G.EOL||, 652 'static const char qt_configure_data_path_str [260 + 12] = "qt_datapath='CPPPath(MaxLen(G.QT_INSTALL_DATA,259))'";'G.EOL||, 653 'static const char qt_configure_translations_path_str [260 + 12] = "qt_trnspath='CPPPath(MaxLen(G.QT_INSTALL_TRANSLATIONS,259))'";'G.EOL||, 654 'static const char qt_configure_settings_path_str [260 + 12] = "qt_stngpath='CPPPath(MaxLen(G.QT_INSTALL_SETTINGS,259))'";'G.EOL||, 655 'static const char qt_configure_examples_path_str [260 + 12] = "qt_xmplpath='CPPPath(MaxLen(G.QT_INSTALL_EXAMPLES,259))'";'G.EOL||, 656 'static const char qt_configure_demos_path_str [260 + 12] = "qt_demopath='CPPPath(MaxLen(G.QT_INSTALL_DEMOS,259))'";'G.EOL||, 657 '/* strlen( "qt_lcnsxxxx" ) == 12 */'G.EOL||, 658 '#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;'G.EOL||, 659 '#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;'G.EOL||, 660 '#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;'G.EOL||, 661 '#define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;'G.EOL||, 662 '#define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;'G.EOL||, 663 '#define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;'G.EOL||, 664 '#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;'G.EOL||, 665 '#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;'G.EOL||, 666 '#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;'G.EOL||, 667 '#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;'G.EOL||, 668 '#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;'G.EOL||, 669 '#define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;'G.EOL||, 670 '#define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;'G.EOL||, 642 '#define QT_CONFIGURE_LICENSEE "'CPPPath(MaxLen(G.Licensee,259))'"'G.EOL||, 643 '#define QT_CONFIGURE_LICENSED_PRODUCTS "'CPPPath(MaxLen(G.Edition,259))'"'G.EOL||, 644 '/* Installation Info */'G.EOL 645 646 if (G.QT_INSTALL_PREFIX == ".") then 647 /* make the prefix path be the directory where the module containing 648 * core Qt classes (in particular, QLibraryInfo) resides. Normally, it 649 * will be the path to QtCore4.DLL which is useful for separate Qt runtime 650 * distros that will have all components along in the same directory */ 651 config_cpp_str = config_cpp_str||, 652 '#define QT_CONFIGURE_PREFIX_PATH qt_module_path()'G.EOL 653 else 654 config_cpp_str = config_cpp_str||, 655 '#define QT_CONFIGURE_PREFIX_PATH "'CPPPath(G.QT_INSTALL_PREFIX)'"'G.EOL 656 657 config_cpp_str = config_cpp_str||, 658 '#define QT_CONFIGURE_DOCUMENTATION_PATH "'CPPPath(G.QT_INSTALL_DOCS)'"'G.EOL||, 659 '#define QT_CONFIGURE_HEADERS_PATH "'CPPPath(G.QT_INSTALL_HEADERS)'"'G.EOL||, 660 '#define QT_CONFIGURE_LIBRARIES_PATH "'CPPPath(G.QT_INSTALL_LIBS)'"'G.EOL||, 661 '#define QT_CONFIGURE_BINARIES_PATH "'CPPPath(G.QT_INSTALL_BINS)'"'G.EOL||, 662 '#define QT_CONFIGURE_PLUGINS_PATH "'CPPPath(G.QT_INSTALL_PLUGINS)'"'G.EOL||, 663 '#define QT_CONFIGURE_DATA_PATH "'CPPPath(G.QT_INSTALL_DATA)'"'G.EOL||, 664 '#define QT_CONFIGURE_TRANSLATIONS_PATH "'CPPPath(G.QT_INSTALL_TRANSLATIONS)'"'G.EOL||, 665 '#define QT_CONFIGURE_SETTINGS_PATH "'CPPPath(G.QT_INSTALL_SETTINGS)'"'G.EOL||, 666 '#define QT_CONFIGURE_EXAMPLES_PATH "'CPPPath(G.QT_INSTALL_EXAMPLES)'"'G.EOL||, 667 '#define QT_CONFIGURE_DEMOS_PATH "'CPPPath(G.QT_INSTALL_DEMOS)'"'G.EOL||, 671 668 G.EOL 672 669 … … 679 676 call charout qconfig_cpp 680 677 end 678 679 680 681 682 683 684 685 686 687 681 688 682 689 /*-------------------------------------------------------------------------- … … 1829 1836 1830 1837 MakeDir: procedure expose (Globals) 1831 /* @todo teach it to create all non-existing intermediate dirs */1832 1838 parse arg aDir 1833 rc = SysMkDir(aDir) 1834 if (rc \= 0) then do 1835 call SayErr 'FATAL: Could not create directory '''aDir'''!' 1836 call SayErr 'SysMkDir returned 'rc 1837 call Done 1 1839 aDir = translate(aDir, '\', '/') 1840 curdir = directory() 1841 base = aDir 1842 todo.0 = 0 1843 do while 1 1844 d = directory(base) 1845 if (d \== '') then 1846 leave 1847 i = todo.0 + 1 1848 todo.i = filespec('N', base) 1849 todo.0 = i 1850 drv = filespec('D', base) 1851 path = filespec('P', base) 1852 if (path == '\' | path == '') then do 1853 base = drv||path 1854 leave 1855 end 1856 base = drv||strip(path, 'T', '\') 1857 end 1858 call directory curdir 1859 do i = todo.0 to 1 by -1 1860 if (i < todo.0 | (base \== '' & right(base,1) \== '\' &, 1861 right(base,1) \== ':')) then 1862 base = base'\' 1863 base = base||todo.i 1864 rc = SysMkDir(base) 1865 if (rc \= 0) then do 1866 call SayErr 'FATAL: Could not create directory '''base'''!' 1867 call SayErr 'SysMkDir returned 'rc 1868 call Done 1 1869 end 1838 1870 end 1839 1871 return … … 2238 2270 2239 2271 /** 2240 * Returns the name ofthe temporary directory.2272 * Returns the the temporary directory. 2241 2273 * The returned value doesn't end with a slash. 2242 2274 */ -
trunk/doc/src/qt-conf.qdoc
r2 r357 58 58 libraries look elsewhere. 59 59 60 61 62 63 64 65 60 66 QLibraryInfo will load \c qt.conf from one of the following locations: 61 67 … … 72 78 \endlist 73 79 80 81 82 83 84 85 86 87 88 89 90 91 74 92 The \c qt.conf file is an INI text file, as described in the \l 75 93 {QSettings::Format}{QSettings} documentation. The file should have … … 106 124 need to be placed in specific sub-directories under the 107 125 \c{plugins} directory (see \l{How to Create Qt Plugins} for 108 details). 109 126 details). On OS/2, the \c Prefix is always relative to the directory 127 where \c qt.conf or \c qtsys.conf is loaded from. 128 110 129 For example, a \c qt.conf file could contain the following: 111 130 -
trunk/src/corelib/global/qlibraryinfo.cpp
r2 r357 41 41 42 42 #include "qdir.h" 43 #include "qfile.h" 43 #include "qfile.h" 44 44 #include "qconfig.h" 45 45 #include "qsettings.h" … … 58 58 # include "private/qcore_mac_p.h" 59 59 #endif 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 60 82 61 83 #include "qconfig.cpp" … … 137 159 qtconfig = pwd.filePath(QLatin1String("qt.conf")); 138 160 } 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 139 181 } 140 182 #endif … … 296 338 } 297 339 298 if (path) 340 if (path) 299 341 ret = QString::fromLocal8Bit(path); 342 343 344 345 346 347 348 349 350 351 352 353 300 354 } else { 301 355 QString key; … … 431 485 // we make the prefix path absolute to the executable's directory 432 486 #ifdef QT_BUILD_QMAKE 433 return QFileInfo(qmake_libraryInfoFile()).absolutePath(); 487 QFileInfo fi(qmake_libraryInfoFile()); 488 return QDir::cleanPath(QDir(fi.absolutePath()).absoluteFilePath(ret)); 434 489 #else 490 491 492 493 494 495 496 497 498 499 435 500 if (QCoreApplication::instance()) { 436 501 #ifdef Q_OS_MAC … … 444 509 } 445 510 #endif 446 return QDir (QCoreApplication::applicationDirPath()).absoluteFilePath(ret);511 return QDir); 447 512 } else { 448 513 return QDir::current().absoluteFilePath(ret); … … 451 516 } else { 452 517 // we make any other path absolute to the prefix directory 453 return QDir (location(PrefixPath)).absoluteFilePath(ret);518 return QDir); 454 519 } 455 520 } 456 return ret;521 return ; 457 522 } 458 523
Note:
See TracChangeset
for help on using the changeset viewer.
