From e55f246042a12955200e20abe406b26ab02b94fa Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 9 Sep 2025 11:38:39 +0200 Subject: feat: launch: Working on LaunchKit's implementation. Signed-off-by: Amlal El Mahrouss --- .gitignore | 3 +++ dev/launch/LaunchKit/LaunchKit.h | 9 +++++++++ dev/launch/ne_launch.json | 20 ++++++++++++++++++++ dev/launch/src/LaunchSrv.cc | 5 +++-- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 dev/launch/ne_launch.json diff --git a/.gitignore b/.gitignore index 1144fd7a..329688e2 100644 --- a/.gitignore +++ b/.gitignore @@ -137,6 +137,9 @@ local.properties # Locally stored "Eclipse launch configurations" # *.launch +# NeKernel Launch +ne_launch + # PyDev specific (Python IDE for Eclipse) *.pydevproject diff --git a/dev/launch/LaunchKit/LaunchKit.h b/dev/launch/LaunchKit/LaunchKit.h index 95d91e09..1a134e8f 100644 --- a/dev/launch/LaunchKit/LaunchKit.h +++ b/dev/launch/LaunchKit/LaunchKit.h @@ -7,3 +7,12 @@ #pragma once #include + +/// @author Amlal El Mahrouss +/// @brief NeKernel Launch Kit. + +#define NELAUNCH_INFO(MSG) PrintOut(nullptr, "INFO: [LAUNCH] %s\n", MSG) +#define NELAUNCH_WARN(MSG) PrintOut(nullptr, "WARN: [LAUNCH] %s\n", MSG) + +using LaunchHandle = VoidPtr; +using KernelStatus = SInt32; diff --git a/dev/launch/ne_launch.json b/dev/launch/ne_launch.json new file mode 100644 index 00000000..38379de9 --- /dev/null +++ b/dev/launch/ne_launch.json @@ -0,0 +1,20 @@ +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": ["../", "./"], + "sources_path": ["src/*.cc"], + "output_name": "ne_launch", + "compiler_flags": [ + "-ffreestanding", + "-shared", + "-fPIC", + "-fno-rtti", + "-fno-exceptions", + "-Wl,--subsystem=17" + ], + "cpp_macros": [ + "kNeLaunchVersion=0x0100", + "kNeLaunchVersionHighest=0x0100", + "kNeLaunchVersionLowest=0x0100" + ] +} diff --git a/dev/launch/src/LaunchSrv.cc b/dev/launch/src/LaunchSrv.cc index 8c302c6d..40027f65 100644 --- a/dev/launch/src/LaunchSrv.cc +++ b/dev/launch/src/LaunchSrv.cc @@ -5,11 +5,12 @@ ------------------------------------------- */ #include +#include SInt32 _NeMain(Void) { - PrintOut(nullptr, "%s", "NeKernel Launcher\n"); + /// @todo Start LaunchServices.fwrk services, make the launcher manageable too (via mgmt.launch) - /// @todo Start LaunchServices.fwrk, make the launcher manageable too (via mgmt.launch) + NELAUNCH_INFO("Starting services..."); return kErrorSuccess; } -- cgit v1.2.3