介绍:
MEDM:MEDM是一个用于设置和实现控制窗口(称为显示窗口)的Motif图形用户界面,其由一个显示和/或更改EPICS过程变量的值的图形对象集合组成。可以支持的对象包括按钮,仪表,滑块,文本显示/输入和图形。它由两种操作模式EDIT和EXECUTE。在EDIT模式创建和编辑显示窗口,在EXECURE模式种运行它们。
EDM:EDM可扩展的显示窗口管理器,在很多EPICS站点使用它窗口可靠的,快速的显示窗口。它基于X11/Linux,并且提供一个用于创建页面的编辑器和一个用于显示它们的runtime。
准备:
在CentOS7上已经成功安装了EPICS base软件包:安装过程参见EPICS -- base的安装步骤详解_yuyuyuliang00的博客-CSDN博客
准备软件包:
- medm-MEDM3_1_17.tar.gz 下载:MEDMMotif编辑器和显示管理器-Linux文档类资源-CSDN下载
- edm-master.zip 下载:MEDMMotif编辑器和显示管理器-Linux文档类资源-CSDN下载
- extensions-master.zip 下载:EPICSextensions-Linux文档类资源-CSDN下载
安装过程:
1、解压extensions-master.zip到/usr/local/EPICS/,并建立到解压目录的软链接:
[root@centos7 EPICS]# ls
base base-7.0.3.1
[root@centos7 EPICS]# unzip /home/epics/extensions-master.zip
Archive: /home/epics/extensions-master.zip
ce3af4c9d82e6a34d788aa907dbc5ad0d7e29df1
creating: extensions-master/
extracting: extensions-master/.gitignore
....
inflating: extensions-master/src/Makefile
[root@centos7 EPICS]# ls
base base-7.0.3.1 extensions-master
[root@centos7 EPICS]# ln -s extensions-master extensions
[root@centos7 EPICS]# ls
base base-7.0.3.1 extensions extensions-master
2、按如下,定义 EXTENSIONS 路径,把以下内容添加到/etc/profile.d/epics.sh文件末尾,并且使得定义的环境变量生效:
- EPICS_EXTENSIONS="/usr/local/EPICS/extensions"
- PATH="${PATH}:${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}"
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH}"
[root@centos7 medm]# cat /etc/profile.d/epics.sh
# 安装EPICS base前添加的环境变量
export EPICS_BASE="/usr/local/EPICS/base"
export EPICS_HOST_ARCH=`${EPICS_BASE}/startup/EpicsHostArch`
export PATH="${PATH}:${EPICS_BASE}/bin/${EPICS_HOST_ARCH}"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${EPICS_BASE}/lib/${EPICS_HOST_ARCH}"
# 安装edm和medm前添加的环境变量
export EPICS_EXTENSIONS="/usr/local/EPICS/extensions"
export PATH="${PATH}:${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH}"
[root@centos7 medm]# source /etc/profile.d/epics.sh
3、解压medm-MEDM3_1_17.tar.gz和edm-master.zip到目录/usr/local/EPICS/extensions/src/下,然后建立各自的软链接:
[root@centos7 EPICS]# cd extensions
[root@centos7 extensions]# ls
configure LICENSE.md Makefile README src
[root@centos7 extensions]# cd src/
[root@centos7 src]# pwd
/usr/local/EPICS/extensions/src
[root@centos7 src]# tar -xvzf /home/epics/medm-MEDM3_1_17.tar.gz
medm-MEDM3_1_17/
...
medm-MEDM3_1_17/xc/utils.c
[root@centos7 src]# unzip /home/epics/edm-master.zip
Archive: /home/epics/edm-master.zip
2d5d8c4ef740f600fb0aab245e7af1463f34c8d9
creating: edm-master/
...
inflating: edm-master/videowidget/twoD.xpm
[root@centos7 src]# ls
edm-master Makefile medm-MEDM3_1_17
[root@centos7 src]# ln -s medm-MEDM3_1_17 medm
[root@centos7 src]# ln -s edm-master edm
[root@centos7 src]# ls
edm edm-master Makefile medm medm-MEDM3_1_17
3、安装以上软件包所需的依赖软件包:
1) MEDM
- medm依赖openmotif软件包,先安装openmotif,然后当前路径切换medm指向的路径,执行make进行编译
[root@centos7 src]# yum install openmotif
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.sjtu.edu.cn
Package motif-2.3.4-14.el7_5.x86_64 already installed and latest version
Nothing to do
[root@centos7 src]# cd medm
[root@centos7 medm]# ls
KNOWN_PROBLEMS.html LICENSE Makefile medm printUtils README.1st xc
[root@centos7 medm]# make
make -C ./printUtils install
make[1]: Entering directory `/usr/local/EPICS/extensions-master/src/medm-MEDM3_1_17/printUtils'
...
make[1]: Leaving directory `/usr/local/EPICS/extensions-master/src/medm-MEDM3_1_17/medm'
[root@centos7 medm]#
- 在图形界面伪终端窗口种输入medm,弹出如下一个标题栏为medm的窗口时,表示medm软件包安装成功:
2) edm
- 安装依赖包:ibXtst-1.2.3-1.el7.x86_64,libXtst-devel-1.2.3-1.el7.x86_64和字体包xorg-x11-fonts
yum install xorg-x11-fonts-* -y
yum install libXtst libXtst-devel -y
- 进入指定路径,编译edm源文件
[root@centos7 epics]# cd /usr/local/EPICS/extensions/src/edm
[root@centos7 edm]# pwd
/usr/local/EPICS/extensions/src/edm
[root@centos7 edm]# make
make -C ./util install
make[1]: Entering directory `/usr/local/EPICS/extensions-master/src/edm-master/util'
...
make[1]: Leaving directory `/usr/local/EPICS/extensions-master/src/edm-master/slaclib'
[root@centos7 edm]#
- 配置edm的库文件的路径
cd ${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH} # 安装base时已经定义生效的环境变量
export EDMOBJECTS=$PWD
export EDMPVOBJECTS=$PWD
export EDM=${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}/edm # 此环境变量指向edm程序
for pv in Epics Calc Log Loc; do $EDM -addpv $PWD/lib$pv.so;done
for ff in lib*.so;do ${EDM} -add $PWD/$ff;done
sed -i -e "s|$PWD|"'$(EDMLIBS)|' edmObjects edmPvObjects
rm edmObjects~ edmPvObjects~
unset EDMOBJECTS EDMPVOBJECTS EDM # 删除已定义的环境变量
install -d ${EPICS_EXTENSIONS}/etc # 在指定目录下新建一个目录etc
mv edmObjects edmPvObjects ${EPICS_EXTENSIONS}/etc/
- 在/etc/profile.d/epics.sh中配置用于edm的环境变量,在epics.sh末尾添加以下几行:
export EDMOBJECTS=$EPICS_EXTENSIONS/etc
export EDMPVOBJECTS=$EPICS_EXTENSIONS/etc
export EDMFILES=$EPICS_EXTENSIONS/src/edm/edmMain
export EDMHELPFILES=$EPICS_EXTENSIONS/src/edm/helpFiles
export EDMLIBS=$EPICS_EXTENSIONS/lib/$EPICS_HOST_ARCH
- 使新定义的环境变量生效:
source /etc/profile.d/epics.sh
- 测试:在图形界面伪终端中输入edm后,弹出一个标题栏伪edm开头的窗口