1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

HackStudio: Allow customizing the actions of the Build & Run buttons

This commit introduces per-project settings that can be customized
through a JSON file placed in '.hackstudio/config.json' in the
project's root
This commit is contained in:
Marco Cutecchia 2022-03-18 23:17:22 +01:00 committed by Andreas Kling
parent 3e6c083754
commit 9096da19f1
7 changed files with 106 additions and 0 deletions

View file

@ -66,4 +66,13 @@ bool Project::project_is_serenity() const
return m_root_path.ends_with("Source/serenity");
}
NonnullOwnPtr<ProjectConfig> Project::config() const
{
auto config_or_error = ProjectConfig::try_load_project_config(LexicalPath::absolute_path(m_root_path, config_file_path));
if (config_or_error.is_error())
return ProjectConfig::create_empty();
return config_or_error.release_value();
}
}