Changeset 91
- Timestamp:
- May 1, 2006, 10:29:20 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.cmd
r88 r91 184 184 if (G.!FirstRun) then call CompileQt 185 185 186 if (\G.!DidConfigureCompiler | \G.!DidConfigureQt | \G.!DidCompileQt) then do 186 if (\G.!DidConfigureCompiler | \G.!DidConfigureQt | \G.!DidCompileQt) then 187 do forever 187 188 G.!Choice.0 = 4 188 189 G.!Choice.1 = 'Configure the compiler' … … 194 195 when choice == 1 then call ConfigureCompiler 195 196 when choice == 2 then call ConfigureQt 196 when choice == 3 then call CompileQt197 otherwise nop197 when choice == 3 then do; call CompileQt; leave; end 198 otherwise leave 198 199 end 199 200 end … … 509 510 Opt.!DLL = -choice + 2 510 511 512 MagicConfig = '' 513 511 514 if (Opt.!DLL == 1) then do 512 515 call SaySay 'You are going to build Qt as a dynamic link library. In order' … … 522 525 do forever 523 526 name = InputLine('Enter a base name for the Qt DLL:', name) 527 if (name == 'qt_official_build') then do 528 /* magic CONFIG keyword to mark the Qt build as official */ 529 MagicConfig = 'qt_official_build ' 530 name = Opt.!CustomDLLName 531 leave 532 end 524 533 upperName = translate(name) 525 534 if (upperName \= '' & length(upperName) <= 8 &, … … 622 631 OptionalConfig = strip(OptionalConfig) 623 632 633 ConfigHeader =, 634 '/* Everything */'G.!EOL||, 635 ''G.!EOL||, 636 '/* License information */'G.!EOL||, 637 '#define QT_PRODUCT_LICENSEE "Free"'G.!EOL||, 638 '#define QT_PRODUCT_LICENSE "qt-free"'G.!EOL||, 639 ''G.!EOL||, 640 '/* Machine byte-order */'G.!EOL||, 641 '#define Q_BIG_ENDIAN 4321'G.!EOL||, 642 '#define Q_LITTLE_ENDIAN 1234'G.!EOL||, 643 '#define Q_BYTE_ORDER Q_LITTLE_ENDIAN'G.!EOL||, 644 ''G.!EOL||, 645 '/* Compile time features */'G.!EOL||, 646 '#ifndef QT_NO_STL'G.!EOL||, 647 '#define QT_NO_STL'G.!EOL||, 648 '#endif'G.!EOL||, 649 '#ifndef QT_NO_STYLE_WINDOWSXP'G.!EOL||, 650 '#define QT_NO_STYLE_WINDOWSXP'G.!EOL||, 651 '#endif'G.!EOL 652 653 ConfigSource =, 654 '#include <qglobal.h>'G.!EOL||, 655 ''G.!EOL||, 656 '/* Install paths from configure */'G.!EOL||, 657 'static const char QT_INSTALL_PREFIX [267] = "qt_nstpath='CPPPath(G.!QTDir)'";'G.!EOL||, 658 'static const char QT_INSTALL_BINS [267] = "qt_binpath='CPPPath(G.!QTDirP)'\\bin";'G.!EOL||, 659 'static const char QT_INSTALL_DOCS [267] = "qt_docpath='CPPPath(G.!QTDirP)'\\doc";'G.!EOL||, 660 'static const char QT_INSTALL_HEADERS[267] = "qt_hdrpath='CPPPath(G.!QTDirP)'\\include";'G.!EOL||, 661 'static const char QT_INSTALL_LIBS [267] = "qt_libpath='CPPPath(G.!QTDirP)'\\lib";'G.!EOL||, 662 'static const char QT_INSTALL_PLUGINS[267] = "qt_plgpath='CPPPath(G.!QTDirP)'\\plugins";'G.!EOL||, 663 'static const char QT_INSTALL_DATA [267] = "qt_datpath='CPPPath(G.!QTDir)'";'G.!EOL||, 664 'static const char QT_INSTALL_TRANSLATIONS [267] = "qt_trnpath='CPPPath(G.!QTDirP)'\\translations";'G.!EOL||, 665 ''G.!EOL||, 666 '/* strlen( "qt_xxxpath=" ) == 11 */'G.!EOL||, 667 'const char *qInstallPath() { return QT_INSTALL_PREFIX + 11; }'G.!EOL||, 668 'const char *qInstallPathDocs() { return QT_INSTALL_DOCS + 11; }'G.!EOL||, 669 'const char *qInstallPathHeaders() { return QT_INSTALL_HEADERS + 11; }'G.!EOL||, 670 'const char *qInstallPathLibs() { return QT_INSTALL_LIBS + 11; }'G.!EOL||, 671 'const char *qInstallPathBins() { return QT_INSTALL_BINS + 11; }'G.!EOL||, 672 'const char *qInstallPathPlugins() { return QT_INSTALL_PLUGINS + 11; }'G.!EOL||, 673 'const char *qInstallPathData() { return QT_INSTALL_DATA + 11; }'G.!EOL||, 674 'const char *qInstallPathTranslations() { return QT_INSTALL_TRANSLATIONS + 11; }'G.!EOL||, 675 'const char *qInstallPathSysconf() { return 0; }'G.!EOL 676 624 677 call SaySay 'You have selected the following compiler configuration:' 625 678 say 626 679 call SaySay 'Library type : 'DllOrStatic', 'ReleaseOrDebug', multithreaded' 627 if (Opt.!DLL == 1) then 628 call SaySay 'Library name : 'Opt.!CustomDLLName 680 if (Opt.!DLL == 1) then do 681 if (MagicConfig == '') then 682 call SaySay 'Library name : 'Opt.!CustomDLLName 683 else 684 call SaySay 'Library name : qtXYZNN (official build)' 685 end 629 686 call SaySay 'Modules : 'BasicModules OptionalModules 630 687 call SaySay 'Other features : 'OptionalConfig … … 646 703 call DeleteFile qmake_cache 647 704 call DeleteFile qtos2config 648 call DeleteFile qmodules_h649 call DeleteFile qconfig_h650 call DeleteFile qconfig_cpp651 705 652 706 call lineout qmake_cache, 'OBJECTS_DIR=tmp\obj\'ReleaseOrDebug'_mt_'SharedOrStatic … … 660 714 call lineout qmake_cache, 'imageformat-plugins+=' 661 715 call lineout qmake_cache, 'QT_PRODUCT=qt-enterprise' 662 call lineout qmake_cache, 'CONFIG+=nocrosscompiler' BasicModules OptionalModules 'minimal-config small-config medium-config large-config full-config 'ReleaseOrDebug' thread' OptionalConfig 'bigcodecs no-tablet incremental create_prl link_prl' 716 call lineout qmake_cache, 'CONFIG+='MagicConfig'nocrosscompiler', 717 BasicModules OptionalModules, 718 'minimal-config small-config medium-config large-config full-config ', 719 ReleaseOrDebug' thread' OptionalConfig, 720 'bigcodecs no-tablet incremental create_prl link_prl' 663 721 call lineout qmake_cache, 'QMAKESPEC=os2-g++' 664 722 call lineout qmake_cache, 'QT_BUILD_TREE='QuotePath(G.!QTDir) … … 684 742 call lineout qtos2config 685 743 686 call lineout qmodules_h, ModulesHeader 687 call lineout qmodules_h 688 689 call lineout qconfig_h, '/* Everything */' 690 call lineout qconfig_h, '' 691 call lineout qconfig_h, '/* License information */' 692 call lineout qconfig_h, '#define QT_PRODUCT_LICENSEE "Free"' 693 call lineout qconfig_h, '#define QT_PRODUCT_LICENSE "qt-free"' 694 call lineout qconfig_h, '' 695 call lineout qconfig_h, '/* Machine byte-order */' 696 call lineout qconfig_h, '#define Q_BIG_ENDIAN 4321' 697 call lineout qconfig_h, '#define Q_LITTLE_ENDIAN 1234' 698 call lineout qconfig_h, '#define Q_BYTE_ORDER Q_LITTLE_ENDIAN' 699 call lineout qconfig_h, '' 700 call lineout qconfig_h, '/* Compile time features */' 701 call lineout qconfig_h, '#ifndef QT_NO_STL' 702 call lineout qconfig_h, '#define QT_NO_STL' 703 call lineout qconfig_h, '#endif' 704 call lineout qconfig_h, '#ifndef QT_NO_STYLE_WINDOWSXP' 705 call lineout qconfig_h, '#define QT_NO_STYLE_WINDOWSXP' 706 call lineout qconfig_h, '#endif' 707 call lineout qconfig_h 708 709 call lineout qconfig_cpp, '#include <qglobal.h>' 710 call lineout qconfig_cpp, '' 711 call lineout qconfig_cpp, '/* Install paths from configure */' 712 call lineout qconfig_cpp, 'static const char QT_INSTALL_PREFIX [267] = "qt_nstpath='CPPPath(G.!QTDir)'";' 713 call lineout qconfig_cpp, 'static const char QT_INSTALL_BINS [267] = "qt_binpath='CPPPath(G.!QTDirP)'\\bin";' 714 call lineout qconfig_cpp, 'static const char QT_INSTALL_DOCS [267] = "qt_docpath='CPPPath(G.!QTDirP)'\\doc";' 715 call lineout qconfig_cpp, 'static const char QT_INSTALL_HEADERS[267] = "qt_hdrpath='CPPPath(G.!QTDirP)'\\include";' 716 call lineout qconfig_cpp, 'static const char QT_INSTALL_LIBS [267] = "qt_libpath='CPPPath(G.!QTDirP)'\\lib";' 717 call lineout qconfig_cpp, 'static const char QT_INSTALL_PLUGINS[267] = "qt_plgpath='CPPPath(G.!QTDirP)'\\plugins";' 718 call lineout qconfig_cpp, 'static const char QT_INSTALL_DATA [267] = "qt_datpath='CPPPath(G.!QTDir)'";' 719 call lineout qconfig_cpp, 'static const char QT_INSTALL_TRANSLATIONS [267] = "qt_trnpath='CPPPath(G.!QTDirP)'\\translations";' 720 call lineout qconfig_cpp, '' 721 call lineout qconfig_cpp, '/* strlen( "qt_xxxpath=" ) == 11 */' 722 call lineout qconfig_cpp, 'const char *qInstallPath() { return QT_INSTALL_PREFIX + 11; }' 723 call lineout qconfig_cpp, 'const char *qInstallPathDocs() { return QT_INSTALL_DOCS + 11; }' 724 call lineout qconfig_cpp, 'const char *qInstallPathHeaders() { return QT_INSTALL_HEADERS + 11; }' 725 call lineout qconfig_cpp, 'const char *qInstallPathLibs() { return QT_INSTALL_LIBS + 11; }' 726 call lineout qconfig_cpp, 'const char *qInstallPathBins() { return QT_INSTALL_BINS + 11; }' 727 call lineout qconfig_cpp, 'const char *qInstallPathPlugins() { return QT_INSTALL_PLUGINS + 11; }' 728 call lineout qconfig_cpp, 'const char *qInstallPathData() { return QT_INSTALL_DATA + 11; }' 729 call lineout qconfig_cpp, 'const char *qInstallPathTranslations() { return QT_INSTALL_TRANSLATIONS + 11; }' 730 call lineout qconfig_cpp, 'const char *qInstallPathSysconf() { return 0; }' 731 call lineout qconfig_cpp 744 /* 745 * Create new headers/sources only if they don't exist yet or if their 746 * current contents differs from the requested configuration to prevent 747 * recompiling every source when no affecting settings are changed 748 */ 749 750 if (\FileExists(qmodules_h) |, 751 CompareFileToVar(qmodules_h, ModulesHeader) \= 0) then do 752 call DeleteFile qmodules_h 753 call charout qmodules_h, ModulesHeader 754 call charout qmodules_h 755 end 756 757 if (\FileExists(qconfig_h) |, 758 CompareFileToVar(qconfig_h, ConfigHeader) \= 0) then do 759 call DeleteFile qconfig_h 760 call charout qconfig_h, ConfigHeader 761 call charout qconfig_h 762 end 763 764 if (\FileExists(qconfig_cpp) |, 765 CompareFileToVar(qconfig_cpp, ConfigSource) \= 0) then do 766 call DeleteFile qconfig_cpp 767 call charout qconfig_cpp, ConfigSource 768 call charout qconfig_cpp 769 end 732 770 733 771 call CopyFile QuotePath(G.!QTDirP)'\qmake\"Makefile.os2-g++"', … … 754 792 755 793 call SaySay 'The configuration script is about to compile and build the Qt' 756 call SaySay 'Library. All output generated by the compiler and other tools'757 call SaySay 'will be recorded to a''build.log'' file located in the'794 call SaySay 'Library. All output generated by the compiler and other tools' 795 call SaySay 'will be recorded to the ''build.log'' file located in the' 758 796 call SaySay 'installation directory.' 759 797 say 798 call SaySay 'Selecting ''Everything'' in the menu below is the right choice if' 799 call SaySay 'this is the first time you are instaling and building the Qt Toolkit.' 800 call SaySay 'If you want to build a different type of the Qt Library from the same' 801 call SaySay 'installation directory (for example, the static library in addition' 802 call SaySay 'to the DLL library built before) you may select ''Qt Library only''' 803 call SaySay 'from the menu.' 804 say 760 805 761 806 build_log = G.!QTDirP'\build.log' 762 807 763 call DeleteFile build_log'.bak' 764 call CopyFile build_log build_log'.bak' 808 if (FileExists(build_log)) then do 809 call DeleteFile build_log'.bak' 810 call CopyFile build_log build_log'.bak' 811 call DeleteFile build_log 812 end 765 813 766 814 build_target = '' 767 815 768 G.!Choice.0 = 2816 G.!Choice.0 = 3 769 817 G.!Choice.1 = 'Everything (Qt Library, tools, examples and tutorials)' 770 818 G.!Choice.2 = 'Qt Library and tools only' 819 G.!Choice.3 = 'Qt Library only' 771 820 choice = GetChoice('Select what to compile:', 'G.!Choice') 772 821 select 773 822 when choice == 1 then build_target = 'all' 774 823 when choice == 2 then build_target = 'sub-src sub-tools' 824 when choice == 3 then build_target = 'sub-src' 775 825 otherwise nop 776 826 end 777 827 778 828 no_cleanup_query = (G.!FirstRun & G.!DidConfigureCompiler & G.!DidConfigureQt) 779 do_cleanup = 1829 do_cleanup = 0 780 830 781 831 if (\no_cleanup_query) then do 782 832 call SaySay "Clean up the previous build?" 783 833 do_cleanup =, 784 GetYesNo("(answer Y (yes) until you are sure what are you doing)", 'Y')834 GetYesNo("(answering N (no) is usually the best choice)", 'N') 785 835 end 786 836 … … 926 976 ******************************************************************************/ 927 977 978 CompareFileToVar: procedure expose (Globals) 979 parse arg aFile, aVar 980 rc = stream(aFile, 'C', 'OPEN READ') 981 if (rc \= 'READY:') then do 982 call SayErr 'FATAL: Could not open '''aFile'''!' 983 call SayErr 'stream returned 'rc 984 call Done 1 985 end 986 contents = charin(aFile, 1, chars(aFile)) 987 call stream aFile, 'C', 'CLOSE' 988 if (contents < aVar) then return -1 989 if (contents > aVar) then return 1 990 return 0 991 928 992 CopyFile: procedure expose (Globals) 929 parse arg fileFrom fileTo993 parse arg fileFrom, fileTo 930 994 address 'cmd' 'copy' fileFrom fileTo '1>nul 2>nul' 931 995 if (rc \== 0) then do
Note:
See TracChangeset
for help on using the changeset viewer.