From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to include external files when building installer for a standalone executable?

Solved!
Go to solution

Hi,

 

I was trying to build a stand alone executable from my Labview project and I was able to do it successfully.  Now I would like to include a few external .txt files in the installer. Those .txt files have parameters/constants that will be used by the program, and my program needs to load/read them when running.  For now I have to manually copy/paste them into the target machine, but I really hope the installer can do it automatically.  I see there is a "data" folder in the installer, and that's where I hope those .txt files can be added into.

 

How can I do it? Can anyone give me some suggestions? Thanks!

 

Rgds

 

Harry

0 Kudos
Message 1 of 14
(7,972 Views)

Hi Harry,

 

In the Source Files catagory of the App Builder Properties you should add the text files to the Always Included section. You can simply include the folder if the files are all in the same location. When you build the application the files will be in the Data folder, and also when you create the Installer.

 

David.

David C
Message 2 of 14
(7,970 Views)

Please note that in order to follow Davids recommendations, the txt-files have to be "managed" by the LV project. I think that you miss that part.

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 14
(7,958 Views)

Yes, the files are included in Project Explorer. Thanks for spotting the omission Norbert.

David C
Message 4 of 14
(7,951 Views)

Hello David,

 

Thanks for your reply. I tried to find where I can "add" file to my project but did not get any luck. Intuitively I thought under "Project -> Add to project" should be where I include external files. However it only allows me to add something that LV handles, like VIs or new projects. Am I looking the wrong place? Can you point out for me how I can get the .txt files been managed by LV project? Thanks a lot!

 

Rgds,

 

Harry 

0 Kudos
Message 5 of 14
(7,942 Views)

Norbert,

 

Thanks for your reply. I tried to what you and David suggested but I cannot find where to add those .txt files so they can be managed by LV project. Can you advise me a bit more in detail how to do it? Thanks!

 

Rgds,

 

Harry 

0 Kudos
Message 6 of 14
(7,940 Views)

Harry,

 

simply select "Add File" in the project (right click menu in your target). Browse to the textfile. I suggest you to create virtual folders in your project in order to have a clean organization of source -, configuration - and  documentation files.

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 7 of 14
(7,937 Views)

Norbert,

 

I could not find "Add file" when right clicking the project. See attached image please. Under "Project" I do have a "Add to project" but there is no option for external files. I did not find "Source" location either.

 

What did i do wrong? Is there any version requirement here? I have a 2010 base version. Thanks for your help.

 

Rgds,

 

Harry

 

1.JPG

 

 

2.JPG

0 Kudos
Message 8 of 14
(7,933 Views)
Solution
Accepted by topic author Harry.W

Right click on the target within the project. In your case, this would be "My Computer".

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 9 of 14
(7,930 Views)

Norbert,

 

I got it. Thanks a lot!

 

Only one thing I noticed is that those files will be put together with the Source file, instead of in the "data" sub folder. Seems only the files under "Dependancies" will be added to the "data" folder, and dependency is automatically done by LV. The reason I notice this is because I also need to include a few .dll files (my project call some Fortran dll which requires use of a few external dll since the target machine does not have Fortran complier installed), and those files need to be in the "data" folder... Would you have any idea how to put files under "Dependencies" in project tree?

 

Rgds,

 

Harry

Message 10 of 14
(7,927 Views)