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.

52 lines
1.4 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM copyinftable - jtolman
  4. @REM Move a built infsect.inx and language files to the build tree.
  5. @REM
  6. @REM Copyright (c) Microsoft Corporation. All rights reserved.
  7. @REM
  8. @REM -----------------------------------------------------------------
  9. @perl -x "%~f0" %*
  10. @goto :EOF
  11. #!perl
  12. use strict;
  13. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  14. use lib $ENV{RAZZLETOOLPATH} . "\\sp";
  15. use lib $ENV{RAZZLETOOLPATH};
  16. use Logmsg;
  17. use ParseArgs;
  18. sub Usage { print<<USAGE; exit(1) }
  19. Usage: copyinftable <final_dir> <setupinfs_dir>
  20. <final_dir> Directory to copy from.
  21. <setupinfs_dir> Directory to copy to.
  22. USAGE
  23. my ($final, $infs);
  24. parseargs('?' => \&Usage,
  25. \$final,
  26. \$infs
  27. );
  28. # Go through the files.
  29. foreach my $path ( `dir /b /s $final` ) {
  30. chomp $path;
  31. next if $path !~ /\.txt$/i;
  32. $path =~ /^.*\\([^\.\\]*)\.(.*)$/i;
  33. system "cd $infs & sd edit $1\\infsect.txt";
  34. system "copy /y $final\\$1.$2 $infs\\$1\\infsect.txt";
  35. }
  36. system "cd $infs & sd edit infsect.inx";
  37. system "copy /y $final\\infsect.inx $infs\\infsect.inx";
  38. if ( -f "$final\\infdiff.inx" ) {
  39. if ( -f "$infs\\infdiff.inx" ) {
  40. system "cd $infs & sd edit infdiff.inx";
  41. system "copy /y $final\\infdiff.inx $infs\\infdiff.inx";
  42. } else {
  43. system "copy /y $final\\infdiff.inx $infs\\infdiff.inx";
  44. system "cd $infs & sd add infdiff.inx";
  45. }
  46. }