Author Topic: several issues with using 'add plugin' button in prefs> plugins  (Read 1620 times)

boroda

  • Hero Member
  • *****
  • Posts: 4744
1. i get error message "unable to start plugin: <dll name>.dll - Dll entry point: MusicBeepPlugin.Plugin was not found", when i try to add plugin .zip (by clicking 'add plugin' button), which contains auxiliary dlls (without "mb_" prefix) in the root of zip and "mb_*.resources.dll" (it doesn't contain any code, only resources) in "ru" subfolder of zip. mb copies main plugin dll "*.dll" instead of "*.resources.dll" to "Plugins\ru" folder.

2. as far as i understand, "add plugin" button had been added for mb store version mainly, because it's the only way to install plugin in this version. similar functionality had been added to mb for installing other mb add-ons (eg. skins). but unlike other types of add-ons there is no way to delete installed plugin in mb store version. it would be great if "uninstall" button next to plugin in prefs> plugins deleted plugin files also, along with calling plugin's Uninstall() function and unloading plugin. of course, only if plugin had been added by using "add plugin" button, not manually.

3. there is no obvious way to update installed plugin in mb store version. i get error "failed to save plugin due to the following error: forbidden data found on decoding" if i try to re-add updated plugin .zip. the only workaround is to disable plugin, then restart mb, then re-add updated plugin.

these issues concern mainly mb store version, but it would be great if they are fixed for all mb versions.

p.s. english wording of error messages may differ from what i've written, but common sense is the same.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34416
for 1, how would mb know which is the plugin dll that is intended to be loaded? do the resource files need to be named starting with 'mb_' or could they be placed in the resources sub-folder?
for 2, i know its an issue but the problem is the files cant be deleted because they are loaded and locked from delete
for 3, good point - i do hate the limitations the windows store brings.
I will try and come up with a solution for 2 and 3 which involves restarting the app but it might be some time before i look at that

boroda

  • Hero Member
  • *****
  • Posts: 4744
for 1, how would mb know which is the plugin dll that is intended to be loaded? do the resource files need to be named starting with 'mb_' or could they be placed in the resources sub-folder?
i think mb must not treat as plugin (1) any dll in the root of plugin .zip, which name doesn't have "mb_" prefix and (2) any dll (with or without "mb_" prefix), which is placed in some subfolder of plugin .zip
 
I will try and come up with a solution for 2 and 3 which involves restarting the app but it might be some time before i look at that
yes, of course, take your time.

boroda

  • Hero Member
  • *****
  • Posts: 4744
Steven, for 1, this is my real plugin, but it's also a good example: it must be installed without error messages using 'add plugin' button and its content must be copied as is to 'Plugins' folder after installation. this .zip contains possibly all type of files, which a plugin .zip can contain: plugin itself (mb_MusicScheduler.dll), 2 *.exe files, root auxiliary dll without 'mb_' prefix (Interop.TaskScheduler.dll), and auxiliary dll with 'mb_' prefix placed into 'ru' subfolder (ru\mb_MusicScheduler.resources.dll).

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34416



Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34416
for 1, i cant reproduce it but it is possible i fixed it a while ago
for 2, in v3.6 the plugin.dll file will be deleted on restart. Its still up to the plugin itself to delete other files/ folders it uses.
for 3, in v3.6 if the plugin is already loaded, MB will request restart and automatically install the updated plugin on restart

boroda

  • Hero Member
  • *****
  • Posts: 4744
for 1, i cant reproduce it but it is possible i fixed it a while ago
for 2, in v3.6 the plugin.dll file will be deleted on restart. Its still up to the plugin itself to delete other files/ folders it uses.
for 3, in v3.6 if the plugin is already loaded, MB will request restart and automatically install the updated plugin on restart

1. yes, you've fixed it already.
2. plugin can delete all resource files it uses (e.g. settings), but can't delete 3d party dlls installed with plugin, so it would be great if mb tracked all dlls (included in plugin zip) installed on plugin installation and deleted them too on plugin uninstallation.
3. great!