jgcode Posted August 8, 2009 Report Share Posted August 8, 2009 (edited) As far as I know (and please correct me if I am wrong - I just remember someone else posting it) the OpenG forums are quite inactive so I thought I would post here Hi! I currently host my icons templates in the palette, this way I can quickly drag and drop them onto the FP then into the icon. This was a pretty fast way to do it for me. Now with 2009 I want to create a package that can install these to <osdatadir>\Icon Templates\[my folder structure etc...] However, it seems that OGPB does not support this symbolic path? So my question are: Does OGPB support the <osdatadir> symbolic path? Is there a better way to do this? Cheers JG Edited August 8, 2009 by jgcode Quote Link to comment
Daklu Posted August 8, 2009 Report Share Posted August 8, 2009 (edited) Great idea! I don't have any tested solutions to the problem--here are a couple ideas for workarounds: Typing the symbolic path directly into the Group Target Directory path box rather than using the drop down box. (I doubt this will work but it's the first thing I would try.) I believe the default <temp> directory in Vista is a subdirectory of <osdatadir>. Entering a relative path from there might work as long as your users use Vista and don't change the defaults. Have the package deploy them to <temp>\Icon Templates\[my folder structure etc...] and write a post install script that moves them to <osdatadir>\Icon Templates\[my folder structure etc...]. You'd also need a preuninstall script to move them back. This should be pretty straight forward. Since the package installation is handled by VIPM it might be possible to edit the package spec file manually to install the files to <osdatadir>. Edited August 8, 2009 by Daklu Quote Link to comment
jgcode Posted August 8, 2009 Author Report Share Posted August 8, 2009 (edited) Great idea! I don't have any tested solutions to the problem--here are a couple ideas for workarounds: Typing the symbolic path directly into the Group Target Directory path box rather than using the drop down box. (I doubt this will work but it's the first thing I would try.) I believe the default <temp> directory in Vista is a subdirectory of <osdatadir>. Entering a relative path from there might work as long as your users use Vista and don't change the defaults. Have the package deploy them to <temp>\Icon Templates\[my folder structure etc...] and write a post install script that moves them to <osdatadir>\Icon Templates\[my folder structure etc...]. You'd also need a preuninstall script to move them back. This should be pretty straight forward. Since the package installation is handled by VIPM it might be possible to edit the package spec file manually to install the files to <osdatadir>. Thanks for posting. I tried editting the SPEC file but that failed. Typing in the symbolic path fails - it must do a check - it just changed it automatically to something else. I have not looked at the post install scripts (I actually didn't know they are there - only the post package build scripts - e.g. hooks build into VIPM). I can easily get the default directory from a LabVIEW primitive. But it will be annoying as I would prefer VIPM to handle the installing/uninstalling of files. <edit> Just tried the following: The <temp> is not always a subset of default data in VISTA. E.g. my <temp> is C:\Users\ME\AppData\Local\Temp by my <osdatadir> is D:\ME\Documents\LabVIEW Data. This is because I changed mine so that my data is not tied up in the OS volume. Bugger! </edit> Edited August 8, 2009 by jgcode Quote Link to comment
Ton Plomp Posted August 8, 2009 Report Share Posted August 8, 2009 Currently OpenG Package Builder only supports the <temp> folder outside the LabVIEW folder. And it is the Temp folder as specified by LabVIEW. The OSData dir is not supported nor is the LabVIEW Data dir. Adding such a feature would also mean VIPM needs to suppport it, and for such a thing you should deal with JKI et al. Ton 1 Quote Link to comment
jgcode Posted August 9, 2009 Author Report Share Posted August 9, 2009 Currently OpenG Package Builder only supports the <temp> folder outside the LabVIEW folder. And it is the Temp folder as specified by LabVIEW. The OSData dir is not supported nor is the LabVIEW Data dir. Adding such a feature would also mean VIPM needs to suppport it, and for such a thing you should deal with JKI et al. Ton Thanks for the info Ton, I have inquired at JKI. Quote Link to comment
Daklu Posted August 10, 2009 Report Share Posted August 10, 2009 I have not looked at the post install scripts (I actually didn't know they are there - only the post package build scripts - e.g. hooks build into VIPM). I can easily get the default directory from a LabVIEW primitive. But it will be annoying as I would prefer VIPM to handle the installing/uninstalling of files. Annoying? I'll bet you've spent more time typing up the response than it would take to implement it. It's really simple and once you set it up (taking all of 2 minutes) it's transparent during package install and uninstall. Save this vi as MoveToOsdatadir.vi to the same place as your .ogpb file. Swap the constants and save another vi as MoveFromOsdatadir.vi. On the OpenG Package Builder 'Script VIs' tab, type 'MoveToOsdatadir.vi' in the PostInstall VI path dialog box and 'MoveFromOsdatadir.vi' in the PreUninstall VI path dialog box. Done. Build the package and install it. Quote Link to comment
jgcode Posted August 10, 2009 Author Report Share Posted August 10, 2009 (edited) Annoying? I'll bet you've spent more time typing up the response than it would take to implement it. It's really simple and once you set it up (taking all of 2 minutes) it's transparent during package install and uninstall. Save this vi as MoveToOsdatadir.vi to the same place as your .ogpb file. Swap the constants and save another vi as MoveFromOsdatadir.vi. On the OpenG Package Builder 'Script VIs' tab, type 'MoveToOsdatadir.vi' in the PostInstall VI path dialog box and 'MoveFromOsdatadir.vi' in the PreUninstall VI path dialog box. Done. Build the package and install it. I must clarify annoying - one of the features I like about VIPM is its ability to install and uninstall packages, upgrade versions etc.. All this is quite transparent to the developer. If I have to manually handle this, then yes, I see it as annoying. As for quickly solving my problem, I cut and pasted the icons in the directory before I started the topic I just want a clean way to do it Anyways thank you very much for replying and the snippet. I am trying to post to Ideas Exchange about the public folders. But it is coming up with Post Flooding - wait 900 seconds By the way - its seems you have posted some interesting Ideas on LVOOP - good job PJM just made a cool post editing the Icon Editor! Maybe I could give that a go! Edited August 10, 2009 by jgcode Quote Link to comment
jgcode Posted August 10, 2009 Author Report Share Posted August 10, 2009 Added request to Ideas Exchange Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.