godot-build-scripts icon indicating copy to clipboard operation
godot-build-scripts copied to clipboard

[Windows] Improve console wrapper script to handle stdin and child processes.

Open bruvzg opened this issue 2 years ago • 1 comments

Uses PowerShell Start-Process cmdlet to start and wait for the Godot editor process, which:

  • Correctly passes stdin input to the Godot process.
  • Unlike cmd, it waits for the all child processes as well.

Additional changes:

  • Passes command line arguments from the script (%*).
  • Fixes start if executable is not in the current working directory, by adding script path (%~dp0).
  • Set console title to "Godot Engine".

Note: Need to be tested on Windows 7 and 8.1.

bruvzg avatar Aug 26 '22 18:08 bruvzg

Note: Need to be tested on Windows 7 and 8.1.

Seems like it doesn't work with older PowerShell versions.

bruvzg avatar Sep 14 '22 05:09 bruvzg

Superseded by https://github.com/godotengine/godot/pull/67434 (I'll open a new PR for the build scripts when the main repo one is done).

bruvzg avatar Oct 15 '22 08:10 bruvzg