kevin.j.r.ross Posted November 17, 2018 Report Share Posted November 17, 2018 Hi, Please help... I am trying to create a .vip that will install my LabVIEW project as a LabVIEW project template (note: I have done this process a few time before with no issues) I have my project that I want to make into a template, everything works perfectly. I configure the .vipb, I build and install the .vip. I check the destination to see if my files have installed to the correct location, they have. Here's where the problem kicks in...... I open my LabVIEW project that has installed in the destination, and notice that the .png files in my project some are missing and some are saying missing. In my project I have .png files in various .lvlibs. The first .lvlib in the project has the .png's showing, however showing as missing and the expected location is saying C:\ which is incorrect, it should be in the location where my .lvlib is in the destination. The other .lvlib's don't even show the .pngs in the LabVIEW project explorer. Now checking on disk all the png's are there and in the correct location. In summary it looks as if as part of the vip install it is removing the link the .lvproj has to my .png files VI Package Manager Version : 2018.0.0f1 Jul 21 2018 LabVIEW Version : 2016 (32 bit) OS : Windows 10 Pro Version 1803 Any help is greatly appreciated Thanks in advance. Kev Link to comment Share on other sites More sharing options...
Jim Kring Posted November 17, 2018 Report Share Posted November 17, 2018 Hi Kev. Can you zip up a simple project that demonstrates the problem. This will make it easier for our team to reproduce and possibly fix this issue. Note that this might not be an easy fix. And, it's also worth noting that VIPM should be able to build packages that include PNG files. Is there a reason why they have to be part of the LVLIB (considering that these are not LabVIEW file types)? Link to comment Share on other sites More sharing options...
kevin.j.r.ross Posted November 17, 2018 Author Report Share Posted November 17, 2018 Hi Jim, Thanks for your email. Let me see what I can do, the current code is private so I don't think I can share but let me see if I can create a simple project. The .PNG files are not the only files in the lvlib, there is also .vi and .ctls in the .lvlib also Do you have an email address or skype that I would be able to share any code with you. Thanks Kevin Link to comment Share on other sites More sharing options...
Sam Taggart Posted November 18, 2018 Report Share Posted November 18, 2018 Jim, Here is a simple example. Note it appears that also text files (and perhaps any non-LV files) are affected. The .vipb file is from 2017. Sam Simple Example.zip Link to comment Share on other sites More sharing options...
kevin.j.r.ross Posted November 19, 2018 Author Report Share Posted November 19, 2018 Hi Thanks for uploading this, this replicates my problem in a simple way. Jim hopefully this should help debug the problem further. Let me know if you need anything else from me. Kev Link to comment Share on other sites More sharing options...
Jim Kring Posted November 27, 2018 Report Share Posted November 27, 2018 Hi Sam, Thanks for posting this example. I'll pass it along to our team to reproduce and review. As always, we can't commit to a fix timeline, but we'll certainly look into it. Link to comment Share on other sites More sharing options...
kevin.j.r.ross Posted November 27, 2018 Author Report Share Posted November 27, 2018 Jim, Thank you so much for your reply. I look forward to hearing from you in the near future, hopefully with a solution. Many thanks Kevin Link to comment Share on other sites More sharing options...
Jim Kring Posted November 28, 2018 Report Share Posted November 28, 2018 Hi @kevin.j.r.ross, @Sam Taggart, We can reproduce the issue and it's a bit tricky, due to limitations in the scripting APIs associated with project libraries and the fact that these project items are not LabVIEW file types. There's no scripting API function to move a project item on disk that is a non-labview file type (and the build process used by VIPM loads the lvlibs and VIs into memory and moves them on disk, causing the links to those lvlib/project items to change). The work-around to this would be to do a lot of fancy, custom relinking on disk, which involves parsing and modifying the raw XML files for the lvlibs. This could work for unlocked lvlibs, but won't work for a password-protected lvlib. Now, it's possible to do these changes in memory, but I think it would involve removing items from the lvlib and then re-adding them to the lvlib after they are moved on disk. I looked to see if anyone has solved this problem and there's a discussion on LAVA about it -- I checked out these resources (GOOP Developer and Darren's Hidden Gems) and these don't deal with non-labview file types, from what I can tell. Now, you could work-around this LabVIEW limitation with a post-build custom action (requires VIPM Pro) that temporarily unpacks (unzips) the package, modifies the lvlib's (and lvproj's) xml files to link to the correct paths, and then re-packs (zips) the package. I've created a sample project that shows this technique and it works for the Simple Example that Sam posted earlier. Here is that work-around in action: >>> Simple Example - Post Build Fix.zip <<< Some notes about this example work-around: Requires VIPM Pro Uses OpenG Zip Tools to unpack/repack (I've included a VIPC file you can apply to quickly install this) Has a very brittle XML parser/fixer (you can see the code, below) -- you'll want to put some of your own love into this (e.g. depending on the actual relative paths to the items inside the lvlib) 🙂 Hope that offers some possibilities for you... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.