Importing a global options file from command line

Having trouble installing Oxygen? Got a bug to report? Post it all here.
sijomon
Posts: 83
Joined: Wed May 20, 2009 1:18 pm

Importing a global options file from command line

Post by sijomon »

Hi,

Are there any command line options, env vars etc I can pass to oxygen to force it to load a global options properties file on start up?

Thanks,

Simon.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Importing a global options file from command line

Post by sorin_ristache »

Hello,

There is no command line option for that. There is only the menu item Import Global Options on the Options menu. Why don't you use project level options if you want to impose a set of options at startup? When the project is loaded automatically at startup the options marked in the Preferences dialog as stored at project level are also initialized with the values loaded from the project file.

Regards,
Sorin
sijomon
Posts: 83
Joined: Wed May 20, 2009 1:18 pm

Re: Importing a global options file from command line

Post by sijomon »

Thanks for the suggestion, unfortunatly the users will not be openeing these files in a project, they are opened via a applet/webservice as standalone files, associated with a framework.

If I manually want to overwrite a users global options is it a simple case of exporting a master options file (menu->Export Global Options), and then using this to over write the users options file at <USER_DIR>/Application Data/com.oxygenxml/oxyOptionsSa<VERSION_NUMBER>.xml?
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Importing a global options file from command line

Post by sorin_ristache »

No, you cannot overwrite the user options with that action because the export file has other structure. I am sorry, there is a parameter that you can set: the folder where the user options files (oxyOptionsSa<VERSION_NUMBER>.xml) are saved and loaded from can be configured with the startup parameter -Dcom.oxygenxml.ApplicationDataFolder=OPTIONS_FOLDER_NAME where OPTIONS_FOLDER_NAME is the full path of the folder with the options files.


Regards,
Sorin
sijomon
Posts: 83
Joined: Wed May 20, 2009 1:18 pm

Re: Importing a global options file from command line

Post by sijomon »

Excellent, I can use this mechanism.

many thanks,

Simon.
Post Reply