1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/build.py Sat Jun 27 17:51:51 2015 +0200
1.3 @@ -0,0 +1,24 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +from UEFfile import UEFfile
1.7 +from subprocess import call
1.8 +from os import remove
1.9 +
1.10 +def readfile(filename):
1.11 + f = open(filename, "rb")
1.12 + try:
1.13 + return f.read()
1.14 + finally:
1.15 + f.close()
1.16 +
1.17 +call(["ophis", "-o", "switcher.bin", "switcher.oph"])
1.18 +
1.19 +uef = UEFfile()
1.20 +uef.import_files(0, [
1.21 + ("SWITCHER", 0x2000, 0x2000, readfile("switcher.bin"))
1.22 + ])
1.23 +uef.write("switcher.uef", write_emulator_info=False)
1.24 +
1.25 +remove("switcher.bin")
1.26 +
1.27 +# vim: tabstop=4 expandtab shiftwidth=4