Author Topic: Add-on Manager  (Read 76564 times)

boroda

  • Sr. Member
  • ****
  • Posts: 4674
IMPORTANT NOTE: I don't have enough time to maintain online repositories up to date. Let me know if somebody is willing to do this.



Description
Plugin allows to automatically install/update/uninstall plugins, skins, icons, etc.

How to install and use
Extract content of archive to plugins subfolder of MusicBee installation folder. Run AS ADMINISTRATOR "Setup Add-on Manager" (NOT the "Add-on Manager Setup Tool"!) from 'Plugins' folder. See 'Tools/Add-on Manager...' menu item. Ticked customizations will be installed/updated. Unticked customizations will be uninstalled. Grayed checkboxes mean that customization won't be touched.

To configure plugin go to 'Edit/Preferences/Plugins'.

NOTE 1:
You might want to maximize plugin window to see enlarged screenshots.

NOTE 2:
Although plugin is heavily based on Google Drive, you don't need to use or have Google account to download customizations.

NOTE 3:
First run of plugin may be very slow, but subsequent runs should be faster due to caching.

NOTE 4:
Application icons (unlike toolbar icons) are searched by MusicBee in 'MusicBee\Skins' folder by default, but plugin installs ALL icons to 'MusicBee\Icons' folder. This is not a problem actually, because you can select application icon not from default folder only.

NOTE 5:
If you have run 'Setup Add-on Manager' (as ADMINISTRATOR) from 'Plugins' folder and anyway are getting error:
Code
System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
   at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.<AuthorizeAsync>d__1.MoveNext()
then manually change "<runtime/>" to:
Code
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-2.2.29.0" newVersion="2.2.29.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
in file "C:\windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config". You wil need admin rights to do this.

Screenshot


License
Do all you want with plugin binary and source code at your own risk.

Download
Stable release, 2015-09-07, only for MusicBee 2.4 or later
Binary
Source code won't be published due to security reasons

Use the Latest Update for full plugin functionality.

Version history
7 september, 2015
  • Now retrieving metadata from Internet may be canceled

    5 september, 2015
  • Some bugfixes of Developer Tools

    3 september, 2015
  • Some bugfixes
  • Some optimizatons
  • Source code cleanup

    1 september, 2015
  • Some bugfixes
  • Better error handling
  • Better caching of online data and thus better performance
  • Now new customizations (uploaded after last launch of plugin) are marked with blue 'exclamation' icon

    18 august, 2015
  • Initial public release, version 4.0.5708
  • Several critical bugs are fixed
  • Some visual glitches are fixed
  • Speed of incremental uploading is improved

    8 august, 2015
  • Now customization is (re)uploaded only if its last updated date is newer or customization is new
  • Minor bugfixes & improvements
  • Better error handling
  • All available working plugins except for 'MusicBee Remote' (which is still under development) have been uploaded to online repositories.

    5 august, 2015
  • Some bugfixes
  • Now its possible to use common keys (such as space or enter) assigned as hotkey in MusicBee as regular keys in plugin dialogs


    Developer instructions
    By 'developers' I mean plugin developers, skin and icon creators, etc.

    Create empty file 'DevMode.txt' in 'Plugins' folder. In plugin window click on 'gear' button, this will open 'Developer Tools' window. Please don't use Developer Tools just for fun, if you don't intend to upload something useful, because too large number of online repositories may slow down all instances of plugin significantly. Click 'Create repository' button to create local repository. Click 'Register repository' button to register online repository on server. Its possible to associate several online repositories with local repository, but the only sense to do this is to balance load between several Google account, because I'm not sure if there are some bandwidth limitations per Google account. Its recommended to start with just 1 online repository. Add plugins, skins, icons, etc. to local repository, then click 'Upload repository' button, browser window will be opened, grant access to your Google drive for plugin.

    NOTE 1:
    Its not recommended (but possible) to host the same customization on several local (and associated online) repositories.

    NOTE 2:
    Its recommended to use 'Arial', 10pt font for descriptions, licenses and version history, so all info for any customization will look consistently. See 'Additional Tagging and Reporting Tools' as an example.

    NOTE3:
    Its recommended to place link to source files at the end of description. See 'Additional Tagging and Reporting Tools' as an example.

    NOTE 4:
    Short name for plugins should be the the name of main plugin file without '.dll' extension. For example for 'Additional Tagging and Reporting Tools' short name should be 'mb_TagTools'. For customizations other than plugins short name may be arbitrary.

    NOTE 5:
    Short name must unique across all repositories. Two customizations with the same short name are considered to be the same customization.

    NOTE 6:
    Recommended customization icon size is 95px X 95px.

    NOTE 7:
    Short name may contain only underline symbol, letters and numbers.

    NOTE 8:
    For visualization (which should be uploaded as regular plugins), icons, theater modes and sometimes for regular plugins you will need non-flat hierarchical folder/file structure. To do this just create in your source folder necessary subfolders, place required files in these subfolders and shorten base path to source folder for every file, e.g. if you want to install 'MySkin.xml' from 'SomeSourceFolder' to 'MusucBee\Skins\My Skins\' folder instead of 'MusicBee\Skins\', create 'My Skins' subfolder in 'SomeSourceFolder', place 'MySkin.xml' into 'SomeSourceFolder\My Skins' and define base path for 'MySkin.xml' as 'SomeSourceFolder'. See folder/file structure below for Additional Tagging and Reporting Tools plugin as an example:



    PLEASE HOST YOUR AND ABANDONED CUSTOMIZATIONS! THIS PLUGIN IS USELESS WITHOUT UPLOADERS.


    @Steven, could you add to API a function 'UninstallPlugin(string pluginMainFile)'? This function must call plugin's 'Uninstall' method.
