diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-11 13:04:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-11 13:04:22 +0200 |
| commit | 57d040e3e6b6d0257c0ba5a914396520b18d9d87 (patch) | |
| tree | 78be4974d8a24e983034b0962ac5435f1b1d0b53 /tooling/mk_fwrk.py | |
| parent | 7690c1976b3127e17370708aef47ba3f18f3b8c2 (diff) | |
| parent | f775566da3cf4f8e3ffd4ca6dfe0a3c7776c3b35 (diff) | |
Merge pull request #30 from nekernel-org/dev0.0.2e2
0.0.2e2
Diffstat (limited to 'tooling/mk_fwrk.py')
| -rwxr-xr-x | tooling/mk_fwrk.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tooling/mk_fwrk.py b/tooling/mk_fwrk.py index e0302754..9bc132e6 100755 --- a/tooling/mk_fwrk.py +++ b/tooling/mk_fwrk.py @@ -13,7 +13,8 @@ def create_directory_structure(base_path, project_name): ".keep": None }, "src": { - ".keep": None + ".keep": None, + "CommandLine.cc": None, }, "vendor": { ".keep": None @@ -40,7 +41,8 @@ def create_directory_structure(base_path, project_name): create_structure(base_path, structure) # Create the JSON file - diutil_json_path = os.path.join(base_path, project_name, f"{project_name}.json") + proj_json_path = os.path.join(base_path, project_name, f"{project_name}.json") + manifest = { "compiler_path": "clang++", "compiler_std": "c++20", @@ -57,9 +59,16 @@ def create_directory_structure(base_path, project_name): ] } - with open(diutil_json_path, 'w') as json_file: + with open(proj_json_path, 'w') as json_file: json.dump(manifest, json_file, indent=4) + proj_cpp_path = os.path.join(base_path, project_name, f"src/CommandLine.cc") + + cpp_file = "#include <user/SystemCalls.h>\n\nSInt32 _NeMain(SInt32 argc, Char* argv[]) {\n\treturn EXIT_FAILURE;\n}" + + with open(proj_cpp_path, 'w') as cpp_file_io: + cpp_file_io.write(cpp_file) + if __name__ == "__main__": if len(sys.argv) != 2: print("Usage: mk_fwrk.py <project_name>") |
