Terminal Command Appears when Sys.command()


Hi, I have a problem that prevents me from releasing my game on Windows

I had an extension that I used in Stencyl. I would have an embedded tts.exe ( a modified version of https://github.com/brookhong/tts ) and use Sys.command() to use it.

In the “old” version of Stencyl which is openfl 3.6 (if I remember well ) everything would work perfectly
In the beta version, which is the lastest openfl , the terminal window appears for a few seconds over my game ( and don’t play the sound).

Where could the difference come from ? An option at compile time ?

I’ve only tested this on Windows. So maybe it doesn’t do the same on other platforms.


This may come from a difference using a newer Haxe release, perhaps Sys.command works a little differently now than it did before. On Windows, specifically, perhaps it calls cmd.exe rather than using some special Windows API to execute the process. Maybe it’s possible to use sys.io.Process instead (unless that also behaves the same)


…the other alternative might be to try and compile TTS to a DLL instead of an executable, and to access it using lime.system.CFFI like a native extension


It’s the same for sys.io.Process. ( the only difference is that I don’t see the command in the terminal)

I haven’t tested in Linux. But I kind of use the same strategy, I call some external apps. I’ll try to test next week, to see if there is the same problem.

Tried to explore haxe to see if something has changed. ( checked on stencyl old version , haxe is at 3.3)

and there 's nothing different

now I’m blocked here

@:extern @:native("_hx_std_sys_command")
public static function sys_command(cmd:String) : Int return 0;

And I don’t know how I can find the source code to “_hx_std_sys_command”


It’s in hxcpp:


Oh I thought , it was some old code .( When you see the tags it goes only till 3.2.2, I thought it was the Haxe version, stupid me ), but it seems updated .

Ok so the whole file didn’t seem to exist in haxe 3.3 …