Jump to content
hooovahh

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?

  • Upvote 1

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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