mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 03:05:43 +00:00
* Add native Sparkle plugin to enable Mac auto-updates The Sparkle framework was being injected into the app bundle, but nothing was initializing it. This adds: - Native Objective-C plugin (SparklePlugin.m) that initializes SPUStandardUpdaterController at runtime - C# wrapper (SparkleUpdater.cs) for Unity to call the native plugin - SparkleInitializer.cs uses RuntimeInitializeOnLoadMethod to automatically initialize Sparkle at app startup - Build script to compile the plugin as a universal binary The plugin is weak-linked against Sparkle.framework, which is injected separately by inject_sparkle.sh during the build process. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Convert Sparkle plugin build from clang to Bazel - Add Sparkle framework as http_archive dependency in MODULE.bazel - Add BUILD.sparkle to import the framework - Add BUILD.bazel for SparklePlugin using macos_bundle rule - Update build_sparkle_plugin.sh to use Bazel instead of direct clang - Register Apple CC toolchain extension 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix symbol exports for SparklePlugin native library The C functions need to be exported with visibility("default") and explicit linker flags for Unity P/Invoke to find them. Without this, the bundle binary had no exported symbols. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Re-enable Sparkle auto-update integration for Mac builds Restores Sparkle integration that was temporarily removed in #5317: - Restore inject_sparkle.sh script - Add Sparkle injection step to mac_build.yml - Re-enable Sparkle signing and appcast updates in deploy step Combined with native SparklePlugin that initializes Sparkle at runtime. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Build SparklePlugin.bundle before Unity build The SparklePlugin.bundle.meta file tells Unity to include the plugin, but the actual bundle needs to be built by Bazel first. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Convert SparklePlugin Info.plist to XML format Unity's build system requires Info.plist files in XML format, but Bazel outputs them in binary plist format. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
355 lines
10 KiB
Python
355 lines
10 KiB
Python
module(name = "net_eagle0")
|
|
|
|
# Version constants
|
|
SCALA_VERSION = "3.7.2"
|
|
|
|
NETTY_VERSION = "4.1.110.Final"
|
|
|
|
SCALAPB_VERSION = "1.0.0-alpha.1"
|
|
|
|
AWS_SDK_VERSION = "2.28.1"
|
|
|
|
#
|
|
# Core Build Tools
|
|
#
|
|
|
|
bazel_dep(name = "bazel_skylib", version = "1.9.0")
|
|
bazel_dep(name = "rules_pkg", version = "1.2.0")
|
|
|
|
#
|
|
# Language Support - Scala
|
|
#
|
|
|
|
bazel_dep(name = "rules_scala", version = "7.1.1")
|
|
|
|
scala_config = use_extension(
|
|
"@rules_scala//scala/extensions:config.bzl",
|
|
"scala_config",
|
|
)
|
|
scala_config.settings(scala_version = SCALA_VERSION)
|
|
|
|
scala_deps = use_extension(
|
|
"@rules_scala//scala/extensions:deps.bzl",
|
|
"scala_deps",
|
|
)
|
|
scala_deps.scala()
|
|
scala_deps.scalatest()
|
|
scala_deps.scala_proto()
|
|
|
|
#
|
|
# Language Support - C++
|
|
#
|
|
|
|
bazel_dep(name = "toolchains_llvm", version = "1.6.0")
|
|
|
|
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
|
|
|
|
# Native toolchain (macOS -> macOS, Linux -> Linux)
|
|
llvm.toolchain(
|
|
name = "llvm_toolchain",
|
|
llvm_version = "20.1.2",
|
|
)
|
|
|
|
# Cross-compilation toolchain (macOS -> Linux x86_64)
|
|
# Uses the same LLVM distribution but with a Linux sysroot
|
|
llvm.toolchain(
|
|
name = "llvm_toolchain_linux",
|
|
llvm_version = "20.1.2",
|
|
)
|
|
|
|
# Linux x86_64 sysroot for cross-compilation
|
|
llvm.sysroot(
|
|
name = "llvm_toolchain_linux",
|
|
label = "@linux_sysroot//sysroot",
|
|
targets = ["linux-x86_64"],
|
|
)
|
|
|
|
# Cross-compilation toolchain (macOS -> Linux ARM64)
|
|
llvm.toolchain(
|
|
name = "llvm_toolchain_linux_arm64",
|
|
llvm_version = "20.1.2",
|
|
)
|
|
|
|
# Linux ARM64 sysroot for cross-compilation
|
|
llvm.sysroot(
|
|
name = "llvm_toolchain_linux_arm64",
|
|
label = "@linux_sysroot_arm64//sysroot",
|
|
targets = ["linux-aarch64"],
|
|
)
|
|
|
|
use_repo(llvm, "llvm_toolchain", "llvm_toolchain_linux", "llvm_toolchain_linux_arm64")
|
|
|
|
# Download the Linux sysroots (Ubuntu 24.04 Noble for C++23 support)
|
|
# Built by: .github/workflows/build_sysroot.yml
|
|
# To rebuild: Run the "Build Linux Sysroot" workflow with a new version, then update sha256 and URL
|
|
sysroot = use_repo_rule("@toolchains_llvm//toolchain:sysroot.bzl", "sysroot")
|
|
|
|
# x86_64 sysroot
|
|
sysroot(
|
|
name = "linux_sysroot",
|
|
sha256 = "a06475004fe8003ae7ccb4fe1d5511feb9b27cce4a8826eb1dfd686ed83f3dba",
|
|
urls = ["https://eagle0-sysroot.sfo3.digitaloceanspaces.com/v3/ubuntu_noble_amd64_sysroot.tar.xz"],
|
|
)
|
|
|
|
# ARM64 sysroot
|
|
sysroot(
|
|
name = "linux_sysroot_arm64",
|
|
sha256 = "87469137737e09bc73855007dab835477eb10a7b3ce3f725f93f64e25747f3f9",
|
|
urls = ["https://eagle0-sysroot.sfo3.digitaloceanspaces.com/v4/ubuntu_noble_arm64_sysroot.tar.xz"],
|
|
)
|
|
|
|
#
|
|
# Language Support - Go
|
|
#
|
|
|
|
bazel_dep(name = "rules_go", version = "0.59.0", repo_name = "io_bazel_rules_go")
|
|
bazel_dep(name = "gazelle", version = "0.47.0", repo_name = "bazel_gazelle")
|
|
|
|
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
|
|
go_sdk.download(version = "1.23.3")
|
|
|
|
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
|
|
go_deps.from_file(go_mod = "//:go.mod")
|
|
use_repo(
|
|
go_deps,
|
|
"com_github_aws_aws_sdk_go_v2",
|
|
"com_github_aws_aws_sdk_go_v2_config",
|
|
"com_github_aws_aws_sdk_go_v2_credentials",
|
|
"com_github_aws_aws_sdk_go_v2_service_s3",
|
|
"com_github_golang_jwt_jwt_v5",
|
|
"com_github_google_uuid",
|
|
"org_golang_google_grpc",
|
|
"org_golang_google_protobuf",
|
|
)
|
|
|
|
#
|
|
# Platform Support - Apple/iOS
|
|
#
|
|
|
|
bazel_dep(name = "apple_support", version = "1.21.1", repo_name = "build_bazel_apple_support")
|
|
bazel_dep(name = "rules_apple", version = "4.3.3", repo_name = "build_bazel_rules_apple")
|
|
bazel_dep(name = "rules_swift", version = "2.4.0", repo_name = "build_bazel_rules_swift")
|
|
|
|
# Register Apple CC toolchain for Objective-C compilation
|
|
apple_cc_configure = use_extension(
|
|
"@build_bazel_apple_support//crosstool:setup.bzl",
|
|
"apple_cc_configure_extension",
|
|
)
|
|
use_repo(apple_cc_configure, "local_config_apple_cc")
|
|
|
|
#
|
|
# Protocol Buffers & RPC
|
|
#
|
|
|
|
bazel_dep(name = "protobuf", version = "29.2", repo_name = "com_google_protobuf")
|
|
bazel_dep(name = "grpc", version = "1.71.0")
|
|
bazel_dep(name = "grpc-java", version = "1.71.0")
|
|
bazel_dep(name = "flatbuffers", version = "25.9.23")
|
|
|
|
#
|
|
# Testing
|
|
#
|
|
|
|
bazel_dep(name = "googletest", version = "1.17.0")
|
|
|
|
#
|
|
# Container Images (OCI)
|
|
#
|
|
|
|
bazel_dep(name = "rules_oci", version = "2.2.7")
|
|
bazel_dep(name = "aspect_bazel_lib", version = "2.22.4")
|
|
|
|
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
|
|
|
|
# Base image for Eagle (Java 17 JDK - includes jcmd for JFR dumps)
|
|
oci.pull(
|
|
name = "eclipse_temurin_17",
|
|
image = "docker.io/library/eclipse-temurin",
|
|
platforms = ["linux/amd64"],
|
|
tag = "17-jdk",
|
|
)
|
|
|
|
# Base image for Shardok (Ubuntu 24.04 for C++ runtime)
|
|
oci.pull(
|
|
name = "ubuntu_24_04",
|
|
image = "docker.io/library/ubuntu",
|
|
platforms = [
|
|
"linux/amd64",
|
|
"linux/arm64/v8",
|
|
],
|
|
tag = "24.04",
|
|
)
|
|
|
|
# Base image for Admin Server (Alpine for lightweight Go binary)
|
|
oci.pull(
|
|
name = "alpine_linux",
|
|
image = "docker.io/library/alpine",
|
|
platforms = ["linux/amd64"],
|
|
tag = "3.21",
|
|
)
|
|
use_repo(oci, "alpine_linux", "alpine_linux_linux_amd64", "eclipse_temurin_17", "eclipse_temurin_17_linux_amd64", "ubuntu_24_04", "ubuntu_24_04_linux_amd64", "ubuntu_24_04_linux_arm64_v8")
|
|
|
|
#
|
|
# Java/Scala Dependencies
|
|
#
|
|
|
|
bazel_dep(name = "rules_jvm_external", version = "6.9")
|
|
|
|
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
|
|
maven.install(
|
|
artifacts = [
|
|
# Netty
|
|
"io.netty:netty-codec:%s" % NETTY_VERSION,
|
|
"io.netty:netty-codec-http:%s" % NETTY_VERSION,
|
|
"io.netty:netty-codec-socks:%s" % NETTY_VERSION,
|
|
"io.netty:netty-codec-http2:%s" % NETTY_VERSION,
|
|
"io.netty:netty-handler:%s" % NETTY_VERSION,
|
|
"io.netty:netty-buffer:%s" % NETTY_VERSION,
|
|
"io.netty:netty-transport:%s" % NETTY_VERSION,
|
|
"io.netty:netty-resolver:%s" % NETTY_VERSION,
|
|
"io.netty:netty-common:%s" % NETTY_VERSION,
|
|
"io.netty:netty-handler-proxy:%s" % NETTY_VERSION,
|
|
|
|
# ScalaPB
|
|
"com.thesamet.scalapb:lenses_3:%s" % SCALAPB_VERSION,
|
|
"com.thesamet.scalapb:scalapb-json4s_3:%s" % SCALAPB_VERSION,
|
|
"com.thesamet.scalapb:scalapb-runtime_3:%s" % SCALAPB_VERSION,
|
|
"com.thesamet.scalapb:scalapb-runtime-grpc_3:%s" % SCALAPB_VERSION,
|
|
"com.thesamet.scalapb:compilerplugin_3:%s" % SCALAPB_VERSION,
|
|
"com.thesamet.scalapb:protoc-bridge_3:0.9.9",
|
|
|
|
# JSON
|
|
"org.json4s:json4s-ast_3:4.1.0-M8",
|
|
"org.json4s:json4s-core_3:4.1.0-M8",
|
|
"org.json4s:json4s-native_3:4.1.0-M8",
|
|
|
|
# Testing
|
|
"org.scalamock:scalamock_3:7.4.1",
|
|
|
|
# AWS SDK
|
|
"software.amazon.awssdk:s3-transfer-manager:%s" % AWS_SDK_VERSION,
|
|
"software.amazon.awssdk:s3:%s" % AWS_SDK_VERSION,
|
|
"software.amazon.awssdk:regions:%s" % AWS_SDK_VERSION,
|
|
"software.amazon.awssdk:aws-core:%s" % AWS_SDK_VERSION,
|
|
"software.amazon.awssdk:sdk-core:%s" % AWS_SDK_VERSION,
|
|
"software.amazon.awssdk:utils:%s" % AWS_SDK_VERSION,
|
|
"software.amazon.awssdk:http-client-spi:%s" % AWS_SDK_VERSION,
|
|
|
|
# AWS Lambda
|
|
"com.amazonaws:aws-lambda-java-core:1.2.3",
|
|
"com.amazonaws:aws-lambda-java-events:3.13.0",
|
|
|
|
# Logging
|
|
"org.slf4j:slf4j-api:2.0.16",
|
|
"org.slf4j:slf4j-simple:2.0.16",
|
|
|
|
# Other
|
|
"org.reactivestreams:reactive-streams:1.0.4",
|
|
"javax.xml.bind:jaxb-api:2.3.1",
|
|
|
|
# OkHttp (for SSE with read timeout support, OAuth HTTP calls)
|
|
"com.squareup.okhttp3:okhttp:4.12.0",
|
|
"com.squareup.okhttp3:okhttp-sse:4.12.0",
|
|
|
|
# JWT (for OAuth token handling)
|
|
"com.nimbusds:nimbus-jose-jwt:9.37.3",
|
|
|
|
# Error tracking
|
|
"io.sentry:sentry:7.19.0",
|
|
],
|
|
duplicate_version_warning = "error",
|
|
fail_if_repin_required = True,
|
|
lock_file = "//:maven_install.json",
|
|
repositories = [
|
|
"https://repo1.maven.org/maven2",
|
|
],
|
|
)
|
|
use_repo(maven, "maven", "unpinned_maven")
|
|
|
|
#
|
|
# External Libraries
|
|
#
|
|
|
|
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
|
|
|
|
# GTL (for parallel_hashmap)
|
|
GTL_VERSION = "1.2.0"
|
|
|
|
GTL_SHA = "1969c45dd76eac0dd87e9e2b65cffe358617f4fe1bcd203f72f427742537913a"
|
|
|
|
http_archive(
|
|
name = "gtl",
|
|
build_file = "@//external:BUILD.gtl",
|
|
sha256 = GTL_SHA,
|
|
strip_prefix = "gtl-%s" % GTL_VERSION,
|
|
url = "https://github.com/greg7mdp/gtl/archive/refs/tags/v%s.zip" % GTL_VERSION,
|
|
)
|
|
|
|
# Unity GoDice Plugin
|
|
UNITY_GODICE_COMMIT = "18d6823991592e4d45fcc0f22692db849dea9063"
|
|
|
|
UNITY_GODICE_SHA = "04e6ae4155965aab3372592e04061eba1256bb6ea7ccffd0d83f27574e5b3349"
|
|
|
|
http_archive(
|
|
name = "net_eagle0_unity_godice",
|
|
sha256 = UNITY_GODICE_SHA,
|
|
strip_prefix = "godice-framework-%s" % UNITY_GODICE_COMMIT,
|
|
urls = [
|
|
"https://github.com/nolen777/godice-framework/archive/%s.zip" % UNITY_GODICE_COMMIT,
|
|
],
|
|
)
|
|
|
|
# Sparkle framework for macOS auto-updates
|
|
SPARKLE_VERSION = "2.6.4"
|
|
|
|
http_archive(
|
|
name = "sparkle",
|
|
build_file = "@//external:BUILD.sparkle",
|
|
sha256 = "50612a06038abc931f16011d7903b8326a362c1074dabccb718404ce8e585f0b",
|
|
strip_prefix = "",
|
|
url = "https://github.com/sparkle-project/Sparkle/releases/download/%s/Sparkle-%s.tar.xz" % (SPARKLE_VERSION, SPARKLE_VERSION),
|
|
)
|
|
|
|
# Busybox static binary for Docker health checks (provides nc, wget, etc.)
|
|
# Primary: DigitalOcean Spaces (public, reliable)
|
|
# Fallback: busybox.net (can be unreliable/slow)
|
|
http_file(
|
|
name = "busybox_x86_64",
|
|
sha256 = "6e123e7f3202a8c1e9b1f94d8941580a25135382b99e8d3e34fb858bba311348",
|
|
urls = [
|
|
"https://eagle0-sysroot.sfo3.digitaloceanspaces.com/busybox/busybox-1.35.0-x86_64-linux-musl",
|
|
"https://busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox",
|
|
],
|
|
downloaded_file_path = "busybox",
|
|
executable = True,
|
|
)
|
|
|
|
http_file(
|
|
name = "busybox_aarch64",
|
|
sha256 = "141adb1b625a6f44c4b114f76b4387b4ea4f7ab802b88eb40e0d2f6adcccb1c3",
|
|
urls = [
|
|
# TODO: Upload aarch64 binary to GitHub release when needed
|
|
"https://busybox.net/downloads/binaries/1.35.0-aarch64-linux-musl/busybox",
|
|
],
|
|
downloaded_file_path = "busybox",
|
|
executable = True,
|
|
)
|
|
|
|
#
|
|
# Toolchain Registration
|
|
#
|
|
|
|
register_toolchains(
|
|
"//tools:unused_dependency_checker_error_and_opts_toolchain",
|
|
"@rules_scala//testing:scalatest_toolchain",
|
|
)
|
|
|
|
# Set dev_dependency so we can turn this off for swift MacOS builds
|
|
register_toolchains(
|
|
"@llvm_toolchain//:all",
|
|
"@llvm_toolchain_linux//:all",
|
|
"@llvm_toolchain_linux_arm64//:all",
|
|
dev_dependency = True,
|
|
)
|