On Sun, 25 Jul 2010 09:52:08 +0100 Josh Lee <frozen-drago...@hotmail.com> wrote:
> > I am now very confused. I have been told by someone on Lazarus Forums that to > write an installer, I would need to use Resources. I have done some research > into resources, and got this:Resource (Windows)From Wikipedia, the free > encyclopedia > In Microsoft Windows, resources are read-only data embedded in EXE, DLL, CPL > or (beginning with Windows Vista) MUI files. > The Windows API provides for easy access to all applications' resources. > [edit]TypesEach resource has a type and a name, both being either numeric > identifiers or strings. > Windows has a set of predefined resource types: > Cursor and animated cursorIconBitmapDialog box templateFontHTML > documentString and message templateVersion > data--------------------------------------------------------- > So it seems that I cannot store a FILE in a resource. > All I wish to do is make a simple installer that installs an .exe onto the > user's hard disk. > Thank you for the link, Mattias. It seems the page has been updated since I > last saw it. > This is the code for my installer so far:procedure > TMainForm.InstallButtonClick(Sender: > TObject);beginStatusMemo.Append('Attempting to retrive file...');CRes := > LazarusResources.Find('test');StatusMemo.Append('test resource found.');{So > what do I do here to get the .exe stored in the resource(Compiled with > Lazres) and place it on the users hard disk?}... If you followed the wiki page you now have the file in a string. Now save the string to a file and set the file attributes. > Do I have some mislead conception of a 'resource'?What comes next in the > code?Thanks in advance,- JoshPS. Sorry for the repeated posts, I'm having > time lag and I'm posting from a crappy device Mattias -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus