Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 25th July 2007, 11:51   #1
archana
Junior Member
 
Join Date: Jul 2007
Posts: 1
Question how to assign version to outfile

hi,
I want to assign version to outfile.
Is there any way to do this?
archana is offline   Reply With Quote
Old 25th July 2007, 12:44   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Where is the version coming from? Is it from your program executable?

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 25th July 2007, 13:07   #3
Trexian
Junior Member
 
Join Date: Jul 2007
Posts: 7
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.
Trexian is offline   Reply With Quote
Old 25th July 2007, 14:06   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
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

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 25th July 2007, 14:09   #5
Trexian
Junior Member
 
Join Date: Jul 2007
Posts: 7
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?
Trexian is offline   Reply With Quote
Old 25th July 2007, 15:10   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
No you compile that script and use the built installer to read the file version at compile time.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump