build(binding): add universal macOS ARM64 dylib and static FreeType compilation

- Static FreeType linking flow for all OS
- Flow to build universal binaries for macOS (x86_64, aarch64)
- Simplified CI workflow by removing FreeType branches from the build matrix

Added 2 new scripts:
1. `buildSrc/scripts/vendor_freetype.sh`
2. `buildSrc/scripts/build.sh`

The first script prepares FreeType for usage in the build process.
The result of this script is used in the `GenerateLibs` task.
Other ways of building with FreeType are removed.
If it's impossible to build with FreeType, it is recommended to set `freetype=false`.

The second script aggregates commands to build native binaries.
It includes specific steps, such as creating a universal library for macOS and copying the result to the specific folder `/tmp/imgui/dst`.

Script 1 can be used for local builds. Script 2 is primarily intended for use in CI.
This commit is contained in:
SpaiR committed 2024-08-07 09:41:09 +03:00
1 parent 66522fa265
commit 46c008eb02
16 files changed
+423 -220

No files matched your search

+1 -2
View File
@@ -29,8 +29,7 @@ import java.util.Properties;
public class ImGui {
private static final String LIB_PATH_PROP = "imgui.library.path";
private static final String LIB_NAME_PROP = "imgui.library.name";
private static final boolean isARM = System.getProperty("os.arch").equals("arm") || System.getProperty("os.arch").startsWith("aarch64");
private static final String LIB_NAME_DEFAULT = "imgui-java" + (isARM ? "arm" : "") + "64";
private static final String LIB_NAME_DEFAULT = "imgui-java64";
private static final String LIB_TMP_DIR_PREFIX = "imgui-java-natives";
private static final ImGuiContext IMGUI_CONTEXT;