mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-15 07:41:21 +02:00
fixes to the failing test systems
This commit is contained in:
@@ -75,3 +75,6 @@ mobile/ios/bundle_id.local
|
|||||||
/dist/native/
|
/dist/native/
|
||||||
/dist/win/
|
/dist/win/
|
||||||
/.bazinga/
|
/.bazinga/
|
||||||
|
|
||||||
|
# Local options / preferences
|
||||||
|
/options.lua*
|
||||||
|
|||||||
@@ -116,6 +116,8 @@ local physfsMountFn = nil
|
|||||||
local function resolveMount()
|
local function resolveMount()
|
||||||
if physfsMountFn ~= nil then return physfsMountFn end
|
if physfsMountFn ~= nil then return physfsMountFn end
|
||||||
physfsMountFn = false
|
physfsMountFn = false
|
||||||
|
if Platform.isUWP() then return physfsMountFn end
|
||||||
|
if love and love.filesystem and love.filesystem._mounts then return physfsMountFn end
|
||||||
local ok, ffi = pcall(require, "ffi")
|
local ok, ffi = pcall(require, "ffi")
|
||||||
if not ok then return physfsMountFn end
|
if not ok then return physfsMountFn end
|
||||||
pcall(ffi.cdef,
|
pcall(ffi.cdef,
|
||||||
@@ -159,6 +161,8 @@ local physfsUnmountFn = nil
|
|||||||
local function resolveUnmount()
|
local function resolveUnmount()
|
||||||
if physfsUnmountFn ~= nil then return physfsUnmountFn end
|
if physfsUnmountFn ~= nil then return physfsUnmountFn end
|
||||||
physfsUnmountFn = false
|
physfsUnmountFn = false
|
||||||
|
if Platform.isUWP() then return physfsUnmountFn end
|
||||||
|
if love and love.filesystem and love.filesystem._mounts then return physfsUnmountFn end
|
||||||
local ok, ffi = pcall(require, "ffi")
|
local ok, ffi = pcall(require, "ffi")
|
||||||
if not ok then return physfsUnmountFn end
|
if not ok then return physfsUnmountFn end
|
||||||
pcall(ffi.cdef, "int PHYSFS_unmount(const char *oldDir);")
|
pcall(ffi.cdef, "int PHYSFS_unmount(const char *oldDir);")
|
||||||
|
|||||||
@@ -1666,7 +1666,7 @@ function RomImporter:_installMod(source)
|
|||||||
if not checkTarget and type(res) == "string" then
|
if not checkTarget and type(res) == "string" then
|
||||||
checkTarget = { id = res }
|
checkTarget = { id = res }
|
||||||
end
|
end
|
||||||
if checkTarget then
|
if checkTarget and LauncherMods.checkDependencies then
|
||||||
local depCheck = LauncherMods.checkDependencies(checkTarget)
|
local depCheck = LauncherMods.checkDependencies(checkTarget)
|
||||||
if depCheck and depCheck.hasIssues then
|
if depCheck and depCheck.hasIssues then
|
||||||
self._modDepResolver = depCheck
|
self._modDepResolver = depCheck
|
||||||
|
|||||||
@@ -8,11 +8,16 @@ local function quote(value)
|
|||||||
return "'" .. tostring(value):gsub("'", "'\\''") .. "'"
|
return "'" .. tostring(value):gsub("'", "'\\''") .. "'"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function execOk(cmd)
|
||||||
|
local status = os.execute(cmd)
|
||||||
|
return status == 0 or status == true
|
||||||
|
end
|
||||||
|
|
||||||
local function full(path) return root .. "/" .. path end
|
local function full(path) return root .. "/" .. path end
|
||||||
|
|
||||||
local fs = {}
|
local fs = {}
|
||||||
function fs.createDirectory(path)
|
function fs.createDirectory(path)
|
||||||
return os.execute("mkdir -p " .. quote(full(path))) == 0
|
return execOk("mkdir -p " .. quote(full(path)))
|
||||||
end
|
end
|
||||||
function fs.write(path, body)
|
function fs.write(path, body)
|
||||||
local parent = path:match("^(.*)/[^/]+$")
|
local parent = path:match("^(.*)/[^/]+$")
|
||||||
@@ -34,7 +39,7 @@ function fs.remove(path)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
function fs.getInfo(path)
|
function fs.getInfo(path)
|
||||||
if os.execute("test -d " .. quote(full(path))) == 0 then
|
if execOk("test -d " .. quote(full(path))) then
|
||||||
return { type = "directory" }
|
return { type = "directory" }
|
||||||
end
|
end
|
||||||
local handle = io.open(full(path), "rb")
|
local handle = io.open(full(path), "rb")
|
||||||
|
|||||||
Reference in New Issue
Block a user