Sharing frameworks - Using variables in paths

Having trouble installing Oxygen? Got a bug to report? Post it all here.
xephon
Posts: 135
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

Sharing frameworks - Using variables in paths

Post by xephon »

Hi,

I can save a framework internal (with the project) or external. Saving it internal is not a good solution for me, because the framework is related to multiple projects, so I'd prefer to save it externally. Unfortunately I cannot use variables like ${home} here, but why?

I'd like to refer to my framework that way:
${home}\Oxygen\framework

This would work on all authoring machines. Because I cannot use variables and I don't want to provide the framework as an Oxygen plugin, Oxygen forces me to copy the framework directly to a directory, that exists on all machines, like C:\Oxygen\frameworks, because I can only use absolute paths here. Because some of us use the Editor and some use the Author, I cannot provide an absolute path to a subdirectory of the Oxygen frameworks directory, because it is either C:\Program Files\Oxygen XML Editor 16\frameworks or C:\Program Files\Oxygen XML Author 16\frameworks.

Where is my error in reasoning? I cannot imagine, that this is a common practice.

Best regards
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Sharing frameworks - Using variables in paths

Post by Patrik »

Hi Stefan,

I solved the problem by using an environment variable that needs to be set on every machine (not only for oXygen). Then you can refer to it with ${env(VariableName)}/OxygenFrameworks.

Regards,
Patrik
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Sharing frameworks - Using variables in paths

Post by Radu »

Hi Stefan,

There are two home-related editor variables:

Code: Select all

${home} - The path (as URL) of the user home folder.
${homeDir} - The path (as file path) of the user home folder.
${homeDir} expands to a file-system dependent path like:

/home/stefan...

and the ${home} expands to an URL-like path like:

file:/home/stefan...

In some settings Oxygen expects that the used editor variables should be solved to URLs and in others it needs file-system dependent paths.

So if in the Preferences->Document Type Association / Locations you want to add an additional frameworks folder from the user home you should use a construct like ${homeDir}/oxygen/frameworks instead. One more important thing, this path must point to a folder which inside it contains the particular framework folder. So it must point to a frameworks folder and not directly to the framework folder.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
xephon
Posts: 135
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

Re: Sharing frameworks - Using variables in paths

Post by xephon »

Hi Patrik and Radu,

thank you both for your replies. I think Radu misunderstood me. I'm talking about the Storage setting in the Document type window.

Image

To me it seems, that I cannot use variables here.


Best regards,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Sharing frameworks - Using variables in paths

Post by Patrik »

Hi Stefan,

there's no point in using variables in the storage path since this path is no parameter that is stored in the settings or something. It is simple a location on the harddisk.

To share frameworks with other computers you have to share the content of the specific frameworks folder and configure the location of that frameworks folder (like Rad described) on each computer.

Regards,
Patrik
xephon
Posts: 135
Joined: Mon Nov 24, 2014 1:49 pm
Location: Greven/Germany

Re: Sharing frameworks - Using variables in paths

Post by xephon »

Hi Patrik,

oh, ok!? So if I understand you correctly, if I deploy, for example, my plugin to another machine, the path does not need to be changed.

So
C:\Users\eike\DITA-OT\frameworks\dakosy-framework\dakosy_dita.framework
automatically switches to
C:\Users\[NEWUSER]\DITA-OT\frameworks\dakosy-framework\dakosy_dita.framework

So there's no problem at all :lol:

...
stefan-jung.org – Your DITA/DITA-OT XML consultant
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Sharing frameworks - Using variables in paths

Post by Radu »

Hi Stefan,

Patrik is right, the external location setting is not saved in the framework configuration file. In the end if everything is done right a framework folder is self-sufficient without hard coded links to resources outside of its path.
If all other users will also have the framework in a similar path on their computers in the Preferences->Document Type Association / Locations they will need to have an entry like:

${homeDir}/DITA-OT/frameworks

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply