Variables after Build

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jeremy_stover
    Forum Member
    • May 2003
    • 2

    Variables after Build

    I'm trying to come up with an easy way to upgrade new versions and make a note to a logfile with the version number. The log file is generated by a bat proceedure that is Run After Build (specified under project settings). I want to be able to pass the Version Number to the bat file without having to type it in to the command line params by hand each time. (I'm afraid someone will forget and then we'll be out of sync...) Is there a way to do this? Or simply to create a file after doing a build?

    Thanks for any help.
  • Darryl
    Indigo Rose Staff Member
    • Jul 2001
    • 1908

    #2
    Re: Variables after Build

    You can certainly use a Design-Time Constant to store the version information which can be modified between builds. You can create these types of variables in Project->Settings, Design-time Constants tab.

    However I'm not sure either how to get that information to your file. The only way I could see it working is if you can include that variable as a Command Line argument in the build, however I don't know how that would work in your circumstance. Maybe others will have some ideas?

    Comment

    • jeremy_stover
      Forum Member
      • May 2003
      • 2

      #3
      Re: Variables after Build

      This was exactly the sequence I went through, but unfortunately, variables don't get translated on the command line parameters. I just passes the actual string rather than the translated value ('%ProductVer%' rather than '4.0.0.218').

      Comment

      • Darryl
        Indigo Rose Staff Member
        • Jul 2001
        • 1908

        #4
        Re: Variables after Build

        %ProductVer% is a runtime variable, however if you use a Design-time constant such as #ProductVer#, it will be expanded during the build, rather than at runtime. Those type of variables can be created on the Design-Time Contants tab of Project->Settings. That should work and if it doesn't, it's a bug.

        Comment

        Working...
        X