Changeset 128
- Timestamp:
- Sep 17, 2006, 10:10:13 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.cmd
r118 r128 62 62 Opt.!MNG = 1 63 63 Opt.!GIF = 0 /* WARNING: license restrictions apply when setting to 1! */ 64 65 /* extra OS/2 specific features */ 66 /* @todo (r=dmik) commented out until there is a GCC compatible FT2 support lib 67 Opt.!Extra.!FT2LIB = '' 68 Opt.!Extra.!FT2LIB.0 = 0 69 Opt.!Extra.!FT2LIB.!choice = '' 70 Opt.!Extra.!FT2LIB.!enabled = '' 71 */ 64 72 65 73 Opt.!QTCustomDefines = '' … … 288 296 call WriteVar G.!ConfigCache, 'Opt.!GIF' 289 297 298 /* @todo (r=dmik) commented out until there is a GCC compatible FT2 support lib 299 call WriteStem G.!ConfigCache, 'Opt.!Extra.!FT2LIB' 300 call WriteVar G.!ConfigCache, 'Opt.!Extra.!FT2LIB.!choice' 301 call WriteVar G.!ConfigCache, 'Opt.!Extra.!FT2LIB.!enabled' 302 */ 290 303 call WriteVar G.!ConfigCache, 'Opt.!QTCustomDefines' 291 304 … … 315 328 Opt.!GNUMAKEPath.!changed = 0 316 329 330 /* @todo (r=dmik) commented out until there is a GCC compatible FT2 support lib 331 Opt.!Extra.!FT2LIB.!changed = 0 332 */ 317 333 return 318 334 … … 335 351 call SaySay 'generated by GCC into OS/2 executables.' 336 352 say 337 call SaySay 'Also, the GNU Make utility version 3.81beta1 or newer (statically' 338 call SaySay 'linked to intl.dll) is required.' 353 call SaySay 'Also, the GNU Make utility version 3.81beta1 or newer is required.' 339 354 say 340 355 341 356 do until (Opt.!GCCPath \= '') 342 call MenuSelectPath,357 Opt.!GCCPath = MenuSelectPath(, 343 358 'Opt.!GCCPath',, 344 359 'Select where to search for a GCC installation:',, … … 346 361 'ERROR: Could not find a valid GCC installation'||G.!EOL||, 347 362 'in ''%1''!'||G.!EOL||, 348 'Please read the documentation.' 363 'Please read the documentation.') 349 364 end 350 365 call WriteConfigCache 351 366 352 367 do until (Opt.!ILINKPath \= '') 353 call MenuSelectPath,368 Opt.!ILINKPath = MenuSelectPath(, 354 369 'Opt.!ILINKPath',, 355 370 'Select where to search for an ILINK installation:',, … … 357 372 'ERROR: Could not find a valid ILINK installation'||G.!EOL||, 358 373 'in ''%1''!'||G.!EOL||, 359 'Please read the documentation.' 374 'Please read the documentation.') 360 375 end 361 376 call WriteConfigCache 362 377 363 378 do until (Opt.!GNUMakePath \= '') 364 call MenuSelectPath,379 Opt.!GNUMakePath = MenuSelectPath(, 365 380 'Opt.!GNUMakePath',, 366 381 'Select where to search for the GNU Make utility:',, … … 368 383 'ERROR: Could not find a GNU Make utility'||G.!EOL||, 369 384 'in ''%1''!'||G.!EOL||, 370 'Please read the documentation.' 385 'Please read the documentation.') 371 386 end 372 387 call WriteConfigCache … … 463 478 */ 464 479 call ConfigureCompiler_GenAddPathEnv 'PATH',, 465 Opt.!GCCPath.! addPath';'Opt.!ILINKPath.!addPath';'Opt.!GNUMAKEPath.!addPath480 Opt.!GCCPath.!path';'Opt.!ILINKPath.!path';'Opt.!GNUMAKEPath.!path 466 481 call ConfigureCompiler_GenAddPathEnv 'BEGINLIBPATH',, 467 Opt.!GCCPath.! addLibPath';'Opt.!ILINKPath.!addLibPath';'Opt.!GNUMAKEPath.!addLibPath482 Opt.!GCCPath.!libpath';'Opt.!ILINKPath.!libpath';'Opt.!GNUMAKEPath.!libpath 468 483 call lineout G.!QtCmd, '' 469 484 call lineout G.!QtCmd, '/*' … … 536 551 say 537 552 553 /* Qt library type */ 554 538 555 G.!Choices.0 = 2 539 556 G.!Choices.1 = 'Dynamic link library (DLL)' … … 575 592 end 576 593 594 /* Qt library debug level */ 595 577 596 G.!Choices.0 = 2 578 597 G.!Choices.1 = 'Release (no debug information)' … … 581 600 Opt.!RELEASE = -choice + 2 582 601 602 /* Optional Qt modules */ 603 583 604 G.!Choices.0 = 4 584 605 do forever … … 589 610 call SaySay 'Enable or disable optional Qt library modules' 590 611 choice = GetChoice('(pressing Enter will accept the current selection):',, 591 'G.!Choices',, 1)612 'G.!Choices',, 'E') 592 613 select 593 614 when choice == 1 then Opt.!NETWORK = \Opt.!NETWORK … … 599 620 end 600 621 622 /* InnoTek Font Engine Support */ 623 624 /* @todo (r=dmik) commented out until there is a GCC compatible FT2 support lib 625 do forever 626 call SaySay "Enable InnoTek Font Engine support in Qt?" 627 Opt.!Extra.!FT2LIB.!enabled =, 628 GetYesNo("(answering Y (yes) is recommended)",, 629 Opt.!Extra.!FT2LIB.!enabled) 630 if (Opt.!Extra.!FT2LIB.!enabled) then do 631 path = MenuSelectPath(, 632 'Opt.!Extra.!FT2LIB',, 633 'Select where to search for the Innotek Font Engine support library:',, 634 'ft2lib.h', 'CheckFT2LIBPath', 'CheckFT2LIBVersion',, 635 'ERROR: Could not find the Innotek Font Engine support library'||G.!EOL||, 636 'in ''%1''!'||G.!EOL||, 637 'Please read the documentation.',, 638 'C') 639 if (path \== '') then do 640 Opt.!Extra.!FT2LIB = path 641 leave 642 end 643 Opt.!Extra.!FT2LIB.!enabled = 0 644 end 645 else leave 646 end 647 648 call WriteConfigCache 649 */ 650 /* Custom Qt defines */ 651 601 652 if (OfficialBuildConfig == '') then do 602 653 call SaySay 'Enter a list of custom Qt defines separated by spaces' … … 609 660 call WriteConfigCache 610 661 662 /* Generate setup files for Qt */ 663 611 664 BasicModules = 'kernel tools widgets dialogs styles' 612 665 BasicModulesHeader =, … … 673 726 OptionalConfig = strip(OptionalConfig) 674 727 728 ExtraConfig = '' 729 /* @todo (r=dmik) commented out until there is a GCC compatible FT2 support lib 730 if (Opt.!Extra.!FT2LIB.!enabled) then do 731 ExtraConfig = ExtraConfig 'pm_ft2lib' 732 end 733 */ 734 ExtraConfig = strip(ExtraConfig) 735 675 736 ConfigHeader =, 676 737 '/* Everything */'G.!EOL||, … … 731 792 call SaySay 'Custom defines : 'Opt.!QTCustomDefines 732 793 say 733 794 /* @todo (r=dmik) commented out until there is a GCC compatible FT2 support lib 795 call SaySay 'Innotek Font Engine support : 'GetYesNoText(Opt.!Extra.!FT2LIB.!enabled) 796 say 797 */ 734 798 call WaitForAnyKey 735 799 … … 762 826 'minimal-config small-config medium-config large-config full-config ', 763 827 ReleaseOrDebug' thread' OptionalConfig, 764 'bigcodecs no-tablet incremental create_prl link_prl' 828 'bigcodecs no-tablet incremental create_prl link_prl', 829 ExtraConfig 765 830 call lineout qmake_cache, 'QMAKESPEC=os2-g++' 766 831 call lineout qmake_cache, 'QT_BUILD_TREE='QuotePath(G.!QTDir) … … 775 840 call lineout qmake_cache, 'data.path='QuotePath(G.!QTDirP) 776 841 call lineout qmake_cache, 'translations.path='QuotePath(G.!QTDirP'\translations') 842 call lineout qmake_cache, '' 843 /* @todo (r=dmik) commented out until there is a GCC compatible FT2 support lib 844 if (Opt.!Extra.!FT2LIB.!enabled) then do 845 call lineout qmake_cache, 'pm_ft2lib.include='Opt.!Extra.!FT2LIB.!include 846 call lineout qmake_cache, 'pm_ft2lib.lib='Opt.!Extra.!FT2LIB.!lib 847 end 848 */ 777 849 call lineout qmake_cache 778 850 … … 919 991 */ 920 992 CheckGCCPath: procedure expose (Globals) 921 parse arg path, beforeCheckVer922 beforeCheckVer = (beforeCheckVer== 1)993 parse arg path, finalCheck 994 finalCheck = (finalCheck == 1) 923 995 path = FixDirNoSlash(path) 924 996 if (FileExists(path'\bin\gccenv.cmd') & FileExists(path'\bin\gcc.exe')) then do 925 if (beforeCheckVer) then do 926 Opt.!GCCPath.!addPath = '' 927 Opt.!GCCPath.!addLibPath = '' 928 end 929 end 930 else return 0 931 return 1 997 if (finalCheck) then do 998 Opt.!GCCPath.!path = '' 999 Opt.!GCCPath.!libpath = '' 1000 return 1 1001 end 1002 return path 1003 end 1004 /* not valid */ 1005 if (finalCheck) then return 0 1006 return '' 932 1007 933 1008 /** … … 945 1020 */ 946 1021 CheckILINKPath: procedure expose (Globals) 947 parse arg path, beforeCheckVer948 beforeCheckVer = (beforeCheckVer== 1)1022 parse arg path, finalCheck 1023 finalCheck = (finalCheck == 1) 949 1024 path = FixDirNoSlash(path) 950 if (translate(right(path, 4)) == '\BIN' &, 951 FileExists(path'\ilink.exe') & FileExists(path'\..\dll\cppom30.dll')) then do 952 if (beforeCheckVer) then do 953 Opt.!ILINKPath.!addPath = path 954 Opt.!ILINKPath.!addLibPath = left(path, length(path) - 4)'\dll' 955 end 956 end 957 else if (FileExists(path'\ilink.exe') & FileExists(path'\cppom30.dll')) then do 958 if (beforeCheckVer) then do 959 Opt.!ILINKPath.!addPath = path 960 Opt.!ILINKPath.!addLibPath = path 961 end 962 end 963 else return 0 964 return 1 1025 base = path 1026 if (\finalCheck) then do 1027 if (translate(right(path, 4)) == '\BIN') then 1028 base = left(path, length(path) - 4) 1029 end 1030 if (FileExists(base'\bin\ilink.exe') & FileExists(base'\dll\cppom30.dll')) then do 1031 /* the \bin and \dll case (as in the VAC3 installation) */ 1032 if (finalCheck) then do 1033 Opt.!ILINKPath.!path = base'\bin' 1034 Opt.!ILINKPath.!libpath = base'\dll' 1035 return 1 1036 end 1037 return base 1038 end 1039 else if (FileExists(base'\ilink.exe') & FileExists(base'\cppom30.dll')) then do 1040 /* ilink.exe and DLLs are in the same dir */ 1041 if (finalCheck) then do 1042 Opt.!ILINKPath.!path = base 1043 Opt.!ILINKPath.!libpath = base 1044 return 1 1045 end 1046 return base 1047 end 1048 /* not valid */ 1049 if (finalCheck) then return 0 1050 return '' 965 1051 966 1052 /** … … 969 1055 parse arg path 970 1056 path = FixDirNoSlash(path) 971 call AddPathEnv 'PATH', Opt.!ILINKPath.! addPath, '''P'''972 call AddPathEnv 'BEGINLIBPATH', Opt.!ILINKPath.! addLibPath, '''P'''1057 call AddPathEnv 'PATH', Opt.!ILINKPath.!path, '''P''' 1058 call AddPathEnv 'BEGINLIBPATH', Opt.!ILINKPath.!libpath, '''P''' 973 1059 address 'cmd' 'ilink.exe | more' 974 1060 say … … 979 1065 */ 980 1066 CheckGNUMakePath: procedure expose (Globals) 981 parse arg path, beforeCheckVer982 beforeCheckVer = (beforeCheckVer== 1)1067 parse arg path, finalCheck 1068 finalCheck = (finalCheck == 1) 983 1069 path = FixDirNoSlash(path) 984 1070 if (FileExists(path'\make.exe')) then do 1071 /* make.exe and DLLs are in the same dir */ 985 1072 if (FileExists(path'\intl.dll')) then do 986 if (beforeCheckVer) then do 987 Opt.!GNUMakePath.!addPath = path 988 Opt.!GNUMakePath.!addLibPath = path 1073 /* have intl.dll */ 1074 if (finalCheck) then do 1075 Opt.!GNUMakePath.!path = path 1076 Opt.!GNUMakePath.!libpath = path 1077 return 1 989 1078 end 990 1079 end 991 1080 else do 992 if (beforeCheckVer) then do 993 Opt.!GNUMakePath.!addPath = path 994 Opt.!GNUMakePath.!addLibPath = '' 995 end 996 end 997 end 998 else return 0 999 return 1 1081 /* no intl.dll */ 1082 if (finalCheck) then do 1083 Opt.!GNUMakePath.!path = path 1084 Opt.!GNUMakePath.!libpath = '' 1085 return 1 1086 end 1087 end 1088 return path 1089 end 1090 /* not valid */ 1091 if (finalCheck) then return 0 1092 return '' 1000 1093 1001 1094 /** … … 1004 1097 parse arg path 1005 1098 path = FixDirNoSlash(path) 1006 call AddPathEnv 'PATH', Opt.!GNUMakePath.! addPath, '''P'''1007 call AddPathEnv 'BEGINLIBPATH', Opt.!GNUMakePath.! addLibPath, '''P'''1099 call AddPathEnv 'PATH', Opt.!GNUMakePath.!path, '''P''' 1100 call AddPathEnv 'BEGINLIBPATH', Opt.!GNUMakePath.!libpath, '''P''' 1008 1101 address 'cmd' 'make.exe --version | more' 1009 1102 say … … 1011 1104 return GetYesNo("Accept the above version?", def) 1012 1105 1106 /** 1107 */ 1108 CheckFT2LIBPath: procedure expose (Globals) 1109 parse arg path, finalCheck 1110 finalCheck = (finalCheck == 1) 1111 path = FixDirNoSlash(path) 1112 base = path 1113 if (\finalCheck) then do 1114 if (translate(right(path, 8)) == '\INCLUDE') then 1115 base = left(path, length(path) - 8) 1116 else if (translate(right(path, 2)) == '\H') then 1117 base = left(path, length(path) - 2) 1118 end 1119 if (FileExists(base'\include\ft2lib.h') & FileExists(base'\lib\ft2lib.lib')) then do 1120 /* the \include and \lib case */ 1121 if (finalCheck) then do 1122 Opt.!Extra.!FT2LIB.!include = base'\include' 1123 Opt.!Extra.!FT2LIB.!lib = base'\lib' 1124 return 1 1125 end 1126 return base 1127 end 1128 else if (FileExists(base'\h\ft2lib.h') & FileExists(base'\lib\ft2lib.lib')) then do 1129 /* the \h and \lib case */ 1130 if (finalCheck) then do 1131 Opt.!Extra.!FT2LIB.!include = base'\h' 1132 Opt.!Extra.!FT2LIB.!lib = base'\lib' 1133 return 1 1134 end 1135 return base 1136 end 1137 else if (FileExists(base'\ft2lib.h') & FileExists(base'\ft2lib.lib')) then do 1138 /* both are in the same dir */ 1139 if (finalCheck) then do 1140 Opt.!Extra.!FT2LIB.!include = base 1141 Opt.!Extra.!FT2LIB.!lib = base 1142 return 1 1143 end 1144 return base 1145 end 1146 /* not valid */ 1147 if (finalCheck) then return 0 1148 return '' 1149 1150 /** 1151 */ 1152 CheckFT2LIBVersion: procedure expose (Globals) 1153 parse arg path 1154 path = FixDirNoSlash(path) 1155 address 'cmd' 'dir' Opt.!Extra.!FT2LIB.!include'\ft2lib.h', 1156 Opt.!Extra.!FT2LIB.!lib'\ft2lib.lib' 1157 say 1158 if (Opt.!Extra.!FT2LIB.!changed \== 1) then def = 'Y'; else def = '' 1159 return GetYesNo("Accept the above version?", def) 1160 1013 1161 /** 1014 1162 */ … … 1017 1165 if (n == 1) then return '[X]' 1018 1166 else return '[ ]' 1167 1168 /** 1169 */ 1170 GetYesNoText: procedure expose (Globals) 1171 parse arg n 1172 if (n == 1 | n == 'Y' | n == 'y') then return 'Yes' 1173 else return 'No' 1019 1174 1020 1175 /* utility functions … … 1118 1273 1119 1274 /** 1120 * Displays a prompt to input a text line and 1121 * returns the line entered by the user. 1275 * Displays a prompt to input a text line and returns the line entered by the 1276 * user. Letters in the mode argument have the following meanings: 1277 * 1278 * N -- empty lines are not allowed (e.g. '' can never be returned) 1279 * C -- ESC can be pressed to cancel input ('1B'x is returned) 1122 1280 * 1123 1281 * @param prompt prompt to display 1124 1282 * @param default initial line contents 1125 * @return selected directory 1283 * @param mode input mode string consisting of letters as described above 1284 * @return entered line 1126 1285 */ 1127 1286 InputLine: procedure expose (Globals) 1128 1287 1129 parse arg prompt, default 1288 parse arg prompt, default, mode 1130 1289 call SaySay prompt 1131 1290 say 1132 1291 1292 mode = translate(mode) 1293 allow_empty = pos('N', mode) == 0 1294 allow_cancel = pos('C', mode) > 0 1295 1133 1296 line = default 1134 1297 len = length(line) … … 1160 1323 when (key == '0D'x) then do 1161 1324 /* Enter */ 1325 if (line == '' & \allow_empty) then iterate 1162 1326 say 1327 leave 1328 end 1329 when (key == '1B'x) then do 1330 /* ESC */ 1331 line = key 1163 1332 leave 1164 1333 end … … 1225 1394 1226 1395 /** 1227 * Shows the prompt to input a directory path and 1228 * returns the path entered by the user. The procedure1229 * does not return until a valid existing path is entered.1396 * Shows the prompt to input a directory path and returns the path entered by 1397 * the user. The procedure does not return until a valid existing path is 1398 * entered or until ESC is pressed in which case it returns ''. 1230 1399 * 1231 1400 * @param prompt prompt to show … … 1237 1406 dir = default 1238 1407 do forever 1239 dir = InputLine(prompt, dir) 1408 dir = InputLine(prompt, dir, 'NC') 1409 if (dir == '1B'x) then do 1410 say 1411 return '' /* canceled */ 1412 end 1240 1413 if (DirExists(dir)) then leave 1241 1414 call SayErr 'The entered directory does not exist.' … … 1249 1422 * @param prompt prompt to show (specify '' to suppress the prompt) 1250 1423 * @param default default choice: 1251 * '' - no default choice1252 * 'Y' - default is yes1253 * other - default is no1424 * '' - no default choice 1425 * 'Y' or 1 - default is yes 1426 * other - default is no 1254 1427 * @return 1255 1428 * 1 if Yes is selected, otherwise 0 … … 1258 1431 parse arg prompt, default 1259 1432 default = translate(default) 1260 if (default \== '' & default \== 'Y') then default = 'N' 1433 if (default == 1) then default = 'Y' 1434 else if (default \== '' & default \== 'Y') then default = 'N' 1261 1435 if (prompt \= '') then call SaySay prompt 1262 1436 say 1263 1437 call SayPrompt '[YN] ', 1 1264 yn = ReadChoice('YN',, default, 1)1438 yn = ReadChoice('YN',, default, 'I') 1265 1439 say 1266 1440 say … … 1268 1442 1269 1443 /** 1270 * Shows a menu of choices and returns the 1271 * menu item number selected by the user. 1444 * Shows a menu of choices and returns the menu item number selected by the 1445 * user. Letters in the mode argument have the following meanings: 1446 * 1447 * E -- allow to press Enter w/o a choice (will return '') 1448 * C -- ESC can be pressed to cancel selection (will return -1) 1272 1449 * 1273 1450 * @param prompt prompt to display 1274 1451 * @param stem stem containing a list of choices 1275 1452 * @param default default choice 1276 * @param allowEnter 1277 * 1 allows to press Enter w/o a choice (will return '') 1453 * @param mode input mode string consisting of letters as described above 1278 1454 * @return 1279 1455 * selected menu item number 1280 1456 */ 1281 1457 GetChoice: procedure expose (Globals) 1282 parse arg prompt, stem, default, allowEnter 1283 allowEnter = (allowEnter == 1) 1458 parse arg prompt, stem, default, mode 1459 mode = translate(mode) 1460 allowEnter = pos('E', mode) > 0 1461 allowESC = pos('C', mode) > 0 1284 1462 count = value(stem'.0') 1285 1463 if (count == 0) then return … … 1294 1472 prompt = choices 1295 1473 if (allowEnter) then prompt = prompt'/Enter' 1474 if (allowESC) then do 1475 prompt = prompt'/Esc' 1476 choices = choices||'1B'x 1477 end 1296 1478 if (first > 1) then do 1297 1479 extChoices = extChoices||'49'x … … 1317 1499 end 1318 1500 call SayPrompt '['prompt'] ', 1 1319 n = ReadChoice(choices, extChoices, def, , allowEnter)1501 n = ReadChoice(choices, extChoices, def, mode) 1320 1502 say 1321 1503 say 1504 if (n == '1B'x) then do 1505 return -1 1506 end 1322 1507 if (n == '0E49'x) then do 1323 1508 first = first - 10 … … 1338 1523 /** 1339 1524 * Reads a one-key choice from the keyboard. 1525 * user. Letters in the mode argument have the following meanings: 1526 * 1527 * E -- allow to press Enter w/o a choice (will return '') 1528 * C -- ESC can be pressed to cancel selection (will return '1B'x) 1529 * I -- ignore case of pressed letters 1340 1530 * 1341 1531 * @param choices string of allowed one-key choices 1342 1532 * @param extChoices string of allowed one-extended-key choices 1343 1533 * @param default default choice (can be a key from choices) 1344 * @param ignoreCase 1 ignores case of letters 1345 * @param allowEnter 1346 * 1 allows to press Enter w/o a choice (will return '') 1534 * @param mode input mode string consisting of letters as described above 1347 1535 * @return 1348 1536 * entered key (prefixed with 'E0'x if from extChoices) 1349 1537 */ 1350 1538 ReadChoice: procedure expose (Globals) 1351 parse arg choices, extChoices, default, ignoreCase, allowEnter 1352 ignoreCase = (ignoreCase == 1) 1353 allowEnter = (allowEnter == 1) 1539 parse arg choices, extChoices, default, mode 1540 mode = translate(mode) 1541 ignoreCase = pos('I', mode) > 0 1542 allowEnter = pos('E', mode) > 0 1543 allowCancel = pos('C', mode) > 0 1354 1544 choice = default 1355 1545 call charout, choice … … 1364 1554 if (\extended & ignoreCase) then key = translate(key) 1365 1555 select 1556 when (allowCancel & \extended & key == '1B'x) then do 1557 choice = key 1558 leave 1559 end 1366 1560 when (choice == '' & \extended & verify(key, choices) == 0) then do 1367 1561 choice = key … … 1390 1584 1391 1585 /** 1392 * Shows a menu to select a path. 1393 * The last of menu entries allows to enter a new location to search for valid 1394 * paths (this operation will completely overwrite all the stem entries passed 1395 * to this function). 1586 * Shows a menu to select a path from the list of entries. 1587 * 1588 * A special menu entry is automatically added as the last choice that allows 1589 * to enter a new location to search for valid paths (this operation will 1590 * completely overwrite all the menu entries passed to this function in the 1591 * stem). 1592 * 1593 * Letters in the mode argument have the following meanings: 1594 * 1595 * C -- ESC can be pressed to cancel selection (will return '') 1396 1596 * 1397 1597 * @param stem … … 1400 1600 * @param prompt 1401 1601 * prompt to display 1402 * @param default1403 * default choice1404 1602 * @param searchPattern 1405 1603 * pattern to search for when selecting suitable paths in the new location … … 1408 1606 * @param checkPath 1409 1607 * name of the funciton to check the path. The first argument is the path 1410 * to check, the second argument is 1 if this function is called just before 1411 * checkVer (this can be used to pass data to checkVer (using global 1412 * vafiables) necessary to perform a version check). 1608 * to check. If the second argument is 0, it means a preliminary check (i.e. 1609 * the path is the result of the SysFileThree procedure); checkPath must 1610 * return a validated (and probably modified) path on success or '' if the 1611 * path is invalid. If the second argument is 1, it's a final check 1612 * (path is what returned by the preliminary check call); checkPath must 1613 * return either 1 on success or 0 on failure. The final check is done 1614 * right before calling checkVer, so it can set some global variables in 1615 * order to pass necessary data to checkVer and to the global level for 1616 * further configuration. 1413 1617 * @param checkVer 1414 1618 * name of the funciton to check the version. The argument is a path to 1415 * check the version for. 1619 * check the version for (as returned by checkPath after the preliminary 1620 * check call). 1416 1621 * @param errPath 1417 1622 * error message to display when a path check fails (%1 will be replaced 1418 1623 * with the failed path name) 1624 * @param mode 1625 * input mode string consisting of letters as described above 1419 1626 * @return 1420 * when both path and version checks succeed, stem variable itself 1421 * (i.e. w/o any indexes) will contain a path selected and stem'.!choice' 1422 * will contain the selected item number; otherwise the stem variable will 1423 * be empty (this also includes the case when a user typed a new location 1424 * and the stem was overwritten with a list of new paths found) 1627 * the selected path or '' if the selection was canceled. 1628 * If a non-empty path is returned, stem'.!choice' will contain 1629 * the selected item number, otherwise it will be empty. 1425 1630 */ 1426 1631 MenuSelectPath: procedure expose (Globals) 1427 1632 1428 parse arg stem, prompt, searchPattern, checkPath, checkVer, errPath 1633 parse arg stem, prompt, searchPattern, checkPath, checkVer, errPath, mode 1634 1635 mode = translate(mode) 1636 if (pos('C', mode) > 0) then mode = 'C' 1637 else mode = '' 1429 1638 1430 1639 if (symbol('Static.!MenuSelectPath.!Recent') \= 'VAR') then 1431 1640 Static.!MenuSelectPath.!Recent = '' 1432 1641 1433 call value stem, '' 1434 1435 n = value(stem'.0') + 1 1436 call SysStemInsert stem, n, '[type a location...]' 1437 if (n == 1) then default = 1 1438 else default = value(stem'.!choice') 1439 1440 choice = GetChoice(prompt, stem, default) 1441 call SysStemDelete stem, n 1442 1443 if (choice == n) then do 1444 path = InputDir('Enter a location where to start searching from:',, 1445 Static.!MenuSelectPath.!Recent) 1446 Static.!MenuSelectPath.!Recent = path 1447 call SaySay 'Please wait...' 1642 do forever 1643 1644 n = value(stem'.0') + 1 1645 call SysStemInsert stem, n, '[type a location...]' 1646 if (n == 1) then default = 1 1647 else default = value(stem'.!choice') 1648 1649 choice = GetChoice(prompt, stem, default, mode) 1650 call SysStemDelete stem, n 1651 1652 if (choice == -1) then return '' /* canceled */ 1653 1654 if (choice == n) then do 1655 call value stem'.!choice', '' 1656 path = InputDir('Enter a location where to start searching from ', 1657 '(or Esc to cancel):',, 1658 Static.!MenuSelectPath.!Recent) 1659 if (path == '') then iterate /* canceled */ 1660 Static.!MenuSelectPath.!Recent = path 1661 call SaySay 'Please wait...' 1662 say 1663 patternPath = translate(filespec('D', searchPattern) || filespec('P', searchPattern)) 1664 patternName = filespec('N', searchPattern) 1665 call SysFileTree FixDirNoSlash(path)'\'patternName, 'found', 'FSO' 1666 found2.0 = 0 1667 if (found.0 > 0) then do 1668 do i = 1 to found.0 1669 dir = filespec('D', found.i) || filespec('P', found.i) 1670 /* check that the found path ends with the pattern path */ 1671 if (translate(right(dir, length(patternPath))) \== patternPath) then 1672 iterate 1673 dir = left(dir, length(dir) - length(patternPath)) 1674 /* check path validity */ 1675 interpret 'dir = 'checkPath'("'dir'")' 1676 if (dir \== '') then 1677 call SysStemInsert 'found2', 1, FixDir(dir) 1678 end 1679 end 1680 if (found2.0 > 0) then do 1681 call SysStemCopy 'found2', stem 1682 /* SysStemCopy is bogus and doesn't copy the count field... */ 1683 call value stem'.0', found2.0 1684 call value stem'.!choice', '' 1685 call value stem'.!changed', 1 1686 iterate 1687 end 1688 end 1689 else do 1690 path = value(stem'.'choice) 1691 /* check path validity and tell the version check will be done next */ 1692 interpret 'ok = 'checkPath'("'path'", 1)' 1693 if (ok) then do 1694 if (value(stem'.!choice') \== choice) then 1695 call value stem'.!changed', 1 1696 interpret 'ok = 'checkVer'("'path'")' 1697 if (ok) then do 1698 call value stem'.!choice', choice 1699 return path 1700 end 1701 call value stem'.!choice', '' 1702 iterate 1703 end 1704 end 1705 1706 call SayErr Replace(errPath, '%1', path) 1448 1707 say 1449 patternPath = translate(filespec('D', searchPattern) || filespec('P', searchPattern)) 1450 patternName = filespec('N', searchPattern) 1451 call SysFileTree FixDirNoSlash(path)'\'patternName, 'found', 'FSO' 1452 found2.0 = 0 1453 if (found.0 > 0) then do 1454 do i = 1 to found.0 1455 dir = filespec('D', found.i) || filespec('P', found.i) 1456 /* check that the found path ends with the pattern path */ 1457 if (translate(right(dir, length(patternPath))) \== patternPath) then 1458 iterate 1459 dir = left(dir, length(dir) - length(patternPath)) 1460 /* check path validity */ 1461 interpret 'ok = 'checkPath'("'dir'")' 1462 if (ok) then 1463 call SysStemInsert 'found2', 1, FixDir(dir) 1464 end 1465 end 1466 if (found2.0 > 0) then do 1467 call SysStemCopy 'found2', stem 1468 call value stem'.!choice', '' 1469 call value stem'.!changed', 1 1470 return 1471 end 1472 end 1473 else do 1474 path = value(stem'.'choice) 1475 /* check path validity and tell the version check will be done next*/ 1476 interpret 'ok = 'checkPath'("'path'", 1)' 1477 if (ok) then do 1478 if (value(stem'.!choice') \== choice) then 1479 call value stem'.!changed', 1 1480 interpret 'ok = 'checkVer'("'path'")' 1481 if (ok) then do 1482 call value stem, path 1483 call value stem'.!choice', choice 1484 return 1485 end 1486 return 1487 end 1488 end 1489 1490 call SayErr Replace(errPath, '%1', path) 1491 say 1492 1493 return 1708 call value stem'.!choice', '' 1709 1710 end 1494 1711 1495 1712 /** -
trunk/src/kernel/qt_kernel.pri
r97 r128 281 281 } 282 282 283 #@@TODO(dmik): headers and sources below are substracted until implemented 283 ## @todo (r=dmik) commented out until there is a GCC compatible FT2 support lib 284 # when uncommented, make sure the static build of Qt library works well 285 # (mkspecs\os2-g++\qmake.conf also needs to be altered) 286 #os2 { 287 # pm_ft2lib { 288 # INCLUDEPATH += $$pm_ft2lib.include 289 # LIBS += $$pm_ft2lib.lib\ft2lib.lib 290 # } 291 # else:DEFINES += QT_PM_NO_FT2LIB 292 #} 293 294 ## @todo (r=dmik): headers and sources below are substracted until implemented 284 295 os2 { 285 296 HEADERS -= \
Note:
See TracChangeset
for help on using the changeset viewer.