-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·25 lines (19 loc) · 1 KB
/
build.sh
File metadata and controls
executable file
·25 lines (19 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
set -e
CSD=$(dirname "$(readlink -f "$0")") #current script dir
PYTHON_DIR="${CSD}/Python-3.8.5"
# 编译加解密工具 ################################################
CRYPT_TOOL_PATH="${CSD}/crypt/"
sh ${CRYPT_TOOL_PATH}/build.sh
cp -r ${CRYPT_TOOL_PATH}/build/unis_crypt_dist ${PYTHON_DIR}/
# 编译python文件 ################################################
PYTHON_INSTALL_PATH="${CSD}/dist/"
sh ${PYTHON_DIR}/build.sh ${PYTHON_INSTALL_PATH}
# 编译完成删除所有的secret_key.h
find ./ -name "secret_key.h" |xargs -I {} rm -f {}
# 在crypt/test/dist 下生成测试用的pye文件 #########################
bash ${CRYPT_TOOL_PATH}/test/py2pye.sh ${PYTHON_INSTALL_PATH}/bin/python3
echo "#############################################"
echo "可以执行以下命令测试是否可以成功加载pye文件"
echo "export LD_LIBRARY_PATH="${PYTHON_INSTALL_PATH}/lib" ; ${PYTHON_INSTALL_PATH}/bin/python3 ${CRYPT_TOOL_PATH}/test/dist/test.pye"
echo "#############################################"