From 9fcff991059ff5cdbdf71848039e7b56ccd5bc49 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 14 May 2025 09:53:11 +0200 Subject: feat(kernel): add ddk.sys to the build flow, finished the mk_fwrk CLI. Signed-off-by: Amlal El Mahrouss --- tooling/mk_app.py | 2 +- tooling/mk_fwrk.py | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'tooling') diff --git a/tooling/mk_app.py b/tooling/mk_app.py index ef2b64c9..9418cf05 100755 --- a/tooling/mk_app.py +++ b/tooling/mk_app.py @@ -77,4 +77,4 @@ if __name__ == "__main__": base_path = os.getcwd() # Use the current working directory as the base path create_directory_structure(base_path, sys.argv[1]) - print("NeKernel Application created successfully.") + print("Info: Application created successfully.") diff --git a/tooling/mk_fwrk.py b/tooling/mk_fwrk.py index 89857347..3c73e88e 100755 --- a/tooling/mk_fwrk.py +++ b/tooling/mk_fwrk.py @@ -12,14 +12,17 @@ def create_directory_structure(base_path_fwrk, project_file_name, project_name): # Define the directory structure structure = { project_name: { + "headers": { + ".keep": None + }, "dist": { ".keep": None }, "src": { ".keep": None, - "CommandLine.cc": None, + "DylibMain.cc": None, }, - "vendor": { + "xml": { ".keep": None }, ".keep": None, @@ -65,13 +68,19 @@ def create_directory_structure(base_path_fwrk, project_file_name, project_name): with open(proj_json_path, 'w') as json_file: json.dump(manifest, json_file, indent=4) - proj_cpp_path = os.path.join(base_path_fwrk, project_name, f"src/CommandLine.cc") + proj_cpp_path = os.path.join(base_path_fwrk, project_name, f"src/DylibMain.cc") cpp_file = "#include \n\nSInt32 _DylibAttach(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) + xml_blob = f"\n" + proj_xml_path = os.path.join(base_path_fwrk, project_name, f"xml/app.xml") + + with open(proj_xml_path, 'w') as cpp_file_io: + cpp_file_io.write(xml_blob) + if __name__ == "__main__": if len(sys.argv) != 2: print("Usage: mk_fwrk.py ") @@ -80,4 +89,4 @@ if __name__ == "__main__": base_path = os.getcwd() # Use the current working directory as the base path create_directory_structure(base_path, sys.argv[1], sys.argv[1] + '.fwrk') - print("NeKernel Framework created successfully.") + print("Info: Framework created successfully.") -- cgit v1.2.3