LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 02/15/2010

Did you know there is a programmatic interface to Application Builder?  In LabVIEW 2009 and later, you can programmatically build EXEs, DLLs, and Source Distributions with the VIs in the following location:

 

[LabVIEW]\vi.lib\AppBuilder\AB_API

 

These VIs contain a subset of the functionality provided in the App Builder UI for creating, editing, and building these three build specification types.  Note that there is no shipping documentation for these VIs, nor are there any shipping examples.  The example attached below demonstrates some basic functionality:

 

  1. Unzip the contents of the ZIP file below to a single folder.
  2. Open API_EXE.vi.
  3. Run the VI.  It will open a LabVIEW Project, create an EXE build specification, build the EXE, and save the project.
  4. Right-click the newly-created EXE build specification and choose 'Run' to run the EXE you just programmatically built.

Note that the App Builder API shipped with LabVIEW 8.6 as well, but only with the DLL and Source Dist build types.  EXEs were added to the App Builder API in LabVIEW 2009.

Message 1 of 15
(11,733 Views)

I was actually talking to a collegue about this kind of thing this morning so very good timing Darren! 🙂

 

One of the things I was interested in doing was retrieving a build's version number programatically (for a number of reasons). One such use case is shown in the snippet below. My question, as shown in the snippet, is "Is there an easy way to do this using the AB API?"

 

(I know I have used the EXE for the installer, but I couldn't see any installer VIs in the folder you suggested, and this image is more as an illustration than an actual use-case)

 

appbuilderQs.png

 

This would be really great as we could then tie un a whole bunch of things such as SVN manipulations (update X, commit Y), set installer version to match EXEs, before sending build to target destination (e.g. ftp server, etc).

Message 2 of 15
(11,645 Views)
There's not a public way to get version number like there is to set version number. I have created a request # for a Get Version VI: 208246.

We are evaluating whether to add an api for the Installer Builder.
Message 3 of 15
(11,544 Views)

Bob P wrote:
There's not a public way to get version number like there is to set version number. I have created a request # for a Get Version VI: 208246.

We are evaluating whether to add an api for the Installer Builder.

 

Is that a post by Dr RT?

 

Nice to see your still around. Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 15
(11,533 Views)

Hi Ben, yep same person, new screen name. 🙂

Message 5 of 15
(11,520 Views)

<duplicate post, server snafu>

Message Edited by Bob P on 02-16-2010 10:14 AM
Message 6 of 15
(11,518 Views)
I don't mean to be obtuse, but when would this be helpful?

I write programs to build executables and installers and thought this would be the next step, but I can't think of how.

Thanks,
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 7 of 15
(11,417 Views)

jcarmody wrote:
I don't mean to be obtuse, but when would this be helpful?

I write programs to build executables and installers and thought this would be the next step, but I can't think of how.

Thanks,

If all you need to do is build, this API offers you no additional utility beyond vi.lib\AppBuilder\BuildTargetBuildSpecification.vi  as described in your link. The API is useful to those who need to create new build specifications, edit existing build specifications, *and* build.

 

It's helpful because it's programmatic.

Message 8 of 15
(11,379 Views)

Bob P wrote:
[...] The API is useful to those who need to create new build specifications, edit existing build specifications, *and* build.

 

It's helpful because it's programmatic.


I'm missing something basic.  What situation would be improved by programmatically creating build specifications?  The API's existence tells me that there are use-cases.  Could you give me a for-instance?

Thanks,
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 9 of 15
(11,373 Views)
In LabVIEW 2009, there is a VI - FileVersionInfo.vi (vi.lib\Platform\fileVersionInfo.llb) - that returns the version information of any application or DLL. This is Windows only.
George M
National Instruments
Message 10 of 15
(11,127 Views)