Afrow UK
23rd April 2003 18:57 UTC
Thought for my compiler program
I just thought - right now I have two modes of compiling..
1. Compile in LogWindow & then write to log file
2. Execute compilers as normal - they open up in an ms-dos style window.
Is it possible to execute them into an MS-DOS window, but keep this MS-DOS window open until the user actually closes it?
I'm executing up to 3 different programs each time the LogWindow is ran.
-Stu
virtlink
23rd April 2003 19:03 UTC
Use the /PAUSE command line argument to let the compiler wait for a key to be pressed before quitting. This way, the MS-DOS-box isn't closed when the compiler is finished.
To save the MS-DOS-box compiler's output to a file, use the /O"log.txt" command line argument. But beware, the compiler seems to write only the last part of the compiler info to the log file, not the complete output. Maybe a bug?
You can read all about the compiler here.
Afrow UK
23rd April 2003 19:10 UTC
You don't understand what I'm talking about!
I have made a Quake2 map-compiler program using NSIS to convert built levels into the format in which Quake2 uses.
Quake2 is a shoot'em up game by id Software.
Hope you understand me now - sorry I should have explained better.
-Stu
Afrow UK
23rd April 2003 19:22 UTC
I shall go into extra detail...
Step 1:
My program checks which mode the user has set.
These consist of...
1. nsExec::ExecToLog
2. ExecWait
Step 2:
It executes the first compiler (qbsp3.exe) on either one or the other execution methods (as shown above)
Step 3:
Executes qvis3.exe
Step 4:
Executes qrad3.exe
Thats that.
I am asking if I can use ExecWait to open the compiles like normal, but in a proper MS-DOS Prompt window, and actually leave it open.
ExecWait "cmd /c $INSTDIR\quake2\compilers\qbsp3.exe $8.map"
This MS-DOS Prompt window then closes when qbsp3 has finished.
I've noticed it even closes the window after it's finished if I create a desktop shortcut with that exact same command line.
I want to keep that window open and compile the next process in that window (qvis3.exe) without losing any of the data which has so far gone through that window.
-Stu
Sunjammer
23rd April 2003 20:01 UTC
Extract from cmd help:-
D:\>cmd /?
Starts a new instance of the Windows 2000 command interpreter
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]
/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains
Notice the /K option
Afrow UK
23rd April 2003 21:18 UTC
:)
Thanks SunJammer!!
I'll have an extra option for this on a IO dialog.
I can then do...
ExecWait "cmd $R4 $INSTDIR\quake2\compilers\qbsp3.exe $8.map"
...where $R4 will be wither /C or /K depending on the users' choice.
-Stu
virtlink
23rd April 2003 21:52 UTC
I'm sorry Afrow. I tought that you were talking about the NSIS compiler. ;)
I didn't know about the /K-switch. Now that I now that, it might prove usefull in the future.
Afrow UK
24th April 2003 13:08 UTC
Hmm, I see the /E switch.
On Win98 it is /E:nnnnn where nnnnn "Sets the initial environment size to nnnnn bytes. (nnnnn should be between 256 and 32,768)."
What is this for?
Also, on Win98, ms-dos has a very small window size and text allways dissapears off the window without me being able to scroll up.
Is there away to stop this and enable a scrollbar?
-Stu