Thanks for your help.
So far, I've had :
a) lots of "primitive failed", most of the time primitiveFileAtEnd (FilePlugin)
b) An error/warning message in the console, "VirtualProtect(x,y,PAGE_EXECUTE_READWRITE): No error" and then nothing happens, not even a prompt!
c) A "Manufactured file handle detected" error
d) An emergency error handler
e) An error saying "stdout is not open"
f) the VM terminating abruptly
g) The "Squeak Cog Spur Virtual Machine" unresponsive and totally frozen (not even able to interrupt it!)
I tried the original and some refactored (VERY simple snippets) examples I could find on the net using :
a) OSProcess
b) FileStream
c) StdioListener
I have tried all tips & tricks :
a) load the "application code" from a script
b) doIt the code in a workspace and save the image
c) doIt some code with code to save the image first so the rest of the doIt resumes at startup
d) I tried so many things I don't remember it all!!
So
far, nothing worked, not even was I once close ! Except for the
example with StdioListener : it shows the prompt but does nothing with
the input...
I'm using Squeak 5.1 32bit on Windows 10.
My
goal is to produce a headless application is a *simple* way. It can be a
script or some code I execute in a workspace. Then save the image (or
whatever step is required).
When running the application, I
don't want to have to specify a script to start it up from
the console. Also, I don't want to open another command window! I
want the app/image to run from the command window without any
artifact/trick the same way any other Windows utility/app would work. I
also want the application to be interactive (it waits for input, does
something with the input, then shows result and presents me with a
prompt again).
Once I get this to work, you can be sure I'll document it in detail !!!!