Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Retrieving command line parameters passed to build script (https://www.kinook.com/Forum/showthread.php?t=4017)

dalevine 04-24-2009 05:45 AM

Retrieving command line parameters passed to build script
 
I am converting an existing batch file driven build to Visual Builder. The batch file accesses some command line parameters passed to it like this:

rem ************************************************** *************************
rem process command line args; check if this is a restart.
:ArgLoop
shift
set _arg=%0
if "%_arg%"=="" goto :EndArgLoop
if /i "%_arg%"=="restart" set ReleaseBuildStep=BuildStart&&goto :ArgLoop
if /i "%_arg:~0,9%"=="startstep" set ReleaseBuildStep=%_arg:~10,30%& goto :ArgLoop

:EndArgLoop
rem ************************************************** *************************

How would I do this, or its equivalent, in Visual Builder?

kinook 04-24-2009 09:37 AM

1 Attachment(s)
The VBP way to do this would be to pass macro values on the command-line (i.e., RESTART=y STARTSTEP=xyz), which will be available as temporary macros in the called project.
http://www.kinook.com/VisBuildPro/Ma...nd_linegui.htm
http://www.kinook.com/VisBuildPro/Manual/consoleapp.htm
http://www.kinook.com/VisBuildPro/Ma...hainsample.htm

You can then reference these macros (i.e. %RESTART%) in build rules and other step fields in the project.
http://www.kinook.com/VisBuildPro/Manual/macrostab.htm
http://www.kinook.com/VisBuildPro/Manual/buildrules.htm

You can also iterate over all temporary macros using the object model (see attached sample).
http://www.kinook.com/VisBuildPro/Ma...bjectmodel.htm
http://www.kinook.com/VisBuildPro/Ma...osproperty.htm


All times are GMT -5. The time now is 03:59 AM.


Copyright © 1999-2023 Kinook Software, Inc.