INTERACT FORUM
Windows => Plug-in Development => Topic started by: hardolf 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:
[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:
- https://wiki.jriver.com/index.php/Package_Files
- http://www.musicex.com/mediajukebox/DevZone/MJP%20Files.html
My MJP and ZIP files are located on GitHub, as indicated by the URL:
- https://github.com/hardolf/JRiver.MediaCenter/releases/download/v1.3.2/LyricsFinder.1.3.2.plugin1.mjp
- https://github.com/hardolf/JRiver.MediaCenter/releases/download/v1.3.2/LyricsFinderFiles.1.3.2.zip
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...
-
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?
-
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
-
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.
-
Thanks, Matt.
In that case, I will focus on the Setup.exe option instead of MJP files for now.