验证OTA资源升级
authorluozheng <1732036298@qq.com>
Mon, 18 Mar 2024 02:17:32 +0000 (10:17 +0800)
committerluozheng <1732036298@qq.com>
Mon, 18 Mar 2024 02:17:32 +0000 (10:17 +0800)
code/sdk/application/wearable/fd230app/nativeui/weather/src/MainWeatherView.cpp
code/sdk/build/config/target_config/brandy/build_brandy_update.py

index 24fd107..f40c0b7 100644 (file)
@@ -1,6 +1,5 @@
 #include "weather/include/MainWeatherView.h"\r
 #include "weather/include/MainWeatherPresenter.h"\r
-#include "ScreenModels.h"\r
 namespace OHOS\r
 {\r
     static MainWeatherView *g_pMainWeatherView{nullptr};\r
index d80e501..cba105e 100755 (executable)
@@ -55,9 +55,13 @@ class upg_base_info:
         self.dsp_overlay_sign = os.path.join(self.output, "newsoftware", "pack_brandy_native_js","sign" ,"dsp_overlay_sign.bin")
 
         # 资源文件路径,根据需要自行修改添加
-        self.res_dir          = os.path.join(self.output, "res_file")
-        self.res_index        = os.path.join(self.output, "res_index.bin")
-        self.res_data         = os.path.join(self.output, "res_data.bin")
+        # self.res_dir          = None 仅删除
+        self.res_dir          = os.path.join(self.output, "res_file") #待打包目录路径, 如果仅删除则填None,此时是打包res_file目录下的所有文件
+        self.res_index        = os.path.join(self.output, "res_index.bin") #生成的索引文件路径
+        self.res_data         = os.path.join(self.output, "res_data.bin") #生成的数据文件路径, 仅删除时此参数无效
+        self.res_delfile         = [ "/user/exc/exc_info.bin"] #待删除文件列表,删除/user/exc/目录下的exc_info.bin文件
+        self.res_rmdir         = ["/user/test","/user/test1"]  #删除/user/test/,/user/test1两个目录
+
 
         # 差分升级时,以下路径配置为上一个版本的镜像路径 (此处路径仅为参考,需要根据实际使用的target修改)
         self.app_old_bin         = os.path.join(self.output, "oldsoftware", "pack_brandy_native_js","application.bin")
@@ -82,11 +86,12 @@ def get_new_image(info):
     # image_list.append("=".join([info.nv_bin,           "nv"]))
 
     # 资源文件
-    # result = res_pack(info.res_dir, info.res_index, info.res_data)
-    # if not result:
-    #     sys.exit("[ERROR] resource file pack failed!!!")
-    # image_list.append("=".join([info.res_index,        "res_index"]))
-    # image_list.append("=".join([info.res_data,         "res_data"]))
+    result = res_pack(info.res_dir, info.res_index, info.res_data)
+    #result = res_pack(info.res_dir, info.res_index, info.res_data,info.res_delfile,info.res_rmdir)
+    if not result:
+        sys.exit("[ERROR] resource file pack failed!!!")
+    image_list.append("=".join([info.res_index,        "res_index"]))
+    image_list.append("=".join([info.res_data,         "res_data"]))
 
     # 镜像签名
     # image_list.append("=".join([info.ssb_sign,         "ssb_sign"]))