MAC系统安装加载项

开发了个加载项, 最近有些MAC用户问我加载项能不能在MAC系统上安装,研究了下,发现是可以的,MAC系统现在是支持加载项开发,但安装功能好像还用不了,跟wps通信的58890端口的连接没有建立成功,于是写了个手动安装的shell脚本,经测试是可用的

cd ~/Library/Containers/com.kingsoft.wpsoffice.mac/Data/.kingsoft/wps/jsaddons/
publish_name="publish.xml"
plugin_content='<jspluginonline name="XXX" url="XXX" type="YYY" install="XXX"/>'
content="<jsplugins>
${plugin_content}
</jsplugins>"

if [ -f "$publish_name" ]; then
    sed -i ""  "$ i\ 
    ${plugin_content}
" "$publish_name"
else
    echo "$content" > "$publish_name"
fi

plugin_content 的内容根据自己的项目改,如果不知道写,可以看下自己在windows系统安装后的 publish.xml 的内容,复制过去就好了

中国香港
浏览 538
收藏
6
分享
6 +1
6
+1
全部评论 6
 
张伟
windows 环境下的在线部署是没问题的 可以安装也能显示,参照你上面的脚本在 publish.xml 增加了对应的标签,重新打开 wps 软件 加载项 没有出来。工具栏中能看到可用的加载项。就是不显示。
· 北京
回复
张伟
也有提示。确认后 没有作用。
· 北京
回复