Important alert: (current site time 8/1/2014 6:09:08 PM EDT)
 

article

VB6 Mass compile 1-Jan-2014

Email
Submitted on: 1/1/2014 12:20:50 PM
By: Kenaso 
Level: Beginner
User Rating: By 2 Users
Compatibility: VB 6.0
Views: 9751
author picture
(About the author)
 
     This may help some of you that have a need to perform mass compiles using Visual BASIC 6.0


 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
  1. You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
				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 ---------
@ECHO OFF
CLS
TITLE "Compiling VB Source Code"
cls
CD C:\
set FLDR=
set VBIDE=
set RPTFILE=
echo.
echo ***************************************************
echoClose all active applications and press ENTER
echo.
echoPress CTRL+C to terminate this application
echoPress ENTER to begin compiling
echo ***************************************************
echo.
pause > nul
cls
set VBIDE="C:\Program Files (x86)\Microsoft Visual Studio\VB98\vb6.exe"
set RPTFILE="C:\Kens Software\Cmpl_Rpt.txt"
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
C:
CD "C:\Kens Software"
:: Update file with project name
echo Compiling - "%FLDR%\AnotherReboot\AnotherReboot.vbp"
%VBIDE% /make "%FLDR%\AnotherReboot\AnotherReboot.vbp" /out %RPTFILE% 
echo Compiling - "%FLDR%\API_Hash\API_Hash_Demo.vbp"
%VBIDE% /make "%FLDR%\API_Hash\API_Hash_Demo.vbp" /out %RPTFILE%
echo Compiling - "%FLDR%\ASCII_Chart\Ascii_Chart.vbp"
%VBIDE% /make "%FLDR%\ASCII_Chart\Ascii_Chart.vbp" /out %RPTFILE%
echo Compiling - "%FLDR%\BuildTables\BuildTables.vbp"
%VBIDE% /make "%FLDR%\BuildTables\BuildTables.vbp" /out %RPTFILE%
echo Compiling - "%FLDR%\DiscDataWipe\DDWipe_Group.vbg"
%VBIDE% /make "%FLDR%\DiscDataWipe\DDWipe_Group.vbg" /out %RPTFILE%
echo Compiling - "%FLDR%\kiCrypt\kiCrypt_Group.vbg"
%VBIDE% /make "%FLDR%\kiCrypt\kiCrypt_Group.vbg" /out %RPTFILE%
echo Compiling - "%FLDR%\kiHash\kiHash_Group.vbg"
%VBIDE% /make "%FLDR%\kiHash\kiHash_Group.vbg" /out %RPTFILE%
echo Compiling - "%FLDR%\kiMisc\kiMisc_Group.vbg"
%VBIDE% /make "%FLDR%\kiMisc\kiMisc_Group.vbg" /out %RPTFILE%
echo Compiling - "%FLDR%\kiPrng\kiPrng_Group.vbg"
%VBIDE% /make "%FLDR%\kiPrng\kiPrng_Group.vbg" /out %RPTFILE%
echo Compiling - "%FLDR%\RebootPC\RebootPC.vbp"
%VBIDE% /make "%FLDR%\RebootPC\RebootPC.vbp" /out %RPTFILE%
echo Compiling - "%FLDR%\ZipDater\ZipDater.vbp"
%VBIDE% /make "%FLDR%\ZipDater\ZipDater.vbp" /out %RPTFILE%
:: Remove DLL debug files
echo *************************************************
echo **Remove DLL debug files**
echo *************************************************
del /S /Q "%FLDR%\*.exp"
del /S /Q "%FLDR%\*.lib"
del /S /Q "%FLDR%\*.obj"
echo *************************************************
echo. >> %RPTFILE%
echo ------------------------------------- >> %RPTFILE%
echo End of report >> %RPTFILE%
CD C:\
echo.
echo ****************************************
echo Finished performing compiles
echo.
echo Press any key to continue
echo ****************************************
echo.
pause > nul
goto done
:done
set FLDR=
set VBIDE=
set RPTFILE=
C:
CD C:\
cls


Other 31 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

1/4/2012 11:31:10 AMBonnie West

SETLOCAL seems to have the same effect as manually removing environment variables.
(If this comment was disrespectful, please report it.)

 
1/5/2012 1:56:55 PMKenaso

Thanks Bonnie. I have never seen that command before.
(If this comment was disrespectful, please report it.)

 
1/10/2012 9:19:09 AMKenaso

Bonnie, here is some additional information on the SETLOCAL DOS command.

http://technet.microsoft.com/en-us/library/bb491001.aspx


(If this comment was disrespectful, please report it.)

 

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.