English 中文(简体)
海关安装处理器的排泄物
原标题:Eclipse p2 alternative for custom install handlers

在第2页之前,人们可以写出一个带有在安装期间做任何定制任务的特征的定制安装器。

I see that with p2 the custom install handler is no longer supported. I keep hearing about custom touchpoints being the replacement for that.

然而,我找不到具体的例子/文件。

Can anyone tell me how to get the functionality of custom install handlers with the p2 update manager.

<><>Edit>: 描述我想要做的事情——

我需要ed。 根据我们是否在64个轨道或32个轨道范围内运行,将Xmx财产归为价值。

<><>><>>>> 我试图在我的故事中用以下文字制作2.inf文档:

instructions.install = 
addJvmArg(jvmArg:-Xmx900m);

instructions.install.import= 
org.eclipse.equinox.p2.touchpoint.eclipse.addJvmArg,

但是,它并不区分32至64分界线。

最佳回答

p2.inf 当然是开展定制行动的适当场所。 把论点添加到......ini是个好的地方。 您可在您的特稿/插文中张贴p2.inf

http://www.ohchr.org。

我在自己的环境中尝试了,在安装第32轨和第64轨号相同的特征时,它很好地发挥了作用。 您可下载example Code

#create a requirement on the IU fragment we are creating
requires.2.namespace=org.eclipse.equinox.p2.iu
requires.2.name=configure.com.example.yourfeature.linux.x86
requires.2.range=[1.0.0,1.0.0]
requires.2.greedy=true
requires.2.filter=(&(osgi.os=linux)(osgi.arch=x86))

#create a IU frament named configure.com.example.yourfeature.linux.x86 for linux 32 bit
units.0.id=configure.com.example.yourfeature.linux.x86
units.0.version=1.0.0
units.0.filter=(&(osgi.os=linux)(osgi.arch=x86))
units.0.provides.1.namespace=org.eclipse.equinox.p2.iu
units.0.provides.1.name=configure.com.example.yourfeature.linux.x86
units.0.provides.1.version=1.0.0
units.0.instructions.configure=addJvmArg(jvmArg:-Xmx500m);
units.0.instructions.configure.import=org.eclipse.equinox.p2.touchpoint.eclipse.addJvmArg,

#create a requirement on the IU fragment we are creating
requires.3.namespace=org.eclipse.equinox.p2.iu
requires.3.name=configure.com.example.yourfeature.linux.x86_64
requires.3.range=[1.0.0,1.0.0]
requires.3.greedy=true
requires.3.filter=(&(osgi.os=linux)(osgi.arch=x86_64))

#create a IU frament named configure.com.example.yourfeature.linux.x86_64 for linux 64 bit
units.1.id=configure.com.example.yourfeature.linux.x86_64
units.1.version=1.0.0
units.1.filter=(&(osgi.os=linux)(osgi.arch=x86_64))
units.1.provides.1.namespace=org.eclipse.equinox.p2.iu
units.1.provides.1.name=configure.com.example.yourfeature.linux.x86_64
units.1.provides.1.version=1.0.0
units.1.instructions.configure=org.eclipse.equinox.p2.touchpoint.eclipse.addJvmArg(jvmArg:-Xmx900m);
问题回答

我认为,关于这个问题的最完整的说明是:。 你或许对“点触点行动”感兴趣,但也可以执行你自己的点行动,即作为安装过程一部分援引的 Java类。

EDIT:Customizingetadata载有一些关于你可在p2.inf档案中填写的内容的信息。 例如:

 instructions.install = 
    ln(targetDir:@artifact,linkTarget:foo/lib.1.so,linkName:lib.so);
    chmod(targetDir:@artifact,targetFile:lib/lib.so,permissions:755);
 instructions.install.import= 
    org.eclipse.equinox.p2.touchpoint.natives.ln,
    org.eclipse.equinox.p2.touchpoint.natives.chmod

有两个条款解释如何做到这一点:

首先涉及更多的选择,其次是P2触点。

WARNING: when we added custom touchpoints to our plugin, it started deadlocking (quite often, but not always) at install time (we did not want the risk and removed them). Maybe we did something wrong but this is something to be aware of.

Built-inpasspoints 但是,似乎有工作报酬。





相关问题
In Eclipse, why doesn t "Show In" appear for non-Java files?

If I have a *java file open, I can right click on the source, scroll down to "Show In (Alt-Shift-W)", and select Navigator. If I have an *xml, *jsp, or pretty much anything besides a Java source ...

Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

How to copy multiple projects into single folder in eclipse

I have two projects, Project1 and Project2. Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below. Eclipse Workspace -> Project -> ...

Java: Finding out what is using all the memory

I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse.

热门标签