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.

77 lines
2.0 KiB

  1. $Language = $ENV{LANGUAGE} || $ENV{LANG};
  2. $_NTPOSTBLD = $ENV{_NTPOSTBLD};
  3. $plan = ($#ARGV>=0 and (shift @ARGV) =~ /\-plan/i);
  4. $IncludeFiles=0;
  5. $FileCnt = 0;
  6. while (<>)
  7. {
  8. s/(\000|\015|\012)//g;
  9. s/;.*$//;
  10. next if /^\s*$/;
  11. next if /#/;
  12. if (/\[/)
  13. {
  14. $includeFiles = /files\]\s*$/i;
  15. $includeFiles = 0 if /delfiles\]\s*$/i;
  16. next;
  17. }
  18. if ($includeFiles)
  19. {
  20. s/^[^,]*,//;
  21. $FileList[$FileCnt] = $_;
  22. $FileCnt++;
  23. }
  24. }
  25. die $0, ": No files in inf or inf not found.\n" if !$FileCnt and !$plan;
  26. PrintSedHeader() if !$plan;
  27. print "SourceFiles0=$_NTPOSTBLD\n" if $FileCnt and !$plan;
  28. if ($FileCnt)
  29. {
  30. print "[SourceFiles0]\n" if !$plan;
  31. foreach $a (@FileList)
  32. {
  33. $a .= "=" if !$plan;
  34. print "$a\n";
  35. }
  36. }
  37. sub PrintSedHeader()
  38. {
  39. print "[Version]\n";
  40. print "Class=IEXPRESS\n";
  41. print "SEDVersion=3\n";
  42. print "[Options]\n";
  43. print "PackagePurpose=CreateCAB\n";
  44. print "ShowInstallProgramWindow=0\n";
  45. print "HideExtractAnimation=0\n";
  46. print "UseLongFileName=1\n";
  47. print "InsideCompressed=0\n";
  48. print "CAB_FixedSize=0\n";
  49. print "CAB_ResvCodeSigning=6144\n";
  50. print "RebootMode=I\n";
  51. print "InstallPrompt=%InstallPrompt%\n";
  52. print "DisplayLicense=%DisplayLicense%\n";
  53. print "FinishMessage=%FinishMessage%\n";
  54. print "TargetName=%TargetName%\n";
  55. print "FriendlyName=%FriendlyName%\n";
  56. print "AppLaunched=%AppLaunched%\n";
  57. print "PostInstallCmd=%PostInstallCmd%\n";
  58. print "AdminQuietInstCmd=%AdminQuietInstCmd%\n";
  59. print "UserQuietInstCmd=%UserQuietInstCmd%\n";
  60. print "SourceFiles=SourceFiles\n";
  61. print "[Strings]\n";
  62. print "InstallPrompt=\n";
  63. print "DisplayLicense=\n";
  64. print "FinishMessage=\n";
  65. print "TargetName=$_NTPOSTBLD\\TabletPC\n";
  66. print "FriendlyName=IExpress Wizard\n";
  67. print "AppLaunched=\n";
  68. print "PostInstallCmd=\n";
  69. print "AdminQuietInstCmd=\n";
  70. print "UserQuietInstCmd=\n";
  71. print "[SourceFiles]\n";
  72. }