Changeset 88
- Timestamp:
- Apr 17, 2006, 2:54:37 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.cmd
r72 r88 29 29 G.!EOL = '0D0A'x 30 30 31 G.!ScreenWidth = -1 32 G.!ScreenHeight = -1 33 31 34 /* path to GCC */ 32 35 Opt.!GCCPath = '' … … 47 50 Opt.!RELEASE = 1 48 51 Opt.!DLL = 1 52 Opt.!CustomDLLName = 'myqt' 49 53 /* optional module configuration */ 50 54 Opt.!NETWORK = 1 … … 73 77 74 78 /* all globals to be exposed in procedures */ 75 Globals = 'G. Opt. '79 Globals = 'G. Opt. Static.' 76 80 77 81 /* init rexx lib … … 85 89 /* startup code 86 90 ******************************************************************************/ 91 92 parse value SysTextScreenSize() with G.!ScreenHeight G.!ScreenWidth 93 if (G.!ScreenHeight < 25 | G.!ScreenWidth < 80) then do 94 address 'cmd' 'mode co80,25' 95 parse value SysTextScreenSize() with G.!ScreenHeight G.!ScreenWidth 96 if (G.!ScreenHeight < 25 | G.!ScreenWidth < 80) then do 97 call SayErr 'WARNING: Cannot set screen size to 80 x 25!' 98 call SayErr 'Some messages can be unreadable.' 99 say 100 call WaitForAnyKey 101 end 102 end 87 103 88 104 call MagicCmdHook arg(1) … … 234 250 call WriteVar G.!ConfigCache, 'Opt.!RELEASE' 235 251 call WriteVar G.!ConfigCache, 'Opt.!DLL' 252 call WriteVar G.!ConfigCache, 'Opt.!CustomDLLName' 236 253 237 254 call WriteVar G.!ConfigCache, 'Opt.!NETWORK' … … 354 371 call lineout G.!QtCmd, '''@echo off''' 355 372 call lineout G.!QtCmd, '' 356 call lineout G.!QtCmd, 'if (RxFuncQuery(''SysBootDrive'')) then '373 call lineout G.!QtCmd, 'if (RxFuncQuery(''SysBootDrive'')) then do' 357 374 call lineout G.!QtCmd, ' call RxFuncAdd ''SysBootDrive'', ''RexxUtil'', ''SysBootDrive''' 375 call lineout G.!QtCmd, ' call RxFuncAdd ''SysSetPriority'', ''RexxUtil'', ''SysSetPriority''' 376 call lineout G.!QtCmd, 'end' 377 call lineout G.!QtCmd, '' 378 /* 379 * determine whether to setup the environment for the debug version of Qt 380 */ 381 call lineout G.!QtCmd, 'DEBUG = 0' 382 call lineout G.!QtCmd, '' 383 call lineout G.!QtCmd, '/* parse command line */' 384 call lineout G.!QtCmd, 'parse arg args' 385 call lineout G.!QtCmd, 'if (translate(word(args, 1)) == ''D'' |,' 386 call lineout G.!QtCmd, ' translate(word(args, 1)) == ''DEBUG'') then' 387 call lineout G.!QtCmd, 'do' 388 call lineout G.!QtCmd, ' DEBUG = 1' 389 call lineout G.!QtCmd, ' args = subword(args, 2)' 390 call lineout G.!QtCmd, 'end' 358 391 call lineout G.!QtCmd, '' 359 392 /* … … 367 400 call lineout G.!QtCmd, 'call value ''QTDIR'', QTDIR, ''OS2ENVIRONMENT''' 368 401 call lineout G.!QtCmd, '' 369 call lineout G.!QtCmd, 'call AddPathEnv ''PATH'', QTDIR''\bin''' 370 call lineout G.!QtCmd, 'call AddPathEnv ''BEGINLIBPATH'', QTDIR''\bin''' 402 /* 403 * place debug directories first in the PATH if in debug mode 404 */ 405 call lineout G.!QtCmd, 'if (\DEBUG) then do' 406 call lineout G.!QtCmd, ' /* releae versions come first */' 407 call lineout G.!QtCmd, ' call AddPathEnv ''PATH'', QTDIR''\bin''' 408 call lineout G.!QtCmd, ' call AddPathEnv ''PATH'', QTDIR''\bin\debug''' 409 call lineout G.!QtCmd, ' call AddPathEnv ''BEGINLIBPATH'', QTDIR''\bin''' 410 call lineout G.!QtCmd, ' call AddPathEnv ''BEGINLIBPATH'', QTDIR''\bin\debug''' 411 call lineout G.!QtCmd, 'end' 412 call lineout G.!QtCmd, 'else do' 413 call lineout G.!QtCmd, ' /* debug versions come first */' 414 call lineout G.!QtCmd, ' call AddPathEnv ''PATH'', QTDIR''\bin\debug''' 415 call lineout G.!QtCmd, ' call AddPathEnv ''PATH'', QTDIR''\bin''' 416 call lineout G.!QtCmd, ' call AddPathEnv ''BEGINLIBPATH'', QTDIR''\bin\debug''' 417 call lineout G.!QtCmd, ' call AddPathEnv ''BEGINLIBPATH'', QTDIR''\bin''' 418 call lineout G.!QtCmd, 'end' 371 419 call lineout G.!QtCmd, '' 372 420 /* … … 393 441 call lineout G.!QtCmd, 'call AddPathEnv ''LIBRARY_PATH'', SysBootDrive()''\MPTN\DLL''' 394 442 call lineout G.!QtCmd, '' 395 call lineout G.!QtCmd, 'parse arg args' 443 call lineout G.!QtCmd, '/*' 444 call lineout G.!QtCmd, ' * set our our priority class to IDLE so prevent GCC from eating' 445 call lineout G.!QtCmd, ' * 100% of CPU load on single-processor machines' 446 call lineout G.!QtCmd, ' */' 447 call lineout G.!QtCmd, 'call SysSetPriority 1, 0' 448 call lineout G.!QtCmd, '' 449 call lineout G.!QtCmd, '/* pass arguments to the command shell */' 396 450 call lineout G.!QtCmd, '''cmd /c'' args' 397 451 call lineout G.!QtCmd, 'exit rc' … … 454 508 choice = GetChoice('Select the Qt library type:', 'G.!Choices', -Opt.!DLL + 2) 455 509 Opt.!DLL = -choice + 2 510 511 if (Opt.!DLL == 1) then do 512 call SaySay 'You are going to build Qt as a dynamic link library. In order' 513 call SaySay 'to prevent possible DLL naming conflicts (a.k.a. DLL hell) with' 514 call SaySay 'the official binary distribution of Qt and with other custom' 515 call SaySay 'builds, please personalize your version of the DLL by entering' 516 call SaySay 'a unique base name for it (without extension). Note that it' 517 call SaySay 'can only consist of latin letters A to Z, numbers, a dash and' 518 call SaySay 'an underscore, and its length cannot exceed 8 characters. Also,' 519 call SaySay 'this name cannot start with ''qt''.' 520 say 521 name = Opt.!CustomDLLName 522 do forever 523 name = InputLine('Enter a base name for the Qt DLL:', name) 524 upperName = translate(name) 525 if (upperName \= '' & length(upperName) <= 8 &, 526 verify(upperName,'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_') == 0 &, 527 left(upperName, 2) \= 'QT') then leave 528 call SayErr 'The entered name is not valid.' 529 say 530 end 531 Opt.!CustomDLLName = name 532 end 456 533 457 534 G.!Choices.0 = 2 … … 548 625 say 549 626 call SaySay 'Library type : 'DllOrStatic', 'ReleaseOrDebug', multithreaded' 627 if (Opt.!DLL == 1) then 628 call SaySay 'Library name : 'Opt.!CustomDLLName 550 629 call SaySay 'Modules : 'BasicModules OptionalModules 551 630 call SaySay 'Other features : 'OptionalConfig … … 556 635 call SaySay 'Please wait...' 557 636 say 558 559 /* do the configure Qt job */560 637 561 638 qmake_cache = G.!QMakeCache … … 565 642 qconfig_cpp = G.!QConfigCPP 566 643 644 /* do the configure Qt job */ 645 567 646 call DeleteFile qmake_cache 568 647 call DeleteFile qtos2config … … 571 650 call DeleteFile qconfig_cpp 572 651 573 call lineout qmake_cache, 'QMAKE_QT_VERSION_OVERRIDE=331'574 652 call lineout qmake_cache, 'OBJECTS_DIR=tmp\obj\'ReleaseOrDebug'_mt_'SharedOrStatic 575 653 call lineout qmake_cache, 'MOC_DIR=tmp\moc\'ReleaseOrDebug'_mt_'SharedOrStatic … … 597 675 call lineout qmake_cache 598 676 599 call lineout qtos2config, 'CONFIG+= 'SharedOrNot' thread 'ReleaseOrDebug 677 if (Opt.!DLL == 1) then 678 call lineout qtos2config, 'QMAKE_QT_DLL_TARGET = 'Opt.!CustomDLLName 679 call lineout qtos2config, 'CONFIG += 'SharedOrNot' thread 'ReleaseOrDebug 600 680 call lineout qtos2config, 'exists( $(QTDIR)\.qtos2defines ) {' 601 681 call lineout qtos2config, ' include( $(QTDIR)\.qtos2defines )' … … 681 761 build_log = G.!QTDirP'\build.log' 682 762 763 call DeleteFile build_log'.bak' 764 call CopyFile build_log build_log'.bak' 765 683 766 build_target = '' 684 767 … … 903 986 return 904 987 905 /** 906 * Shows the prompt to input a text line and 988 SayNoMove: procedure expose (Globals) 989 parse arg str 990 parse value SysCurPos() with row col 991 call SysCurState 'OFF' 992 call charout, str 993 call SysCurPos row, col 994 call SysCurState 'ON' 995 return 996 997 MovePosBy: procedure expose (Globals) 998 parse arg delta 999 parse value SysCurPos() with row col 1000 col = col + delta 1001 row = row + (col % G.!ScreenWidth) 1002 if (col < 0) then 1003 row = row - 1 1004 col = col // G.!ScreenWidth 1005 if (col < 0) then 1006 col = col + G.!ScreenWidth 1007 call SysCurPos row, col 1008 return 1009 1010 /** 1011 * Displays a prompt to input a text line and 907 1012 * returns the line entered by the user. 1013 * 1014 * @param prompt prompt to display 1015 * @param default initial line contents 1016 * @return selected directory 908 1017 */ 909 1018 InputLine: procedure expose (Globals) 910 parse arg prompt 1019 1020 parse arg prompt, default 911 1021 call SaySay prompt 912 1022 say 913 call SayPrompt '', 1 914 line = linein() 1023 1024 line = default 1025 len = length(line) 1026 n = len 1027 1028 call SayPrompt line, 1 1029 extended = 0 1030 1031 do forever 1032 1033 key = SysGetKey('NOECHO') 1034 if (key == 'E0'x) then do 1035 extended = 1 1036 iterate 1037 end 1038 1039 select 1040 when (\extended & key == '08'x) then do 1041 /* Backspace */ 1042 if (n > 0) then do 1043 call MovePosBy -1 1044 line = delstr(line, n, 1) 1045 call SayNoMove substr(line, n)||' ' 1046 len = len - 1 1047 n = n - 1 1048 end 1049 iterate 1050 end 1051 when (key == '0D'x) then do 1052 /* Enter */ 1053 say 1054 leave 1055 end 1056 when (extended) then do 1057 select 1058 when (key == '53'x) then do 1059 /* Delete */ 1060 if (n < len) then do 1061 line = delstr(line, n + 1, 1) 1062 call SayNoMove substr(line, n + 1)||' ' 1063 end 1064 len = len - 1 1065 end 1066 when (key == '4B'x) then do 1067 /* Left arrow */ 1068 if (n > 0) then do 1069 call MovePosBy -1 1070 n = n - 1 1071 end 1072 end 1073 when (key == '4D'x) then do 1074 /* Right arrow */ 1075 if (n < len) then do 1076 call MovePosBy 1 1077 n = n + 1 1078 end 1079 end 1080 when (key == '47'x) then do 1081 /* Home */ 1082 if (n > 0) then do 1083 call MovePosBy -n 1084 n = 0 1085 end 1086 end 1087 when (key == '4F'x) then do 1088 /* End */ 1089 if (n < len) then do 1090 call MovePosBy len - n 1091 n = len 1092 end 1093 end 1094 otherwise nop 1095 end 1096 extended = 0 1097 iterate 1098 end 1099 otherwise do 1100 call charout, key 1101 if (n == len) then do 1102 line = line||key 1103 end 1104 else do 1105 line = insert(key, line, n) 1106 call SayNoMove substr(line, n + 2) 1107 end 1108 len = len + 1 1109 n = n + 1 1110 end 1111 end 1112 end 1113 915 1114 say 916 1115 return line … … 922 1121 * 923 1122 * @param prompt prompt to show 1123 * @param default initial directory 924 1124 * @return selected directory 925 1125 */ 926 1126 InputDir: procedure expose (Globals) 927 parse arg prompt 1127 parse arg prompt, default 1128 dir = default 928 1129 do forever 929 dir = InputLine(prompt )1130 dir = InputLine(prompt, dir) 930 1131 if (DirExists(dir)) then leave 931 1132 call SayErr 'The entered directory does not exist.' … … 951 1152 call SaySay prompt 952 1153 say 953 call SayPrompt '[YN] ' default, 11154 call SayPrompt '[YN] ', 1 954 1155 yn = ReadChoice('YN',, default, 1) 955 1156 say … … 1006 1207 else if (def == 10) then def = 0 1007 1208 end 1008 call SayPrompt '['prompt'] ' ||def, 11209 call SayPrompt '['prompt'] ', 1 1009 1210 n = ReadChoice(choices, extChoices, def,, allowEnter) 1010 1211 say … … 1043 1244 allowEnter = (allowEnter == 1) 1044 1245 choice = default 1246 call charout, choice 1045 1247 if (ignoreCase) then choice = translate(choice) 1046 1248 extended = 0 … … 1117 1319 parse arg stem, prompt, searchPattern, checkPath, checkVer, errPath 1118 1320 1321 if (symbol('Static.!MenuSelectPath.!Recent') \= 'VAR') then 1322 Static.!MenuSelectPath.!Recent = '' 1323 1119 1324 call value stem, '' 1120 1325 … … 1128 1333 1129 1334 if (choice == n) then do 1130 path = InputDir('Enter a location where to start searching from:') 1335 path = InputDir('Enter a location where to start searching from:',, 1336 Static.!MenuSelectPath.!Recent) 1337 Static.!MenuSelectPath.!Recent = path 1131 1338 call SaySay 'Please wait...' 1132 1339 say
Note:
See TracChangeset
for help on using the changeset viewer.