If you start VBLM with the command file switch (/CDF=PathAndFileName), it will open the file, then input and process it one line at a time.
VBLM will recognize and process 3 different kinds of input:
Set statements that define string variables
Any of the 70 or so command line switches recognized by VBLM, and their parameters (including variables)
A STOP, END or QUIT statement that will cause VBLM to terminate command file processing.
String Variables
VBLM's string variable capability is intended to help simplify automated command line processing. Because variables can be used to pass parameters to command line switches, they make it easier to build complex command files that are nevertheless easy to modify and maintain.
Variables must be defined before they can be used, using a Set statement:
Set DesignLanguageName=English
To use them, bracket the names with percent signs.
/DLN=%DesignLanguageName%
Variable names are not case sensitive and can't contain spaces.
Processing Sequence
In what order does VBLM process the commands in a command file (or just on the command line, for that matter)? It depends. Before processing any of them, it reads them all and separates them into those that cause actions (eg, do a build) and those that set attributes affecting these actions (eg what languages to include). All attributes are set before any actions are taken -- thus in the example below, the entire process will run silently even though the /SILENT switch is almost last.
Within the action commands, some sequencing is obvious (eg import before build) and some is not (eg import to one table, export from another). VBLM ignores the order in which commands are listed in the file when the logical sequence is obvious -- it will always /CLOSE last, /SAVE second to last, and /BUILD third to last, for example, regardless of where these commands appear in the file.
File order counts when the sequence isn't obvious. In the example below, VBLM will import before creating dimsets only because the /IMP command appears first, and if the commands were swapped, so would the order in which VBLM executes them. So there very well may be times when you need to consider the order in which you place commands in the file.
Example
The following command file will cause VBLM to:
1. Extract the strings from C:\Projects\Source\MyProjectTestProject.vbp
2. Create 2 language tables by importing French.lmx and German.LMX from the C:\Projects\VBLM\LMXFiles directory
3. Create 2 sets of runtime-switchable interface dimensions ("dimsets"), stored in C:\Projects\VBLM\BDDFiles. French.bdd will be 10% larger than the original project and German.bdd will be 10% larger than French.
4. Build and have RC.exe compile a resource containing the strings in the English design language, French and German, and the corresponding dimsets.
5. Build and have VB6 compile a resource-using runtime switched version
6. Quit without saving the VBLM project (because the stop statement terminates processing)
7. Do this all silently, even though the silent switch is at the end.
Set PDir=C:\Projects\Source\MyProject
Set IDir=C:\Projects\VBLM\LMXFiles
Set DDir=C:\Projects\VBLM\BDDFiles
Set BDir=C:\Projects\VBLM\Builds
Set PName=TestProject
Set L0=English
Set L1=French
Set L2=German
Set DX=0,0,10,10,10,10,10,10
"%PDir%\%PName%.vbp"
/Imp="%IDir%\%L1%.lmx,%IDir%\%L2%.lmx"
/CDD="%PDir%\%PName%.vbp",%DDir%\%L1%.bdd,%DX%|%DDir%\%L1%.bdd,%DDir%\%L2%.bdd,%DX%
/DDS="%DDir%\%L1%.bdd,%DDir%\%L2%.bdd
/DSW=1
/RSV
/LDF=R
/LT="%L0%,%L1%,%L2%"
/TD=%BDir%\%PName%
/VBI=1
/VBV=6
/VBC=" /make"
/BUILD
/CLOSE
/SILENT
Stop
/SAV
See Also