Does it exist a way to write a D5 project's EXE version data from itself's
Delphi code...? It would be nice to avoid having to open
Project/Options/version every time...
regards
Tor
Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Hi Peter,
I use a installer for my software (Youseful). For clarity's sake I want to
display the version data of my main executeable from the setup.exe file.
There is no provision to retrieve the version data from packed installer
files in Youseful, and hence I want to 'manually' set/write version data in
setup.exe as the same version as the main executeable inside the install.
Setup then reads its own version data and displays it is the setup opening
screen.
regards
Tor
well, version information goes into a standard Windows VERSIONINFO resource,
so with a good understanding of the PE executable file format one could find
and change the resource in an existing EXE. Basically like a resource linker
does it. It is not a trivial task, however. If you build this setup.exe
yourself you may be able to automate the task, however. The IDE keeps the
version info for the project in the projects DOF file, which is a simple
INI-style text file. All you need is to copy two sections ([Version Info] and
[Version Info Keys]) from your projects DOF to the setup.dof and then rebuild
the setup project. None of the two projects should be open in the IDE when you
do this.
> Tor,
>
> well, version information goes into a standard Windows VERSIONINFO
resource,
> so with a good understanding of the PE executable file format one could
find
> and change the resource in an existing EXE. Basically like a resource
linker
> does it. It is not a trivial task, however. If you build this setup.exe
> yourself you may be able to automate the task, however. The IDE keeps the
> version info for the project in the projects DOF file, which is a simple
> INI-style text file. All you need is to copy two sections ([Version Info]
and
Hi again,
Unfortunately setup.exe is built entirely by the installer builder which is
a ready compiled project (EXE file). Even if I set this installer builder
version to 9.9.9 no version information is built/transferred into setup.exe.
The DOF approach would have been simple, but it seems that I need to use
some external utility which can merge version information into a EXE which
has no version resource initially. Does such a utility exist, or do I just
have to skip this wish of mine to include version information in my
installer...?
Thanks anyway for the information you have given
best regards
Tor
My utility Resource Hacker will do what you want - add a versioninfo
resource to an exe file. (Note however, it wont allow modifying or deleting
an existing versioninfo resource to prevent unscrupulous users from changing
existing copyright info.)
Freeware, works on Win9x, WinNT and Win2000:
http://rpi.net.au/~ajohnson/resourcehacker/
angus j.
Borlands Resource Workshop can do it, i have recently seen a reference to a
tool named ResourceHacker on these groups but did not store the URL. Do a
websearch for that on google.com, or search the groups via one of the usual
search engines
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://www.deja.com
Hi Angus,
Thanks for this tip. However I downloaded it right now and opened one of my
setup.exe files. It did not display any version information (I know
setup.exe has no version information set) but I did not find any menu item
in tyour program where I could set it, either.
However I need to have this automated and it appears that your program can
use command line parameters.
How can I set setup.exe's version to 2.1.3.1 with command line parameters..?
TIA if there is a solution to this
regards
Tor
> angus j.
>
>
Tor,
The menu item required is: Special | Add a New Resource...
This opens a dialog which allows you to choose any resource
located within a resource (*.res) file. You can use the
*.res file created by your project to get the VersionInfo.
Unfortunately, the only commandline functionality I've
implemented is to allow a filename parameter which
enables file drag and drop onto the Resource Hacker
icon (or shortcut). To implement the full functionality of RH
via the commandline would be very messy to implement:
adding/modifying/deleting/extracting resources which all
require type/name/language identfiers. I can't see how to
do this elegantly.
Any further followup questions to this should be posted in
"thirdparty-tools" or via email.
angus j.