NI Home > Community > NI Discussion Forums

LabVIEW Developers Feature Brainstorming

Showing results for 
Search instead for 
Do you mean 
Reply
Active Participant
gmart
Posts: 337
0 Kudos

Pre/Post build steps for Application Builder

In development environments such as CVI and Visual Studio, there is the concept of pre and post build step operations. You can achieve that behavior in LabVIEW by writing a VI that calls BuildTargetBuildSpecification.vi and has code before and after it. This can't be done via the build specification UI, though.

I'd like to get a feeling on the usefulness of having this feature. I would like to know concrete examples of how adding this feature would either improve usability or allow behavior that is currently not possible. Would there be a need for multiple pre and post build steps or would one call suffice? Should there only be support for calling VIs or should batch files/exe's/scripts be allowed?
George M
National Instruments
Active Participant
Jim_Kring
Posts: 1,750
0 Kudos

Re: Pre/Post build steps for Application Builder

[ Edited ]
That's a great idea and one that I've wanted for a very long time!  You might know that OpenG Builder has this feature (and VIPM 2.0 will have it) and I absolutely love it.

There's no end to the possibilities...
  • obfuscation and inlining (as I mention in my Password Protecting VIs is Security Through Obscurity article)
  • source code control updates/commits/change-validations
  • better (than built-in) zipping of installer files
  • dynamic generation of help documentation
  • running of unit tests prior to build
  • etc...
I don't have much time to discuss each of these in depth, but hopefully you're sufficiently convinced of the value of this feature and other LabVIEW users will chime in about the specifics of various use cases (as well as other use cases).

Here are some specifics of what I would support:
  • Multiple steps would be ideal (as it would aid in modular reuse of build steps), but you might want to start with just supporting one pre- and one post-build step.
  • Running of VI's only -- no need for EXE or batch files, as these can be called from within VIs.
  • Some way to programmatically access build parameters and pass data between the build-hooks (and pass errors out of the build steps, in order to abort the build)
Cheers,

-Jim




Message Edited by Jim Kring on 06-24-2008 12:38 PM
Thinking in G
Active Participant
gmart
Posts: 337
0 Kudos

Re: Pre/Post build steps for Application Builder

Thanks for the feedback. All the use cases you list are good info. What is your opinion on what advantage there is to having the calls be made via the build spec as opposed to writing a VI where you make the calls before and after BuildTargetBuildSpecification?
George M
National Instruments
Active Participant
gmart
Posts: 337
0 Kudos

Re: Pre/Post build steps for Application Builder

I forgot to ask you to elaborate on this point:


Some way to programmatically access build parameters and pass data between the build-hooks (and pass errors out of the build steps, in order to abort the build)


George M
National Instruments
Active Participant
Jim_Kring
Posts: 1,750
0 Kudos

Re: Pre/Post build steps for Application Builder

[ Edited ]


gmart wrote:
Thanks for the feedback. All the use cases you list are good info. What is your opinion on what advantage there is to having the calls be made via the build spec as opposed to writing a VI where you make the calls before and after BuildTargetBuildSpecification?


They are both valid choices and aide in the flexibility of the end-solution.  You'll realize that creating a fully automated build is actually an exercise in software development, so we need lots of different options.  The current app builder is not a great build system, because you can't create builds of builds effectively.  Take a look at Ant (or other build automation tools), as well as continuous integration servers for more ideas about this.


gmart wrote:
I forgot to ask you to elaborate on this point:

Some way to programmatically access build parameters and pass data between the build-hooks (and pass errors out of the build steps, in order to abort the build)



In order to make the build steps modular, they should be passed parameters, such as the path to the *.lvproj file and the build specification name (rather than hard coding them inside the build step VIs).  It should be possible for a build step to abort the build process -- one easy way is to pass out an error cluster.  I think it's best to pass any data using either (1) the Set Control Values, Run VI, Get Control Values, technique or via a set of VIs/functions that enable Get/Set parameter operations.  Basically, I don't like the idea of placing conpane requirements on build step VIs, because it's so much work for users and an error prone task.

Thanks,

-Jim






Message Edited by Jim Kring on 06-24-2008 01:03 PM
Thinking in G
Member
danny_t
Posts: 137
0 Kudos

Re: Pre/Post build steps for Application Builder

[ Edited ]
Hi George,

Sorry to be so very late to add something to your thread here, but I only came across it today while nosing around the boards.

I would just like to add to Jim's comments and say how VERY useful pre and post build steps are for me. This type of functionality is why I do all my builds with the OpenG builder rather than the NI builder (the other reason is we do not use NI Projects yet). I would see this as a great improvement for the NI Builder, I would also want to OpenG build plugin callback type functionality

Just to quickly say some of the ways I use this, the attempt is to get a single button press build process :

We have all our source VI's in ClearCase and when I do an OpenG build I typically do the following.

Before the build begins pre_build functions...
check a correct and valid ClearCase configuration specification is being used for the build
various ClearCase function to checkout and update a build version info file.

In build callbacks.
The OpenG callback allows me to run a small number of VI's on each and every VI used in the build, from this I can generated a proper BOM (Bill Of Materials) for the build
this BOM shows all the files used in the build plus some important ClearCase version info.

Post build
checkin various build products and various log /info files I create and use.
label the new ClearCase build
email people the build has happened

If you wish for any more info please feel free to ask. I must say I am surprised there are not a lot more replies to your post from people as I see this as such a useful and powerful addition

cheers

Dannyt
Message Edited by danny_t on 02-03-2009 02:01 PM
Danny Thomson CLAD
Sub10 Systems Ltd
Active Participant
gmart
Posts: 337
0 Kudos

Re: Pre/Post build steps for Application Builder

Thanks for the post. Don't worry about being late, the forum is open to all input.
George M
National Instruments