From d853c1e9cb6b8befb828fc983289644a8dbfe854 Mon Sep 17 00:00:00 2001 From: SnickerSun Date: Sat, 6 Jul 2024 11:55:01 +0800 Subject: [PATCH] =?utf8?q?=E6=B7=BB=E5=8A=A0=20user=E7=89=88=E6=9C=AC?= =?utf8?q?=EF=BC=8C=E5=8E=BB=E6=8E=89=E6=97=A5=E5=BF=97=E7=89=88=E6=9C=AC?= =?utf8?q?=20=E7=BC=96=E8=AF=91=E6=8C=87=E4=BB=A4=20./autobuild.sh=20user?= =?utf8?q?=20=E5=8D=B3=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- autobuild.sh | 10 +++++++++- .../application/wearable/alipay/driver_adapt/iotsec.h | 2 +- .../wearable/alipay/service/alipay_feature.h | 7 +++++-- .../fd230app/nativeui/main/src/MainPresenterSample.cpp | 2 +- .../fd230app/nativeui/main/src/MainViewSample.cpp | 2 +- code/sdk/application/wearable/ohos_deps/wearable_log.h | 6 +++++- auto_ota_readme.txt => ota_auto_readme.txt | 0 7 files changed, 22 insertions(+), 7 deletions(-) rename auto_ota_readme.txt => ota_auto_readme.txt (100%) diff --git a/autobuild.sh b/autobuild.sh index dd93dade5..e2f1031a8 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -5,7 +5,8 @@ DATE=$(date +%Y%m%d_%H%M%S) HOMEDIR=$PWD DEFAULT_BUILD_TYPE=release DEFAULT_TARGET_PACK_NAME=pack_brandy_native_js -DEFAULT_CUSTOM_FW_VERSION=1.1.13 +DEFAULT_TARGET_PACK_NAME_USER=pack_brandy_native_js_user +DEFAULT_CUSTOM_FW_VERSION=1.0.5 TARGET_PACK_NAME=$DEFAULT_TARGET_PACK_NAME RELEASE_BUILD=$DEFAULT_BUILD_TYPE @@ -33,6 +34,12 @@ if [ "$1" == "release" ] then RELEASE_BUILD=release fi + +if [ "$1" == "user" ] +then +TARGET_PACK_NAME=$DEFAULT_TARGET_PACK_NAME_USER +fi + } CURRENT_BRANCH=`git branch |awk '$1=="*"{print $2}'` COMMIT_ID=`git rev-parse HEAD` @@ -123,6 +130,7 @@ build_target() checkarguments $1 checkarguments $2 checkarguments $3 +checkarguments $4 if [ "$CLEAN" == "-c" ] then echo $0 $TARGET_PACK_NAME $RELEASE_BUILD clean diff --git a/code/sdk/application/wearable/alipay/driver_adapt/iotsec.h b/code/sdk/application/wearable/alipay/driver_adapt/iotsec.h index 888e73f1e..5de261b8b 100755 --- a/code/sdk/application/wearable/alipay/driver_adapt/iotsec.h +++ b/code/sdk/application/wearable/alipay/driver_adapt/iotsec.h @@ -13,7 +13,7 @@ #include #include "debug_print.h" -#define MyPrintf(fmt, arg...) PRINT("[SEC PAY E/] %s: " fmt "\r\n", __FUNCTION__, ##arg) +#define MyPrintf(fmt, arg...) printf("[SEC PAY E/] %s: " fmt "\r\n", __FUNCTION__, ##arg) typedef enum { CSI_OK = 0, diff --git a/code/sdk/application/wearable/alipay/service/alipay_feature.h b/code/sdk/application/wearable/alipay/service/alipay_feature.h index 704ba38c4..390cfc947 100755 --- a/code/sdk/application/wearable/alipay/service/alipay_feature.h +++ b/code/sdk/application/wearable/alipay/service/alipay_feature.h @@ -30,13 +30,16 @@ extern "C" { #define APP_FAILURE (-1) #if !defined(SW_UART_DEBUG) && !defined(SW_RTT_DEBUG) +#ifdef WEARABLE_LOG_DEBUG +#define ALIPAY_PRINT_DEBUG(log_num, fmt, arg...) uapi_diag_debug_log(0, fmt, ##arg) #define ALIPAY_PRINT_ERR(log_num, fmt, arg...) uapi_diag_error_log(0, fmt, ##arg) #define ALIPAY_PRINT_WARN(log_num, fmt, arg...) uapi_diag_warning_log(0, fmt, ##arg) #define ALIPAY_PRINT_INFO(log_num, fmt, arg...) uapi_diag_info_log(0, fmt, ##arg) -#ifdef WEARABLE_LOG_DEBUG -#define ALIPAY_PRINT_DEBUG(log_num, fmt, arg...) uapi_diag_debug_log(0, fmt, ##arg) #else #define ALIPAY_PRINT_DEBUG(log_num, fmt, arg...) +#define ALIPAY_PRINT_ERR(log_num, fmt, arg...) +#define ALIPAY_PRINT_WARN(log_num, fmt, arg...) +#define ALIPAY_PRINT_INFO(log_num, fmt, arg...) #endif #else #define ALIPAY_PRINT_ERR(log_num, fmt, arg...) PRINT("[ALIPAY SVR E/] %s: " fmt "\r\n", __FUNCTION__, ##arg) diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/src/MainPresenterSample.cpp b/code/sdk/application/wearable/fd230app/nativeui/main/src/MainPresenterSample.cpp index 993177c91..ac15344f3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/main/src/MainPresenterSample.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/main/src/MainPresenterSample.cpp @@ -493,7 +493,7 @@ namespace OHOS free(timeStr); free(weekStr); - PRINT("ALLData are refresh!\n"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ALLData are refresh!\n"); } void MainPresenterSample::get_memcheck() { diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/src/MainViewSample.cpp b/code/sdk/application/wearable/fd230app/nativeui/main/src/MainViewSample.cpp index 9fb68c014..c539f6d80 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/main/src/MainViewSample.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/main/src/MainViewSample.cpp @@ -395,7 +395,7 @@ namespace OHOS InitImageView(disturbIcon, 213, 0, 40, 40, "disturbIcon", DISTURBICON); /*获取勿扰状态*/ bool state = ConfigModel::GetInstance()->get_configData_bool(ConfigModel::CONFIGMODEL_ITEM_DNOTDISTURB); - PRINT("disturb:state[%d]\r\n", state); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "disturb:state[%d]\r\n", state); disturbIcon->SetVisible(state); mainClockView->Add(disturbIcon); return mainClockView; diff --git a/code/sdk/application/wearable/ohos_deps/wearable_log.h b/code/sdk/application/wearable/ohos_deps/wearable_log.h index 62557e075..cda4bc90e 100755 --- a/code/sdk/application/wearable/ohos_deps/wearable_log.h +++ b/code/sdk/application/wearable/ohos_deps/wearable_log.h @@ -49,13 +49,17 @@ typedef enum { } WearableLogModuleType; #if !defined(SW_UART_DEBUG) && !defined(SW_RTT_DEBUG) + +#ifdef WEARABLE_LOG_DEBUG #define WEARABLE_LOGE(mod, fmt, arg...) uapi_diag_error_log(0, fmt, ##arg) #define WEARABLE_LOGW(mod, fmt, arg...) uapi_diag_warning_log(0, fmt, ##arg) #define WEARABLE_LOGI(mod, fmt, arg...) uapi_diag_info_log(0, fmt, ##arg) -#ifdef WEARABLE_LOG_DEBUG #define WEARABLE_LOGD(mod, fmt, arg...) uapi_diag_debug_log(0, fmt, ##arg) #else #define WEARABLE_LOGD(mod, fmt, arg...) +#define WEARABLE_LOGE(mod, fmt, arg...) +#define WEARABLE_LOGW(mod, fmt, arg...) +#define WEARABLE_LOGI(mod, fmt, arg...) #endif #else #define WEARABLE_LOGE(mod, fmt, arg...) PRINT("[WEARABLE E/] %s: " fmt "\n", __FUNCTION__, ##arg) diff --git a/auto_ota_readme.txt b/ota_auto_readme.txt similarity index 100% rename from auto_ota_readme.txt rename to ota_auto_readme.txt -- 2.17.1