[no ci] Change icon, temporary fix for dylib loading (#328)
* Move build directory * Move build folder * Move the build folder * Update Mac OS icon * Use snapshot icon * Use icon file * Temporary fix for Mac OS dylib loading * Update require.lua * Update require.lua * Update require.lua * Update require.lua Remember to squash this. * “简化”require模块对于OS X环境的处理方法 Co-authored-by: MrZ626 <1046101471@qq.com>
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package.cpath=package.cpath..';'..SAVEDIR..'/lib/lib?.so;'..'?.dylib'
|
||||
local loaded={}
|
||||
return function(libName)
|
||||
if SYSTEM=='Android'then
|
||||
local require=require
|
||||
if SYSTEM=='OS X'then
|
||||
require=package.loadlib(libName..'.dylib','luaopen_'..libName)
|
||||
libname=nil
|
||||
elseif SYSTEM=='Android'then
|
||||
if not loaded[libName]then
|
||||
local platform=(function()
|
||||
local p=io.popen('uname -m')
|
||||
@@ -20,10 +24,10 @@ return function(libName)
|
||||
loaded[libName]=true
|
||||
end
|
||||
end
|
||||
local r1,r2,r3=pcall(require,libName)
|
||||
if r1 and r2 then
|
||||
return r2
|
||||
local success,res=pcall(require,libName)
|
||||
if success and res then
|
||||
return res
|
||||
else
|
||||
MES.new('error',"Cannot load "..libName..": "..(r2 or r3))
|
||||
MES.new('error',"Cannot load "..libName..": "..res)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user