

VIT - Version Info Tabsheets for NSIS

-------------------------------------------------------------------------------

This example shows how you can seamlessly add Windows Version Info Tabsheets to
all of your NSIS installer executables!

You will need Resource Hacker:
http://www.users.on.net/johnson/resourcehacker

This script assumes that you have extracted Resource Hacker to:
C:\Program Files\ResHack\ResHacker.exe

Modify the path to Resource Hacker in vit.nsi if your path is different!

Right click and compile vit.nsi, then...

Right click vit.exe -> Properties -> Version Info Tabsheet

Yes!  We have a Version Info Tabsheet!!!

w00t!

You do not have to run the new EXE.  All you have to do is run vit.nsi through
the MakeNSIS compiler.  When it builds the EXE, your Version Info Tabsheet will
be 100% ready!

In other words, if you copy my script into your installer script, when your
installer is finished compiling, your EXE will have a Version Info Tabsheet!

This is the fully automatic method which can be implemented seamlessly into all of your
NSIS scripts to automagically add Version Info Tabsheets to your NSIS installers.

If you prefer the manual method you can uncomment that section in vit.nsi and each time
you compile your exe, Resource Hacker will open and you will have to manually replace
the Version Info resource (ugh!).  Automatic mode is much simpler.  ;)

The only thing manual is editing the Version Info to suit your needs.

And now we get to that part...

-------------------------------------------------------------------------------

How to modify Version Info to suit your application:

You have to have an EXE that can act as a basic "starter kit" with Version Info already
built in.  You can use any Windows EXE from your Windows or System32 folder to get
started, however, for safety reasons it would be much better to use an EXE that we can
make on our own.  So, let's use VIT.EXE as our "starter kit"...

1) Compile vit.nsi -> vit.exe

2) Open vit.exe in Resource Hacker

3) Open VersionInfo -> 1 -> 1033

4) Change all pertinent information

Note: you can even add your own values and information!

Example:  VALUE "NSIS_ROCKS!", "Hell Yeah!!!"

5) Click the "Compile Script" button

6) Click the Action Menu -> Save Resource as a *.RES file...

7) Type: vit (for the file name), Save in: Desktop, then click Save

Note: this example uses vit.res, of course for your real application you will most likely
want to save this RES with a more logical name, like version.res or your_project_name.res.

Note: the new vit.res will be saved to your desktop (unless you told it where to go).

8) Close Resource Hacker.  It will ask "Resources have been Modified, do you wish to save
changes?  Normally you would click Yes, but click No this time because we already saved
the changes to vit.res.

9) Move vit.res to the same folder as vit.nsi, overwriting the old copy.

10) Compile vit.nsi again and view its properties --- b00m!  Version Info Updated!

Note: check ResHacker.log for any errors

-------------------------------------------------------------------------------

Enjoy!

Darren Winter / Sgt-D
sgt-d@planetquake.com

