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.

81 lines
2.3 KiB

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