The following is the contents of a .rc file:
 
#define ID_LANGUAGE_TXT 4242
 
ID_LANGUAGE_TXT RCDATA "language.txt"
 
compile that into a .res file then use the following code to access it:
 
procedure WriteLanguageFile;
var
  ResStream : TResourceStream;
begin
 
  ResStream := TResourceStream.CreateFromID(hInstance, 4242, RT_RCDATA);
  try
 
    ResStream.SaveToFile(OutputPath + 'Language.txt');
 
  finally
    ResStream.Free;
 
  end;
 
end;
 
 
As simple as that.
 
 
 
Nahum
 
Have fun, drink coke.


-----Original Message-----
From: Steven Wild [mailto:[EMAIL PROTECTED]]
Sent: Friday, 4 February 2000 13:31
To: Multiple recipients of list delphi
Subject: [DUG]: resources


How do we go about storing a several files (LZh's) in one exe.  The Exe
would run, decompress the files to a temp directory and then install them in
various places in a users system (based on registry settings).  This would
upgrade an existing application, with the user only needing to run one app.


We can do the decompression (thanks to SPIS's wonderful components) but how
do we wrap the LZH file (or any other file) into a delphi app (presumably as
a resource??).

If it is a resource, do we need a resource editor to create the resource
file??

Steven

Wild Software Ltd
*Chreos Business Systems
CHCH, NZ

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to