Custom local add-on path

Post here questions and problems related to oXygen frameworks/document types.
msambasiva
Posts: 83
Joined: Tue Jul 17, 2018 6:57 am

Custom local add-on path

Post by msambasiva » Fri Jun 25, 2021 11:30 am

Hi,

Oxygen Editor 23.0
DITA OT 3.x

We created a oxygen plugin to use custom dita-ot.
The custom dita-ot getting downloaded into the below path which is too long.

C:\Users\smedavar.AAAAA\AppData\Roaming\com.oxygenxml\extensions\v23.0\plugins\http_slcalz.us.bbbbb.com_7Euaework_oxygen_addons_uae_updateSite.xml\uae-plugin-ditaot-package

Code snippet to start a transformation process:

String ditaExecutablePath = PluginWorkspaceProvider.getPluginWorkspace().getUtilAccess().expandEditorVariables("${pluginDir(uae.plugin.ditaot.package)}", null) + "/DOT/DITA-OT3.x/bin" ;

//Success tranformation with below hardcoded path
//String ditaExecutablePath = "C:/uae-plugin-ditaot-package/DOT/DITA-OT3.x/bin"
File ditaExecPath = new File(ditaExecutablePath);

PluginWorkspaceProvider.getPluginWorkspace().startProcess(
"Dita Conversion",
ditaExecPath, cmdString,true);


Getting below error message with the DITA-OT transformation,

The input line is too long.
The syntax of the command is incorrect.
Process ended with exit code: 255

I got successful transformation with short path.

Can we customize the download path to short length some thing below,
C:/temp/uae-plugin-ditaot-package/DOT/DITA-OT3.x/bin

Thanks in advance,
Samba.

msambasiva
Posts: 83
Joined: Tue Jul 17, 2018 6:57 am

Re: Custom local add-on path

Post by msambasiva » Sat Jun 26, 2021 2:16 am

Hi,

Could you please suggest any clue on this?

Thanks,
Samba.

Radu
Posts: 7594
Joined: Fri Jul 09, 2004 5:18 pm

Re: Custom local add-on path

Post by Radu » Mon Jun 28, 2021 8:18 am

Hi Samba,

You can find out more details about this problem here:
https://github.com/dita-ot/dita-ot/issues/2827

Oxygen's bundled DITA OT has various fixes to inhibit this problem but as you are using your own DITA OT distribution...
Anyway, your plugin's Java code can copy the entire DITA OT folder to a folder which has a shorter path before running the transformation.
Due to restrictions in the Windows operating system, an Oxygen application started by the local end user, without admin rights may not have enough access rights to create a folder directly in the "c:\" drive, it may have rights to create folders only in the current user home.

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

Post Reply