File tree Expand file tree Collapse file tree 5 files changed +67
-0
lines changed Expand file tree Collapse file tree 5 files changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [ -n " $OHOS_NDK " ]; then
4+ export NDK=${OHOS_NDK}
5+ elif [ -n " $OHOS_NDK_HOME " ]; then
6+ export NDK=${OHOS_NDK_HOME}
7+ else
8+ export NDK=~ /ohos-sdk/linux/native
9+ fi
10+
11+ export PATH=${NDK} /build-tools/cmake/bin:$PATH
12+
13+ function build() {
14+ ABI=$1
15+ BUILD_PATH=build.OHOS.${ABI}
16+ cmake -H. -DOHOS_STL=c++_shared -B${BUILD_PATH} -DOHOS_ARCH=${ABI} -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE=${NDK} /build/cmake/ohos.toolchain.cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
17+ cmake --build ${BUILD_PATH} --config Release
18+ mkdir -p plugin_lua53/Plugins/OpenHarmony/libs/${ABI} /
19+ cp ${BUILD_PATH} /libxlua.so plugin_lua53/Plugins/OpenHarmony/libs/${ABI} /libxlua.so
20+ }
21+
22+ build armeabi-v7a
23+ build arm64-v8a
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [ -n " $OHOS_NDK " ]; then
4+ export NDK=${OHOS_NDK}
5+ elif [ -n " $OHOS_NDK_HOME " ]; then
6+ export NDK=${OHOS_NDK_HOME}
7+ else
8+ export NDK=~ /ohos-sdk/linux/native
9+ fi
10+
11+ export PATH=${NDK} /build-tools/cmake/bin:$PATH
12+
13+ function build() {
14+ ABI=$1
15+ BUILD_PATH=build54.OHOS.${ABI}
16+ cmake -H. -DLUA_VERSION=5.4.1 -DOHOS_STL=c++_shared -B${BUILD_PATH} -DOHOS_ARCH=${ABI} -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE=${NDK} /build/cmake/ohos.toolchain.cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
17+ cmake --build ${BUILD_PATH} --config Release
18+ mkdir -p plugin_lua54/Plugins/OpenHarmony/libs/${ABI} /
19+ cp ${BUILD_PATH} /libxlua.so plugin_lua54/Plugins/OpenHarmony/libs/${ABI} /libxlua.so
20+ }
21+
22+ build armeabi-v7a
23+ build arm64-v8a
Original file line number Diff line number Diff line change 1+ mkdir -p build_osx_silicon && cd build_osx_silicon
2+ cmake -DBUILD_SILICON=ON -GXcode ../
3+ cd ..
4+ cmake --build build_osx_silicon --config Release
5+ mkdir -p plugin_lua53/Plugins/arm64/
6+ cp build_osx_silicon/Release/libxlua.dylib plugin_lua53/Plugins/arm64/
7+
Original file line number Diff line number Diff line change 1+ mkdir -p build_osx_54_silicon && cd build_osx_54_silicon
2+ cmake -DBUILD_SILICON=ON -DLUA_VERSION=5.4.1 -GXcode ../
3+ cd ..
4+ cmake --build build_osx_54_silicon --config Release
5+ mkdir -p plugin_lua54/Plugins/arm64
6+ cp build_osx_54_silicon/Release/libxlua.dylib plugin_lua54/Plugins/arm64/
7+
Original file line number Diff line number Diff line change 1+ mkdir -p build_lj_osx && cd build_lj_osx
2+ cmake -DBUILD_SILICON=ON -DUSING_LUAJIT=ON -GXcode ../
3+ cd ..
4+ cmake --build build_lj_osx --config Release
5+ mkdir -p plugin_luajit/Plugins/xlua.bundle/Contents/MacOS/
6+ cp build_lj_osx/Release/xlua.bundle/Contents/MacOS/xlua plugin_luajit/Plugins/xlua.bundle/Contents/MacOS/xlua
7+
You can’t perform that action at this time.
0 commit comments