Skip to content

Commit

Permalink
view error info1
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowinterCat committed Sep 29, 2024
1 parent b8f0d60 commit 7762775
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions packages/f/ffmpeg/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,28 @@ package("ffmpeg")

if package:is_plat("windows") then
table.insert(configs, "--extra-cflags=-" .. package:config("runtimes"))
try
{
-- try 代码块
function ()
if path.cygwin then -- xmake 2.8.9
import("package.tools.autoconf")
local envs = autoconf.buildenvs(package, {packagedeps = "libiconv"})
-- add gas-preprocessor to PATH
if package:is_arch("arm", "arm64") then
envs.PATH = path.join(os.programdir(), "scripts") .. path.envsep() .. envs.PATH
end
print("In path.cygwin")
try
{
function ()
autoconf.install(package, configs, {envs = envs})
end,
catch
{
function (errors)
print(errors)
io.cat("ffbuild/config.log")
assert(false)
end
}
}
else
import("core.base.option")
import("core.tool.toolchain")
Expand Down Expand Up @@ -245,6 +255,10 @@ package("ffmpeg")
end

table.insert(configs, "--prefix=" .. package:installdir():gsub("\\", "/"))
print("In others")
try
{
function ()
os.vrunv("./configure", configs, {shell = true, envs = envs})

local njob = option.get("jobs") or tostring(os.default_njob())
Expand All @@ -254,6 +268,16 @@ package("ffmpeg")
end
os.vrunv("make", argv, {envs = envs})
os.vrunv("make", {"install"}, {envs = envs})
end,
catch
{
function (errors)
print(errors)
io.cat("ffbuild/config.log")
assert(false)
end
}
}
end
if package:config("shared") then
-- move .lib from bin/ to lib/
Expand All @@ -264,16 +288,6 @@ package("ffmpeg")
os.vmv(libfile, (libfile:gsub("^(.+[\\/])lib(.+)%.a$", "%1%2.lib")))
end
end
end,
-- catch 代码块
catch
{
-- 发生异常后,被执行
function (errors)
io.cat("ffbuild/config.log")
end
}
}
elseif package:is_plat("android") then
import("core.base.option")
import("core.tool.toolchain")
Expand Down

0 comments on commit 7762775

Please sign in to comment.