LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView 2010 Application Builder for EXE Always Included files are not Included

In LabVIEW 2010 F2, When I am using the Application Builder to build an EXE file, I have listed 10 or so files to Be "Always Included". But when I Explore the directory where the EXE was built, those "Always Included" files are not there or in any subdirectory under the EXE file.

 

This frequently makes my EXE file not work properly because important files are missing. I have to spend extra debugging time to find out the the cause of my problem is missing files that the Application Builder should have transferred "Always".

 

Why did the Application Builder, when building an EXE target, not include the files that should be "Always Included"?

 

Why does the Application Builder ignore these files specifications?

0 Kudos
Message 1 of 31
(7,411 Views)

The files are always included in the .exe file.  They aren't going to show up in explorer because that setting doesn't mean copy the files.  What makes you think they should show up in Explorer?

Message 2 of 31
(7,394 Views)

@Ravens Fan wrote:

The files are always included in the .exe file.  They aren't going to show up in explorer because that setting doesn't mean copy the files.  What makes you think they should show up in Explorer?


The only files that should be included in the EXE file are code and other code components that the application calls directly or indirectly. There is no reason to include additional files other than these code components in the exe because such files can not be accessed within the EXE file.

 

In many applications, additional support files, that are not part of the EXE executable, need to be included in the same directory or in a related directory. In my case, some are template VIs for dynamic calls, other VIs and CTL files that those VIs require, some are data and ini files, some are template files needed for the DIAdem calls that are made from the EXE application, and the like. These "Always Include" files are files that are accessed as files by the EXE application and are expected to be located in the same directory as the EXE file or located nearby.

 

The EXE file will not run properly without these files, but these files are never included within the EXE file. Remember, this EXE file is an executable application. It is not a self expanding installation file that may include more than one file, which are expanded into the appropriate directories during the install process. Theis EXE file built by LV's Application Builder does not include any installer code.

 

The Application Builder should take the "ALWAYS INCLUDE" files that I list and include them in the same directory as the EXE file everytime the EXE is rebuilt, but certainly not as part of the EXE file.

 

If these files are included in the EXE file, then how do I access them? How does DIAdem access them?

 

If they are not included in the EXE file, then why did not the Application Builder "Always Include" them when the EXE is built?

 

How to I get the Application Builder to "Always Include" some files that need to be copied into the same directory as the EXE application file everytime the EXE Application file is built? Why doesn't the Application Builder "Always Include" feature accomplish this need?

0 Kudos
Message 3 of 31
(7,389 Views)

The build does include files you select. Post an example project with a small VI and some separate files where this does not happen.

0 Kudos
Message 4 of 31
(7,381 Views)

@Dennis Knutson wrote:

The build does include files you select. Post an example project with a small VI and some separate files where this does not happen.


No, it does not appear that all of the files that I listed in the "Always Include" list are copied during the Build process to the Build directory or any subdirectory under that.

 

The Build Source Files.jpg file shows most of the list of the files that should be "Always Included". Notice the .VI and .ctl files that are listed

 

The Build Directory.jpg file shows the file in the Build directory that were built.

 

The Data Directory.jpg file shows the data directory under the Build directory and may include some of the files listed in the "Always Include", but not all of them.

 

The other subdirectories under the Build directory were created by me and do not include any files that were copied during the Build process.

 

So not ALL of the files that were included in the "Always Include" list were copied into the Build directory area as expected. ALL of the files that are listed as "Always Include" should be copied, if they exist. Those files existed when then were selected for the List and they existed at the time of the Build.

 

I can not include an example project that demonstrates this. I am prevented from doing so by the terms of an NDA. You are going to have to take my word that this event is real and happens the same way every time. This information should be sufficient for someone to investigate why do not ALL of the files listed in the "Always Include" list are copied into the Build directory area regardless of the file type or contents.

0 Kudos
Message 5 of 31
(7,374 Views)

