Announcement

Collapse
No announcement yet.

Automatic definition of File version/Product version in BuildSettings-Resources

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automatic definition of File version/Product version in BuildSettings-Resources

    Hi,

    I tried to fill the contents of the 'Custom Version Information' in "Build Settings -> Resources" automatically. I've read several contributions in this forum, but I found no way.
    The idea is to retrieve the specfic information at an early point (OnStartup-Action) from particular file:

    tFileList = SetupData.GetFileList();
    for nIndex, PropTable in tFileList do
    strLocal = String.Lower( PropTable.FileName );
    if ( strLocal == "program.exe" ) then
    SessionVar.Set( "%ProductVer%", PropTable.FileVersion );
    end
    end
    At the the moment I see no way to use %ProductVer% in the fields of 'Customer Version Information'.
    Any idea?
    Thanks in advance
    Thomas

  • #2
    You cannot use session variables to set resources. Session variables exist only at runtime. If you want to set something during the build of the installer, use build constants. There are several posts explaining this, for example this one. Another example of setting a session variable with a build constant can be found here.

    Ulrich

    Comment


    • #3
      Hello,
      @Ulrich: thanks for your explanation.
      The basic idea was just to find an easy way to extract the required information completely out of the actions.
      But I also see the difference between the constants (used for the build process) the run-time variables.
      Thomas

      Comment

      Working...
      X