Skip to content

Commit 2266efa

Browse files
committed
更新构建脚本,设置NDK路径,清理构建目录
1 parent d73a84d commit 2266efa

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

build.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ HOME=/root/other
55
TOOLS=/root/other/tools
66
PATCH=/root/other/patch
77
KERNEL=/root/other/kernel
8+
9+
export NDK_HOME=/root/.android/sdk/ndk/28.0.13004108
810
# 构建 Android 版本
911
cd $TOOLS
10-
rm -rf build/android
12+
rm -rf build
1113
mkdir -p build/android
1214
cd build/android
1315
# 请替换以下变量为实际 NDK 路径或通过环境变量传递
@@ -33,14 +35,20 @@ make
3335

3436
cd $HOME
3537

36-
export ANDROID_NDK=/root/other/ndk/android-ndk-r28
38+
export ANDROID_NDK=/root/.android/sdk/ndk/28.0.13004108
39+
40+
rm -rf $PATCH/res/kpimg.enc
41+
rm -rf $PATCH/res/kpimg
3742

3843
cp -r $TOOLS/build/android/kptools-android $PATCH/res
3944
cp -r $TOOLS/build/kptools-linux $PATCH/res
4045
cp -r $KERNEL/kpimg $PATCH/res
4146

4247
cd $PATCH
4348

49+
g++ -o encrypt encrypt.cpp -O3 -std=c++17
50+
chmod 777 ./encrypt
51+
./encrypt res/kpimg res/kpimg.enc
4452
xxd -i res/kpimg.enc > include/kpimg_enc.h
4553
xxd -i res/kptools-linux > include/kptools_linux.h
4654
xxd -i res/kptools-android > include/kptools_android.h

0 commit comments

Comments
 (0)