#!./luajit
--[[
compatibility wrapper

this replaces the former standalone binary which invoked the Lua interpreter/compiler.
now, we use the "default" interpreter/compiler
]]--

require "libs/libkoreader-cre"
require "libs/libkoreader-djvu"
require "libs/libkoreader-input"
require "libs/libkoreader-koptcontext"
require "libs/libkoreader-lfs"
require "libs/libkoreader-pdf"
require "libs/libkoreader-pic"
require "libs/libkoreader-luagettext"
require "libs/libkoreader-kobolight"

-- libraries converted to FFI:
DrawContext = require("ffi/drawcontext")
Blitbuffer = require("ffi/blitbuffer")
freetype = require("ffi/freetype")
Image = require("ffi/mupdfimg")
util = require("ffi/util")
einkfb = require("ffi/framebuffer")

if not arg[1] then
	error("you must give the name of the main lua executable as the first argument")
end
local file = arg[1]
table.remove(arg, 1)

ARGV=arg

dofile(file)
