summaryrefslogtreecommitdiffhomepage
path: root/tooling/mk_app.py
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-04-24 13:38:05 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-04-24 13:38:05 +0200
commitde88c44c68f3941e003ddaf13042875370f10978 (patch)
tree14b0909de5d6d10fc7ef44fc470d210f21e94f25 /tooling/mk_app.py
parente6185ca92212ab0686892a1a12efd392f895c1f7 (diff)
dev, tooling: Improve the tools and frameworks on userspace.
Details: - See commit details for more. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'tooling/mk_app.py')
-rwxr-xr-xtooling/mk_app.py67
1 files changed, 0 insertions, 67 deletions
diff --git a/tooling/mk_app.py b/tooling/mk_app.py
deleted file mode 100755
index 34a7702e..00000000
--- a/tooling/mk_app.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#! /usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-import os
-import json
-import sys
-
-def create_directory_structure(base_path, project_name):
- # Define the directory structure
- structure = {
- project_name: {
- "src": {
- ".keep": 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
- diutil_json_path = os.path.join(base_path, project_name, f"{project_name}.json")
- manifest = {
- "compiler_path": "g++",
- "compiler_std": "c++20",
- "headers_path": ["./", "../../../dev/kernel", "../../../public/frameworks/", "../../../dev/", "./"],
- "sources_path": [
-
- ],
- "output_name": f"./dist/{project_name}",
- "cpp_macros": [
- "kSampleVersion=0x0100",
- "kSampleVersionHighest=0x0100",
- "kSampleVersionLowest=0x0100",
- "__NE_SDK__"
- ]
- }
-
- with open(diutil_json_path, 'w') as json_file:
- json.dump(manifest, json_file, indent=4)
-
-if __name__ == "__main__":
- if len(sys.argv) != 2:
- print("Usage: mk_app.py <project_name>")
- sys.exit(1)
-
- base_path = os.getcwd() # Use the current working directory as the base path
- create_directory_structure(base_path, sys.argv[1])
- print("Ne application created successfully.") \ No newline at end of file