特定于平台的依赖性渗透到 Eclipse 插件中
我已经使用 Eclipse EMF 和 GMF 框架实现了图形编辑器。完成我的项目后,我意识到这个插件显示了对一些特定于操作系统的插件的依赖关系(不是我明确添加的)。即:org.eclipse.ui.win32
,org.eclipse。 swt.win32.win32.x86。每当我尝试在更新站点绕过此依赖项时,插件的安装过程就会出现问题。
因此,不可能在 *nix 环境甚至 win64 机器中运行我的插件。这对我来说似乎是一个非常严重的约束依赖。我是否以错误的方式做事?或者除了在每个不同的操作系统上从头开始构建项目之外,是否没有其他方法来构建跨平台的 Eclipse 插件?
I have implemented a graph editor with Eclipse EMF and GMF frameworks. After completing my project, I realized that this plugin shows dependencies (not explicitly added by me) on some OS-specific plugins.i.e:org.eclipse.ui.win32
, org.eclipse.swt.win32.win32.x86
. And whenever I have tried to bypass this dependency at my update site something went wrong with the installation process of the plugin.
As such it is impossible to run my plugin in *nix environment or even win64 machines.This seems a very heavy constraint dependency to me. Am I doing something in a wrong way? Or is there no other way of building Eclipse plugins which are cross-platform other than building the project from scratch at each different OSs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们在我的项目中创建了类似风格的插件。在 Package Explorer 的“插件依赖关系”下,我可以看到列出了 org.eclipse.swt.win32,但它没有列在 plugin.xml 的必需插件中。
我们还成功创建了一个适用于 Mac 用户的更新站点,没有任何问题。
所以,是的,有可能有一个跨平台插件。
我建议您首先尝试使用“导出...”-> “可部署插件和片段”为您的插件创建一堆 jar 文件。通过复制到新安装的 Eclipse 的 drop-ins 文件夹中,看看是否可以成功安装它们。首先在 Win32 安装上执行此操作,然后在另一个平台上尝试。完成该工作后,请使用新的 Eclipse 安装来创建更新站点。
We created a similar style of plug-in in my project. Under "Plug-in Dependencies" in Package Explorer I can see org.eclipse.swt.win32 listed, but it is not listed in required plug-ins in plugin.xml.
We also successfully created an update site which works for Mac users without issue.
So, yes it is possible to have a cross-platform plug-in.
I would suggest you first try to to use "Export..." -> "Deployable plug-ins and fragments" to create a bunch of jar files for your plug-in. See if these can be successfully installed by copying into the drop-ins folder of a fresh eclipse installation. Do this first on a Win32 install, then try on another platform. Once you have that working, use the new Eclipse installation to create the Update site.