On Sat, Mar 1, 2014 at 8:31 AM, phil@highoctane.be <phil@highoctane.be> wrote:
On Sat, Mar 1, 2014 at 5:12 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:



On Sat, Mar 1, 2014 at 7:43 AM, phil@highoctane.be <phil@highoctane.be> wrote:
When running (from a Zeroconf install):

pharo --headless Pharo.image

it looks like that the window is not opening ( or it is opening and closing so fast that I do not see it).

Then I have an image with Seaside, Magritte, and other things.

When doing the same, I do see the window of one second and then it closes.

Is it normal to have that window opening? That's annoying for scripts as it doesn't look good.

On OSX I do not have this behavior.

What causes that on Windows?

It's bits in the exe that decide whether it's a console app or a windows app. �So, at least with the Cog VM, not sure about the Pharo VM, if you want to run headless you use the SqueakConsole.exe VM instead of the Squeak.exe VM. �They're identical except in those bits. �Yes the distinction is stupid; unix doesn't need it, but that's Windows.



Phil



--
best,
Eliot



So, there is a different way to build/link for each type in Squeak. Now, with Pharo, there is only one exe in Windows.
Where's that thing in Squeak so that I can try to build the Pharo Windows headless version by kind of cloning it?

In the CMakeLists.txt of the PharoVM for the Windows build, I do see:

add_definitions(-march=pentium4 -mwindows -D_MT -msse2 -mthreads -mwin32 -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args -D_USE_32BIT_TIME_T -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN -DNO_SERVICE -DNO_STD_FILE_SUPPORT -DLSB_FIRST -DVM_NAME="Pharo" -DX86 -DSTACK_ALIGN_BYTES=16 -DALLOCA_LIES_SO_USE_GETSP=0 -DENABLE_FAST_BLT �-g0 -O2 -march=pentium4 -momit-leaf-frame-pointer -maccumulate-outgoing-args -funroll-loops -DNDEBUG -DDEBUGVM=0)

There are -mwindows and -mwin32 which look like candidates for that switch.

What do I need to use?

-mconsole in place of -mwindows

--
best,
Eliot