Re: [lazarus] Making an installer
bobby wrote: I want to include an exe, a html file, and two pictures into my exe-file done in Lazarus. The question is: if I include those 4 files into resources, and link them into my exe-file, how can I save them back to HDD from already linked executable? To make the clear picture, all of you know what NSIS installer or Inno setup does, how can I make the same thing? I simply want that my exe create/save other files (that are in resources, linked into running exe) at the runtime. Instead, load the extractor into a TMemoryStream, attach streams of the resources to the end of it, then add pointers to the end of that to the start location of each resource. Have the main extractor read itself into a filestream, get the pointers for each individual resource, and extract them back out. Pretty simple actually, and appending to the end of the main file doesn't break the executable. -Tony _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Making an installer
Is it possible to have files in laz-resources, and to drop them to HDD at the run-time? Also, some kind of compression-decompression would be also welcome. Is there some good manual for using laz-resources? regards Boban Spasic aka Bobby _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making an installer
bobby ha scritto: Is it possible to have files in laz-resources, and to drop them to HDD at the run-time? Also, some kind of compression-decompression would be also welcome. Is there some good manual for using laz-resources? A designtime Not a runtime _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making an installer
Mattias Gaertner wrote: On Mon, 13 Mar 2006 18:57:35 +0100 "v.scozzaro '[EMAIL PROTECTED]'" [EMAIL PROTECTED] wrote: bobby ha scritto: Is it possible to have files in laz-resources, and to drop them to HDD at the run-time? Also, some kind of compression-decompression would be also welcome. Is there some good manual for using laz-resources? A designtime Not a runtime What do you mean? You can add and change lazarus resources at any time, as they are simple strings. If you want to include a file into an executable: use the lazres tool to create an lrs and include that. Mattias I want to include an exe, a html file, and two pictures into my exe-file done in Lazarus. The question is: if I include those 4 files into resources, and link them into my exe-file, how can I save them back to HDD from already linked executable? To make the clear picture, all of you know what NSIS installer or Inno setup does, how can I make the same thing? I simply want that my exe create/save other files (that are in resources, linked into running exe) at the runtime. Bobby _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making an installer
On Mon, 13 Mar 2006 18:57:35 +0100 v.scozzaro '[EMAIL PROTECTED]' [EMAIL PROTECTED] wrote: bobby ha scritto: Is it possible to have files in laz-resources, and to drop them to HDD at the run-time? Also, some kind of compression-decompression would be also welcome. Is there some good manual for using laz-resources? A designtime Not a runtime What do you mean? You can add and change lazarus resources at any time, as they are simple strings. If you want to include a file into an executable: use the lazres tool to create an lrs and include that. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making an installer
Mattias Gaertner wrote: On Mon, 13 Mar 2006 20:11:18 +0100 bobby [EMAIL PROTECTED] wrote: Mattias Gaertner wrote:On Mon, 13 Mar 2006 18:57:35 +0100 v.scozzaro '[EMAIL PROTECTED]' [EMAIL PROTECTED] wrote: bobby ha scritto: Is it possible to have files in laz-resources, and to drop them to HDD at the run-time? Also, some kind of compression-decompression would be also welcome. Is there some good manual for using laz-resources? A designtime Not a runtime What do you mean? You can add and change lazarus resources at any time, as they are simple strings. If you want to include a file into an executable: use the lazres tool to create an lrs and include that. Mattias I want to include an exe, a html file, and two pictures into my exe-file done in Lazarus. The question is: if I include those 4 files into resources, and link them into my exe-file, how can I save them back to HDD from already linked executable? To make the clear picture, all of you know what NSIS installer or Inno setup does, how can I make the same thing? I simply want that my exe create/save other files (that are in resources, linked into running exe) at the runtime. AString:=LazarusResources.Find('imagename').Value; fs:=TFileStream.Create('filename',fmCreate); try fs.Write(AString[1],length(AString)); finally fs.Free; end; Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives Thanks, that was useful. Do someone know, do LazRes uses some kind of compression and/or encryption? bobby _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making an installer
On Mon, 13 Mar 2006 22:43:16 +0100 bobby [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: On Mon, 13 Mar 2006 20:11:18 +0100 bobby [EMAIL PROTECTED] wrote: Mattias Gaertner wrote:On Mon, 13 Mar 2006 18:57:35 +0100 v.scozzaro '[EMAIL PROTECTED]' [EMAIL PROTECTED] wrote: bobby ha scritto: Is it possible to have files in laz-resources, and to drop them to HDD at the run-time? Also, some kind of compression-decompression would be also welcome. Is there some good manual for using laz-resources? A designtime Not a runtime What do you mean? You can add and change lazarus resources at any time, as they are simple strings. If you want to include a file into an executable: use the lazres tool to create an lrs and include that. Mattias I want to include an exe, a html file, and two pictures into my exe-file done in Lazarus. The question is: if I include those 4 files into resources, and link them into my exe-file, how can I save them back to HDD from already linked executable? To make the clear picture, all of you know what NSIS installer or Inno setup does, how can I make the same thing? I simply want that my exe create/save other files (that are in resources, linked into running exe) at the runtime. AString:=LazarusResources.Find('imagename').Value; fs:=TFileStream.Create('filename',fmCreate); try fs.Write(AString[1],length(AString)); finally fs.Free; end; Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives Thanks, that was useful. Do someone know, do LazRes uses some kind of compression and/or encryption? It does not. You must do that on yourself. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making an installer
On Mon, 13 Mar 2006, Mattias Gaertner wrote: On Mon, 13 Mar 2006 18:57:35 +0100 v.scozzaro '[EMAIL PROTECTED]' [EMAIL PROTECTED] wrote: bobby ha scritto: Is it possible to have files in laz-resources, and to drop them to HDD at the run-time? Also, some kind of compression-decompression would be also welcome. Is there some good manual for using laz-resources? A designtime Not a runtime What do you mean? You can add and change lazarus resources at any time, as they are simple strings. If you want to include a file into an executable: use the lazres tool to create an lrs and include that. As an alternative: fpc contains 2 tools which do this for you, bin2obj and data2inc They include any file as an array of bytes in your program. This consumes less memory than the lazarus resources. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making an installer
On Mon, 13 Mar 2006 20:11:18 +0100 bobby [EMAIL PROTECTED] wrote: Mattias Gaertner wrote:On Mon, 13 Mar 2006 18:57:35 +0100 v.scozzaro '[EMAIL PROTECTED]' [EMAIL PROTECTED] wrote: bobby ha scritto: Is it possible to have files in laz-resources, and to drop them to HDD at the run-time? Also, some kind of compression-decompression would be also welcome. Is there some good manual for using laz-resources? A designtime Not a runtime What do you mean? You can add and change lazarus resources at any time, as they are simple strings. If you want to include a file into an executable: use the lazres tool to create an lrs and include that. Mattias I want to include an exe, a html file, and two pictures into my exe-file done in Lazarus. The question is: if I include those 4 files into resources, and link them into my exe-file, how can I save them back to HDD from already linked executable? To make the clear picture, all of you know what NSIS installer or Inno setup does, how can I make the same thing? I simply want that my exe create/save other files (that are in resources, linked into running exe) at the runtime. AString:=LazarusResources.Find('imagename').Value; fs:=TFileStream.Create('filename',fmCreate); try fs.Write(AString[1],length(AString)); finally fs.Free; end; Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making an installer
Hello, Are you trying to create a quick installer for yourself or a fully feature general-purpose installer? thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making an installer
Felipe Monteiro de Carvalho wrote: Hello, Are you trying to create a quick installer for yourself or a fully feature general-purpose installer? thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives I don't believe I have a knowledge to make fully-feature installer. I have no experience with compression/decompression . Apart of that, the problem I have asked here depends on compiler, so it isn't suitable for deployable fully-featured installer. Only situation where this will be suitable for me in the future is: - I prepare a HTML documents that is a help-file for my app - I prepare a little app that will takes arguments and depends on them it will open different HTML documents in default browser - All this is unpacked on runtime when user clicks HELP in menu - after viewing the help, those (app and HTML documents) are deleted from the HDD bobby _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives