Rewrite Metadata Validator/SoC 2008/Wine Browsers Setup

From Creative Commons
Revision as of 15:57, 15 June 2008 by Hdworak (talk | contribs) (Initial writing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If one wants to use two popular browsers (namely Safari and Microsoft Internet Explorer with Internet Explorer Developer Toolbar) under Ubuntu or one of its flavours to test the compatibility of his or her Web application, he or she must use Wine for this purpose. It is important to note that in order to run Microsoft Internet Explorer under Ubuntu, one has to obtain a legal copy of Microsoft Windows. One can also experience problems when installing Internet Explorer Developer Toolbar, because IEs 4 Linux installs Microsoft Internet Explorer 6 in such a fashion, that it runs under a simulated Microsoft Windows 98 environment, whereas the aforementioned toolbar requires Microsoft Windows 2000 or newer. If Wine-Doors is used to accomplish this goal, it may suffer from a bug that has been closed just recently (as of June 2008). The following public domain Bash script can be helpful to install both browsers:

#!/bin/bash
sudo apt-get install sed wget gedit wine binfmt-support msttcorefonts
cd ~
if [ ! -f ies4linux-latest.tar.gz ]
then
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
fi
if [ ! -f IEDevToolBarSetup.msi ]
then
wget http://download.microsoft.com/download/f/3/c/f3c93e70-ccdc-46c9-bbd4-70d94bdd0cc9/IEDevToolBarSetup.msi
fi
if [ ! -f SafariSetup.exe ]
then
wget http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari3/061-4602.20080416.t5rGb/SafariSetup.exe
fi
if [ ! -f winetricks ]
then
wget http://www.kegel.com/wine/winetricks
fi
chmod u+x winetricks
cat > theme.reg <<'EOF'
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Colors]
"ActiveBorder"="212 208 200"
"ActiveTitle"="10 36 106"
"AppWorkSpace"="128 128 128"
"Background"="58 110 165"
"ButtonAlternateFace"="181 181 181"
"ButtonDkShadow"="64 64 64"
"ButtonFace"="212 208 200"
"ButtonHilight"="255 255 255"
"ButtonLight"="212 208 200"
"ButtonShadow"="128 128 128"
"ButtonText"="0 0 0"
"GradientActiveTitle"="166 202 240"
"GradientInactiveTitle"="192 192 192"
"GrayText"="128 128 128"
"Hilight"="10 36 106"
"HilightText"="255 255 255"
"HotTrackingColor"="0 0 128"
"InactiveBorder"="212 208 200"
"InactiveTitle"="128 128 128"
"InactiveTitleText"="212 208 200"
"InfoText"="0 0 0"
"InfoWindow"="255 255 225"
"Menu"="212 208 200"
"MenuBar"="212 208 200"
"MenuHilight"="0 0 0"
"MenuText"="0 0 0"
"Scrollbar"="212 208 200"
"TitleText"="255 255 255"
"Window"="255 255 255"
"WindowFrame"="0 0 0"
"WindowText"="0 0 0"
EOF
mkdir ~/.browsers
WINEPREFIX=~/.browsers/safari wineprefixcreate
WINEPREFIX=~/.browsers/safari ./winetricks corefonts vcrun2005
WINEPREFIX=~/.browsers/safari wine SafariSetup.exe # uncheck additional commands
WINEPREFIX=~/.browsers/safari wineserver -k
WINEPREFIX=~/.browsers/safari regedit theme.reg
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux --no-gui --locale PL --basedir ~/.browsers
cd ~
rm -f ~/.browsers/ie6/.firstrun
sed -i 's/DllOverrides/DllOverridez/g;s/win98/win2k/g' ~/.browsers/ie6/user.reg
WINEPREFIX=~/.browsers/ie6 msiexec /i IEDevToolBarSetup.msi

The following commands have to be executed afterwards:

sed -i 's/DllOverridez/DllOverrides/g;s/win2k/win98/g' ~/.browsers/ie6/user.reg
WINEPREFIX=~/.browsers/ie6 regedit theme.reg
rm -rf ies4linux-* theme.reg IEDevToolBarSetup.msi ~/.browsers/ie6/.firstrun SafariSetup.exe