SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #181  
Old 04-28-2009, 01:41 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
I love this tool and I am so glad I found it

You mention needing to include the jar with the import is that just the

gkunsick.sagetv.jar?

many thanks for this great add in to studio.
Reply With Quote
  #182  
Old 04-28-2009, 03:19 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by PLUCKYHD View Post
You mention needing to include the jar with the import is that just the gkusnick.sagetv.jar?
Correct.
__________________
-- Greg
Reply With Quote
  #183  
Old 04-30-2009, 04:04 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by GKusnick View Post
Correct.
Okay got a problem i am including the .jar with my import but if I import on a computer without your tools installed the external reference get lost

When I import on a computer with your tools it imports in fine?
Reply With Quote
  #184  
Old 04-30-2009, 06:29 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
How exactly are you including the JAR? Simply putting it in the same zip file is not sufficient. You must take steps to ensure that when the user unzips it, the JAR lands in the JARs folder where it belongs; otherwise Sage won't be able to find it.
__________________
-- Greg
Reply With Quote
  #185  
Old 04-30-2009, 06:38 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by GKusnick View Post
How exactly are you including the JAR? Simply putting it in the same zip file is not sufficient. You must take steps to ensure that when the user unzips it, the JAR lands in the JARs folder where it belongs; otherwise Sage won't be able to find it.
Yes that is what I am doing including it in the jars it is in the right location in the zip and when I extract

If I download your import and extract the entire thing it works when mine imports.
Reply With Quote
  #186  
Old 04-30-2009, 06:38 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
One potential issue... if the the jar is simply included in your plugin, then your users will have to shutdown sagetv, extract your plugin, then start sagetv, and import your plugin. If a user simply extracts your plugin with the jar file and then immediately tries to import it without restarting sage first, then sage will not see/use the newly added jar file.

So, a rule of thumb if you are including external dependencies... Have you users shutdown sage before they extract your plugin. This will need to be done on updates as well, since sage (windows only) won't be able to overwrite an existing jar file, if it's in use.

I only point out the restart, since with a stv that doesn not have any jar dependencies, it can be imported without having to restart sage, so this aspect of plugin development may be new to you.
Reply With Quote
  #187  
Old 04-30-2009, 06:43 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by PLUCKYHD View Post
If I download your import and extract the entire thing it works when mine imports.
The only things in there besides the JAR are source and javadocs, and it seems fairly unlikely that your code has a dependency on those (unless you're doing something really weird).

Are you sure you're including the current version of the JAR in your package?
__________________
-- Greg
Reply With Quote
  #188  
Old 04-30-2009, 07:12 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by GKusnick View Post
The only things in there besides the JAR are source and javadocs, and it seems fairly unlikely that your code has a dependency on those (unless you're doing something really weird).

Are you sure you're including the current version of the JAR in your package?
Shoot me a pm if you don't mind with your email and I will send you the zip if u don't mind and make sure I am doing it right
Reply With Quote
  #189  
Old 05-06-2009, 06:46 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Greg,

Could you explain to me what all these backref it keeps throwing in are?
Reply With Quote
  #190  
Old 05-06-2009, 11:17 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Backrefs are references from outside your code to widgets within your code. So for instance if you insert a reference to your code into an existing menu, that will generate a backref at export time. They should be fixed up automatically at import time. If that's not happening, then either you did the export incorrectly (i.e. you didn't export all of your new code), or you imported it into a different version of the base STV that doesn't have a corresponding place to insert the reference.

If you do the import using the Import STVI command on the STVI menu in Studio, it should flag any errors of this sort.
__________________
-- Greg
Reply With Quote
  #191  
Old 05-06-2009, 12:14 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by GKusnick View Post
Backrefs are references from outside your code to widgets within your code. So for instance if you insert a reference to your code into an existing menu, that will generate a backref at export time. They should be fixed up automatically at import time. If that's not happening, then either you did the export incorrectly (i.e. you didn't export all of your new code), or you imported it into a different version of the base STV that doesn't have a corresponding place to insert the reference.

If you do the import using the Import STVI command on the STVI menu in Studio, it should flag any errors of this sort.
I figured it out it was because I was deleting items and they would get moved outside the menu and backref would be placed was really screwing with me
Reply With Quote
  #192  
