PDA

View Full Version : LASTSTEP_STATUS, executing next step based on previous step


abcdetech
12-16-2009, 01:03 PM
The easiest way to execute the second step based on previous step is to use %LASTSTEP_STATUS%



I have two steps:

1. Make VS2008
2. Copy Files with Build Only if %LASTSTEP_STATUS% is equal to 0.

This will work.

Now, in step 1 I've added - Build "Failure Step Something" on failure.

Now if Step 1 fails, it goes into Failed steps and %LASTSTEP_STATUS% gets reset to 0. So Step 2 will be executed no matter what; even if Step 1 failed. This is not what I want.

How to execute Steps 2-N only if Step 1 in Project Steps succeeded?

Manipulating with temp macros, setting them up, resetting - it's a pain. Perhaps there is a better way with System Macros to do this?

thank you

kinook
12-16-2009, 01:31 PM
In the vbld_StepDone script event of Step #1, store the status in another temporary macro:

vbld_TempMacros.Add "VS2008_STATUS", Step.BuildStatus

and reference that macro instead of LASTSTEP_STATUS in Step #2.

http://www.kinook.com/VisBuildPro/Manual/scriptevents.htm