Files
MeowOS-SDK/build_sdk.sh
T
MeowOS Dev c3f70ed893 MeowOS for HiBy R3 Pro II — 公共发布版本(历史已重置)
• 全新单提交:清除含敏感信息的旧历史(sudo 口令、内网 IP、SSH 密钥路径、热点 SSID、设备 MAC)
• 本地开发文档/测试记录/构建脚本全部移入 gitignored 的 devdocs/ 与 scripts/build/(不入库)
• 保留:MeowOS 源码(launcher/watchdog/bootmenu/meow_svcd/SDK)、项目规范文档、mips-repo
增补组件:SDK 统一日志+通知 API、meow_svcd 服务管理器、mips-repo 软件仓库
2026-08-30 01:12:34 +08:00

30 lines
1.0 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# build_sdk.sh — 构建 meow_ui.a(mipsel 静态库,含 meow_font.o 内联打包,
# 应用只需链 meow_ui.a + libz.a + -lpthread)。
set -e
ROOT="$HOME/Project/R3ProII"
cd "$(dirname "$0")"
CC="$ROOT/.tools/zig-mipsel-cc"
AR="${AR:-/usr/bin/ar}" # 系统 GNU ar 即可归档 mipsel ELF 对象(架构无关)
rm -f meow_ui.a *.o
OBJS="meow_ui_gfx meow_ui_log meow_ui_notify meow_ui_img meow_ui_widget meow_ui_input meow_ui_theme meow_ui_ime meow_ui_sys stb_image"
for f in $OBJS; do
echo "== cc $f =="
"$CC" -Os -static -c "$f.c" -o "$f.o"
done
# meow_font.o(复用 launcher 字库,打进 meow_ui.a → 应用只链一个库)
TMP="$(mktemp -d)"
( cd "$TMP" && "$AR" x "$ROOT/patch_v2/meow_launcherd/meow_font.a" && ls *.o )
cp "$TMP"/*.o meow_font.o 2>/dev/null || { echo "meow_font extract failed"; rm -rf "$TMP"; exit 1; }
rm -rf "$TMP"
rm -f meow_ui.a
for f in $OBJS; do "$AR" rcs meow_ui.a "$f.o"; done
"$AR" rcs meow_ui.a meow_font.o
echo "== meow_ui.a =="
ls -la meow_ui.a
"$AR" t meow_ui.a