2
0

ResxBuilder.dpr 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. { $HDR$}
  2. {**********************************************************************}
  3. { Unit archived using Team Coherence }
  4. { Team Coherence is Copyright 2002 by Quality Software Components }
  5. { }
  6. { For further information / comments, visit our WEB site at }
  7. { http://www.TeamCoherence.com }
  8. {**********************************************************************}
  9. {}
  10. { $Log: 109240: ResxBuilder.dpr
  11. {
  12. { Rev 1.1 9/8/2004 10:11:16 PM JPMugaas
  13. { Now also generates the .resources for the Protocols design-time package in
  14. { DotNET.
  15. }
  16. {
  17. { Rev 1.0 9/8/2004 5:56:58 AM JPMugaas
  18. { Builder program for .resources files. You can NOT use a standard resource
  19. { compiler. You have to use a DotNET ResourceWriter class.
  20. }
  21. program ResxBuilder;
  22. {$APPTYPE CONSOLE}
  23. {%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll'}
  24. uses
  25. System.Drawing,
  26. System.Resources;
  27. var
  28. RW : System.Resources.ResourceWriter;
  29. Bmp1, Bmp2, bmp3, bmp4 : System.Drawing.Bitmap;
  30. begin
  31. { TODO -oUser -cConsole Main : Insert code here }
  32. RW := System.Resources.ResourceWriter.Create('w:\source\Indy10\Lib\Core\IdCreditsBitmap.resources');
  33. try
  34. Bmp1 := System.Drawing.Bitmap.Create('w:\source\Indy10\Lib\Core\Res\TIDABOUTPICTURE.BMP');
  35. Bmp2 := System.Drawing.Bitmap.Create('w:\source\Indy10\Lib\Core\Res\Sink.bmp');
  36. try
  37. RW.AddResource('TIDABOUTPICTURE',Bmp1);
  38. RW.AddResource('TIDKITCHENSINK',Bmp2);
  39. RW.Generate;
  40. RW.Close;
  41. finally
  42. bmp1.Dispose;
  43. bmp2.Dispose;
  44. end;
  45. finally
  46. RW.Dispose;
  47. end;
  48. RW := System.Resources.ResourceWriter.Create('w:\source\Indy10\Lib\Protocols\IdSASLListEditorForm.resources');
  49. try
  50. Bmp1 := System.Drawing.Bitmap.Create('w:\source\Indy10\Lib\Protocols\Res\ARROWDOWN.bmp');
  51. Bmp2 := System.Drawing.Bitmap.Create('w:\source\Indy10\Lib\Protocols\Res\ARROWLEFT.bmp');
  52. Bmp3 := System.Drawing.Bitmap.Create('w:\source\Indy10\Lib\Protocols\Res\ARROWRIGHT.bmp');
  53. Bmp4 := System.Drawing.Bitmap.Create('w:\source\Indy10\Lib\Protocols\Res\ARROWUP.bmp');
  54. try
  55. RW.AddResource('ARROWDOWN',Bmp1);
  56. RW.AddResource('ARROWLEFT',Bmp2);
  57. RW.AddResource('ARROWRIGHT',bmp3);
  58. RW.AddResource('ARROWUP',bmp4);
  59. RW.Generate;
  60. RW.Close;
  61. finally
  62. bmp1.Dispose;
  63. bmp2.Dispose;
  64. bmp3.Dispose;
  65. bmp4.Dispose;
  66. end;
  67. finally
  68. RW.Dispose;
  69. end;
  70. end.