VB6 Mass compile

Submitted on: 2/21/2015 4:38:00 AM
By: Kenaso (from psc cd)  
Level: Beginner
User Rating: By 2 Users
Compatibility: VB 6.0
Views: 1830
     This may help some of you that have a need to perform mass compiles using Visual BASIC 6.0

				After tweaking a support module that may effect several applications, you may want to do a mass compile. Below is an example of what I use. You may use VBP or VBG files.
Copy this code into an empty text file and rename the file to Compile.bat. You may store it anywhere since all entries have complete path information. I save mine in the root of C: drive.
When it is finished, the final report is also in the root drive and may be opened with any text editor (Notepad).
Within the output report, it should look something like this:
 VB Compile Report 
 Wed 02/02/2011 4:56:11.80
 Build of 'API_Hash_Demo.exe' succeeded.
 Build of 'DefragAll.exe' succeeded.
If you have an error, Sometimes it is as simple as a bad reference to a module or variable. Other times, it will be like a COBOL error. You will have to backtrack from where the error was reported to where the error actually is located.
------- Copy code below here ---------
TITLE "Compiling VB Source Code"
::VB Batch Compile
:: Kenneth
CD C:set FLDR=
set VBIDE=
echo ***************************************************
echoClose all active applications and press ENTER
echoPress CTRL+C to terminate this application 
echoPress ENTER to begin compiling
echo ***************************************************
pause > nul
set VBIDE="C:\Program Files\Microsoft Visual Studio\VB98\VB6.exe" 
set RPTFILE="C:\Cmpl_Rpt.txt"
:: Double quotes added within batch file
set FLDR=C:\Kens Software
:: Create new report file
echo VB Compile Report > %RPTFILE%
echo %DATE% %TIME% >> %RPTFILE%
echo ------------------------------------- >> %RPTFILE%
:: Navigate to source code base folder
CD %FLDR%:: Update file with project names. Works with VBG and VBP files. 
:: Use as many projects as wanted.
echo Compiling - %FLDR%\AnotherReboot\AnotherReboot.vbp
%VBIDE% "%FLDR%\AnotherReboot\AnotherReboot.vbp" /make /out %RPTFILE%
echo Compiling - %FLDR%\API_Hash\API_Hash_Demo.vbp
%VBIDE% "%FLDR%\API_Hash\API_Hash_Demo.vbp" /make /out %RPTFILE%
echo Compiling - %FLDR%\DiscDataWipe\DDWipe_Group.vbg
%VBIDE% "%FLDR%\DiscDataWipe\DDWipe_Group.vbg" /make /out %RPTFILE%
echo Compiling - %FLDR%\kiCrypt\kiCrypt_Group.vbg
%VBIDE% "%FLDR%\kiCrypt\kiCrypt_Group.vbg" /make /out %RPTFILE%
:: Remove DLL debug files
del /S /Q "%FLDR%\*.exp"
del /S /Q "%FLDR%\*.lib"
echo. >> %RPTFILE% 
echo *** End of report *** >> %RPTFILE%
CD C:echo.
echo ****************************************
echo Finished performing compiles
echo Press any key to continue
echo ****************************************
pause > nul
goto done
set FLDR=
set VBIDE=
CD C:cls

Other 18 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

 There are no comments on this submission.

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)

To post feedback, first please login.