Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » 32/64 bit variable
32/64 bit variable [message #1739715] Thu, 04 August 2016 08:52 Go to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 208
Registered: July 2009
Location: Graz, Austria
Senior Member
Hi,

I want to copy arbitrary libraries within my setup. These depend on the user selection of 32/64 bit for the installation. Is there a variable available that allows me to get the user selection?

thanks
Re: 32/64 bit variable [message #1739800 is a reply to message #1739715] Thu, 04 August 2016 09:15 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31043
Registered: July 2009
Senior Member
Christian,

We have code like this to put those values into the filter context.

OS os = getOS();
filterContext.put("osgi.ws", os.getOsgiWS());
filterContext.put("osgi.os", os.getOsgiOS());
filterContext.put("osgi.arch", os.getOsgiArch());

So you can write a task that specifies a filter; it's an Advanced
property of SetupTask so you have to enable the Show Advanced properties
in the Properties view. There are many architectures in
org.eclipse.core.runtime.Platform.ARCH_*.

For SWT we do this to copy right .classpath_* file to .classpath:

<?xml version="1.0" encoding="UTF-8"?>
<setup:ResourceCopyTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
excludedTriggers="BOOTSTRAP"
sourceURL="${git.clone.platform.swt.location|uri}/examples/org.eclipse.swt.snippets/.classpath_${osgi.ws}"
targetURL="${git.clone.platform.swt.location|uri}/examples/org.eclipse.swt.snippets/.classpath"/>

In the running IDE, these properties are always available.

In the installer, the values of the properties (variables) reflect the
value for the installer itself. I.e., we put the above into the
filterContext, but not into the setup context itself; last time this
issue came up I suggested we could do that too, but no one opened a
bugzilla for it.

In your case, you're asking directly for a variable with the value, but
the above values are maybe not something you can use directly (unlike
for SWT where the naming conventions of the resources involved
conveniently match the osgi.ws values). Likely you're best to use
filters to make the task conditional...


On 04.08.2016 10:52, Christian Pontesegger wrote:
> Hi,
>
> I want to copy arbitrary libraries within my setup. These depend on
> the user selection of 32/64 bit for the installation. Is there a
> variable available that allows me to get the user selection?
>
> thanks
Re: 32/64 bit variable [message #1739833 is a reply to message #1739800] Thu, 04 August 2016 20:04 Go to previous messageGo to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 208
Registered: July 2009
Location: Graz, Austria
Senior Member
Hm, bad news for me. I thought you need something like this as on 64 bit systems a user can select whether to install 32bit or 64bit binaries on the first page of the advanced setup. I wanted to access the user selection there
Re: 32/64 bit variable [message #1742039 is a reply to message #1739833] Fri, 05 August 2016 03:23 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31043
Registered: July 2009
Senior Member
Christian,

Oomph manages a org.eclipse.oomph.jreinfo.JRE instance and that has all
the information about the JRE that will be used for the target
installation (and also the one is used by the current installation).
And that instance selection on the first page is used to switch between
org.eclipse.oomph.util.OS instances. And p2 itself is driven by exactly
these three OSGi values.

In any case, I'm sure you can accomplish what you want, because you can
use filters to populate a variable with the conditional value you want.

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
<setup:VariableTask
filter="(osgi.arch=x86)"
name="foo"
value="32"/>
<setup:VariableTask
filter="(osgi.arch=x86_64)"
name="foo"
value="64"/>
</xmi:XMI>

And of course you can cover all five values of the ARCH_* variants. And
you can make the value of your variable be whatever is most convenient
for your actual setup tasks.

Note that you can pass -Doomph.setup.os.choose=true to the installer so
that instead of just a bitness choice, you have a choice of any of the
OS instances available, so you can test creating an installation for any
OS on any OS. Again, only the three osgi.* values are generally
relevant to the installation variants available being produced.

On 04.08.2016 22:04, Christian Pontesegger wrote:
> Hm, bad news for me. I thought you need something like this as on 64
> bit systems a user can select whether to install 32bit or 64bit
> binaries on the first page of the advanced setup. I wanted to access
> the user selection there
Previous Topic:Configure perspective with Oomph
Next Topic:Reusing variables across setups
Goto Forum:
  


Current Time: Wed Apr 08 19:21:14 GMT 2020

Powered by FUDForum. Page generated in 0.01729 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top