diff --git a/flutter/engine/compile.sh b/flutter/engine/compile.sh index ccbae00289dd8bfa9c7c1ee1363082d48af81e23..99a0aad8908f7fd51475b1f2238cd90e7bebcf47 100644 --- a/flutter/engine/compile.sh +++ b/flutter/engine/compile.sh @@ -23,7 +23,7 @@ function start_compile() { export PATH=$TOOL_HOME/ohpm/bin:$TOOL_HOME/hvigor/bin:$NODE_HOME/bin:$PATH echo "--> Starting prepare_sdk" - $DIR/cicd/flutter/engine/prepare_sdk.sh 12 + $DIR/cicd/flutter/engine/prepare_sdk.sh echo "--> End prepare_sdk" echo "--> Starting build flutter_engine" diff --git a/flutter/engine/prepare_sdk.sh b/flutter/engine/prepare_sdk.sh index 5b4c9795c2acb63c899ac0cc288a7cf93b464a96..9b9b3f4a1a2cb6a4af40fcc39396ab5e034ea3db 100644 --- a/flutter/engine/prepare_sdk.sh +++ b/flutter/engine/prepare_sdk.sh @@ -13,40 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -SDK11_URL="https://update.dbankcdn.com/download/data/pub_13/HWHOTA_hota_900_9/71/v3/-BVBXAvxQdiDZI9X8DpPJg/harmonyos-next-dp1-linux-x64.zip" -SDK12_URL="https://cidownload.openharmony.cn/version/Master_Version/OpenHarmony_5.0.2.43/20241008_020250/version-Master_Version-OpenHarmony_5.0.2.43-20241008_020250-ohos-sdk-full.tar.gz" +SDK_URL="https://cidownload.openharmony.cn/version/Master_Version/OpenHarmony_5.0.2.43/20241008_020250/version-Master_Version-OpenHarmony_5.0.2.43-20241008_020250-ohos-sdk-full.tar.gz" NEW_OHOS_SDK=new-os-sdk OHOS_SDK=os-sdk -function prepare_hos_sdk_api11() { - echo "prepare_hos_sdk_api11" - - # 下载 harmonyos-next-dp1 - if [ -f "harmonyos-next-dp1-linux-x64.zip" ]; then - echo "harmonyos-next-dp1-linux-x64.zip已存在,不重复下载" - else - echo "Start download harmonyos-next-dp1-linux-x64.zip ..." - curl -o $SDK_URL - fi - - if [ $? != 0 ]; then - echo "Download harmonyos-next-dp1-linux-x64.zip failed." - rm -rf harmonyos-next-dp1-linux-x64.zip - fi - - rm -rf $NEW_OHOS_SDK - mkdir $NEW_OHOS_SDK - - if [ ! -d "new-os-sdk/HarmonyOS-NEXT-DP1" ]; then - # 解压HarmonyOS NEXT DP1 SDK - echo "start to unzip harmonyos-next-dp1-linux-x64.zip." - unzip -q harmonyos-next-dp1-linux-x64.zip -d new-os-sdk/HarmonyOS-NEXT-DP1 - ls new-os-sdk/HarmonyOS-NEXT-DP1 - echo "unzip harmonyos-next-dp1-linux-x64.zip success." - fi -} - function prepare_harmonyos_sdk(){ if [ ! -d "new-os-sdk12" ] then @@ -62,8 +33,8 @@ function prepare_harmonyos_sdk(){ return 0 } -function prepare_hos_sdk_api12() { - echo "prepare_hos_sdk_api12" +function prepare_hos_sdk_api() { + echo "prepare_hos_sdk_api" # 下载 HarmonyOS SDK prepare_harmonyos_sdk @@ -84,7 +55,7 @@ function prepare_hos_sdk_api12() { echo "File $sdk_name exists, do not download again." else echo "Start downloading $sdk_name" - curl -o $sdk_name $SDK12_URL + curl -o $sdk_name $SDK_URL fi if [ $? != 0 ]; then echo "Download $sdk_name failed." @@ -103,11 +74,7 @@ function prepare_hos_sdk_api12() { } function prepare(){ - if [ "$1" == "12" ]; then - prepare_hos_sdk_api12 - else - prepare_hos_sdk_api11 - fi + prepare_hos_sdk_api } prepare $@