优化构建脚本
This commit is contained in:
parent
b3eb012942
commit
d303942188
@ -9,7 +9,7 @@
|
|||||||
"@devwiki/common_ui": "file:../common_ui",
|
"@devwiki/common_ui": "file:../common_ui",
|
||||||
"@devwiki/base": "file:../base",
|
"@devwiki/base": "file:../base",
|
||||||
"@ohos/axios": "^2.2.0",
|
"@ohos/axios": "^2.2.0",
|
||||||
// "@devwiki/hmcalculate": "file:../hmcalculate"
|
"@devwiki/hmcalculate": "file:../hmcalculate"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"dynamicDependencies": {}
|
"dynamicDependencies": {}
|
||||||
|
@ -1,16 +1,28 @@
|
|||||||
@echo off
|
@echo off
|
||||||
chcp 65001 > nul
|
chcp 65001 > nul
|
||||||
set native_path=D:\AppData\Huawei\Sdk\HarmonyOS-NEXT-DP2\base\native\
|
|
||||||
set toolchain=%native_path%build\cmake\ohos.toolchain.cmake
|
|
||||||
set cmake_root=%native_path%build-tools\cmake\
|
|
||||||
set cmake_path=%cmake_root%bin\cmake.exe
|
|
||||||
set ninja_path=%cmake_root%bin\ninja.exe
|
|
||||||
set make_path=C:\MinGW\msys\1.0\bin\make.exe
|
|
||||||
set arch=arm64-v8a
|
|
||||||
|
|
||||||
|
set "native_path=C:\Program Files\Huawei\DevEco Studio5\sdk\HarmonyOS-NEXT-DB1\openharmony\native\"
|
||||||
IF NOT "%~1" == "" (
|
IF NOT "%~1" == "" (
|
||||||
set arch=%1
|
set "native_path=%~1"
|
||||||
)
|
)
|
||||||
|
echo %native_path%
|
||||||
|
|
||||||
|
IF NOT "%~2" == "" (
|
||||||
|
set "arch=%~2"
|
||||||
|
)
|
||||||
|
|
||||||
|
set "toolchain=%native_path%build\cmake\ohos.toolchain.cmake"
|
||||||
|
echo %toolchain%
|
||||||
|
set "cmake_root=%native_path%build-tools\cmake\"
|
||||||
|
echo %cmake_root%
|
||||||
|
set "cmake_path=%cmake_root%bin\cmake.exe"
|
||||||
|
echo %cmake_path%
|
||||||
|
set "ninja_path=%cmake_root%bin\ninja.exe"
|
||||||
|
echo %ninja_path%
|
||||||
|
set "make_path=C:\MinGW\msys\1.0\bin\make.exe"
|
||||||
|
echo %make_path%
|
||||||
|
set "arch=arm64-v8a"
|
||||||
|
echo %arch%
|
||||||
|
|
||||||
if exist build (
|
if exist build (
|
||||||
del /q /s build
|
del /q /s build
|
||||||
@ -28,11 +40,11 @@ if exist dist (
|
|||||||
|
|
||||||
cd build
|
cd build
|
||||||
:: 使用 make 构建
|
:: 使用 make 构建
|
||||||
:: %cmake_path% -G"Unix Makefiles" -DCMAKE_MAKE_PROGRAM="%make_path%" -DOHOS_STL=c++_static -DOHOS_ARCH="%arch%" -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE=%toolchain% ..
|
:: "%cmake_path%" -G"Unix Makefiles" -DCMAKE_MAKE_PROGRAM="%make_path%" -DOHOS_STL=c++_static -DOHOS_ARCH="%arch%" -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE="%toolchain%" ..
|
||||||
:: %make_path%
|
:: %make_path%
|
||||||
|
|
||||||
:: 使用 ninja 构建
|
:: 使用 ninja 构建
|
||||||
%cmake_path% -GNinja -DCMAKE_MAKE_PROGRAM="%ninja_path%" -DOHOS_STL=c++_static -DOHOS_ARCH="%arch%" -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE=%toolchain% ..
|
"%cmake_path%" -GNinja -DCMAKE_MAKE_PROGRAM="%ninja_path%" -DOHOS_STL=c++_static -DOHOS_ARCH="%arch%" -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE="%toolchain%" ..
|
||||||
%ninja_path%
|
"%ninja_path%"
|
||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
|
BIN
cppLib/dist/lib/arm64-v8a/libcalculate.so
vendored
BIN
cppLib/dist/lib/arm64-v8a/libcalculate.so
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user