INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MJP file problem (plug-in installation)  (Read 2564 times)

hardolf

  • Regular Member
  • Recent member
  • *
  • Posts: 37
  • Retired developer
MJP file problem (plug-in installation)
« on: April 09, 2020, 03:48:15 pm »

For my LyricsFinder interface plug-in I have created this MJP v1 file that I can't get to work properly:

Code: [Select]
[Package]
Name=LyricsFinder
Action=UNZIPDIR|SAVE_DIR_STRUCT
Version=1.3.2
URL=https://github.com/hardolf/JRiver.MediaCenter/releases/download/v1.3.2/LyricsFinderFiles.1.3.2.zip

[Action]
File1=*.*
File1Action1=COPY_PLUGINDIR

File2=LyricsFinder\LyricsFinderPlugin.dll
File2Action1=REGISTER

File3=LyricsFinder\LyricsFinderCore.dll
File3Action1=REGISTER

The MJP file content is based on this old info:
My MJP and ZIP files are located on GitHub, as indicated by the URL:
When clicking on the MJP file in the browser and acknowledging the execute message, the ZIP file is correctly unpacked and the contents placed in the plug-in folder, as it should (in C:\Program Files\J River\Media Center 25\Plugins\LyricsFinder\).
However, I observe 2 problems:
  • The DLL's won't register
  • The Media Center log file is no help in tracking the problem
This is the message I get when trying to run the MJP file from the browser:

Failed to install package
More Info: Failed to register object.
C:\Program Files\J River\Media Center 25\Plugins\LyricsFinder\LyricsFinderPlugin.dll
URL: C:\Users\BHJ\AppData\Local\Temp\LyricsFinderFiles.1.3.2.zip

I believe that nothing is wrong with the LyricsFinder interface plug-in itself, as it is working fine when installed using the Setup file in the same GitHub location as the MJP file.

My PC is running Windows 10 Pro, version 1909.

I would really appreciate if anyone can explain to me what I am doing wrong...
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41936
  • Shoes gone again!
Re: MJP file problem (plug-in installation)
« Reply #1 on: April 24, 2020, 06:57:12 am »

I'm not sure that using a URL works.

But even without that, I switch to a local file, then try to install.

The file LyricsFinder\LyricsFinderPlugin.dll doesn't look like a Windows DLL that can be registered.  I try regsvr32 on it and it fails.

So maybe something isn't quite right yet?  Any other ideas?
Logged
Matt Ashland, JRiver Media Center

hardolf

  • Regular Member
  • Recent member
  • *
  • Posts: 37
  • Retired developer
Re: MJP file problem (plug-in installation)
« Reply #2 on: April 24, 2020, 08:34:03 am »

Hi Matt - and thanks for the reply.

The LyricsFinder is written in C# for .NET 4.8 - and the DLLs are .NET managed code.
Thus we cannot use RegSvr32 as this tool will not create the needed type library file (.tlb).
The tool to use for registering .NET managed code as COM callable assemblies is RegAsm, which can be found in the proper .NET Framework folder on the PC,
e.g. "{win}\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" for a 64 bit system.

Maybe MediaCenter only uses RegSvr32 for registering?
If that is the case, we are left with only the Setup.exe option (which is also used in the C# template project: https://wiki.jriver.com/index.php/Tips_and_Tricks_for_developing_a_plugin_in_Visual_Studio_2005_.NET).

Reference:
https://interview-preparation-for-you.blogspot.com/2015/03/difference-between-regasm-and-regsrv32.html

Rgds, Bent
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41936
  • Shoes gone again!
Re: MJP file problem (plug-in installation)
« Reply #3 on: April 24, 2020, 08:38:04 am »

Yes, the only register we do is calling the register server function.  If that's not there, you'll need to take a different tact.
Logged
Matt Ashland, JRiver Media Center

hardolf

  • Regular Member
  • Recent member
  • *
  • Posts: 37
  • Retired developer
Re: MJP file problem (plug-in installation)
« Reply #4 on: April 24, 2020, 08:58:37 am »

Thanks, Matt.
In that case, I will focus on the Setup.exe option instead of MJP files for now.
Logged
Pages: [1]   Go Up