PDA

View Full Version : File Version



NewsArchive
05-05-2008, 04:50 AM
Hello Friedrich,

Is it possible to set the File version (in Version Resource) at compile
time? And - if yes - can the value be stored in a textfile? In my setup
projects this is the only thing I have to change all the time so have this
automated would be great!

Thanks,
Hanspeter Stutz
ARCO Software AG

NewsArchive
05-05-2008, 04:50 AM
Hello Hanspeter,

> Is it possible to set the File version (in Version Resource) at compile
> time? And - if yes - can the value be stored in a textfile? In my setup
> projects this is the only thing I have to change all the time so have this
> automated would be great!

No, it's not possible to set the version resource of existing application
files (exe, dll, etc.) at installer compile time. There is no reliable way
to do this.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-05-2008, 04:51 AM
Hi Friedrich,

uups I didn't make myself clear. I want to set the fileversion in the
setup.exe that will be generated in SB.

sorry for the confusion
Hanspeter

NewsArchive
05-05-2008, 04:51 AM
Hi Hanspeter,

> uups I didn't make myself clear. I want to set the fileversion in the
> setup.exe that will be generated in SB.

Aha! Of course, you can set the setup.exe Version Resource at compile time.
You can even use compiler variables here. And yes, you can read the version
value from a test file, store it in a compiler variable and set the version
resource.

See General Information -> Version Resource

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-05-2008, 04:52 AM
Hi Hanspeter,

I have attached a demo script. It reads the version from an ver.ini file to
set the installer file version resource.

HTH,

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-05-2008, 04:52 AM
That works very nice. I tried in the meantime with "Handle text file
Operation" and getline with an ordinary textfile - that didn't work.
However, your solution works for me.

Thank you
Hanspeter

NewsArchive
05-05-2008, 04:53 AM
BTW, you can try something like this (call the tool at installer compile
time)
http://www.elphin.com/products/stampver.html

But make sure that you still have a valid application after you did this.

Friedrich

NewsArchive
05-05-2008, 04:53 AM
Note: never (*NEVER*) use a stampver tool on the installer itself!

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-06-2008, 01:52 AM
Hi Friedrich,

Is it possible to get the file version directly from info of the exe
instead of using an INI?

Sim

NewsArchive
05-06-2008, 01:53 AM
Hi Sim,

> Is it possible to get the file version directly from info of the exe
> instead of using an INI?

Yes, no problem. Use the "#get file information..." directive instead.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-06-2008, 01:53 AM
Hanspeter,

> That works very nice. I tried in the meantime with "Handle text file
> Operation" and getline with an ordinary textfile - that didn't work.
> However, your solution works for me.

Yes, it does not work because installer functions are only available at
installer runtime (when you run the installer)! Compiler directives are
available at compile time (when you run the compiler)!

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-06-2008, 01:54 AM
Hi Hanspeter,

>uups I didn't make myself clear. I want to set the fileversion in the
>setup.exe that will be generated in SB.

You might also want to take a look at our Build Automator
(www.buildautomator.com). You can set the version from it when you
compile the install. I will also have an action to set the version
number in your Clarion apps and in version resource files (.rc) for
Visual Studio and other tools so that you can sync versions of both
compiled code and your install and just set a version variable in your
Build Automator project and use that in the version resources for your
code and SB:)

Best regards,

ArnĂ³r Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
05-06-2008, 12:27 PM
Hi Arnor,

Will have a look at it, thx for the pointer

Hanspeter