Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.4 KiB

  1. $LocalizeBinList=$ARGV[0];
  2. $TargetOS=$ARGV[1];
  3. $BuildType=$ENV{NTDEBUG};
  4. $BinPlaceFile=$ENV{BINPLACE_PLACEFILE};
  5. $BuildErrMsg="nmake : error GENLOC : ";
  6. open(LOCALIZEBINLIST,">$LocalizeBinList") || die "$BuildErrMsg Unable to open $LocalizeBinList for write\n";
  7. open(BINPLACEFILE,$BinPlaceFile) || die "$BuildErrMsg Unable to open $BinPlaceFile for reading\n";
  8. @LocalizedFiles=grep(m/;localize/g,<BINPLACEFILE>);
  9. close BINPLACEFILE;
  10. print LOCALIZEBINLIST "PRELOCBINS= \\\n";
  11. foreach (@LocalizedFiles) {
  12. @DataLine=split;
  13. $DataLine[1]=~s/retail/\./;
  14. if (($DataLine[0]!~m/directx\.cpl/i && $DataLine[0]!~m/\.inf/i) &&
  15. ((($TargetOS=~m/Win9X/i) && ($DataLine[0]!~m/directx\.cpl/i)) ||
  16. (($TargetOS!~m/Win9X/i) && ($DataLine[0]!~m/dxsetup\.exe/i) && ($DataLine[0]!~m/dsetup32\.dll/i) && ($DataLine[0]!~m/migrate\.dll/i)))) {
  17. if ($#DataLine > 3) {
  18. $IfDefs="!if ((\"\$(MULTI_PLACEFILE)\" == \"1\")";
  19. for ($Counter=3, ,$#DataLine) {
  20. $IfDefs="$IfDefs || (\"\$(LANGUAGE)\" == \"$DataLine[$Counter++]\")";
  21. }
  22. print LOCALIZEBINLIST "$IfDefs)\n";
  23. }
  24. #diquick hack
  25. if ($DataLine[0]=~m/diquick\.exe/i) {
  26. print LOCALIZEBINLIST "\$(_NTTREE:Win9x=samples)\\$DataLine[1]\\$DataLine[0] \\\n";
  27. } elsif ($DataLine[0]=~m/dplay\.dll/i || $DataLine[0]=~m/dpserial\.dll/i) {
  28. if ($TargetOS=~m/Win9X/i) {
  29. print LOCALIZEBINLIST "\$(_NTTREE)\\..\\dx6\\$DataLine[1]\\$DataLine[0] \\\n";
  30. } else {
  31. print LOCALIZEBINLIST "\$(_NTTREE)\\redist\\$DataLine[1]\\$DataLine[0] \\\n";
  32. }
  33. } elsif ($DataLine[0]=~m/migrate\.dll/i) {
  34. print LOCALIZEBINLIST "\$(_NTTREE)\\..\\dx8\\$DataLine[1]\\$DataLine[0] \\\n";
  35. } else {
  36. if ($TargetOS=~m/Win9X/i) {
  37. $AltNTTree="\$(_ALT_NTTREE)\\win9x";
  38. } else {
  39. $AltNTTree="\$(_ALT_NTTREE)";
  40. }
  41. if (($BuildType eq "" || $BuildType eq "ntsdnodbg")) {
  42. if ($DataLine[0]=~m/dinput8d\.dll/i || $DataLine[0]=~m/d3d8d\.dll/i || $DataLine[0]=~m/dmusicd\.dll/i) {
  43. print LOCALIZEBINLIST "$AltNTTree\\$DataLine[1]\\$DataLine[0] \\\n";
  44. } else {
  45. print LOCALIZEBINLIST "\$(_NTTREE)\\$DataLine[1]\\$DataLine[0] \\\n";
  46. }
  47. } else {
  48. if ($DataLine[0]=~m/dinput8\.dll/i || $DataLine[0]=~m/d3d8\.dll/i || $DataLine[0]=~m/dmusic\.dll/i) {
  49. print LOCALIZEBINLIST "$AltNTTree\\$DataLine[1]\\$DataLine[0] \\\n";
  50. } else {
  51. print LOCALIZEBINLIST "\$(_NTTREE)\\$DataLine[1]\\$DataLine[0] \\\n";
  52. }
  53. }
  54. }
  55. if ($IfDefs) {
  56. undef $IfDefs;
  57. print LOCALIZEBINLIST "!endif\n";
  58. }
  59. }
  60. }
  61. close LOCALIZEBINLIST;
  62. exit;