How to trigger build of gdextension on Run Project?

Godot Version

4.6

Question

Part of my game is implemented in C++ using gdextension. When I make changes to the C++ source I have to remember to manually call e.g. scons platform=windowsbefore hitting Run Project, else the changes don’t appear in the launched game. Likewise when deploying to other platforms (Android, Web). Is there a way to trigger that scons step automatically?

Maybe you will need to make a system like,when you click the play button,it will run the command(scons build) and then start the game.

It should work I guess…