LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having a problem with the "small target file" option in the application builder

I have an application that I am building. I have selected the option to have a small target file with most of the other VIs going into a seperate library (which I have named app.llb). The build works file and everything gets put where expected. The problem is with the installer. If I have LV build an installer the installer puts app.llb in the wrong place. It always shows up inside a directory, also called app.llb.
 
Is there a way to make the installer put the library in the same place that the application builder puts it?
 
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 1 of 4
(2,762 Views)

Hello,

 

Unfortunately it’s not going to be easy to get this behavior out of the Application Builder.  The reason is that when building an application you are specifying the directories explicitly so the LabVIEW compiler knows the exact directory of your llb file.  When you create an installer, the paths of the install are not known – i.e. the installer’s directory structure is different from yours, and they may choose to change the location of the install.  For this reason, LabVIEW uses relative paths for the support llb file where everything is relative to the directory of the application’s install.  The Application Builder looks at the directory you specify for both the application and the support library to construct the relative path to your library.  Specifying the exact location of the llb file (such as “I want it to be placed on the desktop”) is not going to be possible from these relative paths.

 

One possible workaround is to build a llb of all your sub VIs, and call them from your main VI through VI server.  You can hard code the path of the sub-VI llb in some ini file and read that information from the main VI.  The details of this are obviously a little sketchy here – but needless to say it won’t be easy!

 

I apologize that this is either not possible, or is going to involve some more complicated programming.  If you have any additional questions please don’t hesitate to let me know!

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 2 of 4
(2,741 Views)

Given what you said, I guess the only real question is how long is it going to be before NI fixes this bug. In all that you said there is nothing that would indicate why you can't simply tell the installer to put the support llb in the same directory as the exe--which is all that I want to do but apparently can't. You could even reuse the code from V6, which could do it...

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 4
(2,727 Views)

Hello,

My apologies -- I think I may have misread your post.  The behavior you describe has been fixed in LabVIEW 8.  The problem results when you change the name of the llb in the "LLB for other files" box in the "target" tab of the app builder.  If you keep this as the default it should work.  Another workaround is to add another layer to the LLB for other files path so that it is \llbname.llb\llbname.llb, however before you add the additional layer you have to view the .llb destination settings. Follow the following steps for this workaround:
a) Change the llbname.llb to whatever you want
b) Under the Installer Tab select File.
c) Select the .llb and notice that in the Installation Destination Subdirectory that a subdirectory with the same name has been added.
d) Return to the Target Tab and then add llbname.llb to the LLB for other files path

If you do not view the destination settings before you add the additional layer it will not work.

To test with the first workaround (i.e. not changing the name) I followed the steps below:

First I opened the application builder, and choose to build an exe.  In the target settings I changed the "destination directory" to be some folder on my desktop.  The "support file directory" defaulted to the same directory with /data at the end.  I then selected the small target option and left the destination alone (it defaulted to the same directory as the destination directory).  Next I added the top-level VI in the "Source Files" tab, left the other tabs alone and chose to "create installer".  I left the defaults alone, clicked the "Files" button and verified that both the "Source File Path" directories for the application and its llb were in the same directory.  The exe, llb files were built, and the installer (and its auxiliary files also created).  When I ran the installer and chose to install in the program files directory both the exe and the llb were in the same folder (C:\program files\Application"). 

I apologize for the confusion!  Thanks for posting and have a great afternoon.

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 4 of 4
(2,713 Views)