Start-Process -PassThru -Wait -FilePath "c:\Program Files (x86)\EC Software\HelpAndManual8\HELPMAN.EXE" -ArgumentList
"C:\DEV\t1-host-sw-ii\50_src\Help\En\repo\T1.hmxp","/CHM=C:\DEV\t1-host-sw-ii\_build\T1.chm","/O=C:\DEV\t1-host-sw-i
i\50_src\Help\En\repo\CHM Skin, Gliwa.hmskin","/V=C:\DEV\t1-host-sw-ii\_build\variables.txt"
(I only spotted the /V this morning .. what a bliss. I had a tool updating the T1.hmxp instead )
Command Line call randomly hangs
Moderators: Alexander Halser, Tim Green
Re: Command Line call randomly hangs
Dirk Gaudian - Senior Software Developer UI/UX - GLIWA embedded systems GmbH
- Alexander Halser
- EC-Software Support
- Posts: 4098
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Command Line call randomly hangs
Maybe you can experiment with the two following additional command line parameters (place them as 2nd parameter, right after the project file). Both options are mutually exclusive.
HELPMAN.EXE is not really a console application, but a UI application that behaves like a console app if called with command line parameters. And that can be a beast sometimes. Because a console application does have, well, it's own console to direct output to. A UI application does not unless it creates one. That new console, however, will be a new window, wheras you actually want to see the compiler progress in the console of the calling parent process.
Normally, Help+Manual attempts to attach to the console of the parent process. This works in most cases, but we had rare issues (e.g. with MSBuild) where it did not work well. In those cases, one couldn't see any progress and compiler information, though it actually worked (but if there was an error during compilation, you did not notice that way).
The two additional parameters are:
/stdout
Example: HELPMAN.EXE myproject.hmxp /stdout /HTML=... /O=...
Does not attempt to attach to the console of the parent process, but redirects the compiler output to STD_OUTPUT_HANDLE as defined by the calling process.
/fc
Example: HELPMAN.EXE myproject.hmxp /fc /HTML=... /O=...
"fc" means "force console". Does not attempt to attach to the console of the parent process, but explicitly creates a new console window where the compiler output is directed to.
HELPMAN.EXE is not really a console application, but a UI application that behaves like a console app if called with command line parameters. And that can be a beast sometimes. Because a console application does have, well, it's own console to direct output to. A UI application does not unless it creates one. That new console, however, will be a new window, wheras you actually want to see the compiler progress in the console of the calling parent process.
Normally, Help+Manual attempts to attach to the console of the parent process. This works in most cases, but we had rare issues (e.g. with MSBuild) where it did not work well. In those cases, one couldn't see any progress and compiler information, though it actually worked (but if there was an error during compilation, you did not notice that way).
The two additional parameters are:
/stdout
Example: HELPMAN.EXE myproject.hmxp /stdout /HTML=... /O=...
Does not attempt to attach to the console of the parent process, but redirects the compiler output to STD_OUTPUT_HANDLE as defined by the calling process.
/fc
Example: HELPMAN.EXE myproject.hmxp /fc /HTML=... /O=...
"fc" means "force console". Does not attempt to attach to the console of the parent process, but explicitly creates a new console window where the compiler output is directed to.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
Re: Command Line call randomly hangs
Your /O argument contains a file with spaces in its name. I do not use PowerShell but probably you should use it as:
But I am not sure if it will work, maybe changing the filename to a name without spaces would be better.
Code: Select all
"/O='name with spaces.hmskin'"
dgaudian wrote: ↑Tue Dec 01, 2020 1:35 pm Start-Process -PassThru -Wait -FilePath "c:\Program Files (x86)\EC Software\HelpAndManual8\HELPMAN.EXE" -ArgumentList
"C:\DEV\t1-host-sw-ii\50_src\Help\En\repo\T1.hmxp","/CHM=C:\DEV\t1-host-sw-ii\_build\T1.chm","/O=C:\DEV\t1-host-sw-i
i\50_src\Help\En\repo\CHM Skin, Gliwa.hmskin","/V=C:\DEV\t1-host-sw-ii\_build\variables.txt"
(I only spotted the /V this morning .. what a bliss. I had a tool updating the T1.hmxp instead )
Re: Command Line call randomly hangs
If I had gotten the calling syntax wrong when parameters contain spaces, I would expect compile errors or a faulty output. But everything is alright there, it was just the extremely long time before the command terminated that was my problem.
I have now also added the /stdout parameter and our build servers have not reported any (timeout) error since.
Thank you all for your kind help, I think my problem is terminally fixed!
I have now also added the /stdout parameter and our build servers have not reported any (timeout) error since.
Thank you all for your kind help, I think my problem is terminally fixed!
Dirk Gaudian - Senior Software Developer UI/UX - GLIWA embedded systems GmbH