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:
16 files changed
+423
-220
No files matched your search
+38
-23
@@ -1,30 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set base directory and navigate to project root
|
||||
echo "Setting base directory and navigating to project root..."
|
||||
BASEDIR=$(dirname "$0")
|
||||
cd $BASEDIR/../.. || exit
|
||||
cd "$BASEDIR"/../.. || exit 1
|
||||
echo "Navigated to $(pwd)"
|
||||
|
||||
echo '> Publishing Modules...'
|
||||
echo '>> Module [imgui-app]'
|
||||
./gradlew imgui-app:publishImguiPublicationToMavenCentralRepository
|
||||
echo '>> Module [imgui-lwjgl3]'
|
||||
./gradlew imgui-lwjgl3:publishImguiPublicationToMavenCentralRepository
|
||||
echo '>> Module [imgui-binding]'
|
||||
./gradlew imgui-binding:publishImguiPublicationToMavenCentralRepository
|
||||
|
||||
publish_module() {
|
||||
local module=$1
|
||||
echo ">> Publishing Module [$module]"
|
||||
./gradlew $module:publishImguiPublicationToMavenCentralRepository
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to publish $module module"
|
||||
exit 1
|
||||
fi
|
||||
echo ">> Module [$module] published successfully"
|
||||
}
|
||||
|
||||
# Publish each module
|
||||
publish_module "imgui-app"
|
||||
publish_module "imgui-lwjgl3"
|
||||
publish_module "imgui-binding"
|
||||
|
||||
echo '> Publishing Natives...'
|
||||
echo '>> Natives: [windows, freetype]'
|
||||
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=windows -Pfreetype=true
|
||||
echo '>> Natives: [windows]'
|
||||
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=windows -Pfreetype=false
|
||||
echo '>> Natives: [linux, freetype]'
|
||||
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=linux -Pfreetype=true
|
||||
echo '>> Natives: [linux]'
|
||||
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=linux -Pfreetype=false
|
||||
echo '>> Natives: [macOS, freetype]'
|
||||
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=macos -Pfreetype=true
|
||||
echo '>> Natives: [macOS]'
|
||||
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=macos -Pfreetype=false
|
||||
echo '>> Natives: [macOS-arm64, freetype]'
|
||||
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=macosarm64 -Pfreetype=true
|
||||
echo '>> Natives: [macOS-arm64]'
|
||||
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=macosarm64 -Pfreetype=false
|
||||
|
||||
publish_natives() {
|
||||
local platform=$1
|
||||
echo ">> Publishing Natives: [$platform]"
|
||||
./gradlew imgui-binding-natives:publishImguiPublicationToMavenCentralRepository -PdeployType=$platform
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to publish natives for $platform"
|
||||
exit 1
|
||||
fi
|
||||
echo ">> Natives for $platform published successfully"
|
||||
}
|
||||
|
||||
# Publish natives for each platform
|
||||
publish_natives "windows"
|
||||
publish_natives "linux"
|
||||
publish_natives "macos"
|
||||
|
||||
echo "All modules and natives published successfully."
|
||||
Reference in new issue
Block a user