Jump to content
jgcode

OGPB - Support for Default Data Symbolic Path?

Recommended Posts

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:

  1. Does OGPB support the <osdatadir> symbolic path?
  2. Is there a better way to do this?

Cheers

JG

Edited by jgcode

Share this post


Link to post
Share on other sites

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 by Daklu

Share this post


Link to post
Share on other sites

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 by jgcode

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. wink.gif It's really simple and once you set it up (taking all of 2 minutes) it's transparent during package install and uninstall.

post-7603-124986394148_thumb.png

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.

Share this post


Link to post
Share on other sites

Annoying? I'll bet you've spent more time typing up the response than it would take to implement it. wink.gif It's really simple and once you set it up (taking all of 2 minutes) it's transparent during package install and uninstall.

post-7603-124986394148_thumb.png

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 :frusty:

By the way - its seems you have posted some interesting Ideas on LVOOP - good job :thumbup1:

PJM just made a cool post editing the Icon Editor! Maybe I could give that a go!

Edited by jgcode

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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