Your NDA will not prevent you from creating a new project that can be shown to reproduce the issue. You've done this before - say something is a bug but not provide a means to confirm or deny it.

 

I've created executables with 2010 (did one just now) and have always gotten all of the external files included in the build folder.

Message 6 of 31
(7,369 Views)

And to reiterate what Raven's Fan said, the VIs and controls will be included in the exe by default unless you change that. How you setup the project is one of the reasons you need to actually post some real code.

Message 7 of 31
(7,364 Views)

@Dennis Knutson wrote:

And to reiterate what Raven's Fan said, the VIs and controls will be included in the exe by default unless you change that. How you setup the project is one of the reasons you need to actually post some real code.


I do not think that the VIs and CTLs listed in the "Always Include" list will be included in the EXE, or if they are, that is incorrect.

 

The EXE was built from one main VI, that calls, either directly or indirectly, many other VIs and CTLs. All of the components that are in the call chain will be included in the EXE by default and do not need to be mentioned in the "Always Include" list.

 

Some of the VIs that are listed in the "Always Include" are not called by the VIs included in the EXE, but are instead loaded via file path references by functions like New VI, or Open VI Reference that load VIs as a source file template. These dynamically loaded VIs must exist as (template) files to be loaded on demand, and because they are not "called" by the EXE, they are not included with the EXE. The functions that load them dynamically can not find them in the EXE file, and instead need a file path reference. There are also some additional VIs and CTLs that are called by the dynamically loaded VIs that must also be included as source files in the same directory to be loaded on demand.

 

These dynamically loaded VIs and their related components need to be copied by the build process to a known location relative to the EXE file so that their file paths are known and can be coded into EXE application, to be dynamically loaded at the appropriate time.

 

In order to have the files that will be dynamically loaded, up to date and in a known location, these file,s that are mentioned in the "Always Include" list, need to be copied during the Build process into a known location relative to the EXE file. This does not appear to be done in LV 2010 F2. In order for the New VI and Open VI Reference functions to operate, these dynamically loaded files need to be copied either manually or automatically as part of the Build process. In order to avoid version errors and other mistakes, it is best if the Build process does this automatically via a process similar to "Always Include".

 

How do I get the source files of VIs and their components, that are dynamically loaded by the application, automatically loaded by the Build process into a known directory somewhere related to the Build directory at Build time? What feature provides this function? Why doesn't "Always Include" provide this function?

0 Kudos
Message 8 of 31
(7,357 Views)

@Dennis Knutson wrote:

And to reiterate what Raven's Fan said, the VIs and controls will be included in the exe by default unless you change that. How you setup the project is one of the reasons you need to actually post some real code.


Why would the Build process copy VIs into the EXE file that are not called by functions associated with the EXE application? That doesn't seem to be useful. Once included in the EXE file, any function that is not called by the routines in the EXE application can not be referenced and would become useless storage.

 

Some applications dynamically load VIs and their associated components on demand, and they require these VI and associated components as independant source files in a known location, not as part of the EXE executable file.

0 Kudos
Message 9 of 31
(7,352 Views)

@Dennis Knutson wrote:

And to reiterate what Raven's Fan said, the VIs and controls will be included in the exe by default unless you change that. How you setup the project is one of the reasons you need to actually post some real code.


If you want real code, you can make it up yourself:

  1. Make up an application that uses New VI or Open VI Reference function to launch a VI dynamically.
  2. Write an VI file to be launched automatically.
  3. That means you need to provide a path to the VI source template file for the New VI or Open VI Reference functions.
  4. That also means that you need to provide the source file of the dynamic VI to be loaded for the application to be loaded on demand.
  5. Now try and build everything so that the EXE and the dynamically loaded VI source file(s) are built and copied to the appropriate directories automatically every time the Build process is executed. It appears that "Always Include" will not be useful to do this.

No too hard. Give it a shot. Based upon the terms of the NDA I can not provide any code to any 3rd part during the duration of the Project. Sorry.

 

 

0 Kudos
Message 10 of 31
(7,347 Views)