Kinook Software Forums

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

Thread Tools Rate Thread Display Modes
Old 04-24-2009, 06:45 AM
dalevine dalevine is online now
Registered User
Join Date: 04-23-2009
Posts: 14
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.
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

rem ************************************************** *************************

How would I do this, or its equivalent, in Visual Builder?
Reply With Quote
Old 04-24-2009, 10:37 AM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,758
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.

You can then reference these macros (i.e. %RESTART%) in build rules and other step fields in the project.

You can also iterate over all temporary macros using the object model (see attached sample).
Attached Files
File Type: bld logtempmacros.bld (537 Bytes, 492 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 10:17 AM.

Copyright 1999-2019 Kinook Software, Inc.