Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] User Tips, Tricks and Samples
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rating: Thread Rating: 6 votes, 4.83 average. Display Modes
  #1  
Old 01-09-2004, 09:38 AM
Shawn Shawn is online now
Registered User
 
Join Date: 01-08-2004
Posts: 3
Lightbulb Automating the hassle of building VB project tree

I recently had a need to automate the process of building a hierarchy of dependant Visual Basic projects, most of which were ActiveX dll's or controls. Anyone who has ever dealt with VB in such a situation knows that this can be pure hell if binary compatibility gets out of whack. It was beginning to cost my development team substantial amounts of wasted time and effort keeping these binary compatibility issues straight.

To deal with this problem, I sat down and wrote a series of custom build steps and a library of objects that I used in these custom build steps. I also wrote some global subroutines in Visual Build Pro. With this, I was able to completely automate the building of my VB project tree, regardless of whether binary compatibility was in synch or not. It has turned out to be a great time saver. So I thought I'd offer it to other VBP users who may still be doing VB COM development. This package is available by clicking here.

To use this package, you'll need to unzip the files to a directory on your hard drive. You'll need to run RegSvr32 on CdsiXUtils.dll, CdsiComUtils.dll, and VbBuildUtils.dll. Once you've done that, you'll need to copy the custom steps and macros from the VisBuildPro.steps and VisBuildPro.macros files into your global build steps and macros files.

Next, you need to register the custom steps with VBP. I've provided a custom step that does that, and the included sample BLD file demonstrates how to do it.

Finally, you'll need to call the subroutine to build your VB project. Again, the included BLD file demonstrates how to do that. I've included a sample project tree containing 5 VB projects that are dependant on one another for binary compatibility. If you break compatibility on one of them (remove a method/change parameters/etc.), this automated process should deal with it for you.

Let me know if you have any trouble with it - it's a pretty complicated process and probably has some issues specific to our build environment.

Last edited by Shawn; 01-09-2004 at 09:47 AM.
Reply With Quote
  #2  
Old 01-13-2004, 11:59 AM
Sotorin Sotorin is online now
Registered User
 
Join Date: 05-07-2003
Posts: 7
Followup

I just tried running your project and:
- When you say " ... copy the custom steps and macros from the VisBuildPro.steps and VisBuildPro.macros files into your global build steps and macros files." where exactly is this? Are you referring to a root directory or actual files. Which one is global macro file, what's the name of it? I just copied your files into the root directory of my VBPro installation dir.
- when I run RegisterCustomSteps I kept getting errors. "Failed to open 'C:\Program Files\VisBuildPro\Build Options Action.action': The system cannot find the file specified." I changed the path from what it was in your project to something that reflected my installation layout.

What am I doing wrong?
Reply With Quote
  #3  
Old 01-13-2004, 01:53 PM
Shawn Shawn is online now
Registered User
 
Join Date: 01-08-2004
Posts: 3
VBP has 4 global files called VisBuildPro.config, VisBuildPro.macros, VisBuildPro.Global.scripts, and VisBuildPro.steps. The location for these files is specified by selecting the Tools->File Locations menu from within the VBP main program window. These are XML files, and are pretty self-explanatory as to their layout. I have included the .steps and .macros files in this zip because there are custom global build steps and macros that the solution uses.

As for the other problem, that was an oversight on my part. I failed to include the .action files that this custom build step requires to register the steps with VBP. I've updated the zip file to include these, so you can get the updated one from the same link that you got the original one. Just copy the .action files into the same location where you copied the other files. You may need to change the filename field for the steps under the RegisterCustomSteps subroutine, as I think they are currently pointing to a specific location on my system.

Thanks for trying this out. I hoped it would be useful to someone else. Let me know if you have any more trouble.
Reply With Quote
  #4  
Old 01-14-2004, 11:54 AM
Sotorin Sotorin is online now
Registered User
 
Join Date: 05-07-2003
Posts: 7
Another small problem

Do any of these DLL's included in your project, reference something that's not standard on NT Server? I keep getting "ActiveX component can't create object" whenever I'm trying to execute BuildVbProject -> Retrieve current project settings subroutine. No matter what I try I keep getting the same error. I've register and unregister your DLLs multiple times unfortunately to no avail.
Can you think of anything I can try?
Reply With Quote
  #5  
Old 01-14-2004, 12:27 PM
Sotorin Sotorin is online now
Registered User
 
Join Date: 05-07-2003
Posts: 7
XP problem version (same as above)

I have another box running XP and I reinstalled the whole thing from the scratch. Everything was smooth until, again, I tried to compile the first VB project, I got to "Retrieve current project settings" and it failed w/ msg "Application-defined or object-defined error"
Reply With Quote
  #6  
Old 03-09-2004, 10:36 AM
VBPbetaTest VBPbetaTest is online now
Registered User
 
Join Date: 11-18-2003
Posts: 8
Shawn,

Like Sotorin, I can't 'create the automation object'.

That's really pity cause your work seems to be really interesting and usefull.

Could you give us more information about your dlls?

Or if it is to tough job to comment your binaries, just zip your code source.

Thanks anyway for your job
Reply With Quote
  #7  
Old 03-09-2004, 10:52 AM
Shawn Shawn is online now
Registered User
 
Join Date: 01-08-2004
Posts: 3
Dear Sotorin and VBPBetaTest,

I am sorry about the difficulties you guys are having. I probably should not have posted this until I had a good way to deploy it to other environments. I will try to spend a little time this week to put together a setup executable. I need to do that for the in-house guys anyway. Thanks for your patience.

Shawn
Reply With Quote
  #8  
Old 06-08-2005, 12:03 PM
JFoust JFoust is online now
Registered User
 
Join Date: 06-08-2005
Posts: 3
Has any more work been done on this?

When I try to edit the properties of one of the VBProj actions I am getting an "Error initializing action's custom UI components: The system cannot file the file specified." I think this is because I am running Windows 2000 and your dll seems to be trying to open uxtheme.dll.

I also get an error saying "Error loading info for custom action 'VBProjGetInfo': The system cannot find the file specified." when I try to run it. I am not seeing any file access to uxtheme.dll, but I'm not seeing any other failed file accesses either, so I'm not sure what is going on.

Thanks,
Josha Foust
Reply With Quote
  #9  
Old 06-08-2005, 01:13 PM
JFoust JFoust is online now
Registered User
 
Join Date: 06-08-2005
Posts: 3
Ok, I got past those problems, they were mostly directory issues. Now I am also getting the "can't create object" error.

Josha Foust
Reply With Quote
  #10  
Old 06-08-2005, 01:25 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
I haven't looked at this in any detail, but if you are receiving a "Can't create object" type error, you may simply need to register the different dll's installed with this package with regsrv32.exe... Of course this is only speculation.
Reply With Quote
  #11  
Old 06-08-2005, 02:53 PM
JFoust JFoust is online now
Registered User
 
Join Date: 06-08-2005
Posts: 3
I did that and it looks like the other people in the thread that had the same problem also registered the DLLs.
Reply With Quote
  #12  
Old 09-26-2006, 07:52 AM
zisco zisco is online now
Registered User
 
Join Date: 09-26-2006
Posts: 1
Hello shawn, the link you've provided is outdated - could you please provide a new, working one?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 01:08 PM.


Copyright © 1999-2023 Kinook Software, Inc.