Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Access user selected arch value
Access user selected arch value [message #1735444] Sun, 19 June 2016 15:54 Go to next message
Malte Brunnlieb is currently offline Malte BrunnliebFriend
Messages: 27
Registered: February 2011
Junior Member
Hi *,

is it possible to access the target system's architecture value selected by the user in the product wizard as a property in the model? Currently, I just can access i.e. the os.arch. However, on a x64 system, the user might specify x86 to be installed and my architecture dependent tasks should be aligned with the user's selection.

Maybe just as a side mark:
It would be nice if Compound Task may also get the superb filter property introduced for setup tasks in v1.3.0. It is a killer feature for our use cases. However, having filter property also on Compound Tasks would reduce creation and maintenance costs of the product models even more Smile

Thanks in advance for help!
Best Regards,
Malte
Re: Access user selected arch value [message #1735447 is a reply to message #1735444] Sun, 19 June 2016 17:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30996
Registered: July 2009
Senior Member
Malte,

Comments below.


On 19.06.2016 11:54, Malte Brunnlieb wrote:
> Hi *,
>
> is it possible to access the target system's architecture value
> selected by the user in the product wizard as a property in the model?
> Currently, I just can access i.e. the os.arch. However, on a x64
> system, the user might specify x86 to be installed and my architecture
> dependent tasks should be aligned with the user's selection.
I see what you mean, we put it into the filter context, but not in the
variable map

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

Please open a bugzilla; it's trivial to add and makes good sense.
>
> Maybe just as a side mark:
> It would be nice if Compound Task may also get the superb filter
> property introduced for setup tasks in v1.3.0.
It does have such a property and looking at
org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.getSetupTasks(EList<SetupTask>,
List<Scope>, SetupTaskContainer) I think it's processed properly.
> It is a killer feature for our use cases. However, having filter
> property also on Compound Tasks would reduce creation and maintenance
> costs of the product models even more :)
>
> Thanks in advance for help!
> Best Regards,
> Malte
Re: Access user selected arch value [message #1735448 is a reply to message #1735447] Sun, 19 June 2016 17:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30996
Registered: July 2009
Senior Member
By the way, with -Doomph.setup.os.choose=true, the bitness choice is
replaced with an overall OS combo choice so you could test creating a
Mac, Linux, or Windows installation on any OS. This might be useful for
testing sometimes...


On 19.06.2016 13:38, Ed Merks wrote:
> Malte,
>
> Comments below.
>
>
> On 19.06.2016 11:54, Malte Brunnlieb wrote:
>> Hi *,
>>
>> is it possible to access the target system's architecture value
>> selected by the user in the product wizard as a property in the
>> model? Currently, I just can access i.e. the os.arch. However, on a
>> x64 system, the user might specify x86 to be installed and my
>> architecture dependent tasks should be aligned with the user's
>> selection.
> I see what you mean, we put it into the filter context, but not in the
> variable map
>
> OS os = getOS();
> filterContext.put("osgi.ws", os.getOsgiWS());
> filterContext.put("osgi.os", os.getOsgiOS());
> filterContext.put("osgi.arch", os.getOsgiArch());
>
> Please open a bugzilla; it's trivial to add and makes good sense.
>>
>> Maybe just as a side mark:
>> It would be nice if Compound Task may also get the superb filter
>> property introduced for setup tasks in v1.3.0.
> It does have such a property and looking at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.getSetupTasks(EList<SetupTask>,
> List<Scope>, SetupTaskContainer) I think it's processed properly.
>> It is a killer feature for our use cases. However, having filter
>> property also on Compound Tasks would reduce creation and maintenance
>> costs of the product models even more :)
>>
>> Thanks in advance for help!
>> Best Regards,
>> Malte
>
Re: Access user selected arch value [message #1735840 is a reply to message #1735444] Thu, 23 June 2016 08:39 Go to previous messageGo to next message
Malte Brunnlieb is currently offline Malte BrunnliebFriend
Messages: 27
Registered: February 2011
Junior Member
Thanks!
Just to make it clear. The osgi values will represent the user selected architecture value or simply the osgi architecture the installer is currently running with?
The latter would not be helpful.

In addition, if the osgi values are representing the target eclipse installation. When will they be resolved? I would guess that this is not even possible before starting the installation.

Best Regards,
Malte
Re: Access user selected arch value [message #1735876 is a reply to message #1735840] Thu, 23 June 2016 12:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30996
Registered: July 2009
Senior Member
Malte,

Comments below.


On 23.06.2016 04:39, Malte Brunnlieb wrote:
> Thanks!
> Just to make it clear. The osgi values will represent the user
> selected architecture value or simply the osgi architecture the
> installer is currently running with?
Yes, the former is useful for properly filtering the task, so the values
are in the filter context, but they're not in the properties of the
setup context.
> The latter would not be helpful.
I believe the latter is currently the case, because all the system
properties and environment properties are currently in the setup context
so these OSGi properties are present, but represent the installer's own
system properties.
>
> In addition, if the osgi values are representing the target eclipse
> installation. When will they be resolved?
Currently the properties in the setup context are initialized by
org.eclipse.oomph.setup.internal.core.AbstractSetupTaskContext.initialize(SetupContext)
and that's already putting the three properties for the OS selection
into the filterContext (otherwise the filters wouldn't work correct) and
same code could easily add it to the overall setup context.
> I would guess that this is not even possible before starting the
> installation.
Given we know the target OS for the installation in the installer
itself, we definitely know this before starting the installation. I
wouldn't ask you to open a bugzilla otherwise...
>
> Best Regards,
> Malte
Re: Access user selected arch value [message #1740495 is a reply to message #1735444] Mon, 15 August 2016 05:51 Go to previous message
Malte Brunnlieb is currently offline Malte BrunnliebFriend
Messages: 27
Registered: February 2011
Junior Member
done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=499651
Previous Topic:using boolean variables in filter
Next Topic:accessing project setups from https which requieres authentication
Goto Forum:
  


Current Time: Tue Mar 31 00:16:21 GMT 2020

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

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

Back to the top