Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Command line argument for specifying a Configuration
Command line argument for specifying a Configuration [message #1761028] Fri, 05 May 2017 11:54 Go to next message
Anders Hammar is currently offline Anders HammarFriend
Messages: 12
Registered: August 2012
Junior Member
According to [1] it's possible to specify the URI for a Configuration file as a command line argument to the eclipse installer. What's the argument for doing that?

[1] http://wiki.eclipse.org/Eclipse_Oomph_Authoring#Automation_and_Specialization_with_Configurations
Re: Command line argument for specifying a Configuration [message #1761048 is a reply to message #1761028] Fri, 05 May 2017 15:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Just the URI itself is the argument.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Command line argument for specifying a Configuration [message #1804949 is a reply to message #1761028] Wed, 03 April 2019 15:57 Go to previous messageGo to next message
Christian Schäfer is currently offline Christian SchäferFriend
Messages: 8
Registered: April 2019
Junior Member
Hi,

I've tried that with all combinations that I could think of.

Quote:
eclipse-inst-win64 MyConfiguration.setup


Also Quote:
file: and file:// and file ://./


And I tried a URL:

Quote:
eclipse-inst-win64.exe https ://gist.githubusercontent.com/calle2010/4b89535f9fd2fff3d11cd259706d8958/raw/400cec5b8ff2a0b54242fcadfc21793750c9ffd5/test.setup


But I see no reaction of the installer, also no error message.

Dragging that file or the URL to the installer window selects the product. But, to be honest, that is the least user friendly possibility in an automated setup scenario.

Obviously I'm doing something wrong. Can you show me how to do it right?

Note: I had to invalidate the URLs otherwise I can post here.
Re: Command line argument for specifying a Configuration [message #1805014 is a reply to message #1804949] Thu, 04 April 2019 15:12 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Unfortunately the native *.exe does not pass command line arguments to the launched installer application. I have a rough prototype for that currently working, but not much time to actually finish it and commit it. So you need to pass arguments to the exacted installer's eclipse-inst.exe for this to work. Sorry.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Command line argument for specifying a Configuration [message #1805048 is a reply to message #1805014] Thu, 04 April 2019 20:10 Go to previous messageGo to next message
Christian Schäfer is currently offline Christian SchäferFriend
Messages: 8
Registered: April 2019
Junior Member
Thank you for the reply. I will try that.
Re: Command line argument for specifying a Configuration [message #1805240 is a reply to message #1805048] Wed, 10 April 2019 09:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
I've committed changes for https://bugs.eclipse.org/bugs/show_bug.cgi?id=546265 to support command line arguments for the native installer. The latest nightly build already supports this feature:

http://www.eclipse.org/downloads/download.php?file=/oomph/products/latest/eclipse-inst-win64.exe

For example, the following now works:
eclipse-inst-win64.exe -vm "C:\Program Files\Java\jdk-12" http://git.eclipse.org/c/emf/org.eclipse.emf.git/plain/releng/org.eclipse.emf.releng/EMFDevelopmentEnvironmentConfiguration.setup -vmargs -Duser.home=D:\dummy -Doomph.setup.user.home.redirect=true 
The -vm argument, which must be first, will be inserted into the eclipse-inst.ini to force the installer to run with that VM. Everything after the optional -vmargs will also be inserted (appended) in the eclipse-inst.ini. The stuff between these is passed as an argument to the extracted installer (eclipse-inst.exe) when it is launch. The logic for "keeping the installer in a permanent location" is enhanced to ensure that when the installer is relaunched, the program arguments are passed in again.

Note that the -vmargs above specify -Duser.home, so the installer will behave as if that folder is actually the user's home folder. Furthermore, the -Doomph.setup.user.home.redirect tells the installer to include an EclipseIni task to also set the -Duser.home in any installations created by that installer. So in this way, I/you can test the experience of using the installer for a first-time user with a clean home folder.

The URL of course automatically sets up an EMF development environment.

In the next view days, I'll do a milestone build to include these changes. (The native executable is also fixed to recognized Java 11 and Java 12 in the system registry).


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Command line argument for specifying a Configuration [message #1805243 is a reply to message #1805240] Wed, 10 April 2019 10:25 Go to previous messageGo to next message
Christian Schäfer is currently offline Christian SchäferFriend
Messages: 8
Registered: April 2019
Junior Member
This sounds great! I will reply back here once I got the chance to test this.
Re: Command line argument for specifying a Configuration [message #1805309 is a reply to message #1805243] Thu, 11 April 2019 13:19 Go to previous messageGo to next message
Lucas Koehler is currently offline Lucas KoehlerFriend
Messages: 2
Registered: May 2014
Junior Member
Hello Ed,
I tried the new nightly build with a product. I tried it with the installer in extracted and packaged form. The product works fine if it is added to the UI normally with the used URI (i.e. the plus button in the advanced mode).

When I run the following, Oomph starts up but then presents an error dialog that says:
Quote:
Workspace Problems
Problems were encountered processing the workspace
Details: No configuration could be loaded http://raw.githubusercontent.com/eclipsesource/oomph/master/EclipseSource.setup


Command executed in Win 10 powershell
.\eclipse-installer\eclipse-inst.exe http://raw.githubusercontent.com/eclipsesource/oomph/master/EclipseSource.setup -vmargs -Duser.home=C:\dummy -Doomph.setup.user.home.redirect=true


Unfortunately, I could not find any logs with an error. Your example with the emf workspace works fine for me.
The main difference I noticed between the setup files is that the example configures a workspace and the config used above configures a product. Are products maybe not yet supported when launching via cmd parameter?

Thanks in advance and cheers,
Lucas
Re: Command line argument for specifying a Configuration [message #1805314 is a reply to message #1805243] Thu, 11 April 2019 14:00 Go to previous messageGo to next message
Christian Schäfer is currently offline Christian SchäferFriend
Messages: 8
Registered: April 2019
Junior Member
Hello Ed,

I tested it and it works really great. I start the installer with

eclipse-inst-win64.exe -vm c:\apps\jdk8 configuration.setup -vmargs -Doomph.setup.install.root=C:\directory


I also tried to have -Xmx3G after -vmargs but I think I prefer to have this in the configuration setup.

I found two issues so far:

1) probably not all mirrors are updated yet? I got two downloads of the installer where one worked and the other ignored the "-vm" parameter and opened a browser telling me to install Java

2) If I have either "create start menu entry" or "create desktop shortcut" or both selected the installer hangs at the end at "Launch". If both are unselected the installation works and launches Eclipse without problems.

I'm not sure if 2) is related to my workstation setup. I will try in a vanilla Windows VM to rule that out.

Thanks again for the updated installer!
Re: Command line argument for specifying a Configuration [message #1805320 is a reply to message #1805314] Thu, 11 April 2019 14:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Lucas,

Indeed a https://raw.githubusercontent.com/eclipsesource/oomph/master/EclipseSource.setup is a Product not a Configuration. Only Configurations are automatically processed. But you can create a Configuration that references your Product's Version and use that instead (and the installer will already select that Product Version skipping past the first page. If you reference the Product Version using a URI that addresses it from/via the containing Product Catalog's URI, that Product Catalog should be automatically added/used.

Christian,

Yes, we update the download "in place" and often mirrors will serve up older versions until they catch up. The server should be smarter about that. :-( I was able to download it right away (slowly!), from the main site.

Note that the -vm arguments are arguments for the installer itself not arguments for the application that the installer installs; indeed those you would need to set in your setup (the Product or Configuration).

Are you talking about links to the "kept" installer. Those links are created by this:

https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/KeepInstallerUtil.java#n47

I don't see any reason this would hang, and it works for me...




Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Command line argument for specifying a Configuration [message #1805327 is a reply to message #1805320] Thu, 11 April 2019 17:52 Go to previous messageGo to next message
Christian Schäfer is currently offline Christian SchäferFriend
Messages: 8
Registered: April 2019
Junior Member
Not sure where "create start menu entry" or "create desktop shortcut" would point to, they don't work for me and are selected by default. I'd have expected it to be shortcuts to the installed Eclipse. I didn't intend to keep the installer.

I see that Powershell is used. Our environment is pretty closed and has a special software to control admin access. This may be the issue.
Re: Command line argument for specifying a Configuration [message #1805336 is a reply to message #1805327] Fri, 12 April 2019 03:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
The short cuts would point to the location to which the user chooses to copy the extracted installer, but of course "keeping" it is optional as is creating the links. The point is that the installer in general doesn't need to be download each time the user wants to install but can be reused and is self-updating.

Do you have problems with the shortcut creation that's available when the the installer finally creates a target installation at the end as well?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Command line argument for specifying a Configuration [message #1805431 is a reply to message #1805320] Mon, 15 April 2019 09:22 Go to previous messageGo to next message
Christian Schäfer is currently offline Christian SchäferFriend
Messages: 8
Registered: April 2019
Junior Member
Is there a reliable way to download the latest installer?

Even if I use this URL

https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2019-03/R/eclipse-inst-win64.exe&mirror_id=1

I currently get an installer from that URL that doesn't respect the "-vm" parameter.
Re: Command line argument for specifying a Configuration [message #1805437 is a reply to message #1805336] Mon, 15 April 2019 10:01 Go to previous messageGo to next message
Christian Schäfer is currently offline Christian SchäferFriend
Messages: 8
Registered: April 2019
Junior Member
Ed Merks wrote on Fri, 12 April 2019 03:16
Do you have problems with the shortcut creation that's available when the the installer finally creates a target installation at the end as well?


I start the downloaded installer directly with the parameters as explained above.

As expected it moves to the selected product automatically. I simply click on the install button.

index.php/fa/35327/0/

If I leave the check boxes as default (checked) the installer hangs before the button changes to "Launch". While it hangs the Avecto DefendpointService.exe is active. So I think it is the issue of this tool. The product is installed correctly, but the shortcuts are not.
EDIT: It doesn't hang forever, as I just found. It only takes very long.

If I uncheck the check boxes (sceenshot) the installer proceeds normally and I can launch the product. No shortcuts are created.



[Updated on: Mon, 15 April 2019 10:07]

Report message to a moderator

Re: Command line argument for specifying a Configuration [message #1805440 is a reply to message #1805437] Mon, 15 April 2019 10:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
The installers are linked from this page:

https://wiki.eclipse.org/Eclipse_Installer

This is the latest milestone that will from now on always have this new support:

http://www.eclipse.org/downloads/download.php?file=/oomph/products/eclipse-inst-win64.exe

Your link points at the one use for the 2019-03 version which is and will always be the older releases version.

I won't be able to reproduce your link creation problems because it seems environment specific. :-(



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Command line argument for specifying a Configuration [message #1805483 is a reply to message #1805440] Tue, 16 April 2019 06:36 Go to previous message
Christian Schäfer is currently offline Christian SchäferFriend
Messages: 8
Registered: April 2019
Junior Member
Thank you very much. Everything is working as expected now.
Previous Topic:Eclipse 2019-03 installation error
Next Topic:Missing requirement: 1.0.0.v1555157849834
Goto Forum:
  


Current Time: Fri Apr 19 23:18:10 GMT 2024

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

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

Back to the top