Jump to content


Photo

SubVIs In Pre/Post Install VIs


  • Please log in to reply
5 replies to this topic

#1 hooovahh

hooovahh
  • Members
  • 65 posts

Posted 20 May 2015 - 08:28 PM

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?


  • 1
"40 dollars!? This better be the best damn beer ever.. [drinks beer] You got lucky. "
"Whoah, someone smells stinky! Oh, its me. "

#2 Ashish

Ashish
  • JKI Team
  • 254 posts
  • Gender:Male

Posted 22 May 2015 - 04:45 PM

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.


  • 0
Ashish Uttarwar
Product Support Engineer and Certified LabVIEW Developer, JKI

#3 hooovahh

hooovahh
  • Members
  • 65 posts

Posted 22 May 2015 - 05:14 PM

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.
  • 0
"40 dollars!? This better be the best damn beer ever.. [drinks beer] You got lucky. "
"Whoah, someone smells stinky! Oh, its me. "

#4 Ashish

Ashish
  • JKI Team
  • 254 posts
  • Gender:Male

Posted 22 May 2015 - 05:39 PM

You can think of adding a dummy subVI in the package that you will replace later.


  • 0
Ashish Uttarwar
Product Support Engineer and Certified LabVIEW Developer, JKI

#5 hooovahh

hooovahh
  • Members
  • 65 posts

Posted 06 July 2015 - 07:24 PM

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?


  • 0
"40 dollars!? This better be the best damn beer ever.. [drinks beer] You got lucky. "
"Whoah, someone smells stinky! Oh, its me. "

#6 Ashish

Ashish
  • JKI Team
  • 254 posts
  • Gender:Male

Posted 08 July 2015 - 03:35 AM

> 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.

  • 0
Ashish Uttarwar
Product Support Engineer and Certified LabVIEW Developer, JKI