Old 06-02-2009, 07:59 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Greg how exactly do I right in a reference for an import that may not be existant during importing my import to make sure it will relink to that reference when that import is imported. I thought this was automatic but I guess I am wrong
Reply With Quote
  #193  
Old 06-03-2009, 02:33 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
If your STVI refers to widgets in another STVI, or inserts references to itself under widgets from another STVI, that other STVI must be imported first so the references have something to link up to. There's no provision for leaving some references unresolved and then magically linking them up later if STVIs are imported out of order.
__________________
-- Greg
Reply With Quote
  #194  
Old 06-03-2009, 07:46 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by GKusnick View Post
If your STVI refers to widgets in another STVI, or inserts references to itself under widgets from another STVI, that other STVI must be imported first so the references have something to link up to. There's no provision for leaving some references unresolved and then magically linking them up later if STVIs are imported out of order.
okay thanks I thought there was and I was missing something
Reply With Quote
  #195  
Old 06-04-2009, 08:12 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Greg wanting to make sure I am understanding correctly

If I want to add something to a menu in the default STV the best way using your tools is to create my own menu item(with a name different) and link it to the original stv and make my menu item have the primary reference. Is this correct?
Reply With Quote
  #196  
Old 06-05-2009, 01:34 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
You should create a dummy menu (not just an item) and put all your new code (including menu items) under that new menu. If you want your new items to appear on existing menus, place secondary references to them under the existing menus, but keep the primary refs under your dummy menu.

The widget names shouldn't matter since it will use the widget's unique symbol to do the linking.
__________________
-- Greg
Reply With Quote
  #197  
Old 06-09-2009, 06:37 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Hey, GKusnick:

Any chance you can regenerate the API based on 6.5.17? More specifically, I'm really looking for the new SystemMessageAPI to get included so I can mod my Twitter plugin to actually tweet about some rather useful information. If you can't do it in the next few days just let me know and I'll probably fiddle around by calling the raw API calls instead. Though life is so much easier if you regenerate based on 6.5.17.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #198  
Old 06-09-2009, 08:16 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Slugger View Post
Any chance you can regenerate the API based on 6.5.17?
Done. Version 0.72 has been uploaded.

Note that I have not tested the SystemMessageAPI wrappers in any way other than to eyeball the generated code to see that the types got wrapped correctly.

There are also a few other new API methods that got wrapped in this version for the first time, mostly having to do with other recent beta features such as subtitles and metadata import.

Apart from regenning the wrappers, there are no other tool changes in this version.
__________________
-- Greg
Reply With Quote
  #199  
Old 08-04-2009, 05:43 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by GKusnick View Post
You should create a dummy menu (not just an item) and put all your new code (including menu items) under that new menu. If you want your new items to appear on existing menus, place secondary references to them under the existing menus, but keep the primary refs under your dummy menu.

The widget names shouldn't matter since it will use the widget's unique symbol to do the linking.
Greg,

Your tools are really good, thanks much.

Why is this the best way to add code vs. just putting it directly in the existing menus?

Also, what is the advantage of using your STVi generator vs. the "built in" STVi generator?
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #200  
Old 08-04-2009, 12:35 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
My generator does not do any comparison against the base STV. The only way it knows which widgets to export is for you to tell it, and the way you do that is by grouping all the exportable widgets (and only the exportable widgets) under one or more new menus. So if you want to use my generator, you must take that extra manual step of gathering your new code in a place where the generator can find it.

My generator is not meant to replace or be better than the built-in generator, because the built-in generator (and the widget UIDs on which it's based) did not exist when I wrote mine. If you find the built-in generator easier to understand and use, by all means use it. It does have the advantage of being able to find newly created widgets wherever they may live in the widget tree, without having to manually group them under a dummy menu. On the other hand, it's not very smart about newly created hooks and listeners, and will happily create duplicate hooks if two or more STVIs each call for their creation. (Whereas my generator tries to be smart about that and share newly created hooks and listeners where possible.)
__________________
-- Greg

Last edited by GKusnick; 08-04-2009 at 12:42 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.