diff --git a/.github/workflows/native-compile-platforms.yml b/.github/workflows/native-compile-platforms.yml index 3e7d3021f0..12d6daa715 100644 --- a/.github/workflows/native-compile-platforms.yml +++ b/.github/workflows/native-compile-platforms.yml @@ -17,7 +17,7 @@ jobs: name: "Windows" if: (! contains(github.event.pull_request.body, '[X] does not change any runtime related code or build configuration')) - runs-on: windows-2019 + runs-on: windows-2022 strategy: fail-fast: false matrix: @@ -60,7 +60,7 @@ jobs: cd build-win64 RES_DIR=${GITHUB_WORKSPACE//\\//}/templates/windows/build-win64 COCOS_X_PATH=${GITHUB_WORKSPACE//\\//}/native - cmake ../ -G"Visual Studio 16 2019" -DRES_DIR=$RES_DIR -DCOCOS_X_PATH=$COCOS_X_PATH -Ax64 + cmake ../ -G"Visual Studio 17 2022" -DRES_DIR=$RES_DIR -DCOCOS_X_PATH=$COCOS_X_PATH -Ax64 cmake --build . --config ${{ matrix.config.buildtype }} echo "Compile Win64 ${{ matrix.config.buildtype }} Done!" @@ -258,7 +258,10 @@ jobs: fail-fast: false matrix: config: - - { arch: arm64-v8a } + - { arch: arm64-v8a, jsEngine: V8 } + - { arch: arm64-v8a, jsEngine: ARK } + - { arch: arm64-v8a, jsEngine: JSVM } + steps: - name: Show PATH env run: | @@ -391,9 +394,22 @@ jobs: echo "set(CMAKE_CXX_STANDARD_REQUIRED ON)" >> build-oh/proj/cfg.cmake echo "set(COCOS_X_PATH $NATIVE_ROOT)" >> build-oh/proj/cfg.cmake echo "set(CC_EXECUTABLE_NAME \"\")" >> build-oh/proj/cfg.cmake - echo "set(USE_SE_V8 ON)" >> build-oh/proj/cfg.cmake - echo "set(USE_SE_NAPI OFF)" >> build-oh/proj/cfg.cmake - echo "set(USE_SE_JSVM OFF)" >> build-oh/proj/cfg.cmake + if [ "${{ matrix.config.jsEngine }}" = "V8" ]; then + echo "=============== JsEngine: V8 ===============" + echo "set(USE_SE_V8 ON)" >> build-oh/proj/cfg.cmake + echo "set(USE_SE_NAPI OFF)" >> build-oh/proj/cfg.cmake + echo "set(USE_SE_JSVM OFF)" >> build-oh/proj/cfg.cmake + elif [ "${{ matrix.config.jsEngine }}" = "JSVM" ]; then + echo "=============== JsEngine: JSVM ===============" + echo "set(USE_SE_V8 OFF)" >> build-oh/proj/cfg.cmake + echo "set(USE_SE_NAPI OFF)" >> build-oh/proj/cfg.cmake + echo "set(USE_SE_JSVM ON)" >> build-oh/proj/cfg.cmake + else + echo "=============== JsEngine: ARK ===============" + echo "set(USE_SE_V8 OFF)" >> build-oh/proj/cfg.cmake + echo "set(USE_SE_NAPI ON)" >> build-oh/proj/cfg.cmake + echo "set(USE_SE_JSVM OFF)" >> build-oh/proj/cfg.cmake + fi echo "=============== cat build-oh/proj/cfg.cmake ===============" cat build-oh/proj/cfg.cmake diff --git a/.github/workflows/native-simulator.yml b/.github/workflows/native-simulator.yml index 0f16400454..12abb694b4 100644 --- a/.github/workflows/native-simulator.yml +++ b/.github/workflows/native-simulator.yml @@ -14,7 +14,7 @@ concurrency: jobs: win_gen_simulator: - runs-on: windows-2019 + runs-on: windows-2022 if: (! contains(github.event.pull_request.body, '[X] does not change any runtime related code or build configuration')) name: Windows diff --git a/native/cocos/platform/openharmony/napi/NapiPromiseBridge.cpp b/native/cocos/platform/openharmony/napi/NapiPromiseBridge.cpp index 372b087ad0..cd5cf0e3e1 100644 --- a/native/cocos/platform/openharmony/napi/NapiPromiseBridge.cpp +++ b/native/cocos/platform/openharmony/napi/NapiPromiseBridge.cpp @@ -44,7 +44,7 @@ se::Object* NapiPromiseBridge::createPromise(Napi::Value napiPromise) { bindArkPromise(napiPromise, sePromise); return sePromise; #else - return se::Object::_createJSObject(env, napiPromise, nullptr) + return se::Object::_createJSObject(env, napiPromise, nullptr); #endif } diff --git a/native/gulpfile.js b/native/gulpfile.js index 82bf2df184..183f9ce4f4 100644 --- a/native/gulpfile.js +++ b/native/gulpfile.js @@ -75,7 +75,7 @@ gulp.task('gen-simulator', async function () { var args = []; args.push('-G'); if (isWin32) { - args.push('Visual Studio 16 2019','-A','x64'); + args.push('Visual Studio 17 2022','-A','x64'); } else { args.push('Xcode'); diff --git a/templates/harmonyos-next/entry/src/main/ets/workers/cocos_worker.ets b/templates/harmonyos-next/entry/src/main/ets/workers/cocos_worker.ets index f1eb311c74..faae7727fb 100644 --- a/templates/harmonyos-next/entry/src/main/ets/workers/cocos_worker.ets +++ b/templates/harmonyos-next/entry/src/main/ets/workers/cocos_worker.ets @@ -110,8 +110,8 @@ uiPort.on("onErrorReceive", (viewTag: number, url: string) => { nativeWebView.failLoading(viewTag, url); }) -uiPort.on("onVideoEvent", (videoTag: number, videoEvent: number, arg?: AnyType ) => { - nativeVideo.onVideoEvent(JSON.stringify({videoTag: videoTag, videoEvent: videoEvent, arg: arg ?? null})); +uiPort.on("onVideoEvent", (videoTag: number, videoEvent: number, args?: AnyType ) => { + nativeVideo.onVideoEvent(JSON.stringify({videoTag: videoTag, videoEvent: videoEvent, args: args ?? null})); }) uiPort.on("backPress", () => {