Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Oomph Installation folder name
Oomph Installation folder name [message #1738661] Thu, 21 July 2016 21:34 Go to next message
Velizar Nenov is currently offline Velizar NenovFriend
Messages: 13
Registered: July 2016
Junior Member
Hello,

Is it possible to set a default value for "Installation folder name" parameter, i.e. "eclipse" instead of complex value set by the installer.

Regards,
Velizar
Re: Oomph Installation folder name [message #1738883 is a reply to message #1738661] Mon, 25 July 2016 16:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29551
Registered: July 2009
Senior Member
Velizar,

No, the default is computed (from the names of the product version).
It is designed so that if you install several product versions, they'll
have different folder names, by default.


On 25.07.2016 18:18, Velizar Nenov wrote:
> Hello,
>
> Is it possible to set a default value for "Installation folder name"
> parameter, i.e. "eclipse" instead of complex value set by the installer.
>
> Regards,
> Velizar
Re: Oomph Installation folder name [message #1740067 is a reply to message #1738883] Mon, 08 August 2016 20:05 Go to previous messageGo to next message
Taylor Abrahamson is currently offline Taylor AbrahamsonFriend
Messages: 9
Registered: March 2016
Junior Member
Yes you can. Just add this to your setup file.

<?xml version="1.0" encoding="UTF-8"?>
<setup:VariableTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
filter=""
name="installation.location"
value="D:/Program Files"
defaultValue="D:/Program Files"/>

No more versioned eclipse folders.

Keep in mind, this will override any change when you run the installer to the installation directory. No matter what you choose or type into the installation folder text box when installing, won't be used and it will install to the above directory.

Ed Merks,

We've talked about this before, please don't break this workaround. It's working wonderfully for my team.
Re: Oomph Installation folder name [message #1759963 is a reply to message #1740067] Thu, 20 April 2017 14:34 Go to previous messageGo to next message
David Hofmann is currently offline David HofmannFriend
Messages: 25
Registered: March 2017
Junior Member
Hi,
I have a similar question. As I understand, the pattern of ${installation.location} is ${install.root/}${installation.id}. ${installation.id} is in turn computed through ${scope.product.name}-${scope.product.version.name}.

My goal is to build an installation path like this:
C:\Program Files\My Company\My Software Name\Version


My concrete questions are:


  1. How can I change ${install.root} to something like C:\Program Files and is this possible without file system access problems?
  2. How can I change the installation location rule (${installation.location}) to something like ${install.root/My Company/My Software Name/}${scope.product.version.name}


I tried adding a variable task in my .setup file like this:

<setupTask
        xsi:type="setup:VariableTask"
        name="installation.location"
        value="${install.root/My Company/My Software Name/}${scope.product.version.name}"
        defaultValue="${install.root/My Company/My Software Name/}${scope.product.version.name}"/>


but this has no effect. How can I change these variables in my .setup file or is this possible via the .ini file?

Thanks in advance for any help.
Best regards
David
Re: Oomph Installation folder name [message #1759970 is a reply to message #1759963] Thu, 20 April 2017 14:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29551
Registered: July 2009
Senior Member
You can define a variable for install.root but if that variable is also already defined in the user.setup, the user.setup's definition overrides. I tried adding the variable you showed for installation.location to the Eclipse.org product catalog and that worked as expected...
Re: Oomph Installation folder name [message #1760450 is a reply to message #1759970] Thu, 27 April 2017 12:40 Go to previous messageGo to next message
David Hofmann is currently offline David HofmannFriend
Messages: 25
Registered: March 2017
Junior Member
Thanks for your reply, Ed. I tried adding this variable for installation.location in my custom product setup file, its containing catalog setup file and even tried adding it to both files simultaneously.
I also tried using a Path Variable instead of a simple variable. Nothing had any effect in the installer. I also verified that my custom setup files were loaded by changing the descriptions displayed in the installer.
What am I missing here?
Re: Oomph Installation folder name [message #1760463 is a reply to message #1760450] Thu, 27 April 2017 14:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29551
Registered: July 2009
Senior Member
Did you double check that this variable is not already defined in your user.setup?
Re: Oomph Installation folder name [message #1760464 is a reply to message #1760463] Thu, 27 April 2017 14:13 Go to previous messageGo to next message
David Hofmann is currently offline David HofmannFriend
Messages: 25
Registered: March 2017
Junior Member
I tried three combinations:


  1. Variable in catalog only
  2. Variable in product only
  3. Variable with same value both in catalog and product


None of the combinations had any effect.
Re: Oomph Installation folder name [message #1760482 is a reply to message #1760464] Thu, 27 April 2017 15:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29551
Registered: July 2009
Senior Member
I added this to org.eclipse.applications.setup:
<?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
      name="install.root"
      value="C:/Program Files"
      defaultValue="C:/Program Files"/>
  <setup:VariableTask
      name="installation.location"
      value="${install.root/Some-Location-I-Like}"
      defaultValue="${install.root/Some-Location-I-Like}"/>
</xmi:XMI> 
and that produced the location C:\Program Files\Some-Location-I-Like in advanced mode. If I have the install.root defined in my user.setup (as normal) then it produces D:\sandbox\USER-HOME\Some-Location-I-Like instead.

But that doesn't work for simple mode which uses the logic in org.eclipse.oomph.setup.internal.installer.SimpleVariablePage.getDefaultInstallationFolder() which does not give you any control via the setup models for how that folder is named; only via configuration preferences or via -Doomph.setup.install.root can you control the "install.root", but still the segment after that will be computed.
Re: Oomph Installation folder name [message #1760541 is a reply to message #1760482] Fri, 28 April 2017 08:01 Go to previous messageGo to next message
David Hofmann is currently offline David HofmannFriend
Messages: 25
Registered: March 2017
Junior Member
Thank you for the clarification. After switching to advanced mode, the variable was indeed used.

What is the reason that the installer behaves differently in simple and advanced mode? I have the requirement to adjust installation.location for simple mode. Is this possible currently?
Re: Oomph Installation folder name [message #1760560 is a reply to message #1760541] Fri, 28 April 2017 10:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29551
Registered: July 2009
Senior Member
The simple answer is that the simple mode is supposed to be simple. Razz Seriously though, it can't cope with any prompted variables and so it makes assumptions about the variables that will be prompted. It doesn't offer attribute rule choices and doesn't create a performer until after you hit the install button. So it doesn't do a deep analysis of what variables might already be defined.

In simple model, you can only affect the install.root; the rest of the path is computed. I could imagine yet another annotation you could put on the model (much like the branding annotations for the final implicit segment of the path)...
Re: Oomph Installation folder name [message #1760573 is a reply to message #1760560] Fri, 28 April 2017 14:03 Go to previous messageGo to next message
David Hofmann is currently offline David HofmannFriend
Messages: 25
Registered: March 2017
Junior Member
Thanks for the detailed explanation. I hoped to be able to supply an initial value for the installation path text field, customizable in my .setup file.
However as already pointed out, when adjusting installation.location, this variable is applied after the user entered the desired destination directory, making the input field completely useless because the user input is ignored.

It would be great if the initial value of the text field in the simple installer would be customizable.

I see three alternatives here:


  1. Resolve installation.location before the text field is populated. User can edit the path, installation.location is updated with the changes.
  2. Provide separate variable for the initial installation path value. Advantage (also for previous alternative): ${install.root} can be referenced, path separator handling is already implemented for variables.
  3. Provide annotation for install root suffix. Disadvantage: not as flexible as a variable (no references to other variables), no built-in path separator handling for different file systems.


Please let me know what you think of these alternatives or if you have other ideas.

[Updated on: Thu, 04 May 2017 12:24]

Report message to a moderator

Re: Oomph Installation folder name [message #1760577 is a reply to message #1760573] Fri, 28 April 2017 15:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29551
Registered: July 2009
Senior Member
Please open a bugzilla enhancement request. I'm not sure the best approach. I could imagine that we could create a performer just to test if the installation.location is prompted and eliminate the field from the page in the case that it's not. Then any product version could specify a fixed location that the user could not modify. Or perhaps it could be a variable that has just a default but not a value, in which case the field could be shown but with that default value. Unfortunately I doubt I'll find time for that soon. Sad
Re: Oomph Installation folder name [message #1760582 is a reply to message #1760577] Fri, 28 April 2017 15:18 Go to previous message
David Hofmann is currently offline David HofmannFriend
Messages: 25
Registered: March 2017
Junior Member
I really like your approach to set a default value for installation.location without setting the value, meaning: the text box in the simple installer is filled with the default value, but the user can (optinally) modify it in order to define its final value. I'll create a bugzilla for that. I will also clarify whether I could help by providing a patch.

[Updated on: Thu, 04 May 2017 12:25]

Report message to a moderator

Previous Topic:TargetDefinitionGenerator with platform-specific dependencies
Next Topic:Resolved: Where is the menu entry "Perform Setup Tasks"
Goto Forum:
  


Current Time: Tue Sep 25 03:49:27 GMT 2018

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

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

Back to the top