Archive: how to assign version to outfile


how to assign version to outfile
hi,
I want to assign version to outfile.
Is there any way to do this?


Where is the version coming from? Is it from your program executable?

Stu


By looking at other installers, I cobbled together this process.

Define the version number, along with other "define"s at the top (along with a name):

!define NAME "IoPictest"
!define VER "0.0.0.1" ; #.#.#.#

Then, you can use those variables to produce an outfile:
OutFile "${NAME}_${VER}.exe"

You can also specify a directory other than where your script is, if you want.

You can also use that to set the information displayed when you hover the mouse over the installer icon with commands like this:

VIProductVersion "${VER}"
VIAddVersionKey ProductName "${NAME}"
VIAddVersionKey Comments "Installs ${NAME}."
VIAddVersionKey CompanyName "Trexian Tools"
VIAddVersionKey LegalCopyright "Copyrights held by individual contributing artists."
VIAddVersionKey FileDescription "${DESC}"
VIAddVersionKey FileVersion "${VER}"
VIAddVersionKey ProductVersion "${VER}"
VIAddVersionKey InternalName "${NAME}"
;VIAddVersionKey LegalTrademarks " "
;VIAddVersionKey PrivateBuild ""
;VIAddVersionKey SpecialBuild ""

Some of them are required, but some are not.

In the examples, look for "VersionInfo.nsi".

T
-----
Sic semper tyrannosauro.


That is fine, but if you want to grab the version from your main application executable, see this:
http://nsis.sourceforge.net/Invoking...n_compile-time

Stu


Just to make sure I understand - that's for a situation where you'll basically be using the NSIS executable as a wrapper or something, right?


No you compile that script and use the built installer to read the file version at compile time.

Stu