NATE Posted August 1, 2010 Report Share Posted August 1, 2010 (edited) How do I programmatically determine ALL dependencies of a VI? It's easy to call the Find Dependencies method, but this only returns paths to VIs and controls. I want to find all types of dependencies so that I can copy all dependencies to a new location. Essentially I want a miniature version of OpenG Builder. It's easy to get the library path of each returned VI, but what about other types of files like .rtms, .dlls, etc... Even for libraries, the rules are different based on library type. If the library is a .lvlib, then the lvlib is the only additional dependency. If the library is a .lvclass, then all of the members of that library are also dependencies because the class is not usable unless all member VIs are found. I'm afraid there may be so many exceptions and things I haven't considered that I don't think I can reliably create this functionality from scratch and have it work with all possibilities of dependencies. I'm not using OpenG Builder or Application Builder to do this because the list of VIs I want to run this on can't be known until run time. I'm not sure if OGB or AB can be automated in this way. Any help or guidance on this would be appreciated. I'm using LV2009 SP1 and Win XP. Thanks, Nate Edited August 1, 2010 by NATE Link to comment
NATE Posted August 4, 2010 Author Report Share Posted August 4, 2010 I found the App::Linker.Read Info From File method. I don't understand everything that it returns, but I think all I need are the file paths so it seems to be working great. Link to comment
jzoller Posted August 6, 2010 Report Share Posted August 6, 2010 I found the App::Linker.Read Info From File method. I don't understand everything that it returns, but I think all I need are the file paths so it seems to be working great. Just a note: read the help on the Linker.Read Info From File if your project includes LVOOP. Joe Z. Link to comment
NATE Posted August 13, 2010 Author Report Share Posted August 13, 2010 Just a note: read the help on the Linker.Read Info From File if your project includes LVOOP. Joe Z. My app does use LabVOOP, but I'm using this method to systematically go through ever VI in my application, which includes all of my dynamic dispath VIs. But I think I'm having a problem finding all of the dynamic dispatch dependencies within vi.lib. It makes sense to me that this would be unknowable until runtime, and since parent classes don't know what children classes exist, there's no way for me to truly know what ALL of the dependencies of my application are by static analysis, I'd have to do run-time analysis, which is not convenient for an automated build tool. Thanks for the heads up. I thought I was safe but I guess it bit me afterall. Nate Link to comment
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now