Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Building multiple EXE's for a product...

Status
Not open for further replies.

Snaggs

Programmer
Jan 11, 2000
393
US
OK, I'm sure I'm not the only one that needs to do this.&nbsp;&nbsp;We have a product that has about 18 different EXE's with it.&nbsp;&nbsp;One DLL for the object based stuff and 36 Language DLL's that support English and Traditional Chinese.&nbsp;&nbsp;So we have about 55 exes and dll that make up a product.&nbsp;&nbsp;Sheesh, I know it's ugly, but we can't change it right now.<br><br>The problem is trying to do a build for this thing.&nbsp;&nbsp;Right now I have it running out of a batch file, but when you make the programs from the command line with VB6, the revision doesn't get incremented.&nbsp;&nbsp;I even have the project files checked out of SourceSafe before I do the build.&nbsp;&nbsp;That's in the batch file too!&nbsp;&nbsp;However, Microsoft says that there is a bug in the command line for VB6 where it won't increment the revision in the VBP file.<br><br>This has a cascaded effect apparently, because when I package and deploy the application, since the version number hasn't changed, the new EXE's and DLL's don't install because it thinks they are the same version.<br><br>Now for my question.&nbsp;&nbsp;Does anyone know of a MAKE or BUILD utility for Visual BASIC that will allow you to maybe graphically pick the files you want to build and specify an output directory, etc for Visual BASIC?<br><br>The batch file works fine, however it's a real pain in the you know what to maintain.<br><br>Any and all comments or ideas welcome!<br> <p>Steve Meier<br><a href=mailto:tribesaddict@swbell.net>tribesaddict@swbell.net</a><br><a href= > </a><br>
 
well since its VB6, I assume that each exe is its own project?, if so you can add every project onto a single group in VB, then just build them all by selecting all the projects in the project manager. thats one way if all your exe are made from different projects, also a good way to debug activex's inside your exes, by adding their projects as well you can jump to the exact line of the error, throught the exe and throught the activeX. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Thanks for the reply Karl!&nbsp;&nbsp;However it's not quite that simple.&nbsp;&nbsp;That would take care of the versioning for the EXE's but not for the language DLL's.&nbsp;&nbsp;There is some file copying that goes on in the background.&nbsp;&nbsp;It copies resource files into a common directory from either an English or Chinese directory, then it builds the project.&nbsp;&nbsp;It does this each time for as many languages as we have.<br><br>I'm trying to get an automatic build.<br><br>Update...&nbsp;&nbsp;I did go out to Microsofts site and download their Visual Installer.&nbsp;&nbsp;It's a nice setup program.&nbsp;&nbsp;Much nicer than the P&D Wizard.&nbsp;&nbsp;Gives you much more control over what you can do and how you can package the stuff.&nbsp;&nbsp;However, as far as I know it still won't help me with the build.<br><br>I also ran across a freeware tool that version stamps the exe or dll.&nbsp;&nbsp;However, this isn't any good either because if the product gets built on a different machine, the version numbers will be out of sync.&nbsp;&nbsp;I just don't like the idea that the version number doesn't get updated in the Project file.&nbsp;&nbsp;I guess I'll have to write a little app that goes in there and does that for me, as much as I was trying to avoid doing that.<br><br>Thanks again, <p>Steve Meier<br><a href=mailto:tribesaddict@swbell.net>tribesaddict@swbell.net</a><br><a href= > </a><br>
 
I dont know how much time you have left, but have you considered writing a instalation/build program to do all the stuff you want for you? I'm writing an instalation program for WebSaras(you probally never heard the name since, alot of states put up their own logo and name, when we sell it to different states) since its kind of simple as far as the approach goes (get hardware when Install, Update, Cancel, type features are put in) I dont think I know much more to help you. I would think that writing yourself a program to do the task would helpyou with maximum flexibility. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Yeah,&nbsp;&nbsp;That's what I was thinking.&nbsp;&nbsp;I didn't really want to reinvent the wheel if someone knew of something out there already.&nbsp;&nbsp;But I guess that I'll be breaking new ground on it soon.<br><br>Thanks again, <p>Steve<br><a href=mailto:tribesaddict@swbell.net>tribesaddict@swbell.net</a><br><a href= > </a><br>
 
normally the best products for your own products are you own handlers, or modifications of other handlers to suit your need, like when my boss wanted to make a VPN, through FTP protocals(to start off with) he didnt want to buy an activeX , he wanted to buy the source code so I could modify it , and strip it down to size, which became just using raw winsock commands. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
OK,&nbsp;&nbsp;I had to revert to something that would change the Revision number for me.&nbsp;&nbsp;While this code works for me, use it at your own risk.<br><br>Option Explicit<br><br>Public Sub Main()<br>&nbsp;&nbsp;&nbsp;&nbsp;Dim strBuffer As String, strNewString As String, strFilename As String<br>&nbsp;&nbsp;&nbsp;&nbsp;Dim intRevision As Integer, intFileHandle As Integer<br>&nbsp;&nbsp;&nbsp;&nbsp;Dim lOffset As Long<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;On Error GoTo MainErr:<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;strFilename = Command<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;If strFilename = &quot;&quot; Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;Usage:&nbsp;&nbsp;AutoRev &lt;Project.VBP&gt;&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exit Sub<br>&nbsp;&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;If Dir$(strFilename) = &quot;&quot; Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;File not found: &quot; & strFilename<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exit Sub<br>&nbsp;&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;intFileHandle = FreeFile<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;Open strFilename For Binary As #intFileHandle<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;strBuffer = String(LOF(intFileHandle), 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;Get #intFileHandle, 1, strBuffer<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;'Make sure we want to auto-increment.<br>&nbsp;&nbsp;&nbsp;&nbsp;lOffset = InStr(1, strBuffer, &quot;AutoIncrementVer=1&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;If lOffset &gt; 0 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lOffset = InStr(1, strBuffer, &quot;RevisionVer=&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strNewString = Mid$(strBuffer, 1, lOffset + 11)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intRevision = CInt(Mid$(strBuffer, lOffset + 12, InStr(lOffset + 12, strBuffer, vbCrLf) - (lOffset + 12)))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intRevision = intRevision + 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Make sure we stay within the limits of VB's versioning.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If intRevision &gt; 9999 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intRevision = 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Build the new project file to write.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strNewString = strNewString & CStr(intRevision) & Mid$(strBuffer, InStr(lOffset + 12, strBuffer, vbCrLf))<br>&nbsp;&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;'Write the updated information back to the VBP.<br>&nbsp;&nbsp;&nbsp;&nbsp;Put #intFileHandle, 1, strNewString<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;Close #intFileHandle<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;Exit Sub<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>MainErr:<br>&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;Error #&quot; & Err.Number & vbCrLf & Err.Description<br>End Sub <p>Steve<br><a href=mailto:tribesaddict@swbell.net>tribesaddict@swbell.net</a><br><a href= > </a><br>
 
Hey Steve, where did you D/L the visual installer?
 
um, if you are refering to the distribution packer, Visual Basic comes with that. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top