blob: 48323f9c8b3e149ed327bbaf8fc76a046dcbd564 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/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"
|