Archive: 3.0 vs 2.0 (Winamp)


3.0 vs 2.0 (Winamp)
greatWho pointed me to a problem in his post. winamp plugin authors that want to support both, the old and the new versions of winamp will have to face a problem. winamp 3.0 has a different directory structure and different way to save its settings (ini-files).

i started writing a function that checks for the installed version of winamp (none, 2.x only, 3.x only, both). but i figured that this doesn't go far enough. even if i can determine the version installed, i still have to blow my code with two various ways to setup the plugin properly.

winamp 2 saves its settings in winamp.ini and the plugins in winamp\plugins

winamp 3 saves its settings in studio.ini and the plugins (called components) in winamp\wacs\data

although i can't figure out a way to avoid two different ways of setup (in one installer) to deal with the ini-files, it would help to get an outdir variable for plugin-directories. i remember older versions of nsis had a variable called $WAVSDIR (or similiar, can't really remember) to adress the plugin directory of winamp. it would be nice to see a feature in future versions of nsis to get back something like this. this should work with both versions of winamp.

ideas? let us know!


correct me if i'm wrong, but wouldn't the problem lie in that winamp3 uses differently structured "components" rather than "plugins"?


You don't have to split your code. Just create generic functions such as GetPluginsDir that will return the correct plug-ins dir without letting the scripter worry about the version of Winamp.


ah, thats nice (i love you kichik). is there a similiar way for the ini-file? the studio.ini of winamp still has the the structure as the old winamp.ini, although not all commands are supported. but it is possible to widely configure AVS through that .ini, don't know about other plugins.


What you need is a function that returs the filename of the INI to edit. BTW, I just want to make sure you have noticed that winamp.exe has version info in it so you can use GetDLLVersion to get Winamp's version.


the problem might be, that winamp 2 and 3 have different registry-entries and directories. so one still has to query the registry to find that out (i think its the safest way). the getversion would be unnecessary then.

i think i'll find a clever function to accomplish the problem. will keep you updated.


i was wondering if it is possible to label the buttons of the messagebox. in the documentation i found MB_DEFBUTTON1, but i don't know if this helps solving my problem, nor how to use it. i want to buttons for my messagebox, let's name the "button 1" and "button 2" for the example.


As far as I know it isn't possible to change the buttons captions with just the MessageBox API call.

Let me know when you finish writing these function and I will add them to functions.htm.


Testing for both version and giving choice
For NSIS v1.98
This tests for winamp2 and winamp3 and gives choice if both version are found. Don't know if perfect yet but I've tested it several times and it seems to work correct...

edited by KiCHiK: script attached below :down:
Please attach large scripts next time to keep the forum tidy.


Re: Testing for both version and giving choice

Originally posted by EL-VIS2
For NSISW 1.4
MakeNSISW is just the Window Wrapper, this is not the NSIS version.

NSIS version
Sorry..... NSIS v1.98


For those who noticed that Winamp was using XML files to store config info :
as a member of the french community, i created a little script that will parch an XML file (here, i had to change language used from english to french ;) ) !
I know that the code s***, but this works ;) !

How to use it :

Push "$INSTDIR\studio.xnf"
Push '<entry name="Language" value="'
Push 'FR" />'
Push '<section name="{3CBD4483-DC44-11D3-B608-000086340885}">'
Call XML_Replace

edited by KiCHiK: script attached below :down:


EL-VIS2's code attached.


veekee's code attached.
Same goes here, please attach large scripts.


glups !
really sorry about that, Mr. Moderator :cry: :cry: !


Mr. Moderator forgives :D
Just trying to keep the forum readable and easy to navigate.


Full Basic Script
Here's my basic AVS-NSIS script:

- checking for winamp verions and giving choice if both are found
- verifying install path and giving warning if no winamp is found
- uninstaller
- link to uninstall exe
- running winamp

I did no reg-entries and no ini-changes. If you need to refer to GreatWhos' scripting:

http://forums.winamp.com/showthread....threadid=98454


Originally posted by killahbite
i was wondering if it is possible to label the buttons of the messagebox. in the documentation i found MB_DEFBUTTON1, but i don't know if this helps solving my problem, nor how to use it. i want to buttons for my messagebox, let's name the "button 1" and "button 2" for the example.
still an open question or an requested feature :D

i want custome messagebox buttons :up: