#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
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
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"
if
[ ! -e
"$WINAMPFILE"
];
then
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"
if
[ ! -e
"3725.exe"
]
then
fi
if
[ ! -e
"cc32inst.exe"
]
then
fi
mkdir
"$HOME/.winetrickscache/divx-7"
cd
"$HOME/.winetrickscache/divx-7"
if
[ ! -e
"DivXInstaller.exe"
]
then
fi
cd
"$REPERTOIRE/ressources"
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
POL_SetupWindow_wait_next_signal
"$LNG_INSTALLING wininet.dll"
"$TYTUL"
bash
winetricks -q wininet
POL_SetupWindow_detect_exit
POL_SetupWindow_wait_next_signal
"$LNG_INSTALLING MS common controls 5.80"
"$TYTUL"
bash
winetricks -q cc580
POL_SetupWindow_detect_exit
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"
POL_SetupWindow_wait_next_signal
"$LNG_INSTALLING DivX codecs"
"$TYTUL"
bash
winetricks -q divx
POL_SetupWindow_detect_exit
cd
"$REPERTOIRE/ressources"
POL_SetupWindow_wait_next_signal
"$LNG_INSTALLING $WINAMPFILE"
"$TYTUL"
wine
"$WINAMPFILE"
POL_SetupWindow_detect_exit
POL_SetupWindow_reboot
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