diff options
Diffstat (limited to 'stage2')
-rw-r--r-- | stage2/Dockerfile | 4 | ||||
-rw-r--r-- | stage2/finish.png | bin | 0 -> 640 bytes | |||
-rwxr-xr-x | stage2/installer | 69 |
3 files changed, 73 insertions, 0 deletions
diff --git a/stage2/Dockerfile b/stage2/Dockerfile index da030c8..3878080 100644 --- a/stage2/Dockerfile +++ b/stage2/Dockerfile @@ -10,9 +10,13 @@ RUN ln -sf /bin/bash /bin/sh # to need all of the following once we've debugged this. RUN apt-get update && apt-get install -y \ + libglib2.0-0 \ python-xvfbwrapper \ ratpoison \ x11-apps \ x11-utils \ x11-xserver-utils \ xautomation + +COPY installer /xilinx-unpack/ +CMD /xilinx-unpack/installer diff --git a/stage2/finish.png b/stage2/finish.png Binary files differnew file mode 100644 index 0000000..4129820 --- /dev/null +++ b/stage2/finish.png diff --git a/stage2/installer b/stage2/installer new file mode 100755 index 0000000..0853c9c --- /dev/null +++ b/stage2/installer @@ -0,0 +1,69 @@ +#!/usr/bin/env python + +import subprocess, os, time, xvfbwrapper, itertools + +def run(*args, **kwargs): + return subprocess.Popen(args, **kwargs) + +def xte(*cmds): + subprocess.check_call(("xte",) + cmds) + +def xwininfo(): + print(subprocess.check_output(("xwininfo", "-root", "-tree"))) + +def ratpoison(*args): + cmd = ["ratpoison"] + cmd.extend(itertools.chain.from_iterable(("-c", a) for a in args)) + return subprocess.check_output(cmd) + +def main(): + with xvfbwrapper.Xvfb(fbdir = "/framebuf"): + print("DISPLAY={}".format(os.getenv("DISPLAY"))) + rat = run("ratpoison") + time.sleep(1) + + if False: + run("xsetroot", "-gray").wait() + run("xsetroot", "-cursor_name", "left_ptr", "-fg", "yellow", "-bg", "yellow").wait() + time.sleep(1) + xwininfo() + + xsetup = run("./xsetup", cwd = "/xilinx-unpack/Xilinx_ISE_DS_Lin_14.7_1015_1") + time.sleep(1) + xwininfo() + snooze = lambda: time.sleep(15) + + print("First screen") + snooze() + ratpoison("ratwarp 650 610", "ratclick") + + print("Second screen") + snooze() + ratpoison("ratwarp 250 420", "ratclick", + "ratwarp 250 444", "ratclick", + "ratwarp 650 610", "ratclick") + + print("Third screen") + snooze() + ratpoison("ratwarp 600 560", "ratclick", + "ratwarp 650 610", "ratclick") + + print("Fourth screen") + snooze() + ratpoison("ratwarp 300 100", "ratclick", + "ratwarp 650 610", "ratclick") + + for ith in ("Fifth", "Sixth", "Seventh"): + print(ith + " screen") + snooze() + ratpoison("ratclick") + + print("Waiting a few minutes, ^C if you get bored") + time.sleep(1800) + + # Need to do awful visgrep thing here to find the finish button. + # When we do find it: + #ratpoison("ratwarp 720 610", "ratclick", "quit") + +if __name__ == "__main__": + main() |