Installation Packages [MM3]

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

Moderators: Gurus, Addon Administrators

gege
Posts: 866
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Post by gege »

trixmoto,
have you already tried to create an installation pack whose Install.ini contains more than nine [Copy] sections? (Think about MonkeyRok for MM3 ;-) )

It looks like extensions installation routine can't manage more than nine files to be copied :-(
If an Install.ini contains, say, twelve [Copy] sections, the last three will be ignored...

Can you confirm this?
trixmoto
Posts: 10023
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I'll give it a go but if it happens for you, it probably will for me to! :)
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.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Post by nohitter151 »

trixmoto wrote: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.
A little late but.. thanks for the help Trix!
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.
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

Small improvement that would make quite a difference is to be able to inform the user that the install failed.

For that the routine under Execute should return an int with 0 = success all else represents a failure.

This would be nice in case you cannot install for some reason and you abort.

ATM the user still gets a box with installation success.

Regards,
Red
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

What is the format that the xml file has to have so that MM3 is able to update the scripts?

Must the protocol be http or is ftp also fine?

Thx,
Red
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

Nope, asking this because these questions are not answered in the wiki.
gege
Posts: 866
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Post by gege »

RedX wrote:What is the format that the xml file has to have so that MM3 is able to update the scripts?
Must the protocol be http or is ftp also fine?
Specification hasn't been published yet.
Let's hope the devs do it soon...
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Hi,
I've a question: Where do I define the script.ini-entries? Can this be done over that installer?

Big_Berny
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

Big_Berny wrote:Hi,
I've a question: Where do I define the script.ini-entries? Can this be done over that installer?

Big_Berny
Works with any ini file:
For MediaMonkey.ini use the SDB.iniFile object

Code: Select all

'Taken from AlbumArtTagger and Modified for AdvShutdown
Dim inip : inip = SDB.ApplicationPath&"Scripts\Scripts.ini"
	Dim inif : Set inif = SDB.Tools.IniFileByPath(inip)
	If Not (inif Is Nothing) Then
		inif.StringValue("AdvShutdown","Filename") = "Auto\AdvShutdown.vbs"
		inif.StringValue("AdvShutdown","Procname") = "ShutdownUI"
		inif.StringValue("AdvShutdown","Order") = "99"
		inif.StringValue("AdvShutdown","DisplayName") = "Advanced Shutdown"
		inif.StringValue("AdvShutdown","Description") = "Shuts down PC after some time with more options"
		inif.StringValue("AdvShutdown","Language") = "VBScript"
		inif.StringValue("AdvShutdown","ScriptType") = "0"
		inif.StringValue("AdvShutdown","Shortcut") = "Ctr+Shift+s"
		SDB.RefreshScriptItems
	End If
To Remove when uninstalling:

Code: Select all

Dim inip : inip = SDB.ApplicationPath&"Scripts\Scripts.ini"
Dim inif : Set inif = SDB.Tools.IniFileByPath(inip)
If Not (inif Is Nothing) Then
  inif.DeleteSection("AdvShutdown")
  SDB.RefreshScriptItems
End If
Regards, Red
gege
Posts: 866
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Post by gege »

OK, RedX, you were faster than me, but I'll put my answer, anyway ;-)

Big_Berny, first you need to put a section like this in your install.ini:

Code: Select all

[Execute]
File=Install.vbs
Function=Install()
Then, you need to create an Install.vbs like this:

Code: Select all

Sub Install()

  'You can use this to create the entry in Scripts.ini
  Dim inipath : inipath = SDB.ApplicationPath&"Scripts\Scripts.ini"
  Dim ini : Set ini = SDB.Tools.IniFileByPath(inipath)
  If Not (ini Is Nothing) Then
    ini.StringValue("YourScriptSection","Filename") = "YourScript.vbs"
    ini.StringValue("YourScriptSection","Procname") = "YourScript"
    ini.StringValue("YourScriptSection","Order") = "30"
    ini.StringValue("YourScriptSection","DisplayName") = "Your script menu item..."
    ini.StringValue("YourScriptSection","Description") = "Your script description"
    ini.StringValue("YourScriptSection","Language") = "VBScript"
    ini.StringValue("YourScriptSection","ScriptType") = "0"    
  End If
  SDB.RefreshScriptItems


  'And this can be used to store default settings for your script during install
  Set ini = SDB.IniFile
  If Not (ini Is Nothing) Then
    'We define default settings only if they do not exist in ini file yet
    If ini.StringValue("YourScriptSection","ShowSomething") = "" Then 
       ini.BoolValue("YourScriptSection","ShowSomething") = False
	  End If
	  
    If ini.StringValue("YourScriptSection","DoThat") = "" Then 
       ini.BoolValue("YourScriptSection","DoThat") = True
    End If
    
    If ini.StringValue("YourScriptSection","SomeStringValue") = "" Then 
       ini.StringValue("YourScriptSection","SomeStringValue") = "Blah"
    End If
    
    If ini.StringValue("YourScriptSection","SomeNumericalValue") = "" Then 
       ini.IntValue("YourScriptSection","SomeNumericalValue") = 8
    End If 
   End If

End Sub
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Thanks! :)

A little question about your solution, gege:
Do I have to copy this Install.vbs somewhere (for example to the scripts-folder= or can it just be party of the 'zip'-file?
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
gege
Posts: 866
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Post by gege »

Big_Berny wrote:A little question about your solution, gege:
Do I have to copy this Install.vbs somewhere (for example to the scripts-folder= or can it just be party of the 'zip'-file?
You just need to put it in the root of your zip file.
Big_Berny
Posts: 1784
Joined: Mon Nov 28, 2005 11:55 am
Location: Switzerland
Contact:

Post by Big_Berny »

Thanks!

But do you all have the problem that in Vista UAC has to be disabled to install a script with that installer? I used the standard scripts from the wiki...
Image
Scripts in use: Genre Finder / Last.fm DJ / Magic Nodes / AutoRateAccurate / Last.FM Node
Skins in use: ZuneSkin SP / Eclipse SP
AutoRateAccurate 3.0.0 (New) - Rates all your songs in less than 5 seconds!
About me: icoaching - internet | marketing | design
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

just got word that all skins for mm 3 SHOULD be in an install package. it was said should be, meaning that it might be alright not to be in one.

so i took it that it was a good idea to make them for the skins.

now i'll need to read this and figure out how to make one.
so i go to the wiki and found there are two ways of doing it.
via the ini,
or the vbs.

so which is the best way and why do i need to use the code in the above that is a reply to big berny?

and why can't i just use my zip programs abilty to make zip exe programs that will remember the path to load the file in?

:o :-? :( :-?
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
Post Reply