summaryrefslogtreecommitdiffhomepage
path: root/tooling
diff options
context:
space:
mode:
Diffstat (limited to 'tooling')
-rwxr-xr-xtooling/mk_app.py2
-rwxr-xr-xtooling/mk_fwrk.py17
2 files changed, 14 insertions, 5 deletions
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 <user/SystemCalls.h>\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"<PropertyList>\n<PLEntry Type=\"CFString\" Name=\"LibraryName\" Len=\"{len(project_name)}\" Value=\"{project_name}\" /></PropertyList>"
+ 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 <project_name>")
@@ -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.")