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.

75 lines
1.9 KiB

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