|
Post by stuart on Nov 24, 2009 8:05:01 GMT -5
We are looking at purchasing a component that allows us to create self extracting zip files, which VCLZip does, however, once the extract has completed, we need a file within the extract to run. Does VCLZip support this?
|
|
|
Post by Kevin on Nov 24, 2009 21:20:13 GMT -5
If you mean you want one of the executables that you extract to run, then yes, the sfx stub that comes with VCLZip will do that.
However, you can also easily create your own SFX using Delphi if size is not overly crucial. So you could create a Delphi (or BCB) app any way you want it to be and turn it into an SFX and it also could run a file that gets extracted.
Kevin
|
|
|
Post by stuart on Nov 26, 2009 11:21:12 GMT -5
Kevin
Thats great thanks. I have downloaded the demo, and found it very easy to use. One thing I would like to ask is how much control over the SFX does one have?
By that I mean exe icon, and the screens that are displayed if you have the TSFXConfig components AutoExtract set to False? Can you change the Guis to make them look more windows Vista?
Thanks in advance.
|
|
|
Post by Kevin on Nov 27, 2009 10:32:23 GMT -5
That's just it, that sfx is a windows api app, not VCL. So it is not easy to change. You can change the icon and window (dialog box) with a resource editor. But, overall, it is not all that easy to customize.
That sfx stub was written about 15 years ago when download size had to be kept at a minimum. Now, the size of a stub written in VCL is normally not that large in comparison to what it is attached to. So if you just write a VCL app that uses VCLZip, then attach that stub to a zip file in the same way, you have yourself a completely customized sfx stub.
|
|
|
Post by stuart on Nov 27, 2009 10:55:38 GMT -5
Superb, thanks for that. Hope you had a good thanksgiving Do you have any examples of you to create a stub??
|
|
|
Post by Kevin on Nov 27, 2009 19:09:23 GMT -5
Well my installation program that I used for years was a vcl sfx stub. But that was pretty involved so I doubt it would help. It is actually pretty simple. I'll look around to see what I have and if I can't find something I can create something very basic. But in the mean time...
To create your own stub in Delphi, just initially write your program (your stub) to open up your zip archive as a separate file. Then when everything is working as you want it to, just change the code that you have that sets the ZipName property so that your program sets ZipName to point at itself. So if your program is called Install.exe, you will set ZipName := Install.exe or even just ZipName := Application.Name. Compile it, then run MakeSFX (you can actually do this from the VCLZip Zip Utility Example) which will attach the zip archive to your app, which essentially makes your EXE program a zip archive and IT OPENS ITSELF up while it is running.
|
|