LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Installers and Application Distribution

I am making an application which needs to work on another computer. This computer will not, at first, have the LabVIEW runtime environment. To solve this (my application wouldn't run, of course), I tried to make an installer. After using the installer, the VI's front panel shows up and some things seems to work, but not everything does. I haven't done thorough testing on it yet, but I know that the sound effects don't work.

The application consists of a main VI which uses an Open VI Reference node, through a file path, to load sub VI's into subpanels. LabVIEW seems to be good at finding VI's that aren't where their file paths say that they should be, so I suppose that the ability of the application to load its subpanels is likely not thanks to any proper action on my part. I'd like to correct that.

Sound effects, which use "Play Sound File.vi" via a file path, don't work at all. That's also bad.

The application will need to read to and write from a settings file; I haven't tested this, but I'd hazard to guess that such will have problems similar to the sound effects.

I read the installer help files, and that introduced new problems. Not only do I still not know how to account for varying file structure on the target computer (e.g. E:\Program Files\Installerstuff rather than C:\Program Files\Installerstuff), but now I'm not sure that I should be using an installer at all, because I might have problems with any existing LabVIEW runtime environment getting overwritten, such as if the user uses more than one of my applications (which is likely).

Finally, it would appear that the "Panel Close" event does not fire when an application closes out, which is a problem since I was using it.

So... help, please. Will using an application instead of an installer fix my sound file link problems (I got the notion from a forum search that it might)? How do I reliably create and then locate a settings file? Can I distribute the runtime environment by copying its installer from my LabVIEW DVD and thus avoid problems with multiple created installers? Will it be necessary and functional to change "Panel Close" into "Panel Close? --> (Discard) --> (some action) --> (programmatic command to close)"?
0 Kudos
Message 1 of 10
(3,661 Views)
Bump. (Things don't seem to get replied to after they fall off the first two pages.)
0 Kudos
Message 2 of 10
(3,627 Views)
Hmmm, short edit window. >_>

Anyway, I'm still beating my head against this. Here's what I've come up with so far for saving and locating a settings file. Note that this loop is a sub VI that's running in a sub VI that's running in an application (.exe). Given that, am I on the right track?

Edit: Visible pictures for my Read and Write cases.




Message Edited by DJDDA on 12-04-2007 09:28 AM
Download All
0 Kudos
Message 3 of 10
(3,620 Views)

Create an indicator for the path that you are not sure of....

When you finish, just delete it

0 Kudos
Message 4 of 10
(3,611 Views)
Did you include the vi you are referencing into the installation file?
0 Kudos
Message 5 of 10
(3,605 Views)
"Did you include the vi you are referencing into the installation file?"

Yes.

The VI's visually work in the installer-based build, but their sounds do not, and I'm still especially worried about my Panel Close condition.

Edit: Pnt, I can do (and am doing) that, but the turnaround time on my testing is horrible that way, since I need to compile sufficiently many applications to try to figure out what the general rule is. That's why I'm hoping that someone here knows how applications actually work.

Message Edited by DJDDA on 12-04-2007 12:11 PM
0 Kudos
Message 6 of 10
(3,595 Views)

I assume you are talking about the sound files. Are they included in your installation build? If you do, they generally are placed in the data directory under the directory the executable actually is.

This may be a dumb question, did you check for the sound files after an installation?

0 Kudos
Message 7 of 10
(3,585 Views)
I checked for them; they're in the data directory for the .exe. I figured they weren't playing because the data directory file path for the .exe is so very different than the file path that's wired in the block diagram; however, the sub VI file path is also way wrong, and those (visually) run fine.

My interpretation was "Oh, VI's must get searched for but sounds must need to be located correctly by the code." It is possible, of course, that I merely did something else wrong.

Edit: Mostly, though, I'm worried about my Panel Close event, and I'd like to know what the people here think of that situation.

Also, new question: Do I need to include my Type Definitions in my build, or do their appearances in my VI's carry them in? I'm new to Type Defs.

Message Edited by DJDDA on 12-04-2007 12:41 PM
0 Kudos
Message 8 of 10
(3,581 Views)

This is one of the problems when you work with data directory. The development version maps it to a different location than the actual one you want during the intallation.

I have multiple directories where I store my VI. To make sure it operates roughly the same way, find the location where you build the the data path. If it is in a library, you may need to strip the library name out. If it is an individual file VI in the directory, you can create your data directory in that location. When you run the VI, it should now properly find the direcory. When you install the program, it should now operate properly.

An alternative is to use the data directory and set it in the intialization file and use that to store the sound files, You will need to alter the development data directory and the installation data directory via the initialization file.

0 Kudos
Message 9 of 10
(3,574 Views)
Okay, things seem to be working better for me on file paths now.

Also: It appears that I may very well need to include Type Defs in the .exe build. I'm not sure yet, but it so far appears that the VI's cannot run without the Type Defs present, so maybe the applications work that way?
0 Kudos
Message 10 of 10
(3,561 Views)