getting No gamedir in c:\quake2\resist.map also i don't have a copy of quake2 to work with at home 🙁
will just have to crack out worldcraft and half life (hopefully that will work in a similar way - quickly scanned down the page) or it's custom dos program time 😱
-daz
nsExec question
43 posts
ok how it's going so far...
managed to get a test system running with worldcraft 3.3 and using Afrow Uk's test map and a smaller one i've generated.
in all tests, the output will not appear until it has all finished (no title even when it starts - checked against direct running via the console) - also checked this with the current cvs code too 🙁
checking the code and the peeknamedpipe(..) function returns that there is no data to get from the screen even though when running the dos version it can be seen that there is data available (especially when starting!).
why this is the case i'm not too sure 😕
it almost seems as though the data is being locked from being read and so the pipe can't get at the screen data.
going to check a few more things out about pipes, etc. also going to give my old screen capture code a go as well to see how that fairs with things (readconsolescreen(..) etc and all of those functions, oh the fun 🙂)
will also fix the code i've done to handle certain 'live output' as chkdsk does - is part way there for full live output, just the locked display issue to get around and it should run correctly.
-daz
p.s. i will upload a test exe of what the chkdsk thing does to show what i mean for certain 'live' outputs happening
managed to get a test system running with worldcraft 3.3 and using Afrow Uk's test map and a smaller one i've generated.
in all tests, the output will not appear until it has all finished (no title even when it starts - checked against direct running via the console) - also checked this with the current cvs code too 🙁
checking the code and the peeknamedpipe(..) function returns that there is no data to get from the screen even though when running the dos version it can be seen that there is data available (especially when starting!).
why this is the case i'm not too sure 😕
it almost seems as though the data is being locked from being read and so the pipe can't get at the screen data.
going to check a few more things out about pipes, etc. also going to give my old screen capture code a go as well to see how that fairs with things (readconsolescreen(..) etc and all of those functions, oh the fun 🙂)
will also fix the code i've done to handle certain 'live output' as chkdsk does - is part way there for full live output, just the locked display issue to get around and it should run correctly.
-daz
p.s. i will upload a test exe of what the chkdsk thing does to show what i mean for certain 'live' outputs happening
gamedir is baseq2, so simply move the map to C:\quake2\baseq2\maps
Sorry I should have told you earlier, but haven't been around.
-Stu
Sorry I should have told you earlier, but haven't been around.
-Stu
don't worry about it 😉 and thanks for the info
off to crack on with it again soon so let the fun begin again i guess 😱
-daz
off to crack on with it again soon so let the fun begin again i guess 😱
-daz
done some more work on things (using Afrow Uk's example now for testing).
for whatever reason the console does not seem to be recognising that there is data on the screen until processing ends 😔
checked the working of the code against the standard console redirection and the problems with nsExec also happen with the console
e.g.
qbsp3.exe c:\quake2\baseq2\maps\resist.map > blah.txt
will only put data into the file once the processing has been finished. i also tried this with chkdsk and that will output the screen data as it changes. i even tried control-breaks to see what was output and for the resist.map test there is still no output to the blah.txt file.
so whatever the reason causing this, even the OS can't deal with things 🤪
what i'm working on (as an idea) of outputting a basic string such as nsExec is working... / where the last part ( / ) will go /,-,\,| to indicate that processing is still going - at least gives some indication that things are working.
-daz
for whatever reason the console does not seem to be recognising that there is data on the screen until processing ends 😔
checked the working of the code against the standard console redirection and the problems with nsExec also happen with the console
e.g.
qbsp3.exe c:\quake2\baseq2\maps\resist.map > blah.txt
will only put data into the file once the processing has been finished. i also tried this with chkdsk and that will output the screen data as it changes. i even tried control-breaks to see what was output and for the resist.map test there is still no output to the blah.txt file.
so whatever the reason causing this, even the OS can't deal with things 🤪
what i'm working on (as an idea) of outputting a basic string such as nsExec is working... / where the last part ( / ) will go /,-,\,| to indicate that processing is still going - at least gives some indication that things are working.
-daz
here's an example of the indicating processing code when the output can't be read.
it's not complete (only started on it this morning) but it shows the basics of the feature
note: the previous line may disappear when reading occurs (still to track that down)
-daz
[edit]
the test is set to use Afrow Uk's example, see above for the setup of the files and to get them too 😉
[/edit]
it's not complete (only started on it this morning) but it shows the basics of the feature
note: the previous line may disappear when reading occurs (still to track that down)
-daz
[edit]
the test is set to use Afrow Uk's example, see above for the setup of the files and to get them too 😉
[/edit]
Some console based applications do not use the standard handles for their input/output (IO) operations. The Win32 API does not support redirection of these processes.after a little searching my thoughts were confirmed with the above quote from m$ here 🙁
Will finish the processing... part since it doesn't look like it's possible to get the data and some indication is going to be better than nothing i think
-daz
attached is the modified source code that will put
nsExec is working... /
when the code detects the process is running but it is not able to get the data put to the console (see above as to why).
i'm re-working the code that will display live output that can be detected but the attached modification is good to go for the cases when it is not detectable 🙂
-daz
p.s. is just the source file (forgot to bring the new dll with me)
nsExec is working... /
when the code detects the process is running but it is not able to get the data put to the console (see above as to why).
i'm re-working the code that will display live output that can be detected but the attached modification is good to go for the cases when it is not detectable 🙂
-daz
p.s. is just the source file (forgot to bring the new dll with me)
finally remembered to bring all the files with me, so here is a working example of the modified nsExec and there is a test program to show it at work when the output is held back until processing is finished (damn you printf(..) 😞 )
just extract the installer and dummycon.exe to the same place and run.
the next update will incorporate earlier code (further up this thread) that will be able to handle the output holding at the same position such as a %increase (or the 0... to 9... in the attached example file).
-daz
just extract the installer and dummycon.exe to the same place and run.
the next update will incorporate earlier code (further up this thread) that will be able to handle the output holding at the same position such as a %increase (or the 0... to 9... in the attached example file).
-daz
off topic i think?!?!
if i'm altering the nsExec code, is it be alright to put my modified version in the archive? i'm asking this since i've added in an abort button (needed it for testing for bits above) and i thought it might be useful for other people.
thanks
-daz
if i'm altering the nsExec code, is it be alright to put my modified version in the archive? i'm asking this since i've added in an abort button (needed it for testing for bits above) and i thought it might be useful for other people.
thanks
-daz
Of course you can. Where else? 🙂
It should find its way into CVS too, but I don't know if before b4 or not.
It should find its way into CVS too, but I don't know if before b4 or not.
thanks, i just thought it best to check before i did put it in the archive.
if it gets in it's probably best to go after b4 i think since i found a few problems with the code i posted (fixed in the latest version i have 😉 )
will put an updated version in the archive as soon as i can
-daz
if it gets in it's probably best to go after b4 i think since i found a few problems with the code i posted (fixed in the latest version i have 😉 )
will put an updated version in the archive as soon as i can
-daz
Well, this thread has been dormant for a few years, but in case anyone else is having this problem, I found that one way to get live output streaming working with nsExec::ExecToLog is to do this in each console app you'll be running:
This fully disables output buffering on stdout, which seems to solve the problem.setvbuf(stdout, NULL, _IONBF, 0);