Installation Packages [MM3]

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

jiri
Posts: 5433
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

Yes, when you execute a script/function from MMIP, you can do anything you would do using an ordinary MM script, including ini files editing. As for new sections and keys - they are created automatically when you write their values.

Jiri
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I see. I thought you might need to do it differently in this situation. :-?

Am I correct in thinking that during installation the [Execute] runs a file/function which is outside of the package and during the uninstallation the [Execute] runs just a file which is inside the package? Or can you also run a file/function which is inside the package during the installation?

How is the UpdateURL going to work? Presumably it will always point to an XML file in a certain format? Are there any details about what this XML file should contain?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

And on a slight side note (but very much related) - will there be an access method (like SDB.IniFile) to get straight to the Scripts.ini file? I know you can use SDB.Tools.IniFileByPath("...") to get to it, I was just wondering. :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Well I just tried my first one and it copied the files and wrote the ini entries correctly, however the "Tools, Scripts" menu bar was not updated. I thought the Scripts.ini file would be re-read after the installation - is this not the case? The uninstallation seems to work fine as well (all the files and ini entries were removed). :D
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
jiri
Posts: 5433
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

Re. Update of menu - you are right, it wasn't implemented yet, I added this method http://www.mediamonkey.com/wiki/index.p ... criptItems which resolves the issue.

Re. Uninstall - I slightly updated the documentation to make it clearer. Also, the next release will have several smaller improvement allowing you to execute any script or function from the uninstaller, not only uninstall.vbs.

Jiri
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Thanks for the info. Any comments on the access method to get the Scripts.ini file or more details about the UpdateURL ini key?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Has anyone managed to successfully create and install an installation package for a script yet? I'm still struggling!! :-?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Morten
Posts: 1092
Joined: Thu Aug 11, 2005 11:31 am
Location: Norway

Post by Morten »

I can sure try to make an installation package.
Best regards,
Morten
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Having much more success now - blame M$ Vista!

However, when I register an OnPlay event in the function which is executed by the Install.ini, the event does not fire. I know that the sub has run so the event must have been registered, well the code was called to register it anyway...

Code: Select all

Script.RegisterEvent SDB, "OnPlay", "CueReader"
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
gege
Posts: 866
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Post by gege »

I'm creating an installation package, but I'm having some trouble trying to figure out how to copy multiple files to diferent locations during installation process.

My script will use a structure like this:

Code: Select all

{app}
|__ Scripts\
    |__ Auto\
    |   |__ MyScript.vbs
    |
    |__ MyScript\
        |__ Languages\
        |   |__ english.lng
        |   |__ spanish.lng
        |   |__ portuguese.lng
        |
        |__ MyStyleSheet.css
        |__ MyImage1.png
        |__ MyImage2.png
- How should the [Copy] section of Install.ini file look like, in this case?
- If I try multiple Src=/Tgt= pairs, copying one file at a time, only the first file is copied. If try something like

Code: Select all

Src=MyScript\*.*
Tgt={app}\Scripts\MyScript\
the folder structure is lost... Is it possible to copy multiple files mantaining folder structure with just one Src=/Tgt= pair?
- In the Uninstall.ini, how can I delete the folders created by my script?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Each file needs to be done individually, like this...

Code: Select all

[Copy]
Src=CueReader.vbs
Tgt={app}\Scripts\Auto\CueReader.vbs

[Copy]
Src=edit.gif
File={app}\Scripts\Auto\edit.gif

[Copy]
Src=reset.gif
File={app}\Scripts\Auto\reset.gif
I don't know about deleting folders, that's an interesting question!
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
gege
Posts: 866
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Post by gege »

trixmoto wrote:Each file needs to be done individually, like this...
Thanks! I added this info to the wiki page.
trixmoto wrote:I don't know about deleting folders, that's an interesting question!
Yeah, it looks like we've got a lot to learn about this yet.
Last edited by gege on Fri Oct 12, 2007 12:20 pm, edited 1 time in total.
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

Trixmoto wrote:Each file needs to be done individually, like this...
Now that's really what I needed. Thanks for the answer :)
That said it's important to notice that because of this the ini file is not a standard INI file, as those don't have multiple sections with the same name. Confusing it is...
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Post by nohitter151 »

I'm having some trouble with an installation package as well. All I'm packaging is a skin, I basically took the WMP11 mmip, unzipped, and edited the ini values. I'm getting an "Invalid product installation package" error. It seems to me that it should work... the WMP11 installer did.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

If you email it to me I'll take a look, but I've not tried a skin one yet so I'm not sure if I can help.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Post Reply