Last Edit: September 03, 2016, 06:15:54 PM by boroda74

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10692
This is really exciting.  I'm glad you're working on it!
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest patches (3.5/3.6)
(Unzip and overwrite existing program files)

redwing

  • Guest
  • What is common file/folder structure for toolbar icons? Is it possible to download several toolbar icon packages at the same time?
Currently there's no support for customized icon set folders. I assume most users would store them in a sub-folder under \MusicBee\Icons\ folder. That's why I requested the following feature:

Also, consider making MB look for a icons sub-folder in the same name as selected skin first and use, if the folder is not present, icons in default icons folder. This would allow people to use various designs of icon sets supplied by skinners without any manual setup.

If that's implemented, then each icon set should use the same folder name as the skin under \MusicBee\Icons\ folder.

  • What is common file/folder structure for embedded and not embedded (how they are called correctly?) theater modes?
There's no official name for non-embedded TM views. BTW this is a good chance to correct the typo in the TM folder name from "embeded" to "embedded".

<Non-embedded TM view files>

TM view xml files (\MusicBee\Plugins\TheaterMode.List\)

- Optional
Background images  (\MusicBee\Plugins\TheaterMode.List\SharedArtwork\custom folder\)
Icon images (\MusicBee\Plugins\TheaterMode.List\Images\custom folder\)

<Embedded TM view files>
TM view xml files (\MusicBee\Plugins\TheaterMode.Embeded\)

- Optional
Background images  (\MusicBee\Plugins\TheaterMode.Embeded\SharedArtwork\custom folder\)
Icon images (\MusicBee\Plugins\TheaterMode.Embeded\Images\custom folder\)

Maybe we should ask skinners to use the same folder name as the TM view.

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3840
  • MB Version: 3.6.8878 P
What a great plug-in idea!

  • What is common file/folder structure for visualizations?
\MusicBee\Plugins\ and are in the form vis_*.dll

The exception being 'Milkdrop' visualizations. The *.milk files going in
\MusicBee\Plugins\Milkdrop2\presets\

Install a fresh copy of MB to some WRITABLE folder (e.g. desktop).

Can I use a portable version of MB on a USB drive here?

  • What is common file/folder structure for toolbar icons? Is it possible to download several toolbar icon packages at the same time?
Currently there's no support for customized icon set folders.

redwing is correct. All toolbar icon sets get lumped together in \MusicBee\Icons\ and the only current way to "download several toolbar icon packages at the same time" is to have a unique name for every icon.
MusicBee and my library - Making bee-utiful music together

redwing

  • Guest
I just tested this plugin, but the two points you made seem to be a big hassle for any user.

  • Its recommended to create new Google account to use with this plugin because plugin will delete ALL files on Google drive when it uploads files.
  • Google drive INITIALIZATION is very slow. I cache all I can cache, but this doesn't help much. Also, the less online repositories exist, the better download performance (but worse upload performanse) is.
For me, it takes about 4 minutes to initialize whenever I open the plugin. Not sure how longer it would take if people start uploading stuff. Creating an additional Google account dedicated just to this plugin is another issue (for developers).

What other online repository options do we have except for Google drive?

boroda

  • Sr. Member
  • ****
  • Posts: 4674
Can I use a portable version of MB on a USB drive here?
yes. actually i've tested this plugin only with portable version of mb, but i'll be glad  if somebody tests this plugin with non-portable version later (when i'll upload new fixed version).

boroda

  • Sr. Member
  • ****
  • Posts: 4674
For me, it takes about 4 minutes to initialize whenever I open the plugin. Not sure how longer it would take if people start uploading stuff.
it seems i've found the way i could speed up google drive siggnificanly. not sure though,
Creating an additional Google account dedicated just to this plugin is another issue (for developers).
i could fix this when i publish final version.
What other online repository options do we have except for Google drive?
i want to add support for any customizations available.

redwing

  • Guest
OK. I'll test again with the new version.

boroda

  • Sr. Member
  • ****
  • Posts: 4674
New version released
Instructions and download link are updated in the 1st post of this topic.

What's new:
  • Multiple bugfixes
  • Now all buttons should work
  • Plugin wont delete all files on your Google drive any more when it uploads customizations
  • Visualizers can be installed like native plugins
  • Now plugin can work even if MB is installed to 'Program Files'


TO DO:
  • Improve the speed of plugin. Current performance is very disappointing
  • Add support for theater modes and toolbar icons
Now plugin has the status of 'beta'. Please test it. Also please test uploading.
Last Edit: June 02, 2015, 11:30:12 AM by boroda74

redwing

  • Guest
The new version fails to initialize with the following error:

6.1.7601.65536 - 2.5.5606.32711 - System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)

