[Wine] Re: Writing an automated install script

Timeout wineforum-user at winehq.org
Tue Apr 8 07:09:17 CDT 2008


New script with interesting output:


Code:

#!/bin/sh

# requires that the necessary files are in a directory "trados-installation" in home

wineprefixcreate
cp ~/trados-installation/SDLTrados2007_PRO_SP2_835.exe ~/.wine/drive_c/

cd ~/.wine/drive_c/windows/system32


if test -f msvcr70.dll
then
echo "file exists"
else
	cp ~/trados-installation/msvcr70.dll ~/.wine/drive_c/windows/system32
	wine regsvr32.exe msvcr70.dll
fi

if test -f fusion.dll
then
echo "file exists"
else
	cp ~/trados-installation/fusion.dll ~/.wine/drive_c/windows/system32 
	wine regsvr32.exe fusion.dll
fi

if test -f secur32.dll
then
echo "file exists"
else
	cp ~/trados-installation/secur32.dll ~/.wine/drive_c/windows/system32
	wine regsvr32.exe secur32.dll
fi



cd ../../../


wget www.kegel.com/winetricks
winetricks -q corefonts gecko wsh56js fakeie6 vcrun6

declare -x $loop1[=wine SDLTrados2007_PRO_SP2_835.exe&>log1.txt]
declare -x $loop2=[wine SDLTrados2007_PRO_SP2_835.exe&>log2.txt]

cd ~/.wine/drive_c

$loop1
{

# Screenshot 2a
if $button = "No to all"
then select $button [="No to all"]
fi


# Screenshot 4
if $link="Installation Software"
then select $link="Installation Software"
fi


# Screenshot 5

if	$link="Install SDL Trados 2007" 
then select $link="Install SDL Trados 2007"
fi

# Screenshot 6

if 	$button="Install" 
then select $button="Install"
fi 


# Screenshot 7

if read "Failed to install Microsoft .NET Framework 2.0. Continue with other components" 
then echo ".NET2 INSTALL FAILS!" && select $button="Yes"
fi


# Screenshot 8

if 	$button="Annehmen"
then select $button="Annehmen"
fi

# Screenshot 10

if read "I accept the terms in the license agreement" | "I do not accept the terms in the license agreement"  
then select "I accept the terms in the license agreement" 
fi

# Screenshot 11

if read = "User name"  then echo =  "test"
fi
if read = "Organisation" then echo = "test" && select $button = "Next"
fi


# Screenshot 1 als letzes Eingeben!
if $button="Next"
then select $button="Next"
fi

fi 
}

if [ test -f trados.exe ]
then


{
wine $loop2


#Screenshot 5
if $link ="Install SDL FLEXlm License server"
then select $link ="Install SDL FLEXlm License server"
fi

}

else
exit




Now to the interesting part:
It's not launching the installation yet, but I'm not far.
The script is not yet distinguishing the prompting of the wine installation with all other if and throwing me error because of the if (I have to find out why).
The interesting thing is that all winetricks and steps before are working, so if you go to drive_c and launch the installer of Trados, you start directly with the installation of the .NET2, throwing you a couple of exceptions like the ones I've seen later on Trados.
Tested on 0.9.59.







More information about the wine-users mailing list