#!/bin/sh -ex Xvfb :99 -screen 0 1280x1024x24 -nolisten tcp & set DISPLAY=:99 sleep 5 DISPLAY=:99 WINEDLLOVERRIDES="mscoree,mshtml=" wineboot -i # For some reason we have to set this here, having set .. ^ is not enough DISPLAY=:99 msiexec /i lua4win.msi & WIN="Lua4Win Installer 1.0 Setup" DISPLAY=:99 xdotool sleep 3 # Try to turn off underlined hotkeys wine reg add "HKCU\\Control Panel\\Accessibility\\Keyboard Preference" /v "On" /d "0" /f # What if we use keyboard shortcuts instead? DISPLAY=:99 xwd -name "$WIN" | magick xwd:- png:/root/1.png DISPLAY=:99 xdotool key --window $(DISPLAY=:99 xdotool search --sync --name "Installer") N DISPLAY=:99 xdotool sleep 3 DISPLAY=:99 xwd -name "$WIN" | magick xwd:- png:/root/2.png DISPLAY=:99 xdotool key --window $(DISPLAY=:99 xdotool search --sync --name "Installer") a DISPLAY=:99 xdotool sleep 3 DISPLAY=:99 xwd -name "$WIN" | magick xwd:- png:/root/3.png DISPLAY=:99 xdotool key --window $(DISPLAY=:99 xdotool search --sync --name "Installer") N DISPLAY=:99 xdotool sleep 3 DISPLAY=:99 xwd -name "$WIN" | magick xwd:- png:/root/4.png DISPLAY=:99 xdotool key --window $(DISPLAY=:99 xdotool search --sync --name "Installer") N DISPLAY=:99 xdotool sleep 3 DISPLAY=:99 xwd -name "$WIN" | magick xwd:- png:/root/5.png DISPLAY=:99 xdotool key --window $(DISPLAY=:99 xdotool search --sync --name "Installer") I DISPLAY=:99 xdotool sleep 3 DISPLAY=:99 xwd -name "$WIN" | magick xwd:- png:/root/6.png DISPLAY=:99 xdotool sleep 3 DISPLAY=:99 xwd -name "$WIN" | magick xwd:- png:/root/7.png DISPLAY=:99 xdotool key --window $(DISPLAY=:99 xdotool search --sync --name "Installer") F DISPLAY=:99 xdotool sleep 3 DISPLAY=:99 xwd -root | magick xwd:- png:/root/8.png tar -czf images.tar.gz *.png # Make sure we've installed it INSTALLDIR='/root/.wine/drive_c/Program Files (x86)/Lua4Win/Lua4Win 1.0' test -e "$INSTALLDIR/luajit.exe" test -e "$INSTALLDIR/luarocks.exe" wine "$INSTALLDIR/luarocks.exe" --help wine "$INSTALLDIR/luarocks.exe" config # Try installing something with it wine "luarocks install lpeg"