1 Star 0 Fork 0

loongeeker/OpenSCADA

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
setup.sh 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
Vignesh Babu 提交于 2020-09-27 13:47 . updating setup.sh
#!/bin/bash
if [ "$1" == "install" ]; then
echo "Build Started with Bazel ..."
echo "Building Emulator library ..."
bazel build :pc_emulator_lib
echo "Building Python Proto libs ..."
bazel build :py_access_service_proto
echo "Building LibModbus extensions ..."
cd contrib/libmodbus && ./autogen.sh && ./configure && make install
cd ../../
sudo ldconfig
echo "Building GRPC extensions ..."
bazel build :grpc_ext_lib
echo "Building GRPC server ..."
bazel build :pc_grpc_server
sudo cp bazel-bin/pc_grpc_server /usr/bin
echo "Building Modbus comm module ..."
bazel build :modbus_comm_module
sudo cp bazel-bin/modbus_comm_module /usr/bin
echo "Building PLC Runnable ..."
bazel build :plc_runner
sudo cp bazel-bin/plc_runner /usr/bin
echo "Building Example HMI ..."
bazel build :example_hmi
sudo cp bazel-bin/example_hmi /usr/bin
sudo cp bazel-genfiles/py_access_service_proto_pb/src/pc_emulator/proto/*.py src/pc_emulator/proto
sudo chmod 777 src/pc_emulator/proto/*.py
echo "Build and Install finished ..."
else
if [ "$1" == "uninstall" ]; then
echo "Cleaning up installation ..."
bazel clean
rm /usr/bin/pc_grpc_server || true
rm /usr/bin/modbus_comm_module || true
rm /usr/bin/plc_runner || true
rm /usr/bin/example_hmi || true
rm src/pc_emulator/proto/*.py
cd contrib/libmodbus && make uninstall
cd ../../
echo "Cleanup finished ..."
fi
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/loongeeker/OpenSCADA.git
git@gitee.com:loongeeker/OpenSCADA.git
loongeeker
OpenSCADA
OpenSCADA
master

搜索帮助