Now I want to create a script to automate the install of windows apps on linux through wine.So i thought that to accomplish this I need to create a script that makes a text file for every .exe and .msi file from a directory ,naming the text files after the apps.I used as source for this a topic from this area and I came up with this script ,that partially works:
Code: Select all
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
rm -f /tmp/txt
cd $HERE
find . -maxdepth 1 -type f \( -name "*.exe" -o -name "*.msi" \) -print > /tmp/txt
fgs=/tmp/txt
while IFS='' read -r line || [[ -n "$line" ]]; do
echo 'This is a test' > $line.txt
done < "$fgs"
Code: Select all
#!/bin/bash
env WINEPREFIX="/home/lns/.wine" /opt/wine-staging/bin/wine Z:\\\\tmp\\\\$line &
sleep 3
xdotool windowactivate
sleep 3
xdotool key Return
sleep 2
xdotool key space
sleep 2
xdotool key Return
sleep 2
xdotool key Down
sleep 2
xdotool key Tab
sleep 2
xdotool key Return
sleep 2
xdotool key Delete
sleep 2
xdotool type "C:\Program Files\VSTPlugins"
sleep 2
xdotool key Tab
sleep 2
xdotool key Return
sleep 2
xdotool key Tab
sleep 2
xdotool key Tab
sleep 2
xdotool key Tab
sleep 2
xdotool key Tab
sleep 2
xdotool key Return
sleep 2
xdotool key Return
sleep 2
xdotool key Return