ARCS 补丁包制作流程

一、工具准备

1、前往 opensource / makeself · GitLab (aubo-robotics.cn) 下载 makeself 工具。

2、将制作补丁的代码推到远端留存,出现问题便于追溯。假设客户的版本为 0.29.1-rc.40,远端分支应命名为 0.29.1-hotfix.40。

二、制作补丁

以替换 /opt/arcs/0.29.1-rc.40/bin/aubo_scope 为例

mkdir patch
cd patch
# 将上述 makeself 工具放在此目录下
mkdir 0.29.1-hotfix40 
cd 0.29.1-hotfix40

# 1、制作 .run 包
mkdir resources
# 将编译好的资源(aubo_scope) 放在resources 文件夹下

touch setup.sh 
# 将以下脚本写入 setup.sh
​```sh
#!/bin/bash
ROOT_DIR=$(dirname $(readlink -f $0))
VERSION="0.29.1-rc.40"
TARGET_PATH="/opt/arcs/${VERSION}/bin/aubo_scope"

if [ -f ${TARGET_PATH} ]; then
   mv ${TARGET_PATH} ${TARGET_PATH}_bak
   cp -av ${ROOT_DIR}/resources/aubo_scope ${TARGET_PATH}
   chmod +x ${TARGET_PATH}
fi

chmod +x setup.sh # 很重要

makeself 工具里面的 makeself.sh 打 .run 包

../../makeself-release-2.4.4/makeself.sh ./ 0.29.1-hotfix40.run "start patch" ./setup.sh

2、制作 .sh 包

touch aubomagic_0291_hotfix40.sh # .sh 文件必须以 aubo_magic 为前缀,否则上位机不识别 ​```sh

!/bin/bash

cd /tmp chmod +x 0.29.1-hotfix40.run ./0.29.1-hotfix.40.run --nox11 install ​chmod +x aubo_magic_0291_hotfix40.sh

三、补丁使用

1、将 0.29.1-hotfix40.run 以及 aubo_magic_0291_hotfix40.sh 放入 U 盘,将 U 盘插入控制柜。

2、在示教器的 U 盘导入界面,先导入 0.29.1-hotfix40.run,后运行 aubo_magic_0291_hotfix40.sh。

image

3、重启设备,补丁即可生效。

results matching ""

    No results matching ""