mirror of
https://github.com/kepler155c/opus
synced 2025-10-28 06:07:41 +00:00
move apis into rom/modules/main for shell compatibility
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
_G.requireInjector(_ENV)
|
||||
|
||||
local Peripheral = require('peripheral')
|
||||
local Peripheral = require('opus.peripheral')
|
||||
|
||||
_G.device = Peripheral.getList()
|
||||
|
||||
@@ -24,8 +24,8 @@ _G.device.mouse = {
|
||||
state = { },
|
||||
}
|
||||
|
||||
local Input = require('input')
|
||||
local Util = require('util')
|
||||
local Input = require('opus.input')
|
||||
local Util = require('opus.util')
|
||||
|
||||
local device = _G.device
|
||||
local kernel = _G.kernel
|
||||
|
||||
@@ -3,7 +3,7 @@ if fs.native then
|
||||
end
|
||||
|
||||
_G.requireInjector(_ENV)
|
||||
local Util = require('util')
|
||||
local Util = require('opus.util')
|
||||
|
||||
-- TODO: support getDrive for virtual nodes
|
||||
|
||||
@@ -256,7 +256,7 @@ end
|
||||
local function getfstype(fstype)
|
||||
local vfs = fstypes[fstype]
|
||||
if not vfs then
|
||||
vfs = require('fs.' .. fstype)
|
||||
vfs = require('opus.fs.' .. fstype)
|
||||
fs.registerType(fstype, vfs)
|
||||
end
|
||||
return vfs
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local Util = require('util')
|
||||
local Util = require('opus.util')
|
||||
|
||||
local device = _G.device
|
||||
local kernel = _G.kernel
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local Util = require('util')
|
||||
local Util = require('opus.util')
|
||||
|
||||
local fs = _G.fs
|
||||
local shell = _ENV.shell
|
||||
@@ -43,7 +43,7 @@ end
|
||||
|
||||
shell.setPath(table.concat(path, ':'))
|
||||
|
||||
_G.LUA_PATH = config.lua_path
|
||||
_G.settings.set('mbs.shell.require_path', config.lua_path)
|
||||
--_G.LUA_PATH = config.lua_path
|
||||
--_G.settings.set('mbs.shell.require_path', config.lua_path)
|
||||
|
||||
fs.loadTab('usr/config/fstab')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
_G.requireInjector(_ENV)
|
||||
|
||||
local Config = require('config')
|
||||
local Config = require('opus.config')
|
||||
|
||||
local device = _G.device
|
||||
local kernel = _G.kernel
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local Packages = require('packages')
|
||||
local Util = require('util')
|
||||
local Packages = require('opus.packages')
|
||||
local Util = require('opus.util')
|
||||
|
||||
local fs = _G.fs
|
||||
local help = _G.help
|
||||
@@ -22,7 +22,7 @@ for name in pairs(Packages:installed()) do
|
||||
table.insert(appPaths, 1, packageDir)
|
||||
local apiPath = fs.combine(packageDir, 'apis')
|
||||
if fs.exists(apiPath) then
|
||||
fs.mount(fs.combine('sys/apis', name), 'linkfs', apiPath)
|
||||
fs.mount(fs.combine('rom/modules/main', name), 'linkfs', apiPath)
|
||||
end
|
||||
|
||||
local helpPath = '/' .. fs.combine(packageDir, 'help')
|
||||
@@ -33,3 +33,5 @@ end
|
||||
|
||||
help.setPath(table.concat(helpPaths, ':'))
|
||||
shell.setPath(table.concat(appPaths, ':'))
|
||||
|
||||
fs.mount('rom/modules/main/opus', 'linkfs', 'sys/modules/opus')
|
||||
|
||||
@@ -2,10 +2,10 @@ if not _G.turtle then
|
||||
return
|
||||
end
|
||||
|
||||
local Pathing = require('pathfind')
|
||||
local Point = require('point')
|
||||
local synchronized = require('sync').sync
|
||||
local Util = require('util')
|
||||
local Pathing = require('opus.pathfind')
|
||||
local Point = require('opus.point')
|
||||
local synchronized = require('opus.sync').sync
|
||||
local Util = require('opus.util')
|
||||
|
||||
local os = _G.os
|
||||
local peripheral = _G.peripheral
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
_G.requireInjector(_ENV)
|
||||
|
||||
local Config = require('config')
|
||||
local trace = require('trace')
|
||||
local Util = require('util')
|
||||
local Config = require('opus.config')
|
||||
local trace = require('opus.trace')
|
||||
local Util = require('opus.util')
|
||||
|
||||
local colors = _G.colors
|
||||
local fs = _G.fs
|
||||
|
||||
Reference in New Issue
Block a user