修复编译脚本,支持编译 x86 和 arm

This commit is contained in:
DevWiki 2024-07-15 15:09:09 +08:00
parent 0cfbbb8065
commit 1654669845
3 changed files with 12 additions and 16 deletions

View File

@ -2,27 +2,27 @@
chcp 65001 > nul chcp 65001 > nul
set "native_path=C:\Program Files\Huawei\DevEco Studio5\sdk\HarmonyOS-NEXT-DB1\openharmony\native\" set "native_path=C:\Program Files\Huawei\DevEco Studio5\sdk\HarmonyOS-NEXT-DB1\openharmony\native\"
::IF NOT "%~1" == "" ( :: IF NOT "%~2" == "" (
:: set "native_path=%~1" :: set "native_path=%~2"
:: ) :: )
echo %native_path% echo native_path: "%native_path%"
set "toolchain=%native_path%build\cmake\ohos.toolchain.cmake" set "toolchain=%native_path%build\cmake\ohos.toolchain.cmake"
echo %toolchain% echo toolchain: "%toolchain%"
set "cmake_root=%native_path%build-tools\cmake\" set "cmake_root=%native_path%build-tools\cmake\"
echo %cmake_root% echo cmake_root: "%cmake_root%"
set "cmake_path=%cmake_root%bin\cmake.exe" set "cmake_path=%cmake_root%bin\cmake.exe"
echo %cmake_path% echo cmake_path: "%cmake_path%"
set "ninja_path=%cmake_root%bin\ninja.exe" set "ninja_path=%cmake_root%bin\ninja.exe"
echo %ninja_path% echo ninja_path: "%ninja_path%"
set "make_path=C:\MinGW\msys\1.0\bin\make.exe" set "make_path=C:\MinGW\msys\1.0\bin\make.exe"
echo %make_path% echo make_path: %make_path%
set "arch=arm64-v8a" set "arch=arm64-v8a"
IF NOT "%~1" == "" ( IF NOT "%~1" == "" (
set "arch=%~1" set "arch=%~1"
) )
echo %arch% echo arch: "%arch%"
if exist build ( if exist build (
del /q /s build del /q /s build

View File

@ -1,5 +0,0 @@
@echo off
chcp 65001 > nul
build.bat
build.bat x86_64

1
cppLib/build_x86.bat Normal file
View File

@ -0,0 +1 @@
build.bat "x86_64"