The forum

[script] Winamp

Author Replies
NSLW Monday 21 September 2009 at 9:27
NSLW

Hello,
I wrote script which installs Winamp
Wine version : 1.1.29
Distribution : Fedora
Distribution Version : 11 (32 bit)
Graphics card : Nvidia, GeForce 9xxx
Drivers of the graphics card : 190.32

Icon for the game:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
#!/bin/bash
# Date : (2009-09-21 09-00)
# Last revision : (2009-09-21 09-00)
# Wine version used : 1.1.29
# Distribution used to test : Fedora 11
# Author : NSLW
# Licence : Freeware
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
#fetching PROGRAMFILES environmental variable
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
 
TYTUL="Winamp"
PREFIX="Winamp"
WINAMPVER="556"
WORKINGWINEVERSION="1.1.29"
 
LNG_VERQUESTION="Which $TYTUL would you like to install?"
LNG_OWNVER="I've got my own installation file."
LNG_SETUPSEL="Select $TYTUL setup file"
LNG_WHICHLANG="Which language version would you like to install?"
LNG_DOWNLOADING="PlayOnLinux is downloading"
LNG_DOWNLOADINGANDINSTALLING="PlayOnLinux is downloading and installing"
LNG_INSTALLING="PlayOnLinux is installing"
LNG_DIBENGINE="Do you want to use DIB Engine (improves Media Library performance)?"
LNG_SUCCES="$TYTUL has been installed successfully"
LNG_ONLYDIVXCODECS="Please install only \\"DivX Codec\\" component"
 
POL_SetupWindow_make_icon_for_shortcut()
{
convert "$HOME/.local/share/icons/$2" -geometry 32X32 "$REPERTOIRE/icones/32/$1"
}
 
Get_Latest_Wine_Version()
{
wget http://mulx.playonlinux.com/wine/linux-i386/LIST --output-document="$REPERTOIRE/tmp/LIST"
xyz=`cat "$REPERTOIRE/tmp/LIST" | sed -e 's/\\.//g' | cut -d';' -f2 | sort -n | tail -n1`
echo "$(echo $xyz | cut -c1-1).$(echo $xyz | cut -c2-2).$(echo $xyz | cut -c3-4)"
}
 
