helper for starting up editor

This commit is contained in:
2026-09-25 22:23:44 -07:00
parent 171634ca01
commit fe516bb1ef
+14
View File
@@ -50,6 +50,20 @@ class DevHelper:
preset, fresh = self._parse_preset_args(args, "build")
self._build_preset(preset, fresh)
##
# Builds the debug preset (incrementally), then runs the editor from
# build/debug. Any arguments are passed through to the editor.
# dev editor [args...]
def editor(self, *args, **kwargs):
preset = self.DEFAULT_PRESET
self._build_preset(preset, fresh=False)
preset_dir = os.path.join(self._project_root(), "build", preset)
binary = os.path.join(preset_dir, "bin", "editor")
print(f"Running: {shlex.join([binary, *args])}")
os.chdir(preset_dir)
os.execv(binary, [binary, *args])
##
# Builds the debug preset (incrementally), then runs the testbed from
# build/debug. Any arguments are passed through to the testbed.