Home » Eclipse Projects » Oomph » Access user selected arch value
|
Re: Access user selected arch value [message #1735447 is a reply to message #1735444] |
Sun, 19 June 2016 17:38 |
Ed Merks Messages: 33217 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
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Access user selected arch value [message #1735448 is a reply to message #1735447] |
Sun, 19 June 2016 17:41 |
Ed Merks Messages: 33217 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
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Re: Access user selected arch value [message #1735876 is a reply to message #1735840] |
Thu, 23 June 2016 12:11 |
Ed Merks Messages: 33217 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
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Goto Forum:
Current Time: Mon Sep 23 16:15:43 GMT 2024
Powered by FUDForum. Page generated in 0.03765 seconds
|