LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
Top Authors
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Larry.C

EXE build spec's dependent files locations should be included in Installer build spec

This is a real pain for me and I think this should not be considered expected behaviour of LabVIEW. But since I have been told it is I am posting this as an idea for the Idea Exchange. Let me explain:

 

Imagine you build an application which makes use of a large number of files (images, text files, etc) and you would like to include these in the build specification of your application. Imagine you want the files to go to various different custom locations on the computer (some in documents, some in a folder on your desktop, some in another location... the list goes on). I have such an application and it includes about 25 different folder locations I had to insert manually as destinations for the files. This is fine, I expect to do such a thing and it was simple enough (although time consuming).

 

Now comes the pain:

 

I now want to build an installer which uses this EXE build spec. If I use the EXE build spec in my installer build spec the result is to place all of these dependent files in the same folder as the installed executable, not the locations I defined in the EXE build! This means I have had to go back and create a new EXE build spec which contains no dependent files (so that it compiles without placing files everywhere) and then back to the installer to use that EXE build and then define all the location yet again! This has been super time consuming.

 

Upon discussion this is apparently expected behaviour as installer build specs are seperate to the exe build specs....... except am I not right in thinking the installer build spec relies on you having an EXE build spec???

 

So currently the situation is this: I have to have to have an EXE build spec containing the custom destinations which I can build and use to test my application. I then also have to have an EXE build containing no custom locations which when built is useless since it is missing dependent files, but purely there to then create the installer build specification which I have to define all custom locations in again.

 

My proposal is simple: When you create an installer that uses an EXE build spec with custom locations for files it should replicate those locations in the instaler. Simples!

 

Note: If this was super confusing download the attached project and see for yourself. (LabVIEW 2013)


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

3 Comments
PNR
Member
Member

This is not just expected behavior in LabVIEW, but with any IDE. I think you confuse the intention of the application vs. installer build script.

 

As you already know, the installer build script requires an application build script not to install the application, but to acquire the list of files that are necessary to execute the application on any system. So your application build script should generate the executable and specify all files necessary to execute it. Notice that the application should be able to start, not necessarily be properly setup at this point.

Later when you build the installer, it will copy these files. The additional files should be defined in the installer build script too, such that after an installation the system is properly setup.

Your dev system is a different story, as you would manually setup your environment to work with the executable without using the installer (at least that is how I commonly work to avoid building the installer to often).

Bob_Preis
NI Employee (retired)

Hi Larry,

 

I can understand the frustration. Installer Builder is doing something seemingly unexpected by moving some of the files generated by the EXE build next to your executable when added to an installer. This is by design because the installer is only told where the EXE build is going. Anything relative to the EXE's main build path is guaranteed to exist on the target installed system, however, anything above that folder may not exist (consider the case where C:\ is your EXE build's target destination folder). And since your dev system may not reflect your target install system, there's no way to ensure the existence of folders above the EXE's main build path until it's time to install, even if they were properly built by the EXE build spec. Therefore, we move these non-relative files next to the executable in the EXE build's main build path.

 

Though all of the build spec types allow for custom destinations which are not relative to the main build path, you'll notice that by default custom destinations start off as relative until the path is manually changed. Ideally, the EXE build should only be producing files that are needed by the .exe file to load and run. If there are files needed by the .exe which cannot reside in the .exe, next to the .exe, or relative to the .exe's parent folder, then those files will have to be added to the installer build spec and care must be taken to ensure that those destination folder resolve correctly across various bitnesses and versions of Windows.

Darren
Proven Zealot
Status changed to: Declined