Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-06-2005, 02:25 PM
David Hoffer David Hoffer is online now
Registered User
 
Join Date: 06-27-2005
Posts: 9
How can I increment a macro value?

I have a project macro (BUILD_VER) that I want to increment after every build. How can I do this?

I am trying to use the Macro action where I set its value. If I set its value to %BUILD_VER% +1 it changes the value to be "5 + 1". How can I make it evaluate the math first?

-dh
Reply With Quote
  #2  
Old 07-06-2005, 03:11 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
Use a script expression (indicated by brackets):

[%BUILD_VER% + 1]

Also see the Increment Counter step in the Advanced.bld sample.
Reply With Quote
  #3  
Old 07-06-2005, 03:19 PM
David Hoffer David Hoffer is online now
Registered User
 
Join Date: 06-27-2005
Posts: 9
That works great!

Thanks.

-dh
Reply With Quote
  #4  
Old 11-10-2006, 12:31 PM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
I need something similar-I have a macro %BUILD_VER% having the initial value 6.4.1010.0 (so it does not contain only numbers).
I need to update its value after every succesful build by incrementing the 3rd field (6.4.1010.0->6.4.1011.0).How can I do this?
Reply With Quote
  #5  
Old 11-10-2006, 03:56 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
See attachment.
Attached Files
File Type: bld incrver2.bld (895 Bytes, 794 views)
Reply With Quote
  #6  
Old 11-13-2006, 12:14 PM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
thanks a lot,it works perfect!
Reply With Quote
Reply


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 Off
HTML code is Off



All times are GMT -5. The time now is 01:59 PM.


Copyright © 1999-2023 Kinook Software, Inc.