diff --git a/docs/APP_DEV_GUIDE.md b/docs/APP_DEV_GUIDE.md index 592bdd8..40e1634 100644 --- a/docs/APP_DEV_GUIDE.md +++ b/docs/APP_DEV_GUIDE.md @@ -59,7 +59,7 @@ MEOW_SYSROOT="$HOME/Project/R3ProII/.tools/mipsel-linux-muslsf-cross/mipsel-linu SDK 依赖板载 `/dev/fb0` 与字库,宿主机没有——但你可以**链真实 SDK 目标文件 + 打桩**来跑逻辑单测(参考 `sdk/test_host_stub.c`): - `test_host_stub.c` 提供了 `meow_font_*` / `meow_ui_global_render` 等宿主桩(无 fb → 5×7 点阵回退;无字库 → `meow_font_load` 返回 -1)。 -- 宿主可 `gcc` 直接编译 SDK 各 `.c` + 你的逻辑,跑纯 C 断言,**不碰硬件**(`hello` 的 `test_p1p2p3_repro` / `test_meow_ui_widgets` / `test_pinyin` 等都是这么跑的,宿主宿主验证全 PASS)。 +- 宿主可 `gcc` 直接编译 SDK 各 `.c` + 你的逻辑,跑纯 C 断言,**不碰硬件**(`hello` 的 `test_p1p2p3_repro` / `test_meow_ui_widgets` / `test_pinyin` 等都是这么跑的)。注意:公开仓 38 个 `sdk/test_*.c` 的头注释已按实测修订——按注释补齐 `-Iinclude`、`meow_ui_nav.c` 等源集后 **34/38 全部 PASS**;`test_notify_post` / `test_ui_audio_host` / `test_p1p2p3_repro` 依赖主仓组件(launcher/audiod/hello_app),公开仓跳过;`test_net_ipc` 需运行中的 netmgrd,属手工验证项。宿主 `/tmp` 需可写(Termux 本机可用 `proot -b :/tmp` 提供)。 - 注意:`logic/` 层要写**纯 C**(不依赖 `meow_ui.h`),才能裸宿主单测;`ui/` 层才碰 SDK。 ### 1.3 qemu-mipsel 全系统仿真 diff --git a/sdk/test_ime_fix.c b/sdk/test_ime_fix.c index fb321e0..e2b6627 100644 --- a/sdk/test_ime_fix.c +++ b/sdk/test_ime_fix.c @@ -8,8 +8,9 @@ * gcc -Wall -Wextra -o test_ime_fix test_ime_fix.c test_host_stub.c \ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ - * meow_ui_draw.c meow_ui_view.c meow_ui_img.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_media.c \ + * meow_ui_img.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * (meow_ui_widget.c 新 W_LISTVIEW 引用 meow_ui_img_scaled → 需链 meow_ui_img.c+stb_image.c+-lm) */ #include "meow_ui.h" diff --git a/sdk/test_meow_cachegov.c b/sdk/test_meow_cachegov.c index e516bc3..015b084 100644 --- a/sdk/test_meow_cachegov.c +++ b/sdk/test_meow_cachegov.c @@ -8,8 +8,8 @@ * - MEOW_CACHEGOV_C_FILE 指向临时文件写入 fake C 状态,断言 download_paused/prefetch_paused。 * * 编译(patch_v2/sdk 目录下): - * gcc -Os -Wall -Wextra -I. -Iinclude -I../meow_launcherd -c meow_cachegov.c -o /tmp/cg.o - * gcc -Os -Wall -Wextra -I. -Iinclude -I../meow_launcherd test_meow_cachegov.c /tmp/cg.o -lpthread -o test_meow_cachegov + * gcc -Os -Wall -Wextra -I. -Iinclude -c meow_cachegov.c -o /tmp/cg.o + * gcc -Os -Wall -Wextra -I. -Iinclude test_meow_cachegov.c /tmp/cg.o -lpthread -o test_meow_cachegov * 运行:./test_meow_cachegov (exit 0=PASS / 1=FAIL) */ #define _GNU_SOURCE diff --git a/sdk/test_meow_img_color.c b/sdk/test_meow_img_color.c index 433826c..0f23048 100644 --- a/sdk/test_meow_img_color.c +++ b/sdk/test_meow_img_color.c @@ -16,8 +16,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_img_color */ #include "meow_ui.h" diff --git a/sdk/test_meow_lyric.c b/sdk/test_meow_lyric.c index 0f44630..cb035cd 100644 --- a/sdk/test_meow_lyric.c +++ b/sdk/test_meow_lyric.c @@ -2,7 +2,7 @@ * test_meow_lyric.c — meow_lyric_* 宿主单测(2026-09-03,SDK 通用歌词组件批1)。 * * 编译(宿主,meow_lyric 为纯 libc + pthread,无需 SDK 其它对象): - * gcc -Wall -Wextra -pthread -o test_meow_lyric test_meow_lyric.c meow_lyric.c -I. + * gcc -Wall -Wextra -pthread -o test_meow_lyric test_meow_lyric.c meow_lyric.c -I. -Iinclude * ./test_meow_lyric * * 覆盖矩阵: diff --git a/sdk/test_meow_lyric_view.c b/sdk/test_meow_lyric_view.c index 5be898d..54873b9 100644 --- a/sdk/test_meow_lyric_view.c +++ b/sdk/test_meow_lyric_view.c @@ -8,8 +8,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_lyric_view * * 覆盖矩阵(对齐任务批2:活动行纯白/灰阶、翻译行占位不叠行、偏上锚定、折行中西文、点行 seek 命中、 diff --git a/sdk/test_meow_md3.c b/sdk/test_meow_md3.c index 918964e..b132ed9 100644 --- a/sdk/test_meow_md3.c +++ b/sdk/test_meow_md3.c @@ -9,8 +9,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_md3 */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_anim.c b/sdk/test_meow_ui_anim.c index 9ac1720..063b834 100644 --- a/sdk/test_meow_ui_anim.c +++ b/sdk/test_meow_ui_anim.c @@ -7,8 +7,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_anim */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_box.c b/sdk/test_meow_ui_box.c index 2ec9aaa..12eb6cf 100644 --- a/sdk/test_meow_ui_box.c +++ b/sdk/test_meow_ui_box.c @@ -7,8 +7,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_box */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_config.c b/sdk/test_meow_ui_config.c index ff6b733..8722c43 100644 --- a/sdk/test_meow_ui_config.c +++ b/sdk/test_meow_ui_config.c @@ -2,7 +2,7 @@ * test_meow_ui_config.c — meow_config_* 宿主单测(2026-08-30)。 * * 编译(宿主,config 为纯 libc,无需 SDK 其它对象): - * gcc -Wall -Wextra test_meow_ui_config.c meow_ui_config.c -o test_meow_ui_config -lpthread + * gcc -Wall -Wextra -I. -Iinclude test_meow_ui_config.c meow_ui_config.c -o test_meow_ui_config -lpthread * * 两种模式(meow_config_dir 经 pthread_once 缓存,目录只在首次调用确定,故分两次跑): * ./test_meow_ui_config env → 设 MEOW_DATA_DIR=,验证持久目录读写 diff --git a/sdk/test_meow_ui_dispatch.c b/sdk/test_meow_ui_dispatch.c index aaea24a..aa1c394 100644 --- a/sdk/test_meow_ui_dispatch.c +++ b/sdk/test_meow_ui_dispatch.c @@ -16,8 +16,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_dispatch (无设备,纯宿主) */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_home_gesture.c b/sdk/test_meow_ui_home_gesture.c index 7bc97aa..f754cc6 100644 --- a/sdk/test_meow_ui_home_gesture.c +++ b/sdk/test_meow_ui_home_gesture.c @@ -20,7 +20,7 @@ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_home_gesture */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_iconbtn.c b/sdk/test_meow_ui_iconbtn.c index 6da9656..206f148 100644 --- a/sdk/test_meow_ui_iconbtn.c +++ b/sdk/test_meow_ui_iconbtn.c @@ -12,8 +12,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_iconbtn */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_lazygrid.c b/sdk/test_meow_ui_lazygrid.c index 806bc67..6d9636f 100644 --- a/sdk/test_meow_ui_lazygrid.c +++ b/sdk/test_meow_ui_lazygrid.c @@ -11,8 +11,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_lazygrid.c meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_lazygrid.c meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_lazygrid */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_listvirt.c b/sdk/test_meow_ui_listvirt.c index f7844c0..2fd9c58 100644 --- a/sdk/test_meow_ui_listvirt.c +++ b/sdk/test_meow_ui_listvirt.c @@ -13,8 +13,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_listvirt */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_scroll.c b/sdk/test_meow_ui_scroll.c index 9aef33f..9f5cfa8 100644 --- a/sdk/test_meow_ui_scroll.c +++ b/sdk/test_meow_ui_scroll.c @@ -7,8 +7,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_scroll */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_select.c b/sdk/test_meow_ui_select.c index 3d6f0fd..fbad471 100644 --- a/sdk/test_meow_ui_select.c +++ b/sdk/test_meow_ui_select.c @@ -9,8 +9,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_select.c meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_select.c meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_select */ #include "meow_ui.h" @@ -114,7 +114,7 @@ static void test_select_highlight(void) /* 单选高亮:cur=2(第 3 行)选中背景 = primaryContainer */ const meow_theme *thm = meow_theme_get(); int pc_r, pc_g, pc_b; UNPK(thm->primaryContainer, pc_r, pc_g, pc_b); - int hx = 6, hy = list_y + 2 * SEL_ROW + SEL_ROW / 2; + int hx = 12, hy = list_y + 2 * SEL_ROW + SEL_ROW / 2; /* 容器卡横向内缩 8px(MEOW_LISTV_CARD_MARGIN),探针取卡内 */ int r, g, b; rd_px(hx, hy, &r, &g, &b); CHECK(near2(r, pc_r) && near2(g, pc_g) && near2(b, pc_b), "T1 highlight row2 primaryContainer got %02X%02X%02X", r, g, b); diff --git a/sdk/test_meow_ui_str.c b/sdk/test_meow_ui_str.c index 6932331..4ae343d 100644 --- a/sdk/test_meow_ui_str.c +++ b/sdk/test_meow_ui_str.c @@ -2,7 +2,7 @@ * test_meow_ui_str.c — meow_str_* 宿主单测(2026-09-02,§13.i18n 雏形)。 * * 编译(宿主,meow_ui_str 为纯 libc,无需 SDK 其它对象): - * gcc -Wall -Wextra -o test_meow_ui_str test_meow_ui_str.c meow_ui_str.c -I. + * gcc -Wall -Wextra -o test_meow_ui_str test_meow_ui_str.c meow_ui_str.c -I. -Iinclude * * 两种模式(覆盖表按 locale 懒加载,分两次跑): * ./test_meow_ui_str tmp → unsetenv MEOW_DATA_DIR,仅验证内嵌双语表(无覆盖表) diff --git a/sdk/test_meow_ui_swipe.c b/sdk/test_meow_ui_swipe.c index d40787b..b81dbf5 100644 --- a/sdk/test_meow_ui_swipe.c +++ b/sdk/test_meow_ui_swipe.c @@ -11,8 +11,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_swipe */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_theme.c b/sdk/test_meow_ui_theme.c index b9acdeb..9827564 100644 --- a/sdk/test_meow_ui_theme.c +++ b/sdk/test_meow_ui_theme.c @@ -10,8 +10,9 @@ * gcc -o test_meow_ui_theme test_meow_ui_theme.c test_host_stub.c \ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ - * meow_ui_draw.c meow_ui_view.c meow_ui_img.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_img.c meow_ui_media.c \ + * meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * * 验证要点:四套主题 primary/radius 各不相同(MD3 蓝 / MIUIx 橙 + 更大圆角), * 同 style 下 light/dark 的 surface 成对切换;图形用 MEOW_UI_DUMP 导出 PPM 目检。 diff --git a/sdk/test_meow_ui_theme_export.c b/sdk/test_meow_ui_theme_export.c index 6260499..99d6317 100644 --- a/sdk/test_meow_ui_theme_export.c +++ b/sdk/test_meow_ui_theme_export.c @@ -14,8 +14,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_theme_export */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_view_event.c b/sdk/test_meow_ui_view_event.c index 42c1a2e..62e5b1e 100644 --- a/sdk/test_meow_ui_view_event.c +++ b/sdk/test_meow_ui_view_event.c @@ -11,8 +11,8 @@ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_scroll.c \ - * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_img.c meow_ui_media.c meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_meow_ui_view_event */ #include "meow_ui.h" diff --git a/sdk/test_meow_ui_vol.c b/sdk/test_meow_ui_vol.c index cf1d7a3..3ca6c45 100644 --- a/sdk/test_meow_ui_vol.c +++ b/sdk/test_meow_ui_vol.c @@ -12,7 +12,7 @@ * 当前夹后音量(含 step 语义:a.volume_step 只决定步进,展示原样不/舍入)。 * * 编译(宿主 gcc,mipsel 无关): - * gcc -o test_meow_ui_vol test_meow_ui_vol.c meow_ui_vol.c -I. + * gcc -o test_meow_ui_vol test_meow_ui_vol.c meow_ui_vol.c -I. -Iinclude */ #include "meow_ui_vol.h" diff --git a/sdk/test_meow_ui_widgets.c b/sdk/test_meow_ui_widgets.c index d2005d1..ede68c0 100644 --- a/sdk/test_meow_ui_widgets.c +++ b/sdk/test_meow_ui_widgets.c @@ -5,8 +5,9 @@ * gcc -o test_meow_ui_widgets test_meow_ui_widgets.c test_host_stub.c \ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ - * meow_ui_draw.c meow_ui_view.c meow_ui_img.c meow_notify_ipc.c stb_image.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_img.c meow_ui_media.c \ + * meow_notify_ipc.c stb_image.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:MEOW_UI_DUMP=/tmp/b2.ppm ./test_meow_ui_widgets (可选,dump 屏幕) * * 注:W_LISTVIEW 的 MEOW_LIST_ICON_IMG 分支调用 meow_ui_img_scaled → 宿主链 meow_ui_img.c+stb_image.c+-lm。 diff --git a/sdk/test_net_ipc.c b/sdk/test_net_ipc.c index a15f6a7..d31b30c 100644 --- a/sdk/test_net_ipc.c +++ b/sdk/test_net_ipc.c @@ -4,8 +4,9 @@ * (MEOW_NET_SOCK 指向测试 socket)验证: * - meow_net_policy_check(host):按 MEOW_LOG_APP 实体判定 allow/block(netmgrd 决策权威); * - meow_net_report(rx,tx):best-effort 上报(netmgrd 记入 entity_bytes)。 - * 用法:cc -Iinclude -I. -I../meow_launcherd test_net_ipc.c meow_net_ipc.c -o test_net_ipc + * 用法:cc -Iinclude -I. test_net_ipc.c meow_net_ipc.c -o test_net_ipc * 然后 MEOW_NET_SOCK= MEOW_LOG_APP= ./test_net_ipc + * 注:需运行中的 netmgrd;缺 netmgrd 时本测试无断言恒退 0,不能作为通过证据。 */ #include "include/meow_ui_net.h" #include diff --git a/sdk/test_notif_gesture.c b/sdk/test_notif_gesture.c index 4c5db97..979743c 100644 --- a/sdk/test_notif_gesture.c +++ b/sdk/test_notif_gesture.c @@ -16,8 +16,9 @@ * 编译(宿主 gcc,链真实 gfx/sys/theme/vol/log/widget/input/ime/media/notify_ipc + 打桩 font/global): * gcc -Wall -Wextra -o test_notif_gesture test_notif_gesture.c test_host_stub.c \ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ - * meow_ui_widget.c meow_ui_input.c meow_ui_ime.c meow_ui_str.c meow_ui_media.c meow_notify_ipc.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_ui_widget.c meow_ui_input.c meow_ui_ime.c meow_ui_str.c meow_ui_activity.c meow_ui_media.c \ + * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_notify_ipc.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_notif_gesture */ #include "meow_ui.h" diff --git a/sdk/test_notif_open.c b/sdk/test_notif_open.c index 394d34f..1f4f614 100644 --- a/sdk/test_notif_open.c +++ b/sdk/test_notif_open.c @@ -10,7 +10,7 @@ * gcc -Wall -o test_notif_open test_notif_open.c test_host_stub.c \ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_notify_ipc.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm * 运行:./test_notif_open */ #include "meow_ui.h" diff --git a/sdk/test_notify_integration.c b/sdk/test_notify_integration.c index 2f50f0a..865e274 100644 --- a/sdk/test_notify_integration.c +++ b/sdk/test_notify_integration.c @@ -13,7 +13,7 @@ * * 编译(宿主 gcc): * gcc -o test_notify_integration test_notify_integration.c \ - * meow_ui_notify.c meow_notify_ipc.c -I. -I../meow_launcherd -lpthread + * meow_ui_notify.c meow_notify_ipc.c -I. -Iinclude -lpthread */ #include "meow_ui.h" #include "meow_notify_ipc.h" diff --git a/sdk/test_notify_ipc.c b/sdk/test_notify_ipc.c index c7f5dc3..760c309 100644 --- a/sdk/test_notify_ipc.c +++ b/sdk/test_notify_ipc.c @@ -11,7 +11,7 @@ * * 编译(宿主 gcc,不依赖 meow_ui.a 其余 TU): * gcc -o test_notify_ipc test_notify_ipc.c meow_notify_ipc.c \ - * -I. -I../meow_launcherd -lpthread + * -I. -Iinclude -lpthread * 运行:./test_notify_ipc (全部 PASS 退出码 0,任一 FAIL 退出码 1) */ #include "meow_notify_ipc.h" diff --git a/sdk/test_notify_post.c b/sdk/test_notify_post.c index b3d0440..b73b7b2 100644 --- a/sdk/test_notify_post.c +++ b/sdk/test_notify_post.c @@ -8,9 +8,9 @@ * 验证:SDK meow_notify_ipc_send() 产出的帧被 meow_notif_post() 真实落库并回分配 nid>0; * 随后 meow_notify_ipc_dismiss() 经 meow_notif_dismiss() 撤下(count 归 0)。 * - * 编译(宿主 gcc): + * 编译(宿主 gcc;**需主仓组件,公开仓跳过**——../meow_launcherd/meow_notif.c 未随本仓发布): * gcc -o test_notify_post test_notify_post.c meow_notify_ipc.c \ - * ../meow_launcherd/meow_notif.c -I. -I../meow_launcherd -lpthread + * ../meow_launcherd/meow_notif.c -I. -Iinclude -I../meow_launcherd -lpthread */ #include "meow_notify_ipc.h" #include "meow_ui.h" diff --git a/sdk/test_overlay_suppress.c b/sdk/test_overlay_suppress.c index d0f7f54..f0763c1 100644 --- a/sdk/test_overlay_suppress.c +++ b/sdk/test_overlay_suppress.c @@ -19,8 +19,9 @@ * gcc -Wall -Wextra -o test_overlay_suppress test_overlay_suppress.c test_host_stub.c \ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ - * meow_ui_draw.c meow_ui_view.c meow_notify_ipc.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread + * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_media.c \ + * meow_notify_ipc.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread */ #include "meow_ui.h" #include "meow_ui_internal.h" diff --git a/sdk/test_p1p2p3_repro.c b/sdk/test_p1p2p3_repro.c index 474480b..b6ee0a5 100644 --- a/sdk/test_p1p2p3_repro.c +++ b/sdk/test_p1p2p3_repro.c @@ -15,11 +15,12 @@ * P2 list 焦点:命中非 list 区域时释放列表焦点、切页滚动(不再沿用旧焦点继续滚列表)。 * P3 list 脏区:W_LIST 绘制已裁剪到视口;滚动(非整行偏移)+选中行不再向标题间隙/底缘下泄漏。 * - * 编译(宿主 gcc,链真实 gfx/sys/theme/vol/log/widget/input/activity/dialog/ime/img/config/ - * notify/ipc + 打桩 font/global(test_host_stub) + stb_image + hello 拆分层): + * 编译(需主仓组件,公开仓跳过):本仓不含 ../hello_app(公开仓为 examples/hello),且本文件 + * 直接 #include "../hello_app/hello_internal.h";以下路径按主仓布局(打桩 font/global + + * stb_image + hello 拆分层): * 1) 单独编译 app.c 并把 main 改名 hello_app_main(否则与本文件 main 冲突): * gcc -c -Wall -Wextra -DMEOW_UI_HOST_TEST -Dmain=hello_app_main \ - * -I. -I../hello_app ../hello_app/app.c -o app.o + * -I. -Iinclude -I../hello_app ../hello_app/app.c -o app.o * 2) 编译本文件 + 其余 hello 模块 + SDK 源 + 打桩,链接 app.o: * gcc -Wall -Wextra -DMEOW_UI_HOST_TEST -o test_p1p2p3_repro test_p1p2p3_repro.c app.o \ * test_host_stub.c meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ diff --git a/sdk/test_pinyin.c b/sdk/test_pinyin.c index 6b9a764..b594ac7 100644 --- a/sdk/test_pinyin.c +++ b/sdk/test_pinyin.c @@ -10,8 +10,8 @@ * gcc -Wall -Wextra -o test_pinyin test_pinyin.c test_host_stub.c \ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ - * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_img.c meow_ui_media.c \ - * meow_notify_ipc.c stb_image.c -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread -lm + * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_img.c meow_ui_media.c \ + * meow_notify_ipc.c stb_image.c meow_ui_nav.c -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm */ #include "meow_ui.h" #include "meow_ui_internal.h" diff --git a/sdk/test_sb_collapse.c b/sdk/test_sb_collapse.c index 3967769..cf97463 100644 --- a/sdk/test_sb_collapse.c +++ b/sdk/test_sb_collapse.c @@ -10,7 +10,7 @@ * 编译(宿主 gcc,链真实 gfx/sys/theme/vol/log + 打桩 font/global + meow_notify_ipc): * gcc -o test_sb_collapse test_sb_collapse.c test_host_stub.c \ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c meow_notify_ipc.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread */ #include "meow_ui.h" #include "meow_ui_internal.h" diff --git a/sdk/test_sb_statusbar.c b/sdk/test_sb_statusbar.c index ca3af2b..a370563 100644 --- a/sdk/test_sb_statusbar.c +++ b/sdk/test_sb_statusbar.c @@ -6,9 +6,10 @@ * 3. 图标簇+值:fed 数据 → render 依次调用 meow_gfx_blit_icon(电量/音量/蓝牙/WiFi/亮度) * 与 meow_ui_text_right(%n 值);WiFi 已连-50dBm → WIFI_STRONG。 * - * 编译(宿主 gcc): - * gcc -o test_sb_statusbar test_sb_statusbar.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c \ - * -I. -I../meow_launcherd + * 编译(宿主 gcc;测试自带桩与 meow_ui_gfx/meow_ui_log 的符号重复,需 --allow-multiple-definition): + * gcc -Wall -Wextra -o test_sb_statusbar test_sb_statusbar.c test_host_stub.c \ + * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c meow_notify_ipc.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread -lm -Wl,--allow-multiple-definition */ #include "meow_ui.h" #include "meow_ui_internal.h" diff --git a/sdk/test_sdk_fixes.c b/sdk/test_sdk_fixes.c index 1134668..4ed7506 100644 --- a/sdk/test_sdk_fixes.c +++ b/sdk/test_sdk_fixes.c @@ -10,8 +10,9 @@ * gcc -Wall -o test_sdk_fixes test_sdk_fixes.c test_host_stub.c \ * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c meow_ui_str.c \ - * meow_ui_draw.c meow_ui_view.c meow_notify_ipc.c \ - * -I. -I../meow_launcherd -DMEOW_UI_HOST_TEST -pthread + * meow_pinyin.c meow_ui_draw.c meow_ui_view.c meow_ui_box.c meow_ui_anim.c meow_ui_media.c \ + * meow_notify_ipc.c meow_ui_nav.c \ + * -I. -Iinclude -DMEOW_UI_HOST_TEST -pthread */ #include "meow_ui.h" #include "meow_ui_internal.h" diff --git a/sdk/test_sdk_input_keys.c b/sdk/test_sdk_input_keys.c index 8a5dfb1..44e7449 100644 --- a/sdk/test_sdk_input_keys.c +++ b/sdk/test_sdk_input_keys.c @@ -12,7 +12,7 @@ * * 编译(宿主 gcc,仅链 vol/media 两个 TU;无需 meow_ui 其它子系统): * gcc -Wall -Wextra -pthread -o test_sdk_input_keys test_sdk_input_keys.c \ - * meow_ui_vol.c meow_ui_media.c -I. -I../meow_launcherd + * meow_ui_vol.c meow_ui_media.c -I. -Iinclude */ #include "meow_ui_vol.h" #include "meow_ui_media.h" diff --git a/sdk/test_ui_audio_host.c b/sdk/test_ui_audio_host.c index 70a2789..f0021ad 100644 --- a/sdk/test_ui_audio_host.c +++ b/sdk/test_ui_audio_host.c @@ -7,7 +7,8 @@ * - on_preempt 回调:第二客户端(raw)抢先 → 本 SDK 客户端收到 PREEMPTED,write 返回负值 * * 启动被测试 audiod(宿主二进制,FILE sink)。 - * 编译:cc -I../meow_launcherd -I. -Os -Wall -Wextra test_ui_audio_host.c meow_ui_audio.c -lpthread -o test_ui_audio_host + * **需主仓组件,公开仓跳过**:运行需 ../meow_audiod/meow_audiod_host(未随本仓发布)。 + * 编译:cc -I. -Iinclude -Os -Wall -Wextra test_ui_audio_host.c meow_ui_audio.c -lpthread -lm -o test_ui_audio_host */ #include "meow_ui.h" #include "meow_ipc.h" diff --git a/sdk/test_umbrella.c b/sdk/test_umbrella.c index efd8c10..7460d8d 100644 --- a/sdk/test_umbrella.c +++ b/sdk/test_umbrella.c @@ -1,7 +1,7 @@ /* * test_umbrella.c — 伞头完整性回归:只 #include "meow_ui.h",抽查各模块代表性声明 * (类型 / 函数 / 宏)都存在。头拆分后用来证明伞头聚合无遗漏、签名未变。 - * 用法:gcc -std=c11 -Wall -Wextra -I -c test_umbrella.c -o test_umbrella.o + * 用法(在 sdk/ 目录下):gcc -std=c11 -Wall -Wextra -I. -Iinclude -c test_umbrella.c -o test_umbrella.o * (纯声明级检查,不链接、不调用;产生可执行代码仍 0 warning)。 */ #include "meow_ui.h"