LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto-building - Problem with Properties of a Build Spec

LV2018 SP1, LVRT 2018

 

My suite has 20-25 LVPROJ files. Some build PPLs (*.lvlibp), while some build EXE, or RTEXE.

There is a specific build order, because of dependencies.  One project might depend on a PPL built by an earlier project.

 

When doing this by hand, time is wasted - some are 5-second builds, some are 120-seconds.  I have to pay attention and close one project, open the next, and BUILD ALL while watching for it being done. 

 

To avoid wasting time, I made an auto-builder.  It constructs a list of the LVPROJ files, in the build order and then consults the DEPENDENCIES of each target, to decode whether to build or skip this set of Build Specs.  Basically, if LatestModDate(AllSourceFiles) > ModDate(Target) then Build, else Skip.

 

The idea is to run one VI, and have it build everything that is necessary, and skip everything that isn't.

 

This all works well on the host (Windows) side.

 

But there are snags on the RT side.  Although I have it working, it is an ugly hack, and I would like to make it more flexible.

 

Issue 1:  For an RT target, the Build Spec includes a LOCAL DEST DIRECTORY, and a TARGET DESTINATION DIRECTORY, with a TARGET FILENAME:

Build Spec.PNG

 

When building, LV concatenates LOCAL+TARGET+FILENAME to obtain the address on the host to store the file (in the above case, that works out to 

MoSAICSource\MoSAIC\RTAC\C\MoSAIC\MoSAIC_Support\MoSAIC Common.lvlibp)

 

That's where on the host disk the file is placed.  

 

In my build process, I need to obtain that path, in order to compare MOD dates, but I don't see a way to obtain the LOCAL DESTINATION portion from code.

BuildItIfNeeded.PNG

I have found no way to obtain the LOCAL DESTINATION DIRECTORY from code.

There are BUILD methods which might yield it, but they are protected, and can't be called from outside the class they're in.

What I'm doing in the above, which works, is to detect whether it's an RT or not, and either assembling the path from the DEST PATH and DEST FILENAME (for a host target), or manufacturing the path by inserting constants (for an RT target).

CreateRTPath.PNG

 

So, the question is, How can I obtain the three pieces I need: LOCAL DEST DIRECTORY, and a TARGET DESTINATION DIRECTORY, with a TARGET FILENAME from the Build Spec?

 

Issue 2:  The BUILDSPEC property node has a property called TYPE STRING, which is advertised as one of "DLL", "Source Distribution", "EXE", "Packed Library", "RT EXE", and a couple of others.  The OPEN BUILD vi apparently creates a different class depending on the type it's given.  

The trouble is, if the target is an RT EXE, the TYPE STRING does NOT come out as "RT EXE", but instead is a UUID (of the 8+4+4+4+12 digits variety).

 

In order to produce an RT EXE constant to give to the OPEN BUILD method, I have to ASSUME that if it's not "Packed Library" or "EXE" (the other kinds that I use), that it's a RT EXE.  That seems fragile.  I suppose I could qualify it as a UUID or not, but is there a guarantee that the UUID means it's an RT EXE?  I find no help info about this.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 3
(2,998 Views)

Anybody have ideas?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 3
(2,182 Views)

A ".lvproj" file is just XML.  Open it as text, pass it to an XML parser, then manually read the "Build Specifications" section out to get the properties and such that you need that aren't accessible from any node directly.

0 Kudos
Message 3 of 3
(2,172 Views)