diff --git a/source/app.d b/source/app.d index de7d6a5..221ace0 100644 --- a/source/app.d +++ b/source/app.d @@ -37,7 +37,7 @@ int main(string[] args) const ret = loadFreeImage(); if (ret == FISupport.noLibrary) - writeln("Couldn't load FreeImage!"); + writeln("FreeImage 3.18 is required!"); // start machine try @@ -58,7 +58,7 @@ int main(string[] args) } catch (Exception e) { - writeln("no config!"); + writeln("no config! creating default."); config = parseJSON("{}"); } if (!("drives" in config)) diff --git a/source/machine.d b/source/machine.d index a81ddb0..a23d839 100644 --- a/source/machine.d +++ b/source/machine.d @@ -26,7 +26,7 @@ import pixmap; import image_loader; import network; -const VERSION = "0.9.0"; /// version of the software +const VERSION = "0.9.1"; /// version of the software /** Class representing "the machine"! @@ -61,7 +61,7 @@ class Machine this() { if (loadSDL() != sdlSupport) - throw new Exception("SDL not work! :("); + throw new Exception("SDL2 2.0.8 is required!"); if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) != 0) throw new Exception(format("SDL_Init Error: %s", SDL_GetError())); diff --git a/source/program.d b/source/program.d index 84ad288..b68ea6c 100644 --- a/source/program.d +++ b/source/program.d @@ -68,9 +68,16 @@ class Program this.samples ~= null; // Load the Lua library. - dylib_load_lua(); - this.lua = luaL_newstate(); - luaL_openlibs(this.lua); + try + { + dylib_load_lua(); + this.lua = luaL_newstate(); + luaL_openlibs(this.lua); + } + catch (Throwable err) + { + writeln("Lua 5.3 is required!"); + } registerFunctions(this); string luacode = this.machine.luaFilepathVars(this.filename) ~ readText( this.actualFile(this.filename)); diff --git a/system_drive/libs/class.lua b/system_drive/libs/class.lua deleted file mode 100644 index 3c8df82..0000000 --- a/system_drive/libs/class.lua +++ /dev/null @@ -1,19 +0,0 @@ -print("Don't use class.lua.. object.lua is much better!") -fs.delete(_DIR .. _FILE) - -local Class = {} - -function Class:new(super, constructor) - local class = setmetatable({}, super or {}) - class.__index = class - if constructor then - class._new = constructor - function class:new(...) - local self = setmetatable({}, self) - self:_new(...) - return self - end - end - return class -end -return Class