Fix compilation on linux.
Rename generate_ninja_build.py.
Many changes.
Add headless option, make loop actually loop.