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.

58 lines
1.3 KiB

  1. #! /usr/bin/perl
  2. #
  3. #
  4. # Perl CopyDw.pl <Input_Uncomrpessed_directory> <CD_image_share_directory> <Final_Directory>
  5. #
  6. #
  7. my $self = $0;
  8. my $Uncomp_Directory = $ARGV[0];
  9. my $Input_Directory = $ARGV[1];
  10. my $Output_Directory = $ARGV[2];
  11. sub myprocess {
  12. local($filename) = @_;
  13. $dirname = $filename;
  14. if( length($dirname) < 9) {
  15. return 0;
  16. }
  17. $dirname = substr($dirname, 4);
  18. chop $dirname;
  19. chop $dirname;
  20. chop $dirname;
  21. chop $dirname;
  22. #print "$dirname\n";
  23. if( int($dirname) > 0) {
  24. $orginalFile = $Uncomp_Directory."\\dwil".$dirname.".dll";
  25. $newFile = $Output_Directory."\\drw\\".$dirname."\\dwintl.dll";
  26. `compdir /nel $orginalFile $newFile`;
  27. #print "Original " . $orginalFile . " Final ". $newFile . "\n";
  28. }
  29. }
  30. # Make link to dwwin.exe
  31. $orginalFile = $Uncomp_Directory."\\dwwin.exe";
  32. $newFile = $Output_Directory."\\drw\\dwwin.exe";
  33. `compdir /nel $orginalFile $newFile`;
  34. # Make link to faulth.dll
  35. $orginalFile = $Uncomp_Directory."\\faulth.dll";
  36. $newFile = $Output_Directory."\\drw\\faulth.dll";
  37. `compdir /nel $orginalFile $newFile`;
  38. # Link dwil* files.
  39. $filecard = $Input_Directory . "\\dwil*.dl?";
  40. @filelist = `dir /b /a-d $filecard`;
  41. foreach (@filelist) {
  42. chomp $_;
  43. #print "$_\n";
  44. myprocess( $_);
  45. }
  46. exit(0);