From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Build an application installer and include files referenced in the code

I want to make an application installer of my project, and I need to include a picture that I'm using in the code.

This picture is used both in the vision assistant and in a low level color pattern match.

What I need is some way to reference this picture in my code, so that when I create the installer and the project is installed on another computer, this file will always get referenced.

Can someone please tell me how to do this?

Thanks in advance!

0 Kudos
Message 1 of 10
(3,104 Views)

Hi Nando,

 

that image file should be part of your LabVIEW project tree. Then you can include it in the build settings when creating the EXE.

Using the standard settings the file will be located in the "data" subfolder of your EXE folder and you can load it from there!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 10
(3,077 Views)

The thing is that I'm trying to create an installer not just an .EXE.

Should I also add it to the build settings, and if not, where should I add these files?

Thanks in advance!

 

0 Kudos
Message 3 of 10
(3,059 Views)

I added the files in the source files portion of the installer, but I don't know how to locate them in labview, so that the files are always referenced, even if the project is installed in another computer.

0 Kudos
Message 4 of 10
(3,056 Views)

Hi Nando,

 

once you include those images in your EXE build settings they are also included in any setup you create from that EXE…

 

To create an Installation build you have to provide an executable anyway!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 10
(3,054 Views)

I just figured it out, first I need to make the .EXE and then the installer.

0 Kudos
Message 6 of 10
(3,047 Views)

I just have one more question.

If I make reference to these files in the data folder of the .Exe, and I include the .Exe on the installer, will the vi still make reference to these files if the project is installed on another computer?

0 Kudos
Message 7 of 10
(3,040 Views)

Your installer should be putting everything in the data folder you need.  So it should be fine.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 10
(3,032 Views)

The thing that's confusing me is that the path I currently have is not a relative path, and I don't know if the vi in the installer is going to find the files in the data folder if I install the project in another computer.

Please tell me if I have to do something else.

Thanks in advance!

0 Kudos
Message 9 of 10
(3,028 Views)

I do not want to hijack this thread, but what if I wanted to include a "manual" in my installer and install that to the "Program Files" folder. I have tried adding it to the source files with no luck.

 

What am I missing here? It seems like it should be simple.

 

Thanks for your help.

 

Regards,

mcduff

0 Kudos
Message 10 of 10
(3,024 Views)