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.

92 lines
2.5 KiB

  1. $Language=$ARGV[0];
  2. $SedName=$ARGV[1];
  3. $CatName=$ARGV[2];
  4. $OutputPath=$ARGV[3];
  5. $DefaultLanguage=$ARGV[4];
  6. $MakeSedNamed=$ARGV[5];
  7. $LocalizedRoot=$ARGV[6];
  8. $CabType=$ARGV[7];
  9. $RootDir=lc($ENV{DXROOT});
  10. $TouchedCommonDirRoot=$ENV{DXROOT}."\\DeliveryImages\\CabPacks\\temp";
  11. $BuildErrorMsg="nmake : error GENSED : ";
  12. $RootDir=$ENV{DXROOT};
  13. $LocalizedDirectory = "$LocalizedRoot\\$Language";
  14. $MultiLocalizedDirectory=$LocalizedRoot."\\multi";
  15. $ExtraPath = (-e ".\\$Language.txt")?".\\$Language.txt":"..\\$DefaultLanguage\\$DefaultLanguage.txt";
  16. $SedPath = (-e ".\\sed$Language.txt")?".\\sed$Language.txt":"..\\$DefaultLanguage\\sed$DefaultLanguage.txt";
  17. $Path="$OutputPath\\$MakeSedNamed.sed";
  18. open(OUTPUT,">$Path") || die "$BuildErrorMsg Unable to open ".$Path." for output\n";
  19. $Path = ".\\".$SedName;
  20. open(MASTERSED,$Path) || die "$BuildErrorMsg Unable to open master sed file ".$Path." for input\n";
  21. @MasterSed = <MASTERSED>;
  22. close (MASTERSED);
  23. open(SEDTEXT,$SedPath) || die "$BuildErrorMsg Unable to open sed file at".$SedPath." for input\n";
  24. @SedText = <SEDTEXT>;
  25. close (SEDTEXT);
  26. foreach (@MasterSed)
  27. {
  28. $SedLine= $_;
  29. if (m/TargetWIN9XVers=F/g)
  30. {
  31. print OUTPUT sprintf( "TargetWIN9XVers=0: %s\n", $SedText[0]);
  32. }
  33. elsif (m/MultiInstanceChk=E/g)
  34. {
  35. print OUTPUT sprintf( "MultiInstanceChk=B, %s", $SedText[1]);
  36. }
  37. else
  38. {
  39. print OUTPUT $_;
  40. }
  41. }
  42. $Path="$RootDir\\public\\sdk\\lib\\placefil.txt";
  43. open(PLACEFIL, $Path) || die "$BuildErrorMsg Unable to open placefil.txt at ".$Path." for input\n";
  44. @LocalizedFiles =grep(m/;localize/, <PLACEFIL>);
  45. close (PLACEFIL);
  46. $Path=$RootDir."\\DeliveryImages\\inc\\nt51redist.dat";
  47. open(REDISTFILES,$Path) || die "$BuildErrorMsg Unable to open nt51redist.dat at ".$Path." for input\n";
  48. foreach (<REDISTFILES>)
  49. {
  50. if (!(m/;/i))
  51. {
  52. ($FileName, $SubPath, $TimeDateStamp, $Filters) = split /,/,$_,4;
  53. $FileName=~s/^\s*(.*?)\s*$/$1/;
  54. $SubPath=~s/^\s*(.*?)\s*$/$1/;
  55. $Filters=~s/^\s*(.*?)\s*$/$1/;
  56. # if (grep(m/$FileName/i, @LocalizedFiles))
  57. # {
  58. # if ($Filters=~m/SINGLELANGUAGE/ig)
  59. # {
  60. # $SubPath=($Language ne "eng")?$LocalizedDirectory:$SubPath;
  61. # }
  62. # else
  63. # {
  64. # $SubPath=$MultiLocalizedDirectory;
  65. # }
  66. # }
  67. if ($Filters!~m/nocab/i || $CabType!~m/core/i)
  68. {
  69. print OUTPUT sprintf( "%s\\%s=\n",$SubPath,$FileName);
  70. }
  71. }
  72. }
  73. #print OUTPUT sprintf( "[SourceFiles1]\n");
  74. #print OUTPUT sprintf( "$CatName=\n");
  75. close (OUTPUT);
  76. close (REDISTFILES);
  77. exit;