download_DIBEngine()
{
cd "$REPERTOIRE/ressources/"
if [ ! -e "$REPERTOIRE/ressources/$WORKINGWINEVERSION-mod.zip" ]; then
POL_SetupWindow_download "Downloading DIB Engine" "$TYTUL" "http://www.sigmirror.com/files/30883_5ku8k/$WORKINGWINEVERSION-mod.zip"
fi
cd "$WINEPREFIX/drive_c/windows/temp/"
unzip "$REPERTOIRE/ressources/$WORKINGWINEVERSION-mod.zip"
./$WORKINGWINEVERSION-mod -y
cp dibengine/* ./
}
 
prepare_patched_WineVersion()
{
POL_SetupWindow_install_wine "$1"
cd "$REPERTOIRE/WineVersions"
POL_SetupWindow_wait_next_signal "Removing old WineVersion" "$TYTUL"
rm -fr "$1-$PREFIX"
POL_SetupWindow_detect_exit
  
POL_SetupWindow_wait_next_signal "Copying WineVersion" "$TYTUL"
cp -r "$1" "$1-$PREFIX"
rm -fr "$REPERTOIRE/WineVersions/$1-$PREFIX/usr/lib/wine/gdi32.dll.so"
cp "$WINEPREFIX/drive_c/windows/temp/gdi32.dll.so" "$REPERTOIRE/WineVersions/$1-$PREFIX/usr/lib/wine/gdi32.dll.so"
cp "$WINEPREFIX/drive_c/windows/temp/winedib.drv.so" "$REPERTOIRE/WineVersions/$1-$PREFIX/usr/lib/wine/winedib.drv.so"
POL_SetupWindow_detect_exit
}
 
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TYTUL" "Nullsoft" "www.winamp.com" "NSLW" "$PREFIX"
 
POL_SetupWindow_menu "$LNG_VERQUESTION" "$TYTUL" "Full~Bundle~Lite~Pro~$LNG_OWNVER" "~"
if [ "$APP_ANSWER" == "$LNG_OWNVER" ]; then
WINAMPFILE="$APP_ANSWER"
POL_SetupWindow_browse "$LNG_SETUPSEL" ""
else
    if [ "$APP_ANSWER" == "Full" ]; then
    NAMEENDING="full_emusic-7plus"
    elif [ "$APP_ANSWER" == "Bundle" ]
    then
    NAMEENDING="full_bundle_emusic-7plus"
    elif [ "$APP_ANSWER" == "Lite" ]
    then
    NAMEENDING="lite"
    elif [ "$APP_ANSWER" == "Pro" ]
    then
    NAMEENDING="pro"
    fi
 
    POL_SetupWindow_menu "$LNG_WHICHLANG" "$TYTUL" "English~Simplified Chinese~Traditional Chinese~Deutsch~Español~Français~Italiano~Japanese~Korean~Nederlands~Polski~Русский~Svenska~Turkish~Brazilian Portuguese~Romanian" "~"
    if [ "$APP_ANSWER" == "English" ]; then
    WINAMPLANGSHRT="all"
    elif [ "$APP_ANSWER" == "Simplified Chinese" ]
    then
    WINAMPLANGSHRT="zh-cn"
    elif [ "$APP_ANSWER" == "Traditional Chinese" ]
    then
    WINAMPLANGSHRT="zh-tw"
    elif [ "$APP_ANSWER" == "Deutsch" ]
    then
    WINAMPLANGSHRT="de-de"
    elif [ "$APP_ANSWER" == "Español" ]
    then
    WINAMPLANGSHRT="es-us"
    elif [ "$APP_ANSWER" == "Français" ]
    then
    WINAMPLANGSHRT="fr-fr"
    elif [ "$APP_ANSWER" == "Italiano" ]
    then
    WINAMPLANGSHRT="it-it"
    elif [ "$APP_ANSWER" == "Japanese" ]
    then
    WINAMPLANGSHRT="ja-jp"
    elif [ "$APP_ANSWER" == "Korean" ]
    then
    WINAMPLANGSHRT="ko-kr"
    elif [ "$APP_ANSWER" == "Nederlands" ]
    then
    WINAMPLANGSHRT="nl-nl"
    elif [ "$APP_ANSWER" == "Polski" ]
    then
    WINAMPLANGSHRT="pl-pl"
    elif [ "$APP_ANSWER" == "Русский" ]
    then
    WINAMPLANGSHRT="ru-ru"
    elif [ "$APP_ANSWER" == "Svenska" ]
    then
    WINAMPLANGSHRT="sv-se"
    elif [ "$APP_ANSWER" == "Turkish" ]
    then
    WINAMPLANGSHRT="tr-tr"
    elif [ "$APP_ANSWER" == "Brazilian Portuguese" ]
    then
    WINAMPLANGSHRT="pt-br"
    elif [ "$APP_ANSWER" == "Romanian" ]
    then
    WINAMPLANGSHRT="ro-ro"
    fi
 
    echo "$WINAMPLANGSHRT"
    WINAMPFILE="winamp${WINAMPVER}_${NAMEENDING}_${WINAMPLANGSHRT}.exe"
    echo "$WINAMPFILE"
 
    cd "$REPERTOIRE/ressources"
    #checking if Winamp is in ressources
    if [ ! -e "$WINAMPFILE" ]; then
    POL_SetupWindow_download "$LNG_DOWNLOADING $WINAMPFILE" "$TYTUL" "http://download.nullsoft.com/winamp/client/$WINAMPFILE"
    fi
fi
 
    select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
    LATESTVERSION=$(Get_Latest_Wine_Version)
    CHOSENWINEVERSION=$LATESTVERSION
    POL_SetupWindow_install_wine "$CHOSENWINEVERSION"
    Use_WineVersion "$CHOSENWINEVERSION"
    POL_SetupWindow_prefixcreate
 
cd "$REPERTOIRE/ressources"
if [ "`sha1sum < winetricks | sed 's/ .*//'`" != "153de6c6a751bee53e0125bd93a7e77e76d3d452" ]; then
wget http://winezeug.googlecode.com/svn/trunk/winetricks --output-document=winetricks
fi
 
mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
 
# checking if 3725.exe is in winetricks cache if not then download
if [ ! -e "3725.exe" ]
then
POL_SetupWindow_download "$LNG_DOWNLOADING wininet.dll" "$TYTUL" "http://download.microsoft.com/download/ie5/Update/1/WIN98/EN-US/3725.exe"
fi
 
# checking if cc32inst.exe is in winetricks cache if not then download
if [ ! -e "cc32inst.exe" ]
then
POL_SetupWindow_download "$LNG_DOWNLOADING MS common controls 5.80" "$TYTUL" "http://download.microsoft.com/download/platformsdk/redist/5.80.2614.3600/w9xnt4/en-us/cc32inst.exe"
fi
 
mkdir "$HOME/.winetrickscache/divx-7"
cd "$HOME/.winetrickscache/divx-7"
# checking if DivXInstaller.exe is in winetricks cache if not then download
if [ ! -e "DivXInstaller.exe" ]
then
POL_SetupWindow_download "$LNG_DOWNLOADING DivX codecs" "$TYTUL" "http://download.divx.com/divx/DivXInstaller.exe"
fi
 
cd "$REPERTOIRE/ressources"
#installing ie6
POL_SetupWindow_wait_next_signal "$LNG_DOWNLOADINGANDINSTALLING Internet Explorer 6\\n\\nPlease be patient ca. 12 MB is being downloaded." "$TYTUL"
bash winetricks -q ie6
POL_SetupWindow_detect_exit
 
#installing ffdshow (IMO codecs are causing unhandeled exceptions)
#POL_SetupWindow_wait_next_signal "$LNG_DOWNLOADINGANDINSTALLING ffdshow codecs\\n\\nPlease be patient ca. 4 MB is being downloaded." "$TYTUL"
#bash winetricks -q ffdshow
#POL_SetupWindow_detect_exit
 
#installing wininet
POL_SetupWindow_wait_next_signal "$LNG_INSTALLING wininet.dll" "$TYTUL"
bash winetricks -q wininet
POL_SetupWindow_detect_exit
 
#installing cc32inst.exe
POL_SetupWindow_wait_next_signal "$LNG_INSTALLING MS common controls 5.80" "$TYTUL"
bash winetricks -q cc580
POL_SetupWindow_detect_exit
 
#temporary fix
cd "$WINEPREFIX/drive_c/windows/temp"
cat "$REPERTOIRE/ressources/winetricks" | sed -e 's/786aef0f421df5e7358d2d740d9911f9afd055de/ad420bf8bf72e924e658c9c6ad6bba76b848fb79/' > winetricks
 
POL_SetupWindow_message_image "$LNG_ONLYDIVXCODECS" "$TYTUL" "/usr/share/playonlinux/themes/tango/info.png"
#installing DivX
POL_SetupWindow_wait_next_signal "$LNG_INSTALLING DivX codecs" "$TYTUL"
bash winetricks -q divx
POL_SetupWindow_detect_exit
 
cd "$REPERTOIRE/ressources"
#installing Winamp
POL_SetupWindow_wait_next_signal "$LNG_INSTALLING $WINAMPFILE" "$TYTUL"
wine "$WINAMPFILE"
POL_SetupWindow_detect_exit
 
POL_SetupWindow_reboot
 
#asking about DIB Engine
POL_SetupWindow_question "$LNG_DIBENGINE" "$TYTUL"
if [ "$APP_ANSWER" == "TRUE" ] ;then
    CHOSENWINEVERSION=$LATESTVERSION-$PREFIX
    download_DIBEngine
    prepare_patched_WineVersion "$LATESTVERSION"
    cd "$WINEPREFIX/drive_c/windows/temp/"
    echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DIB Engine]" > dib.reg
    echo "\\"Enable\\"=\\"Y\\"" >> dib.reg
    regedit dib.reg
fi
 
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Winamp" "winamp.exe" "" "$TYTUL" "" ""
POL_SetupWindow_make_icon_for_shortcut "$TYTUL" "0e5b_winamp.0.png"
Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL"
 
POL_SetupWindow_message "$LNG_SUCCES" "$TYTUL"
 
POL_SetupWindow_Close
exit

Edited by NSLW

grohino Thursday 24 May 2012 at 9:29
grohinoAnonymous

Hi,

Thank you for this script!
Can you tell us what version of winamp can work?
I saw there (http://www.wine-reviews.net/applications/winamp-55-on-linux-with-wine.html) that Winamp 5.5 is fine.

By the way, I'm asking another question.
I want to install Winamp on a iMac I just bought, and use PlayonMac (wich seems to be the best way for running winamp).
You wrote à script for PlayOnLinux. Does your script work with PlayOnMac, and what is the way to make this work?

Thank you for time/answer,

have à nice day!

Grohino
Quentin PÂRIS Thursday 24 May 2012 at 12:36
Quentin PÂRISAnonymous

Do not use this script! It's out to date, and it won't work.

I will rewrite a winamp script if you want soon

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca@playonlinux.com