Don't assume lite lives at the root of the repo
This commit is contained in:
parent
cb5132f393
commit
74d184597e
|
@ -1,4 +1,4 @@
|
||||||
(require :editor.lite)
|
(require :vendor.lite.main)
|
||||||
(local util (require :lib.util))
|
(local util (require :lib.util))
|
||||||
(local TileView (require :editor.tileedit))
|
(local TileView (require :editor.tileedit))
|
||||||
(local MapEditView (require :editor.mapedit))
|
(local MapEditView (require :editor.mapedit))
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../lite/main.lua
|
|
20
vendor/lite/main.lua
vendored
20
vendor/lite/main.lua
vendored
|
@ -233,14 +233,28 @@ function system.fuzzy_match(str, ptn)
|
||||||
end
|
end
|
||||||
table.unpack = unpack
|
table.unpack = unpack
|
||||||
|
|
||||||
|
|
||||||
|
PATHSEP = package.config:sub(1, 1)
|
||||||
ARGS = love.arg.parseGameArguments(arg)
|
ARGS = love.arg.parseGameArguments(arg)
|
||||||
VERSION = "1.11"
|
VERSION = "1.11"
|
||||||
PLATFORM = "love2d"
|
PLATFORM = "love2d"
|
||||||
SCALE = love.graphics.getDPIScale()
|
SCALE = love.graphics.getDPIScale()
|
||||||
|
|
||||||
|
local modname = ...
|
||||||
|
local ilastdot = modname:reverse():find("%.")
|
||||||
|
EXEDIR = modname:gsub("%.", PATHSEP)
|
||||||
|
if ilastdot then
|
||||||
|
EXEDIR = EXEDIR:sub(1, (-1 - ilastdot))
|
||||||
|
else
|
||||||
EXEDIR = ""
|
EXEDIR = ""
|
||||||
PATHSEP = package.config:sub(1, 1)
|
end
|
||||||
-- love.filesystem.mount(love.filesystem.getSourceBaseDirectory(), love.filesystem.getSourceBaseDirectory())
|
|
||||||
package.path = love.filesystem.getWorkingDirectory() .. '/data/?.lua;' .. love.filesystem.getWorkingDirectory() .. '/data/?/init.lua;' .. package.path
|
local literoot = love.filesystem.getWorkingDirectory()
|
||||||
|
if #EXEDIR > 0 then
|
||||||
|
literoot = literoot .. PATHSEP .. EXEDIR
|
||||||
|
end
|
||||||
|
package.path = literoot .. '/data/?/init.lua;' .. package.path
|
||||||
|
package.path = literoot .. '/data/?.lua;' .. package.path
|
||||||
|
|
||||||
function love.run()
|
function love.run()
|
||||||
local core = require('core')
|
local core = require('core')
|
||||||
|
|
Loading…
Reference in a new issue