svarCOM can't run complex batch file
roytam1 opened this issue · comments
foe example, drdos.sys make.bat: https://hg.pushbx.org/ecm/edrdos/file/tip/drdos/make.bat
it seems that IF
and FOR
are missing?
Hi Roy, any chance you could isolate which lines exactly are leading to issues?
Both IF and FOR are implemented in SvarCOM and are supposed to work at least as well as they were under MS-DOS 5.x.
for
goes stange:
(einvronment: XP SP3 ntvdm)
Z:\DEVEL\EDRDOS\DRDOS>for LOCTOOLSf.o86 bin\f.obj
Invalid syntax
original line is for %f in (buffers dirs fdos fcbs) do %LOCTOOLS%\fixupp bin\%f.o86 bin\%f.obj
for
goes stange: (einvronment: XP SP3 ntvdm)Z:\DEVEL\EDRDOS\DRDOS>for LOCTOOLSf.o86 bin\f.obj Invalid syntax
original line is
for %f in (buffers dirs fdos fcbs) do %LOCTOOLS%\fixupp bin\%f.o86 bin\%f.obj
That's because the % character is supposed to be doubled in batch files. Can you try fixing the batch file to see if it works all right for you then? Ie instead of "%f" it should be "%%f"
That's because the % character is supposed to be doubled in batch files. Can you try fixing the batch file to see if it works all right for you then? Ie instead of "%f" it should be "%%f"
oh yeah, fixing this and it is working now.
BTW when using svarcom in ntvdm, setting new environment variable gets Not enough available space within the environment block
, but it seems not happening with freecom, any idea/fix/workaround?
That's because the % character is supposed to be doubled in batch files. Can you try fixing the batch file to see if it works all right for you then? Ie instead of "%f" it should be "%%f"
oh yeah, fixing this and it is working now.
Great, so it was a non-issue then :-)
If this worked as-is on EDR-DOS, then it would mean the EDR-DOS command.com has some non-microsoft-standard processing of batch files.
Anyway, closing the issue then. Thanks for your feedback.
BTW when using svarcom in ntvdm, setting new environment variable gets
Not enough available space within the environment block
, but it seems not happening with freecom, any idea/fix/workaround?
You may want to allocate a bigger block when running SvarCOM (like /E:512). Without an explicit size SvarCOM allocates a 256 bytes buffer for the environment size, which might be too short if you have lots of environment strings.
In the future SvarCOM should be able to resize the environment when needed (#5).