Basic MythTV plugin configuration: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
Line 8: Line 8:
== Details ==
== Details ==


1. I chose to clone mythmusic.
<ol>
 
<li>I chose to clone mythmusic.
<pre>
  cd mythplugins
  cd mythplugins
  cp -r mythmusic mythdj
  cp -r mythmusic mythdj
Line 19: Line 20:
  mv mythmusic.pro mythdj.pro
  mv mythmusic.pro mythdj.pro
  emacs mythdj.pro (s&r as needed)
  emacs mythdj.pro (s&r as needed)
 
</pre></li>
2. Here's what I needed to add to [mythplugins/configure]:
<li>Here's what I needed to add to [mythplugins/configure]:
<pre>
  dj="yes"
  dj="yes"
  ---
  ---
Line 45: Line 47:
  ###########################################################
  ###########################################################
  (basically a copy of MythMusic with s&r of 'music' with 'dj')
  (basically a copy of MythMusic with s&r of 'music' with 'dj')
 
</pre>
3. In my case, I added the following block to [mythtv/programs/mythfrontend/library.xml]:
</li>
<li>In my case, I added the following block to [mythtv/programs/mythfrontend/library.xml]:
<pre>
   <button>
   <button>
       <type>DJ_PLAY</type>
       <type>DJ_PLAY</type>
Line 54: Line 58:
       <depends>mythdj</depends>
       <depends>mythdj</depends>
   </button>
   </button>
 
</pre>
4. I'm doing it now!
</li>
<li>I'm doing it now!
</li>
</ol>

Revision as of 02:41, 18 November 2008

Plugin support in MythTV is great, but a little rough around the edges to set up. Here is a quick setup HOWTO.

  1. In the mythplugins project, select an existing plugin to clone, and copy the directory.
  2. In the mythplugins project, update the configuration file to build your new plugin.
  3. In the mythtv project, add a button to the XML ui to access your plugin.
  4. Bang away on your new plugin!

Details

  1. I chose to clone mythmusic.
     cd mythplugins
     cp -r mythmusic mythdj
     cd mythdj
     mv mythmusic.pro mythdj.pro
     emacs mythdj.pro (s&r as needed)
     mv mythmusic mythdj
     cd mythdj
     mv mythmusic.pro mythdj.pro
     emacs mythdj.pro (s&r as needed)
    
  2. Here's what I needed to add to [mythplugins/configure]:
     dj="yes"
     ---
     MythDJ related options:
       --enable-mythdj          MDM build the mythdj plugin [$dj]
     ---
      --enable-mythdj) dj="yes"
      ;;
      --disable-mythdj) dj="no"
      ;;
     ---
     if test "$dj" = "yes" ; then
       echo "        MythDJ         plugin will be built"
       echo "SUBDIRS += mythdj" >> ./config.pro
     else
       echo "        MythDJ         plugin will not be built"
     fi
     ---
     ###########################################################
     #                                                         #
     #  MythDJ related configuration options                   #
     #  (similar to MythMusic)                                 #
     #                                                         #
     ###########################################################
     (basically a copy of MythMusic with s&r of 'music' with 'dj')
    
  3. In my case, I added the following block to [mythtv/programs/mythfrontend/library.xml]:
       <button>
          <type>DJ_PLAY</type>
          <text>Start DJ</text>
          <action>JUMP Start DJ</action>
          <depends>mythmusic</depends>
          <depends>mythdj</depends>
       </button>
    
  4. I'm doing it now!