SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV Studio (http://forums.sagetv.com/forums/forumdisplay.php?f=34)
-   -   Studio Tools for SageTV V7 (http://forums.sagetv.com/forums/showthread.php?t=48443)

GKusnick 05-20-2010 02:49 PM

Studio Tools for SageTV V7
 
I've revamped my Studio Tools for SageTV V7. You will now find the following three plugins in the SageTV plugin repository.

GKusnick's Tools Library contains a set of strongly-typed wrapper classes for the SageTV API, plus some other miscellaneous utilities.

New features in this component since SageTV V6 include:

* Support for V7 Effects widgets.

* Wrappers for the new PluginAPI.

* Various extensions to the SageTV API.

GKusnick's Studio Plugin Framework implements a platform for creating Studio plugins that extend the Studio user interface with custom commands and menus.

Changes in this component since V6 include:

* The Plugins > Manage... dialog is gone; the framework now relies on the SageTV V7 plugin manager to install, enable, and disable Studio plugins.

* Some architectural changes to the way Studio plugins are written. Any Studio plugins you've created yourself will need some code changes to work with the new framework. I'll be happy to help sort out any issues you have in porting your plugins.

GKusnick's Studio Tools runs on top of the framework and implements the searching and editing features you've become addicted to.

Changes in this component include:

* An Enable/Disable STVIs dialog that lets you unload unwanted STVIs from within Studio before you start editing.

* The STVI Tools menu is gone. This has been more or less obsolete since the addition of Studio's built-in STVI generator, so I decided to take advantage of this opportunity to retire it rather than porting it to the new Studio plugin framework. If there's demand I can look into resurrecting it as a separate Studio plugin.

All three plugins include source and documentation, including a brief how-to for writing your own Studio plugins.

Upgrading from the pre-V7 version of my Tools should be fairly seamless; just select GKusnick's Studio Tools from the repository and install. The other two components will be pulled in automatically as dependencies. Obsolete properties and directories from previous versions should be cleaned up automatically.

For reference, the old Studio Tools thread is here. I now consider that thread closed; questions or issues with Tools V1.0 and later should be posted here, in this thread.

jaminben 05-21-2010 05:35 AM

Hello,

I'm having trouble getting your plugin to work on a Client PC running a clean install of v7.0.9.

Not really sure what the problem is but in the plugin manager the Studio Plugin Frame Work has Failed but the Studio Tools part is or looks ok.

The error in my log is:

Code:

Fri 5/21 12:28:05.581 [SageTV@1e67e6a] CorePluginManager is checking plugin: gkusnickstudioframework type: Standard version: 1.0.1 by: GKusnick
Fri 5/21 12:28:05.584 [SageTV@1e67e6a] Plugin gkusnickstudioframework is enabled, try to load it from class: gkusnick.sagetv.studio.Inject
Fri 5/21 12:28:05.591 [SageTV@1e67e6a] ERROR cannot instantiate plugin object due to: java.lang.reflect.InvocationTargetException
Fri 5/21 12:28:05.593 [SageTV@1e67e6a] java.lang.reflect.InvocationTargetException
Fri 5/21 12:28:05.593 [SageTV@1e67e6a]        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Fri 5/21 12:28:05.595 [SageTV@1e67e6a]        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
Fri 5/21 12:28:05.597 [SageTV@1e67e6a]        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
Fri 5/21 12:28:05.601 [SageTV@1e67e6a]        at java.lang.reflect.Constructor.newInstance(Unknown Source)
Fri 5/21 12:28:05.604 [SageTV@1e67e6a]        at sage.plugin.a.a(Unknown Source)
Fri 5/21 12:28:05.605 [SageTV@1e67e6a]        at sage.plugin.a.if(Unknown Source)
Fri 5/21 12:28:05.607 [SageTV@1e67e6a]        at sage.plugin.a.for(Unknown Source)
Fri 5/21 12:28:05.610 [SageTV@1e67e6a]        at sage.plugin.a.<init>(Unknown Source)
Fri 5/21 12:28:05.613 [SageTV@1e67e6a]        at sage.plugin.a.int(Unknown Source)
Fri 5/21 12:28:05.618 [SageTV@1e67e6a]        at sage.SageTV.run(Unknown Source)
Fri 5/21 12:28:05.623 [SageTV@1e67e6a]        at java.lang.Thread.run(Unknown Source)
Fri 5/21 12:28:05.625 [SageTV@1e67e6a] Caused by: java.lang.ExceptionInInitializerError
Fri 5/21 12:28:05.627 [SageTV@1e67e6a]        at gkusnick.sagetv.studio.Inject.<init>(Inject.java:255)
Fri 5/21 12:28:05.661 [SageTV@1e67e6a]        ... 11 more
Fri 5/21 12:28:05.663 [SageTV@1e67e6a] Caused by: java.lang.NullPointerException
Fri 5/21 12:28:05.668 [SageTV@1e67e6a]        at gkusnick.util.Log.PropsLoad(Log.java:409)
Fri 5/21 12:28:05.670 [SageTV@1e67e6a]        at gkusnick.util.Log.<clinit>(Log.java:332)
Fri 5/21 12:28:05.673 [SageTV@1e67e6a]        ... 12 more
Fri 5/21 12:28:05.675 [SageTV@1e67e6a] Loading of plugin gkusnickstudioframework failed!

Let me know if you need anymore info, I can't live without this plugin :)

Cheers

Ben

GKusnick 05-21-2010 02:13 PM

Quote:

Originally Posted by jaminben (Post 424981)
I'm having trouble getting your plugin to work on a Client PC running a clean install of v7.0.9.

"Clean install" is the key phrase there. I'm failing to handle the case where a .properties file doesn't exist yet.

The fix will be in V1.1, but meanwhile, just create an empty file in your SageTV install directory called gkusnick.util.Log.properties and you should be OK.

jaminben 05-21-2010 02:54 PM

Yep, thats got it......easily the best plugin around, love it :D

Thank you

Ben

tmiranda 05-21-2010 05:58 PM

Greg,

I go away for a few days and when I come back the Sage world is rocked with v7....

I do a lot of my Studio work on a linux machine and I noticed that this new version will not install on linux. Any way you can make it compatible?

Tom

PS. I've been studying up on Java and I'm starting to have a (small) clue about what I am doing :D

GKusnick 05-21-2010 06:39 PM

1 Attachment(s)
Quote:

Originally Posted by tmiranda (Post 425513)
I do a lot of my Studio work on a linux machine and I noticed that this new version will not install on linux. Any way you can make it compatible?

Right, this came up once before. The problem is that the plugin is flagged as "desktop only" to keep it from loading on remote clients (Placeshifter and extenders). However Linux doesn't have a non-remote client; Placeshifter is the only UI you get.

Attached is an updated manifest file that turns off the "desktop only" flag. Unzip that into your SageTV installation folder and it will overwrite the manifests in the online repository (for my plugins only) and allow you to install the plugins.

Do keep an eye out, though, for any strange behavior on extender clients. If nothing bad happens, I'll consider making the change permanent in my next release (because clearly Linux users need to be able to install the plugins).

tmiranda 05-21-2010 08:09 PM

Thanks Greg. I'll try this out over the weekend. I suspect it will get the same results as the old version, which was good. The only thing that did not work was global searching.

GKusnick 05-21-2010 09:46 PM

Quote:

Originally Posted by tmiranda (Post 425568)
The only thing that did not work was global searching.

Global searching works for me. If you have a reproducible case where it doesn't, let me know so I can fix it.

koelec 05-22-2010 01:37 PM

Greg,

I used the stvi export for every stvi I created. It really made creating stvi's a breeze. You say that studio now has the same ability built-in? I just looked for it in V7, but all I found was the export selected menus option, which does not do relinking of references like your stvi export does. Please tell me I'm wrong.

Chris

razrsharpe 05-22-2010 01:51 PM

Tools -> STV UID File Difference -> Select the Base STV that your STV should be compared against -> Generate STVi -> Save

(been there since 6.4)

GKusnick 05-22-2010 02:01 PM

Quote:

Originally Posted by koelec (Post 425886)
I used the stvi export for every stvi I created. It really made creating stvi's a breeze. You say that studio now has the same ability built-in? I just looked for it in V7, but all I found was the export selected menus option, which does not do relinking of references like your stvi export does. Please tell me I'm wrong.

What Studio has built-in is a way to compare to STVs and save the difference as an STVI. Look under Tools > STV UID File Difference. (OK, razr beat me to that part.) The advantage of this approach over mine is that you don't have to keep track of your changes and quarantine them under an exportable menu. Studio can automatically figure out what's changed. The flip side of that, of course, is that you must be careful to start editing from a known clean state so you have something to compare against.

The other advantage of the built-in method is that it requires no runtime library dependency to process the import. All the necessary machinery is built in, on both ends.

If you need to convert your existing STVIs to the built-in scheme, you can do that by loading up a saved STV containing your imported STVI (e.g. SageTV3-n.xml) and comparing it to a saved copy of the corresponding base STV (SageTV3.xml). If you don't have those available, you can recreate them by using an older version of my runtime library (still available in the old Downloads section of the forum) to import your STVI into a clean copy of SageTV3.xml from the V7 release and save the result.

If that option isn't palatable, I'm not against the idea of bringing back my STVI generator. But it's not a high priority for me since I don't use it myself anymore.

PLUCKYHD 05-25-2010 06:21 PM

Quote:

Originally Posted by GKusnick (Post 425896)
What Studio has built-in is a way to compare to STVs and save the difference as an STVI. Look under Tools > STV UID File Difference. (OK, razr beat me to that part.) The advantage of this approach over mine is that you don't have to keep track of your changes and quarantine them under an exportable menu. Studio can automatically figure out what's changed. The flip side of that, of course, is that you must be careful to start editing from a known clean state so you have something to compare against.

The other advantage of the built-in method is that it requires no runtime library dependency to process the import. All the necessary machinery is built in, on both ends.

If you need to convert your existing STVIs to the built-in scheme, you can do that by loading up a saved STV containing your imported STVI (e.g. SageTV3-n.xml) and comparing it to a saved copy of the corresponding base STV (SageTV3.xml). If you don't have those available, you can recreate them by using an older version of my runtime library (still available in the old Downloads section of the forum) to import your STVI into a clean copy of SageTV3.xml from the V7 release and save the result.

If that option isn't palatable, I'm not against the idea of bringing back my STVI generator. But it's not a high priority for me since I don't use it myself anymore.

Okay add me to the list wanting the stvi exporter back. :)

I just found out when I export a menu with references in it the references don't get relinked on import like they did with yours. Sometimes I have allot of access junk from code testing and don't want to run a full stvi difference evaluator, but just export the menu item

So yes I am wanting this pretty badly now thought I could get by without it but it appears I am wrong.

twieder 05-29-2010 06:15 PM

help - can't get it working...
 
nevermind - figured it out (needed the empy gkusnick.util.Log.properties file)

jaminben 06-16-2010 12:17 PM

Hi Greg,

I've got a weird problem......the tools were working just fine earlier today but in the last hour or so its just stopped. The top menu item has dissappeared from studio and when I look at the plugin manager its telling that the tools have failed (default UI).

In the log I have:

Code:

Wed 6/16 19:08:25.330 [SageTV@97d026] Plugin gkusnickstudioframework is enabled, try to load it from class: gkusnick.sagetv.studio.Inject
Wed 6/16 19:08:25.334 [SageTV@97d026] ERROR loading plugin class gkusnick.sagetv.studio.Inject of:java.lang.NoClassDefFoundError: tv/sage/StudioAPI
Wed 6/16 19:08:25.336 [SageTV@97d026] java.lang.NoClassDefFoundError: tv/sage/StudioAPI

I've tried uninstalling the tools, restarting, removing and re-adding a new .properties file but nothing appears to be working.

Any ideas what I can try next? I feel like I've just lost an arm and I'm a little lost now.....

Cheers

Ben

GKusnick 06-16-2010 12:54 PM

Do you still have a copy of gkusnick.sagetv.jar in your JARs folder? That's where the missing class should be.

jaminben 06-16-2010 01:06 PM

Quote:

Originally Posted by GKusnick (Post 431658)
Do you still have a copy of gkusnick.sagetv.jar in your JARs folder? That's where the missing class should be.

I have two of your jar's in my jars folder:

gkusnick.sagetv.studio.jar
gkusnick.sagetv.studio.tools.jar

Not sure whats really happened.....like I said above it was fine and now its not. I've not been playing with any jars, only Studio. I've pretty much tried everything I can think of at the moment apart from a complete uninstall/reinstall.

Cheers

Ben

GKusnick 06-16-2010 01:14 PM

Quote:

Originally Posted by jaminben (Post 431663)
I have two of your jar's in my jars folder:

gkusnick.sagetv.studio.jar
gkusnick.sagetv.studio.tools.jar

But you do not have gkusnick.sagetv.jar? In that case you need to reinstall my Tools Library plugin (not the Tools or the Framework; you already have those).

I don't know how that file came to be missing, unless there's another plugin out there that includes my JAR directly as part of its package rather than as a plugin dependency.

jaminben 06-16-2010 01:23 PM

Quote:

Originally Posted by GKusnick (Post 431665)
But you do not have gkusnick.sagetv.jar? In that case you need to reinstall my Tools Library plugin (not the Tools or the Framework; you already have those).

I don't know how that file came to be missing, unless there's another plugin out there that includes my JAR directly as part of its package rather than as a plugin dependency.

Ah, yes.....I misread your original post, that jar was missing. However in saying that surely it should've installed the missing jar when I uninstalled the plugin and re-installed? I tried several times to re-install but that jar never got downloaded. In fact the only way I could get that jar to download was to delete my SageClient.properties & SageClient.properties.autobackup....everything is working fine now :)

I don't remember downloading any other plugins....apart from the Ortus one but that doesn't use your tools as a plugin dependency (It doesn't use it at all). Bit stumped as to why it would just stop working.

Cheers

Ben

GKusnick 06-16-2010 01:37 PM

Quote:

Originally Posted by jaminben (Post 431670)
However in saying that surely it should've installed the missing jar when I uninstalled the plugin and re-installed?

Depends on which plugin you're talking about. If it thought the Tools Library was already installed, there'd be no reason to re-install it just because you re-installed something that depended on it (such as the Tools plugin). That's why I told you to reinstall the Tools Library.

Tools and Tools Library are two distinct plugins, as detailed in the first post on this thread. If you use my API wrappers, you're using the Tools Library.

jaminben 06-16-2010 01:52 PM

Quote:

Originally Posted by GKusnick (Post 431676)
Depends on which plugin you're talking about. If it thought the Tools Library was already installed, there'd be no reason to re-install it just because you re-installed something that depended on it (such as the Tools plugin). That's why I told you to reinstall the Tools Library.

Tools and Tools Library are two distinct plugins, as detailed in the first post on this thread. If you use my API wrappers, you're using the Tools Library.

I'm pretty sure I tried them all.....(I got desperate). Of course there is always hand-eye error which probably was the main issue.

Anyway, its all working good now :)

Cheers

Ben


All times are GMT -6. The time now is 03:51 AM.

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