From the second time, I get this (without the above error) and the initialization never ends.

6.1.7601.65536 - 2.5.5606.32711 - System.IO.FileNotFoundException: Could not find file 'D:\MB\AppData\MusicBee Add-on Manager\emptyfile'.
File name: 'D:\MB\AppData\MusicBee Add-on Manager\emptyfile'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at System.IO.File.Copy(String sourceFileName, String destFileName)
   at MusicBeePlugin.MainWindow.DownloadRepositorySection(String repositoryName, String sectionName, StorageApiFile root)
   at MusicBeePlugin.MainWindow.DownloadRepository(String repositoryName)
   at MusicBeePlugin.MainWindow.MainWindow_Shown(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnShown(EventArgs e)
   at System.Windows.Forms.Form.CallShownEvent()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

redwing

  • Guest
BTW can't you use a sub-folder for this plugin? I don't really like to put theses 28 files under \Plugins\ folder where some files are overlapped with files from other plugins. It's quite a mess to the extent that I can't even figure out which files are for which plugin.

boroda

  • Sr. Member
  • ****
  • Posts: 4674
The new version fails to initialize with the following error:

6.1.7601.65536 - 2.5.5606.32711 - System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)

From the second time, I get this (without the above error) and the initialization never ends.

6.1.7601.65536 - 2.5.5606.32711 - System.IO.FileNotFoundException: Could not find file 'D:\MB\AppData\MusicBee Add-on Manager\emptyfile'.
File name: 'D:\MB\AppData\MusicBee Add-on Manager\emptyfile'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at System.IO.File.Copy(String sourceFileName, String destFileName)
   at MusicBeePlugin.MainWindow.DownloadRepositorySection(String repositoryName, String sectionName, StorageApiFile root)
   at MusicBeePlugin.MainWindow.DownloadRepository(String repositoryName)
   at MusicBeePlugin.MainWindow.MainWindow_Shown(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnShown(EventArgs e)
   at System.Windows.Forms.Form.CallShownEvent()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
http://www.mediafire.com/download/lgi3a3pc4tcas5a/mb_AddonManager_2015-06-03.zip

boroda

  • Sr. Member
  • ****
  • Posts: 4674
BTW can't you use a sub-folder for this plugin?
i'm afraid, no. at least i don't know to do this.

redwing

  • Guest
Initialization and uploading worked fine, except for taking too long.

- Can't close/exit the plugin while it's connecting or retrieving. Have to kill MB process
- Keys assigned to hotkeys are unusable while entering text into the plugin window
- Would be nice if available buttons gets highlighted when at least one item gets ticked
- No legend shown for any items
- Not sure what these buttons are meant to do: clean removed, reset all, apply all pages
- Gets the following error from clicking on mark updated, clean removed, reset all buttons

MusicBee v2.5.5606.32711 (Win6.1)

System.InvalidCastException: Unable to cast object of type 'System.Windows.Forms.Button' to type 'System.Windows.Forms.DataGridView'.
   at MusicBeePlugin.MainWindow.markUpdatedButton_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

boroda

  • Sr. Member
  • ****
  • Posts: 4674
- Can't close/exit the plugin while it's connecting or retrieving. Have to kill MB process
- Keys assigned to hotkeys are unusable while entering text into the plugin window
yes, these are known issues. i'll fix them later, after adding support for theater modes and toolbar icons.
- Would be nice if available buttons gets highlighted when at least one item gets ticked
don't understand what you mean
- No legend shown for any items
this should work, but icons are displayed only for installed plugins/skins
- Not sure what these buttons are meant to do: clean removed, reset all, apply all pages
clear removed - mark for uninstallation customizations which are not available online anymore
reset all - change status of all customizations to 'do not touch them'
apply all pages - apply all changes on all pages (i.e install/uninstall/update according to your marks)
- Gets the following error from clicking on mark updated, clean removed, reset all buttons

MusicBee v2.5.5606.32711 (Win6.1)

System.InvalidCastException: Unable to cast object of type 'System.Windows.Forms.Button' to type 'System.Windows.Forms.DataGridView'.
   at MusicBeePlugin.MainWindow.markUpdatedButton_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
its fixed

http://www.mediafire.com/download/z7r3tgw7tbqg0wk/mb_AddonManager_2015-06-03-2.zip