Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » ResourceCreation of .options file in Eclipse install Directory
ResourceCreation of .options file in Eclipse install Directory [message #1709999] Fri, 02 October 2015 14:28 Go to next message
Simon Laffoy is currently offline Simon LaffoyFriend
Messages: 19
Registered: January 2015
Junior Member
Hi,

I wish to use ResourceCreation to create a .option file in the Eclipse Install Directory using Oomph. Is there is a variable which corresponds to the install directory which is correct across platforms which I may use in the Target URL field?

I would like to have something like:

targetURL="file:${eclipse.working.dir}/.options"

However, ${eclipse.working.dir} is not being recognised as the install direction (or any other likely variable I try). I can't seem to find what the default variable is which will correspond to this location. Can anyone help?
Re: ResourceCreation of .options file in Eclipse install Directory [message #1710066 is a reply to message #1709999] Sat, 03 October 2015 15:31 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

have you tried the following?

${installation.location}/.options or ${installation.location|uri}/.options

Alex



Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: ResourceCreation of .options file in Eclipse install Directory [message #1710205 is a reply to message #1710066] Mon, 05 October 2015 11:03 Go to previous messageGo to next message
Simon Laffoy is currently offline Simon LaffoyFriend
Messages: 19
Registered: January 2015
Junior Member
Quote:
Hi,

have you tried the following?

${installation.location}/.options or ${installation.location|uri}/.options

Alex


Hi, thanks for the suggestion.

I hadn't tried those because I hadn't expected them to work, but just to be sure I tried them anyway. I believe that your above suggestion would work on Windows, however not on Mac (which I am using).

Apologies, but it is clear to me now that I did a poor job of defining the problem in the initial post of the thread. Let me do so now ...

I need the option file to be saved in the same directory as the eclipse executable file. In Mac that would be something like

${installation.location}/Eclipse.app/Contents/MacOS/.options

Now, I could just use the above and I would have something that works on Mac, but then it would not work on Windows.

I am looking for some variable which represents the directory where the .exe file is saved and which is platform independent.

Apologies for not having more clearly defined this in the opening post of the thread.
Re: ResourceCreation of .options file in Eclipse install Directory [message #1710259 is a reply to message #1710205] Mon, 05 October 2015 14:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Simon,

No, there's nothing for that yet. Aren't the contents of that folder
signed and therefore shouldn't be modified?


On 05/10/2015 1:03 PM, Simon Laffoy wrote:
> Quote:
>> Hi,
>>
>> have you tried the following?
>>
>> ${installation.location}/.options or
>> ${installation.location|uri}/.options
>>
>> Alex
>
>
> Hi, thanks for the suggestion.
> I hadn't tried those because I hadn't expected them to work, but just
> to be sure I tried them anyway. I believe that your above suggestion
> would work on Windows, however not on Mac (which I am using).
> Apologies, but it is clear to me now that I did a poor job of defining
> the problem in the initial post of the thread. Let me do so now ...
>
> I need the option file to be saved in the same directory as the
> eclipse executable file. In Mac that would be something like
>
> ${installation.location}/Eclipse.app/Contents/MacOS/.options
> Now, I could just use the above and I would have something that works
> on Mac, but then it would not work on Windows.
>
> I am looking for some variable which represents the directory where
> the .exe file is saved and which is platform independent.
>
> Apologies for not having more clearly defined this in the opening post
> of the thread.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: ResourceCreation of .options file in Eclipse install Directory [message #1710319 is a reply to message #1710259] Tue, 06 October 2015 05:44 Go to previous messageGo to next message
Simon Laffoy is currently offline Simon LaffoyFriend
Messages: 19
Registered: January 2015
Junior Member
Quote:
No, there's nothing for that yet. Aren't the contents of that folder
signed and therefore shouldn't be modified?


Hmm, I don't know if they are or not. I do know though that there are occasions when an option file should be saved in the install directory (where the executable is). For example, see the "Enable additional debug output" paragraph of this article (EDIT: here is the article: url=https://wiki.eclipse.org/EPP/Logging][/url])

Additionally, I know that the effect that I am trying to achieve works if I manually save the option file in the install directory after installation.

[Updated on: Tue, 06 October 2015 05:58]

Report message to a moderator

Re: ResourceCreation of .options file in Eclipse install Directory [message #1710370 is a reply to message #1710319] Tue, 06 October 2015 09:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Simon,

Yes, I'm not really sure how signatures work on the Mac either; I know
they changed the layout in Mars so that signatures work properly...

Your forum edit doesn't show up in my Thunderbird reader but I see
you're referring to
https://wiki.eclipse.org/EPP/Logging#Enable_additional_debug_output

I can't really understand how they define what ${eclipse.working.dir}
means for all platforms, i.e., for Mac it suggests, as you say, that
it's in the same folder as the executable (though it's wrong in the
document and should be ./Eclipse.app/Contents/MacOs/.options), but it
doesn't define where this is on Linux or Windows, presumably the same way...

It seems rather questionable to me because with a shared/read-only
installation such a location is read-only. I would have expected such
information to be stored in the configuration folder so that for a
read-only installation the user can have a place to modify it. I need
to find out more details about why it's this way, but I suppose it's
unlikely to change anymore...

Reading more about this, I wonder if your assumption might just be
wrong. In particular, from reading
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Frunning_eclipse.htm
and looking at the documentation for the -debug flag it says:

If a file location is not given, the platform looks in the directory
that eclipse was started from for a file called ".options".

I think that means it looks in the folder specified by user.dir system
property, i.e., the current working directory. That just happens to be
the folder where the executable is located when you launch from an
icon/shortcut/app, but that's not generally the case. So if you really
want it always to use certain options, you should specify an Eclipse
Ini task to specify the -debug option and include in that task the
absolute location of the .options file.


On 06/10/2015 7:44 AM, Simon Laffoy wrote:
> Quote:
>> No, there's nothing for that yet. Aren't the contents of that folder
>> signed and therefore shouldn't be modified?
>
>
> Hmm, I don't know if they are or not. I do know though that there are
> occasions when an option file should be saved in the install directory
> (where the executable is). For example, see the "Enable additional
> debug output" paragraph of this article.
>
> Additionally, I know that the effect that I am trying to achieve works
> if I manually save the option file in the install directory after
> installation.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: ResourceCreation of .options file in Eclipse install Directory [message #1710482 is a reply to message #1710370] Wed, 07 October 2015 06:43 Go to previous messageGo to next message
Simon Laffoy is currently offline Simon LaffoyFriend
Messages: 19
Registered: January 2015
Junior Member
Quote:
I think that means it looks in the folder specified by user.dir system
property, i.e., the current working directory. That just happens to be
the folder where the executable is located when you launch from an
icon/shortcut/app, but that's not generally the case.


Just curious now, but can you give me some examples of when this is not the case? The two ways that I use to start Eclipse are both from that directory (clicking on the .app icon, or via the command line)

As we are a small company and we all use Mac I am just going to go with ${installation.location}/Eclipse.app/Contents/MacOS/.options. However, this does give me another problem to overcome. The website I linked to (https://wiki.eclipse.org/EPP/Logging#Enable_additional_debug_output) says that the -debug option in the eclipse.ini file must appear above the -vmargs line. How can I create a new Eclipse ini set up task which specifies where in the ini file the debug flag must go?
Re: ResourceCreation of .options file in Eclipse install Directory [message #1710486 is a reply to message #1710482] Wed, 07 October 2015 07:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Simon,

Comments below.

On 07/10/2015 8:43 AM, Simon Laffoy wrote:
> Quote:
>> I think that means it looks in the folder specified by user.dir system
>> property, i.e., the current working directory. That just happens to be
>> the folder where the executable is located when you launch from an
>> icon/shortcut/app, but that's not generally the case.
>
>
> Just curious now, but can you give me some examples of when this is
> not the case? The two ways that I use to start Eclipse are both from
> that directory (clicking on the .app icon, or via the command line)
From a command-line, the current directory of the shell/command-line
process should remain the current directory of any launched executable.
>
> As we are a small company and we all use Mac I am just going to go
> with ${installation.location}/Eclipse.app/Contents/MacOS/.options.
> However, this does give me another problem to overcome. The website I
> linked to
> (https://wiki.eclipse.org/EPP/Logging#Enable_additional_debug_output)
> says that the -debug option in the eclipse.ini file must appear above
> the -vmargs line. How can I create a new Eclipse ini set up task which
> specifies where in the ini file the debug flag must go?
An Eclipse Ini task can have Vm either be true or false. In this case,
the -debug option is not a VM option. Of course if you are going to
provide such a task to set the -debug option, it's also easy to specify
where the .options file appears, i.e., you might specify
${user.home/.../.options) and have another task to puts the option you
want into that file... This way there is a single options file that can
be changed for all installations...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: ResourceCreation of .options file in Eclipse install Directory [message #1710979 is a reply to message #1710486] Mon, 12 October 2015 06:26 Go to previous message
Simon Laffoy is currently offline Simon LaffoyFriend
Messages: 19
Registered: January 2015
Junior Member
Thanks for your help Ed
Previous Topic:[Solved] How to setup Gerrit Mylyn task repository and queries
Next Topic:Executing ResourceCreationTask after workspace switch
Goto Forum:
  


Current Time: Mon Dec 09 04:59:28 GMT 2024

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

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

Back to the top