Extensions: A GUI Plugin for MediaPortal's MPEI Installer (1 Viewer)

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Thanks a lot, it already works with this dll!

    I have one small problem with this version:

    I need to give the full path to the settings file. As this button is "skin only" with no code behind, I don't know that full path
    a) in the skin I don't know where the path to the "Installer" is (I think)
    b) I don't want to put the version number in the parameter as this would have to be changed in the skin xml everytime a different version is installed

    Would it be possible to only pass the GUID and the MPEI plugin finds the path and installed version on its own?


    Button in OnlineVideos' hidden menu that directly opens the MPEI plugin's Settings Window, where you can configure OnlineVideos :)
    Code:
    <control>
              <type>button</type>
              <description>Settings</description>
              <id>14</id>
              <onright>50</onright>
              <onup>13</onup>
              <ondown>2</ondown>
              <label>5</label>
              <font>font11</font>
              <height>37</height>
              <hyperlink>803</hyperlink>
              <hyperlinkParameter>c:\ProgramData\Team MediaPortal\MediaPortal\Installer\V2\269bd257-7ce5-450a-b786-1c2834c81849\0.29.0.1\extension_settings.xml</hyperlinkParameter>
              <visible>plugin.isenabled(Extensions)</visible>
            </control>
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Dukus, does MPEI installer have the ability to mark a file as Shared? What I mean by this, is if two or more installers share a common component?

    e.g.
    Maya installs SkinTranslations.dll
    BlackGlass installs SkinTranslations.dll

    If one of those gets uninstalled, then the skin functionality is broken for the other as it depends on translations.

    Typically in a MSI setup when a component is marked as Shared it creates a reference count in the registry:
    HKLM\Software\Microsoft\Windows\CurrentVersion\SharedDlls.

    How this works is like this:
    a DWORD is created for the file that is shared e.g.

    C:\Program Files\Team MediaPortal\MediaPortal\plugins\Process\SkinTranslations.dll

    If the value exists before installation, then the value is incremented. If it does not exist then its set to a count of 1 with the exception if the file existed on disk prior to installation in which case it will be set to 2.

    If the installer removes a file, then it checks if there is a shareddll reference and decrements the count, if it gets set to 0 the entry is removed and the file/component is removed. If the count is greater than one then the file remains.

    If we make this change, all installers weather it be MSI, NSIS, MPEI can all live in harmony :)
     

    dukus

    Portal Pro
    January 20, 2006
    783
    748
    44
    Home Country
    Romania Romania
    When the MPEI install a file and in install location same file already exist, first this will be make a backup. On uninstall same backup file will be copied back, but if in meantime the original file was changed, then the file isn't replaced or deleted. Somehow this mechanism try to avoid accidentally deletion of a file.

    The problem of SkinTranslations.dll is, the file should be provided as a extension package not a single file, in this way can be set a dependency for this extension, if you uninstall a on of this skins the dll will be remain there.

    I think should be a command line parameter for mpeinstaller.exe to query if a extension is installed or not, if installed which version, in this way should be more easy to interact other installer with mpei.

    Another question : if you have some idea hoe to track new version of a extension (which have installer other that mpei ) via Extension plugin ?
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    When the MPEI install a file and in install location same file already exist, first this will be make a backup. On uninstall same backup file will be copied back, but if in meantime the original file was changed, then the file isn't replaced or deleted. Somehow this mechanism try to avoid accidentally deletion of a file.

    The problem of SkinTranslations.dll is, the file should be provided as a extension package not a single file, in this way can be set a dependency for this extension, if you uninstall a on of this skins the dll will be remain there.
    Thanks for clearing that up.

    I think should be a command line parameter for mpeinstaller.exe to query if a extension is installed or not, if installed which version, in this way should be more easy to interact other installer with mpei.
    Yeah, something like that could easily be integrated into msi/nsis installers. On the topic of command line parameters for mpeinstaller, is there a /s switch to silently install a mpei?

    A silent install option would be neat, it would obviously need to handle scenarios such as install,upgrade, uninstall etc.

    Another question : if you have some idea hoe to track new version of a extension (which have installer other that mpei ) via Extension plugin ?
    Isn't there already something in the online repository about when an updated extension is uploaded? When I upload StreamedMP or TVSeries I see that the 'Last Updated' field changes, maybe you can just query that?
     

    powermarcel10

    Retired Team Member
  • Premium Supporter
  • November 30, 2010
    2,839
    898
    35
    Groningen
    Home Country
    Netherlands Netherlands
    Re: Extensions Plugin for MpeInstaller (Updated on 25-01-2011)

    Thx! Just realized you need a very recent SVN (27804 is too old ;) ) working now.

    Maybe a stupid question, but what do you meen with "SVN" the latest build of mediaportal is 1.2.0beta, so what does that SVN meens..

    By the way, the plugin doesnt work for me.. When I install the plugin, I get an error when entering the plugin section in the configuration screen.. Any idea?
     

    piccirilli

    Portal Member
    September 24, 2009
    37
    2
    Problem with MpeInstaller

    I'm having problem using MpeInstaller. Using latest version for MP 1.2 Beta. When trying to install various plugins such as fanart handler, I do not get the 'continue' button to install. Any ideas?
     

    Attachments

    • Screenshot.JPG
      Screenshot.JPG
      29.9 KB

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Re: Problem with MpeInstaller

    I'm having problem using MpeInstaller. Using latest version for MP 1.2 Beta. When trying to install various plugins such as fanart handler, I do not get the 'continue' button to install. Any ideas?

    This was a windows large font issue I think which should be fixed in MediaPortal 1.2 RC.

    fyi, this has nothing to do with Extensions GUI plugin but with MPEIInstaller thats integrated with-in MediaPortal. (I know can be confusing to tell them apart!)
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I need to give the full path to the settings file. As this button is "skin only" with no code behind, I don't know that full path
    a) in the skin I don't know where the path to the "Installer" is (I think)
    b) I don't want to put the version number in the parameter as this would have to be changed in the skin xml everytime a different version is installed

    Would it be possible to only pass the GUID and the MPEI plugin finds the path and installed version on its own?

    I've started to get my hands dirty with this plugin, I added this to the issue tracker so I will take a look and get that working.

    You're right you can't get that path from skin alone. I think just the GUID should be enough, the plugin should be able to work out the path from that...I hope :)

    Issue 18 - Launch Plugin Settings with just GUID as hyperlinkparameter
     

    dukus

    Portal Pro
    January 20, 2006
    783
    748
    44
    Home Country
    Romania Romania
    offbione the syntax for configuration looks like his:
    <control>
    <description>MPEICONFIGURE:269bd257-7ce5-450a-b786-1c2834c81849</description>
    <type>button</type>
    <id>59</id>
    <posX>71</posX>
    <posY>499</posY>
    <label>Configure</label>
    <onright>50</onright>
    <onup>7</onup>
    <ondown>2</ondown>
    <visible>string.equals(#mpei.269bd257_7ce5_450a_b786_1c2834c81849.isinstalled ,true)</visible>
    </control>

    No reference to the config file or to the configuration window id needed
     

    Users who are viewing this thread

    Top Bottom