Skip to content

Commit

Permalink
Copy afdko binaries to build
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyDuchess committed Jul 7, 2024
1 parent 16e7420 commit d630d3d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Assets/Editor/OpenTS2/AFDKOBuildPostProcessor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;

namespace OpenTS2
{
public class AFDKOBuildPostProcessor : IPostprocessBuildWithReport
{
public int callbackOrder => 0;

public void OnPostprocessBuild(BuildReport report)
{
var buildPath = Path.GetDirectoryName(report.summary.outputPath);
var afdkoFiles = Directory.GetFiles("afdko");
var afdkoOutputPath = Path.Combine(buildPath, "afdko");
if (Directory.Exists(afdkoOutputPath))
Directory.Delete(afdkoOutputPath, true);
var dir = Directory.CreateDirectory(afdkoOutputPath);
foreach(var file in afdkoFiles)
{
File.Copy(file, Path.Combine(afdkoOutputPath, Path.GetFileName(file)));
}
}
}
}
11 changes: 11 additions & 0 deletions Assets/Editor/OpenTS2/AFDKOBuildPostProcessor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Assets/Scripts/OpenTS2/UI/Skia/PFBFontConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace OpenTS2.UI.Skia
{
// TODO - Include builds for different architectures.
public static class PFBFontConverter
{
private const string TXPath = "afdko/tx.exe";
Expand Down

0 comments on commit d630d3d

Please sign in to comment.