summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-19 09:26:49 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-19 09:26:49 +0100
commit9f3ed9465eacc0811a2397b0b807779729aa1b9e (patch)
treeaabdbbec304807e3038b00f1c8378c26b9d58729
parent36bd2efdc56877729617ccf5222911484fb86d31 (diff)
feat: new commits on components, new libsteps library.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--compile_flags.txt1
m---------dev/nebuild0
m---------dev/necti0
-rw-r--r--lib/.keep (renamed from sbin/.keep)0
m---------lib/libocl0
-rw-r--r--lib/libsteps/steps.h47
-rw-r--r--sbin/install.cc18
-rw-r--r--sbin/install.toml8
-rw-r--r--tools/.keep0
-rw-r--r--tools/steps.cc27
-rw-r--r--tools/steps.toml8
11 files changed, 83 insertions, 26 deletions
diff --git a/compile_flags.txt b/compile_flags.txt
index 36d5b7d..6f5638b 100644
--- a/compile_flags.txt
+++ b/compile_flags.txt
@@ -6,3 +6,4 @@
-Idev/nekernel/dev
-Idev/necti/dev
-Ilib/libocl/dev/
+-I/opt/homebrew/Cellar/boost/1.89.0/include
diff --git a/dev/nebuild b/dev/nebuild
-Subproject 8cf214b3e06556aa0aa18133aac60ddbedebc06
+Subproject dc87375b9a0103e8c9dd39393abc21113e2dd91
diff --git a/dev/necti b/dev/necti
-Subproject 3651a188c829ab0e85b3f3ea337d069be9a5103
+Subproject 281bef7f35e63a9c5daf37cca5bb8eea64c1269
diff --git a/sbin/.keep b/lib/.keep
index e69de29..e69de29 100644
--- a/sbin/.keep
+++ b/lib/.keep
diff --git a/lib/libocl b/lib/libocl
-Subproject c9fd682f3662e0eec09de49a36a4ea199656da3
+Subproject 3bc2fca2c9beff13586b8bf3089ce439acb09de
diff --git a/lib/libsteps/steps.h b/lib/libsteps/steps.h
new file mode 100644
index 0000000..357f0df
--- /dev/null
+++ b/lib/libsteps/steps.h
@@ -0,0 +1,47 @@
+/* -------------------------------------------
+
+Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <lib/core/includes.hpp>
+
+#define kSysStepsExtension ".stp"
+#define kSysStepsStrLen (256U)
+
+#define kSysStepsMagic " pls"
+#define kSysStepsMagicLen (4U)
+#define kSysStepsVersion (0x0100)
+
+#define kStepsMime "ne-application-kind/steps"
+
+namespace steps {
+struct record final {
+ char magic[kSysStepsMagicLen] = {kSysStepsMagic[0], kSysStepsMagic[1],
+ kSysStepsMagic[2], kSysStepsMagic[3]};
+ char name[kSysStepsStrLen] = "";
+ char company[kSysStepsStrLen] = "";
+ char author[kSysStepsStrLen] = "";
+ int32_t version = 0;
+ int32_t pages = 0;
+ int32_t check_page = 0, eula_page = 0;
+};
+
+namespace operators {
+/// =========================================================== ///
+/// @brief Equal operator for steps records.
+/// =========================================================== ///
+inline bool operator==(const record &r, const record &l) {
+ return (std::strncmp(r.magic, l.magic, kSysStepsMagicLen) == 0);
+}
+
+/// =========================================================== ///
+/// @brief Not equal operator for steps records.
+/// =========================================================== ///
+inline bool operator!=(const record &r, const record &l) {
+ return (std::strncmp(r.magic, l.magic, kSysStepsMagicLen) > 0);
+}
+} // namespace operators
+} // namespace steps
diff --git a/sbin/install.cc b/sbin/install.cc
deleted file mode 100644
index 4bdb4fa..0000000
--- a/sbin/install.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -------------------------------------------
-
-Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
-
-------------------------------------------- */
-
-#include <lib/io/print.hpp>
-
-int main(int argc, char** argv)
-{
- ocl::io::print("install: Installing distribution...\n");
-
- /// AMLALE: TODO: implement the install logic here.
-
- ocl::io::print("install: Done!\n");
-
- return EXIT_SUCCESS;
-} \ No newline at end of file
diff --git a/sbin/install.toml b/sbin/install.toml
deleted file mode 100644
index 219da21..0000000
--- a/sbin/install.toml
+++ /dev/null
@@ -1,8 +0,0 @@
-compiler_path = "clang++"
-compiler_std = "c++20"
-headers_path = [ "../lib/libocl/dev/", "/opt/homebrew/Cellar/boost/1.89.0/include" ]
-sources_path = [ "install.cc" ]
-output_name = "install.o"
-compiler_flags = [ "-fPIC" ]
-cpp_macros = [ "__INSTALL__" ]
-run_after_build = false
diff --git a/tools/.keep b/tools/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/.keep
diff --git a/tools/steps.cc b/tools/steps.cc
new file mode 100644
index 0000000..551203c
--- /dev/null
+++ b/tools/steps.cc
@@ -0,0 +1,27 @@
+/* -------------------------------------------
+
+Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
+
+------------------------------------------- */
+
+#include <lib/io/print.hpp>
+#include <libsteps/steps.h>
+
+/// Use operators from steps namespace to compare steps records.
+using namespace steps::operators;
+
+/// =========================================================== ///
+/// @brief Main function for running steps on NeKernel.
+/// =========================================================== ///
+int main(int argc, char** argv)
+{
+ ocl::io::print("steps: running steps for program...\n");
+
+ steps::record steps;
+
+ /// AMLALE: Read steps from file and process them.
+
+ ocl::io::print("steps: done!\n");
+
+ return EXIT_SUCCESS;
+} \ No newline at end of file
diff --git a/tools/steps.toml b/tools/steps.toml
new file mode 100644
index 0000000..f9e3734
--- /dev/null
+++ b/tools/steps.toml
@@ -0,0 +1,8 @@
+compiler_path = "clang++"
+compiler_std = "c++20"
+headers_path = [ "../lib", "../lib/libocl/dev/", "/opt/homebrew/Cellar/boost/1.89.0/include" ]
+sources_path = [ "steps.cc" ]
+output_name = "steps.o"
+compiler_flags = [ "-fPIC" ]
+cpp_macros = [ "__NE_STEPS__" ]
+run_after_build = false