View Single Post
  #4  
Old 04-01-2008, 12:10 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,013
Quote:
Originally posted by JonSmith
I guess my biggest beef is that very little is explained in requirements, limitations and other nice to know details of writing custom actions. The example in VB.Net for example has a function with several args - is this required? Optional? What's the limits?
Custom actions components must implement the ICustomAction interface defined in the 'Visual Build 6 Professional Objects' type library, which defines one BuildStep method taking two required parameters. VB.NET:

Public Function BuildStep(ByVal Builder As VisBuildSvr.Builder, ByVal [step] As VisBuildSvr.IStep) As VisBuildSvr.StepStatusEnum Implements VisBuildSvr.ICustomAction.BuildStep

http://www.visualbuild.com/Manual/userdefaction.htm

Quote:
The code is presented as-is with no explanatory comments and a bare minimum of trivial code (hello). Yeah I could probably spend a week playing around with variants to see what works and what doesn't, but it would be nice to have a fence so I don't *have* to expend that time. Like - can I call UI elements?
A custom action does not have access to the VBP GUI app, nor should it assume it even exists (a build could be run from the console app or directly from the object model). The step's properties can be accessed from the custom action via the provided Step object (use ExpProperty, as shown in the samples, to retrieve a value with all macros/script expanded).

Quote:
What are the threading implications?
With VBP v6.3 or later, custom actions are called from the build thread within a COM single-threaded apartment (STA). Other threads will not access/modify VBP objects while the custom action code is executing.
http://www.visualbuild.com/Manual/threading.htm

Quote:
In all honesty I probably wouldn't be so grumpy if I had a lot more time.
How 'bout some more meaningful examples with comments?
Thanks!
We'll add this to our request list. Thanks.
Reply With Quote