Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] General Discussion

Thread Tools Rate Thread Display Modes
Old 03-13-2003, 06:10 AM
endever endever is online now
Registered User
Join Date: 03-13-2003
Posts: 1
Question Conditional Branching


Sorry this takes some explaining:

I have many steps to my build proc's so I have split them into separate scripts.

I have created a script that will run them all, at each step asking the builder if he/she wants to run the next step. This "asking" has been achieved by using some VBscript.

Most of the steps have sub steps that also ask if you want to continue i.e

-Build Progs?
|-Build Progs.
|-Copy Progs?
|--Copy Progs to Test folder.

I don't want the copy progs to be run if the build progs wasn't run. However even though the build and copy steps are skipped, the questions are not.

What am I missing? (I have attached a brief example of my problem.)


Attached Files
File Type: bld conditionalbranching.bld (1.2 KB, 1015 views)
Reply With Quote
Old 03-13-2003, 09:32 AM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,837

Build rules are evaluated from the bottom up, so even though the parent step is skipped, the child step's build rule is evaluated first to determine if that step will be skipped. It's implemented this way to support the options to nest or not nest build rules and checked status of steps.

There are a couple ways to get around this:

1) Move the child steps of Build Progs into a subroutine and call that subroutine from a child step of Build Progs. Build rules in subroutines are not evaluated if the subroutine isn't called.

2) Use a separate Run Script step to prompt for whether to build, which sets a temporary macro value according to the input, and then have the child step's conditional build rule reference that macro. The prompt step will be skipped if the parent was skipped.

Both methods are demonstrated in the attached file.
Attached Files
File Type: bld conditionalbranching2.bld (2.9 KB, 931 views)
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 02:45 AM.

Copyright 1999-2021 Kinook Software, Inc.