drawio-desktop icon indicating copy to clipboard operation
drawio-desktop copied to clipboard

How can I use cli parameters with "windows no installer exe"

Open korpa opened this issue 6 years ago • 10 comments

If I run the "windows no installer exe" with cli parameters, it just returns with an empty line instead of a help message:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. Alle Rechte vorbehalten.

D:\>draw.io-10.7.5-windows-no-installer.exe -h

D:\>

Release notes for version 10.7.5 assume, that I can use cli parameters like this: https://github.com/jgraph/drawio-desktop/releases/tag/v10.7.5

korpa avatar Jun 21 '19 09:06 korpa

-h, --height fits the generated image/pdf into the specified height, preserves aspect ratio. --crop crops PDF to diagram size

You've specified no input file, add -x and the path.

davidjgraph avatar Jun 21 '19 09:06 davidjgraph

Ok. There seems to be an issue in the release notes: image

I tried to get the help with -h

Now I tried --help to get the help. Same issue:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. Alle Rechte vorbehalten.

D:\>draw.io-10.7.5-windows-no-installer.exe --help

D:\>

korpa avatar Jun 21 '19 10:06 korpa

Fixed, thanks for the report.

davidjgraph avatar Jun 21 '19 10:06 davidjgraph

Sorry to bother you again. I'm not sure if cli parameters work with the "no installer exe". I tried the version parameter now:

D:\drawio>draw.io-10.7.5-windows-no-installer.exe --version

D:\drawio>draw.io-10.7.5-windows-no-installer.exe --V

D:\drawio>

Even if I try to render a drawing into a pdf, it doesn't work:

D:\drawio>draw.io-10.7.5-windows-no-installer.exe -x architecture.drawio

D:\drawio>

I would expect that a file called architecture.pdf in the same directory will be created or at least an error message is shown.

korpa avatar Jun 21 '19 10:06 korpa

@davidjgraph Do you had already time to double check the behavior I described in my last comment?

korpa avatar Jun 26 '19 07:06 korpa

No, I won't have time to look, but I'll reopen so someone else can.

davidjgraph avatar Jun 26 '19 07:06 davidjgraph

I've tried the portable version (no-install) and it works in terms of exporting draw.io diagrams. But, it doesn't show any message in the command prompt. This is an issue with Electron-builder and we will report it to them.

Meanwhile, you can use draw.io CLI with the portable version but you need to make sure all arguments are correct since all error/info messages are not shown

m-mohamedin avatar Jun 27 '19 14:06 m-mohamedin

Electron-builder issue: electron-userland/electron-builder#3998

m-mohamedin avatar Jun 27 '19 14:06 m-mohamedin

Is there already a solution / workaround to use cli parameters with portable version?

BeKl92 avatar Jul 11 '22 09:07 BeKl92

As stated above, it works but with no output. It is an issue with electron builder and it's not fixed yet

m-mohamedin avatar Jul 13 '22 07:07 m-mohamedin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

stale[bot] avatar Mar 25 '23 14:03 stale[bot]