- NSIS Discussion
- 3.0 vs 2.0 (Winamp)
Archive: 3.0 vs 2.0 (Winamp)
Yathosho
11th August 2002 23:33 UTC
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!
liquidmotion
12th August 2002 04:27 UTC
correct me if i'm wrong, but wouldn't the problem lie in that winamp3 uses differently structured "components" rather than "plugins"?
kichik
12th August 2002 09:29 UTC
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.
Yathosho
12th August 2002 09:53 UTC
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.
kichik
12th August 2002 09:59 UTC
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.
Yathosho
12th August 2002 12:27 UTC
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.
Yathosho
12th August 2002 12:31 UTC
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.
kichik
12th August 2002 13:44 UTC
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.
EL-VIS2
12th August 2002 14:49 UTC
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.
Joost Verburg
12th August 2002 15:47 UTC
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.
EL-VIS2
12th August 2002 16:05 UTC
NSIS version
Sorry..... NSIS v1.98
veekee
12th August 2002 18:14 UTC
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:
kichik
12th August 2002 22:06 UTC
EL-VIS2's code attached.
kichik
12th August 2002 22:07 UTC
veekee's code attached.
Same goes here, please attach large scripts.
veekee
12th August 2002 22:46 UTC
glups !
really sorry about that, Mr. Moderator :cry: :cry: !
kichik
12th August 2002 23:00 UTC
Mr. Moderator forgives :D
Just trying to keep the forum readable and easy to navigate.
EL-VIS2
13th August 2002 10:18 UTC
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
Yathosho
8th October 2002 12:13 UTC
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: