Always generate API files

This commit is contained in:
cra0zy 2017-11-13 19:36:15 +01:00
parent 5d3c13f245
commit 153a77ad4b
6 changed files with 6 additions and 9 deletions

View file

@ -29,21 +29,21 @@ public class GAssembly
var temppath = P.Combine(Dir, name);
Csproj = temppath + ".csproj";
RawApi = temppath + "-api.raw";
RawApi = temppath + "-api.xml";
Metadata = temppath + ".metadata";
}
public void Prepare()
{
Cake.CreateDirectory(GDir);
var tempapi = P.Combine(GDir, Name + "-api.xml");
Cake.CopyFile(RawApi, tempapi);
// Raw API file found, time to generate some stuff!!!
if (Cake.FileExists(RawApi))
// Metadata file found, time to generate some stuff!!!
if (Cake.FileExists(Metadata))
{
// Fixup API file
var tempapi = P.Combine(GDir, Name + "-api.xml");
var symfile = P.Combine(Dir, Name + "-symbols.xml");
Cake.CopyFile(RawApi, tempapi);
Cake.DotNetCoreExecute("BuildOutput/Tools/GapiFixup.dll",
"--metadata=" + Metadata + " " + "--api=" + tempapi +
(Cake.FileExists(symfile) ? " --symbols=" + symfile : string.Empty)
@ -54,10 +54,7 @@ public class GAssembly
// Locate APIs to include
foreach(var dep in Deps)
{
var ipath = P.Combine("Source", "Libs", dep, dep + "-api.xml");
if (!Cake.FileExists(ipath))
ipath = P.Combine("Source", "Libs", dep, "Generated", dep + "-api.xml");
var ipath = P.Combine("Source", "Libs", dep, "Generated", dep + "-api.xml");
if (Cake.FileExists(ipath))
extraargs += " --include=" + ipath + " ";