summaryrefslogtreecommitdiffhomepage
path: root/tools/mk_app.py
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-30 19:08:56 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-30 19:11:19 +0100
commit86555126d855df005bb1777c1c4ab7127c677b6c (patch)
tree5afca23f0ab7a6bf091dc25fc4998d0c51347147 /tools/mk_app.py
parent8d853a3235d37b746508d178b6128380b07ceb57 (diff)
feat: SMP support tweaks, add MACROS_MAP.md
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'tools/mk_app.py')
-rwxr-xr-xtools/mk_app.py78
1 files changed, 0 insertions, 78 deletions
diff --git a/tools/mk_app.py b/tools/mk_app.py
deleted file mode 100755
index 793dd4a4..00000000
--- a/tools/mk_app.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#! /usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-import os, json, sys
-
-def create_directory_structure(base_path, project_name):
- # Define the directory structure
- structure = {
- project_name: {
- "dist": {
- ".keep": None
- },
- "src": {
- ".keep": None,
- "CommandLine.cc": None,
- },
- "vendor": {
- ".keep": None
- },
- ".keep": None,
- f"{project_name}.json": {}
- }
- }
-
- def create_structure(path, structure):
- for name, content in structure.items():
- current_path = os.path.join(path, name)
- # Create directories or files based on the content type
- if isinstance(content, dict) and current_path.endswith(".json") == False:
- os.makedirs(current_path, exist_ok=True)
- create_structure(current_path, content)
- elif content is None:
- # Create an empty file
- with open(current_path, 'w') as f:
- pass
-
- # Create the base directory
- os.makedirs(base_path, exist_ok=True)
- create_structure(base_path, structure)
-
- # Create the JSON file
- proj_json_path = os.path.join(base_path, project_name, f"{project_name}.json")
-
- manifest = {
- "compiler_path": "clang++",
- "compiler_std": "c++20",
- "headers_path": ["./", "../../../src/kernel", "../../../public/frameworks/", "../../../src/", "./"],
- "sources_path": [
-
- ],
- "output_name": f"./dist/{project_name}",
- "cpp_macros": [
- "kSampleFWVersion=0x0100",
- "kSampleFWVersionHighest=0x0100",
- "kSampleFWVersionLowest=0x0100",
- "__NE_SDK__"
- ]
- }
-
- 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 <libSystem/SystemKit/System.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("HELP: mk_app.py <project_name>")
- sys.exit(os.EX_CONFIG)
-
- base_path = os.getcwd() # Use the current working directory as the base path
- create_directory_structure(base_path, sys.argv[1])
-
- print("INFO: Application created successfully.")