Browse Source

add:添加zlib

Dozingfiretruck 4 years ago
parent
commit
086cd975db
3 changed files with 7 additions and 0 deletions
  1. 3 0
      app/port/luat_base_air101.c
  2. 1 0
      app/port/luat_conf_bsp.h
  3. 3 0
      xmake.lua

+ 3 - 0
app/port/luat_base_air101.c

@@ -167,6 +167,9 @@ static const luaL_Reg loadedlibs[] = {
 #endif
 #ifdef LUAT_USE_FONTS
   {"fonts", luaopen_fonts},
+#endif
+#ifdef LUAT_USE_ZLIB
+  {"zlib", luaopen_zlib},
 #endif
   {NULL, NULL}
 };

+ 1 - 0
app/port/luat_conf_bsp.h

@@ -54,6 +54,7 @@
 // #define LUAT_USE_STATEM 1
 // 性能测试,跑完就是玩,不要与lvgl一起启用,生产环境的固件别加这个库
 // #define LUAT_USE_COREMARK 1
+// #define LUAT_USE_ZLIB 
 
 //---------------SDIO-FATFS特别配置
 // sdio库对接的是fatfs

+ 3 - 0
xmake.lua

@@ -276,6 +276,9 @@ target("air10x")
     add_files(luatos.."components/luatfonts/*.c")
     add_includedirs(luatos.."components/luatfonts")
 
+    add_files(luatos.."luat/packages/zlib/*.c")
+    add_includedirs(luatos.."luat/packages/zlib")
+
     -- add_files(luatos.."components/mlx90640-library/*.c")
     -- del_files(luatos.."components/mlx90640-library/MLX90640_I2C_Driver.c")
     -- add_includedirs(luatos.."components/mlx90640-library")