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.

72 lines
2.0 KiB

  1. $SourceFiles=$ARGV[0];
  2. $Language=($ARGV[1]);
  3. $SRC=$ARGV[2];
  4. $CATNAME=$ARGV[3];
  5. $LocalizedRoot=$ARGV[4];
  6. $CabType=$ARGV[5];
  7. $RootDir=$ENV{DXROOT};
  8. $BuildType=$ENV{NTDEBUG};
  9. $AltSourceFiles=$ENV{_ALT_NTTREE};
  10. $MultiLocalizedDirectory= "$LocalizedRoot\\multi";
  11. $LocalizedDirectory = "$LocalizedRoot\\$Language";
  12. $BuildErrorMsg="nmake : error DEPGEN : ";
  13. $Path="$RootDir\\public\\sdk\\lib\\placefil.txt";
  14. open(PLACEFIL, $Path) || die "$BuildErrorMsg Unable to open placefil.txt at ".$Path." for input\n";
  15. @LocalizedFiles =grep(m/;localize/, <PLACEFIL>);
  16. close (PLACEFIL);
  17. open(SRCFILE,">$SRC") || die "$BuildErrorMsg Unable to open $SRC to write the dependency list out\n";
  18. print SRCFILE "$CATNAME\n";
  19. $Path=$RootDir."\\DeliveryImages\\inc\\redistfiles.dat";
  20. open(REDISTFILES,$Path) || die "$BuildErrorMsg Unable to open redistfiles.dat at ".$Path." for input\n";
  21. foreach (<REDISTFILES>)
  22. {
  23. if (!(m/;/i))
  24. {
  25. ($FileName, $SubPath, $TimeDateStamp, $Filters) = split /,/,$_,4;
  26. $FileName=~s/^\s*(.*?)\s*$/$1/;
  27. $SubPath=~s/^\s*(.*?)\s*$/$1/;
  28. $Filters=~s/^\s*(.*?)\s*$/$1/;
  29. # if ($Filters!~m/nocab/i || $CabType!~m/core/i)
  30. # {
  31. # print SRCFILE "$SourceFiles\\$SubPath\\$FileName \\\n";
  32. # }
  33. if (grep(m/$FileName/i, @LocalizedFiles))
  34. {
  35. # if ($Filters=~m/SINGLELANGUAGE/ig )
  36. if (!($Language eq "eng" && $FileName eq "dxdiag.exe"))
  37. {
  38. $SubPath=($Language ne "eng")?$LocalizedDirectory:$SubPath;
  39. } else {
  40. $SubPath=$MultiLocalizedDirectory;
  41. }
  42. }
  43. if ($Filters=~m/PROTECTED/i)
  44. {
  45. # if ($BuildType eq "" || $BuildType eq "ntsdnodbg" || grep(m/$FileName/i, @LocalizedFiles))
  46. if ($BuildType eq "" || $BuildType eq "ntsdnodbg" || (grep(m/$FileName/i, @LocalizedFiles) && ($Language ne "eng")))
  47. {
  48. print SRCFILE "$SourceFiles\\$SubPath\\$FileName\n";
  49. } else {
  50. if ($Filters=~m/SWITCHFILER/i){
  51. print SRCFILE "$AltSourceFiles\\$SubPath\\$FileName\n";
  52. } else {
  53. print SRCFILE "$SourceFiles\\$SubPath\\$FileName\n";
  54. }
  55. }
  56. }
  57. }
  58. }
  59. close (REDISTFILES);
  60. close (SRCFILE);
  61. exit;