mame/plugins/boot.lua
Vas Crabb 38082ccbee
Overdue internal UI enhancements (#8674)
* frontend: Added support for message context to localisations.
* frontend: Added string_view versions of the message lookup functions.
* frontend: Added a few more folder options to the internal UI.
* emu/softlist.cpp: Use more appropriate containers.
* Switched to Python 3 by default - this will become a requirement.
* Updated msgfmt.py for message context support.
* frontend: Show all software item info in the internal UI.
* frontend: Search alternate titles in software selection menu.
* 3rdparty/utf8proc: Updated to v2.6.1 (has several fixes).
* frontend: Added software filters for common info fields.
* frontend: Allow UI manager to hold onto persistent session data.
* frontend: Cache software lists for eight machines.
* frontend: Added support for loading localised system names.
* frontend: Add UI for selecting localised system names.
2021-10-09 12:16:17 +11:00

29 lines
978 B
Lua

-- license:BSD-3-Clause
-- copyright-holders:Miodrag Milanovic
require('lfs')
_G._ = emu.lang_translate
_G.N_ = function (message) return message end
_G.N_p = function (context, message) return message end
_G.emu.plugin = {} -- table to contain plugin interfaces
-- substitute environment variables in the plugins path from options
local dirs = emu.subst_env(manager.options.entries.pluginspath:value())
-- and split the paths apart and make them suitable for package.path
package.path = ""
for dir in string.gmatch(dirs, "([^;]+)") do
if (package.path ~= "") then
package.path = package.path .. ";"
end
package.path = package.path .. dir .. "/?.lua;" .. dir .. "/?/init.lua"
end
for _,entry in pairs(manager.plugins) do
if (entry.type == "plugin" and entry.start) then
emu.print_verbose("Starting plugin " .. entry.name .. "...")
plugin = require(entry.name)
if plugin.set_folder~=nil then plugin.set_folder(entry.directory) end
plugin.startplugin();
end
end