Jump to content

SubVIs In Pre/Post Install VIs


Recommended Posts

What is the best way to handle having a Pre and Post Install VI call, that has dependencies on other VIs that either might not be installed yet, or other subVIs that aren't part of a reuse library?

 

For instance I have a Pre-Install VI and it uses some OpenG functions. The problem is I suspect it is possible that the user hasn't installed the OpenG functions yet. It might be a dependency of this package being installed, but I assume it can't be guaranteed what the order of install is, but maybe I'm mistaken and this isn't a problem.

 

But the second issue I have is my Pre-Install VI has a few subVIs, that aren't a part of the project. When building the package I don't think these subVIs are included, and when the package is being installed the Pre-Install VI is called and I see the searching dialog trying to find the subVIs in a temp folder which is where I assume the Pre Install VI was extracted to and ran.

 

Should subVIs in general be avoided in Pre and Post install VIs? Should they work as expected but for some reason mine crapped out for an unrelated issue?

Link to comment
Share on other sites

If you add other packages as dependencies, then you will get all the necessary subVI components installed.

Also, the order of installation should not matter since VIPM performs mass comipile after package installation.

Link to comment
Share on other sites

Yeah I tested it and you are right that the dependencies are installed before the preeinstall VI is ran. But what type of solution is there for including a sub VI that isn't in a package? For now I inclined the VI but it is a bit of a pain updating it.

Link to comment
Share on other sites

  • 1 month later...

Okay I think I got a new one that's related. I had an error today on an uninstall of a package. I suspect this is because I have a Post-Uninstall VI that gets ran after a package is uninstalled. But it has a dependency on a subVI that is in another package.

 

I didn't investigate it too far, but what I suspect is happening is I have a dependency that says package A depends on package B. Then in my Post-Uninstall VI in package A, I call code that gets installed with Package B. During an uninstall, does the order of an uninstall occur so that package A will be uninstalled before package B?

Link to comment
Share on other sites

> I have a dependency that says package A depends on package B.

> does the order of an uninstall occur so that package A will be uninstalled before package B


Yes, I believe that this is the intended/designed behavior.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.