| Summary: | [director] provide commandline syntax help | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Nick Boldt <nboldt> |
| Component: | p2 | Assignee: | Thomas Hallgren <thomas> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | irbull, thomas |
| Version: | 3.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Bug Depends on: | 274470 | ||
| Bug Blocks: | |||
|
Description
Nick Boldt
There is work going on to simplify the director app in bug 268138. Regarding packaging of the director app, see bug 267623 - Ship a headless director product. I'd like it to be shipped from the Equinox download page but for now, you'll find one here: http://www.eclipse.org/buckminster/downloads.html (the link "director_1.0.0.r10104.zip" in the "Headless Product" section). It doesn't have an executable since it's completely platform independent. Instead it's shipped with a 'director' shell script and a windows 'director.bat'. Excellent idea about the -help option. I'll change this bugzilla to cover that since the rest is covered by other bugs. http://www.eclipse.org/buckminster/downloads.html shows usage, with -ar <url to headless repo> -mr <url to headless repo> I would suggest you give an example and clarify that one url points to artifacts, the other metadata. Took me a second to grok "ar" vs "mr", and I've been using p2 for over a year now. :) As you know, these may not be the same value, and can also be multiple values. For example: -metadataRepository file:${p2.director.input.repo},file:${p2.director.destination}/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile -artifactRepository file:${p2.director.input.repo},file:${p2.director.destination} (http://wiki.eclipse.org/Equinox_p2_director_application/Examples/Install_into_eclipse_using_SDKProfile) Looking in the director shell script, I notice a few things: a) the script is not executable (use AntZip instead of pure Zip when bundling it so you can set permissions) - http://ant.apache.org/manual/CoreTypes/zipfileset.html b) I see no mention of the director app, only the equinox.launcher_*.jar. How does the script know to run the director? Doesn't that jar have a number of Main classes? Is the director the default one? (http://wiki.eclipse.org/Starting_Eclipse_Commandline_With_Equinox_Launcher) c) The script can be run w/o options, and it does... not much. $ ./director Operation completed in 1 ms. Better output to explain what happened would be useful here. d) in place of director and director.bat, why not bundle the app as an executable jar? Thus `java -jar director.jar` would be functionally equivalent to `./director`, and on Windows, double-clicking the jar would run it (and hopefully throw some information into a log next to the jar in the same folder, or pop a dialog w/ the results). As an added bonus, you need not maintain the same script in multiple languages (have you tested this on Mac, for example?) (In reply to comment #3) > http://www.eclipse.org/buckminster/downloads.html shows usage, with > > -ar <url to headless repo> > -mr <url to headless repo> > > I would suggest you give an example and clarify that one url points to > artifacts, the other metadata. > The <headless repo> in this case is the one referenced in the previous sentence so I don't see the need for that. This is supposed to be a short instruction to get Bucky Headless up and running with no ambitions beyond that. I'll add a link to more comprehensive director docs. > Looking in the director shell script, I notice a few things: > > a) the script is not executable > Oops, that's a bug. I'll check (and yes, ant zip is used in the assembly). > b) I see no mention of the director app, only the equinox.launcher_*.jar. How > does the script know to run the director? > The director is the default application. Have a look at configuration/config.ini > c) The script can be run w/o options, and it does... not much. > > $ ./director > Operation completed in 1 ms. > Yes, that's not very nice. The director app should check what 'action' (i.e. -installIU, -uninstallIU, -list -help) to perform. If none is given, it should default to the -help. Well, as soon as that option exists of course. > d) in place of director and director.bat, why not bundle the app as an > executable jar? Thus `java -jar director.jar` would be functionally equivalent > to `./director` > It would, but it's more typing :-) I agree with you that a standard Java entry point would be a good thing. Not just for the director. I was not overly enthusiastic when they decided to remove the startup.jar (bug 173742) without a proper replacement. > and on Windows, double-clicking the jar would run it (and hopefully > throw some information into a log next to the jar in the same > folder, or pop a dialog w/ the results). > I've seen more then one system where a double-click on a jar opens up winzip (my own is one example) or winrar. Not sure I see the value of this. > As an added bonus, you need not maintain the > same script in multiple languages (have you tested this on Mac, for example?) > Yes, it's tested on a Mac and at present, that just about covers all platforms that we support. (In reply to comment #4) > > does the script know to run the director? > configuration/config.ini /me smacks forehead. Of course! > I've seen more then one system where a double-click on a jar opens up winzip > (my own is one example) or winrar. Not sure I see the value of this. Fair enough; hadn't considered that scenario / file association. > Yes, it's tested on a Mac and at present, that just about covers all platforms > that we support. Yep, the trio of mac/win/lin (+/- the 64-bit flavours) is about all you need. The couple people out there trying to use Eclipse on Solaris (Solipse project @ code.google.com) can roll their own. :) Fixed in the new director app. |