View Issue Details

IDProjectCategoryView StatusLast Update
0006752MMW v4Framework: Scripts/Extensionspublic2022-04-29 01:48
ReporterLudek Assigned To 
PriorityimmediateSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version4.0Fixed in Version4.0 
Summary0006752: Automatize process of MMIP installation in case of locked plugin DLL
DescriptionCurrently if a MMIP package wants to copy a new version of DLL that is locked (in use) by application then following workflow is needed:

1. Locked DLL is renamed to DLL.off
2. New DLL is copied
3. DLL.off is deleted upon next startup

this process should be automatized so that scripters wouldn't need to handle this per each MMIP package.
Tagstodoc-dev
Fixed in build1329

Relationships

related to 0007412 closedLudek Script Installation Issues 
related to 0007435 closedLudek SDBFileSystem: Tweaks 

Activities

jiri

2010-11-26 10:02

administrator   ~0021484

As a part of this, it would be nice to standardize 'Restart' message across scripts, i.e. show the message whenever it's necessary to restart MM and also give scripts an option to manually turn on a flag that would result in showing this message after Addon installation. This would result in having this message localized as well.

Ludek

2010-11-26 13:41

developer   ~0021488

Last edited: 2010-11-26 20:41

Fixed in build 1329.

Note that in case of installing the "restart" prompt is shown automatically together with the "complete" prompt on the same dialog,
in case of uninstall.ini the
ShowRestartPrompt=True
needs to be added to the [Header] section


Example:

[Header]
ID=CodecPack
ShowRestartPrompt=True

peke

2010-11-26 17:57

developer   ~0021492

Last edited: 2010-11-26 18:39

Can you also add ID=Plugins so that Winamp type plugins can be installed that way

Last.FM for example.

EDIT: Actually I do not think that this approach is the best one. Using Header and ID looks more like a workaround. I would rather use Delphi existing Ext check and compare for common files (DLL) and set Restart Needed Boolean to True so that user is asked to Restart MM on the end of MMIP Installation/Uninstall.

Ludek

2010-11-26 20:35

developer   ~0021497

Last edited: 2010-11-26 20:46

You don't need to include the ID.
It works also without it.

If you add

[Header]
ShowRestartPrompt=True

then the uninstall restart prompt is shown, if you don't add the [Header] at all then no prompt is shown. I think that this prompt should be optional, because it can be annoying to see that you need to restart MM in order to complete uninstall process (e.g. for scripts you mostly don't need it).

Note that I renamed it to ShowRestartPrompt so that it fits.

peke

2010-11-26 22:39

developer   ~0021498

I'm still not sure that I understand completely how feature work and how to do regression testing.

Example:
If in install.ini/uninstall.ini User use
----
[Copy]
Src=gen_LastFMScrobbler.dll
Tgt={app}\Plugins\gen_LastFMScrobbler.dll
----
My guess that on the end of installation Information dialog should be shown informing user that Restart would be recommended to complete install of MMIP and in case of using
----
[Header]
ShowRestartPrompt=True
----
Instead of above information Restart dialog should be presented to user to complete installation of plugin.

Note: In this case all steps/checks regarding gen_LastFMScrobbler.dll from last.fm install.vbs would not be needed for correct plugin installation as MM will handle that internally.

Possible Regression: In the past we have instructed users to rename .DLL to DLL.off and if they are found it is unclear if they will be also deleted on next startup.

Ludek

2010-11-26 22:46

developer   ~0021499

Last edited: 2010-11-26 22:47

Yes, that is exactly how it works now.

user needn't to rename .DLL to DLL.off, because if MM find that the DLL exists then it tries to delete the DLL and if the deletion failed then MM automatically rename the dll (moves to AppData/MediaMonkey/Trash/ and the Trash directory is cleared after restart of MediaMonkey)

peke

2010-11-26 23:07

developer   ~0021500

Great, this needs to be noted in http://www.mediamonkey.com/wiki/index.php/Installation_Packages

peke

2010-11-26 23:13

developer   ~0021501

I'm not sure that .DLL can be moved to another drive in case MM is installed on D: and AppData/MediaMonkey/Trash/ is located on C:

I would rather rename it where it is and make AppData/MediaMonkey/CleanTrash.txt that will delete such files on MM startup.

Ludek

2010-11-26 23:39

developer   ~0021502

Every user (even non-admin) can access AppData/MediaMonkey/Trash/ so why it should be a problem to move it from its original location to the trash?

Why it should be somehow drive related?

peke

2010-11-27 08:32

developer   ~0021506

Last edited: 2010-11-27 10:51

It is due the nature of HDD file system handling.

I tested today and I'm right, here are the steps:
1. Open MM (c:\mediamonkey\mediamonkey.exe)
2. Tried to Move c:\mediamonkey\plugins\f_ape.dll -> d:\f_ape.dll.off
3. Failed
4. Tried to Move c:\mediamonkey\plugins\f_ape.dll -> c:\ProgramData\MediaMonkey\Trash\f_ape.dll.off
5. Worked

Reason:
Move within same partition on HDD only writes to Partition Table (VFAT on FAT32) or in Master File Table (MFT on NTFS) No delete is involved.

Move to Another partition do same with addition that File nedds to be deleted from original partition and VFAT/MFT after copy to new partition and adding to VFAT/MFT. Which in above example file is copied to new partition but can't be deleted from old one.

Ludek

2010-11-27 12:08

developer   ~0021507

Thanks Peke, you are right,
fixed in build 1329.

peke

2011-03-02 02:23

developer   ~0023489

Verified 1351