Click here to Skip to main content
15,860,972 members
Articles / Programming Languages / VBScript
Article

VBMake Script

Rate me:
Please Sign up or sign in to vote.
5.00/5 (7 votes)
27 Jun 2000 212.9K   2.2K   25   21
Script for automating and speeding Visual Basic builds
  • Download source files - 5 Kb
  • Introduction

    VBMake.vbs provides critical functionality that is missing from the Visual Basic IDE/compiler. It is a VBScript make utility for intelligently building Microsoft Visual Basic projects, only building projects when the target executable is older than the source files. It works well in conjunction with the Visual Build build management tool.

    This script parses an individual VBP file (or all VBP files in a VBG) for its target and dependencies (the project file, all constituent source files and their binary equivalents [i.e.: frx, etc.]), and invokes VB from the command-line to build the project only if the target executable does not exist or is older than any of the dependencies. It does not consider references as a dependency. If the target is not specified in the VBP, VBMake will fail with an error.

    Usage: cscript VBMake.vbs <VBP/VBG file> [/V <VB compiler path>] [/F] [/N] [/S]

    Any output is echoed to standard output; returns exitcode of 0 if successful or < 0 if any error occurs.

    The first parameter must be a valid VB project file (VBP) or group filename (VBG) and the following optional flags are supported (non-case-sensitive):

    • /F => forces all targets to be rebuilt regardless of dependency dates.
    • /N => displays commands but does not execute. Useful for debugging.
    • /S => Suppress default output (only displays error output)
    • /V => full path to VB compiler (looks for compiler if not passed). Use to override for newer version of VB (/m and /out flags must be supported by newer versions for calling from command-line)

    e.g.: cscript VBMake.vbs MyProjects.vbg /s

    Dependencies:

    1. Microsoft Windows Scripting 5.0+ (comes with Win98 & Win2000, download for NT 4.0 and Win95 at http://msdn.microsoft.com/scripting)
    2. Microsoft Visual Basic 5.0+. If SourceSafe is also installed, is recommended that you disable SourceSafe integration in VB on the build machine to prevent the possibility of dialog boxes requiring user input when building. This is done by selecting Add-ins|Add-In Manager, selecting Source Code Control in the listbox and unchecking 'Load on Startup'.

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    United States United States
    This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
    This is a Organisation

    1 members

    Comments and Discussions

     
    Generalmonitor text file size, if 2 MB then run a Batch File Pin
    virenmerdraib11-Oct-07 18:55
    virenmerdraib11-Oct-07 18:55 
    Questionpause in a vb script Pin
    Eltjo.schol3-May-06 0:56
    Eltjo.schol3-May-06 0:56 
    QuestionVB6: Reached Limit Cannot Create Any More Control For This Form Pin
    steventry21-Jan-06 15:32
    steventry21-Jan-06 15:32 
    QuestionCould u do it Pin
    sadirov3-Dec-05 16:09
    sadirov3-Dec-05 16:09 
    QuestionSSTab Saving???? Pin
    truonghanca8-Nov-05 7:30
    truonghanca8-Nov-05 7:30 
    Generalabout mailimg list Pin
    Anonymous20-Jun-05 5:51
    Anonymous20-Jun-05 5:51 
    Generalh r u . Pin
    Anonymous31-Dec-04 17:02
    Anonymous31-Dec-04 17:02 
    Generalh r u Pin
    Anonymous31-Dec-04 17:02
    Anonymous31-Dec-04 17:02 
    GeneralARP packet analyzer Pin
    estebitancf4-Nov-04 0:39
    estebitancf4-Nov-04 0:39 
    QuestionHow to pass arguments to a batch file from a VBScript Pin
    sankha_20252-May-04 0:29
    sankha_20252-May-04 0:29 
    AnswerRe: How to pass arguments to a batch file from a VBScript Pin
    Jeff Prochaska29-Sep-04 5:11
    professionalJeff Prochaska29-Sep-04 5:11 
    Questionhow to create a menu control in VB? Pin
    donghuong15-Apr-04 20:22
    donghuong15-Apr-04 20:22 
    GeneralPacket analyzer Pin
    Member 8558511-Feb-04 20:42
    Member 8558511-Feb-04 20:42 
    GeneralEntering PIN Pin
    18-Jun-02 22:11
    suss18-Jun-02 22:11 
    Generalhi how r u Pin
    1-Jul-01 21:18
    suss1-Jul-01 21:18 
    GeneralRe: hi how r u Pin
    1-Nov-01 5:00
    suss1-Nov-01 5:00 
    iam fine and you

    vij
    GeneralRe: hi how r u Pin
    12-Feb-02 4:13
    suss12-Feb-02 4:13 
    GeneralRe: hi how r u Pin
    10-Apr-02 6:37
    suss10-Apr-02 6:37 
    GeneralRe: hi how r u Pin
    31-May-02 1:42
    suss31-May-02 1:42 
    GeneralRe: hi how r u Pin
    Anonymous3-Jul-03 1:40
    Anonymous3-Jul-03 1:40 
    GeneralRe: hi how r u Pin
    jwjames8-Jan-04 7:35
    jwjames8-Jan-04 7:35 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.