diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-29 16:52:49 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-29 16:52:49 +0100 |
| commit | 4b7cd3b0536f44a3c95e71550a77df08d9a4c088 (patch) | |
| tree | 254c11bc837ea179db65d11d3085956ef5ac1793 | |
| parent | 22995df42e039a575b6adf3f30ec0fde4033ca87 (diff) | |
Breaking changes!
Remove Native Subsystem will move it to Private.
SDK now compiles to COFF
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
| -rw-r--r-- | Public/SDK/SystemKit/FileAPI.hxx | 10 | ||||
| -rw-r--r-- | Public/SDK/SystemKit/HeapAPI.hxx | 30 | ||||
| -rw-r--r-- | Public/SDK/UIKit/UIKitCore.cxx | 9 | ||||
| -rw-r--r-- | Public/SDK/UIKit/makefile | 7 | ||||
| -rw-r--r-- | Public/SDK/ZipKit/Makefile | 7 | ||||
| -rw-r--r-- | Public/SDK/ZipKit/NewFS-Addon.hpp | 10 | ||||
| -rw-r--r-- | Public/SDK/ZipKit/Zip.cxx | 10 | ||||
| -rw-r--r-- | Public/SDK/ZipKit/Zip.hpp | 2 | ||||
| -rw-r--r-- | Public/Subsystems/.gitkeep | 0 |
9 files changed, 53 insertions, 32 deletions
diff --git a/Public/SDK/SystemKit/FileAPI.hxx b/Public/SDK/SystemKit/FileAPI.hxx index 88bf9bfb..089a5882 100644 --- a/Public/SDK/SystemKit/FileAPI.hxx +++ b/Public/SDK/SystemKit/FileAPI.hxx @@ -15,14 +15,14 @@ using namespace hCore; -class MeFile final +class HFile final { public: - explicit MeFile(const char *path); - ~MeFile(); + explicit HFile(const char *path); + ~HFile(); public: - HCORE_COPY_DEFAULT(MeFile); + HCORE_COPY_DEFAULT(HFile); public: void *Read(SizeT off, SizeT sz); @@ -36,6 +36,6 @@ class MeFile final void SetMIME(const char *mime); }; -typedef MeFile *MeFilePtr; +typedef HFile *HFilePtr; #endif // ifndef _SYSTEM_KIT_HCORE_FILE_HPP diff --git a/Public/SDK/SystemKit/HeapAPI.hxx b/Public/SDK/SystemKit/HeapAPI.hxx index a1d7f51d..8f89235c 100644 --- a/Public/SDK/SystemKit/HeapAPI.hxx +++ b/Public/SDK/SystemKit/HeapAPI.hxx @@ -14,9 +14,9 @@ using namespace hCore; -class MeMemoryException; +class HMemoryException; -typedef void *MeHeapPtr; +typedef VoidPtr HHeapPtr; enum { @@ -27,34 +27,34 @@ enum kHeapNoFlags = 0 }; -class MeHeap final +class HHeap final { private: - explicit MeHeap(); + explicit HHeap(); public: - ~MeHeap(); + ~HHeap(); public: - HCORE_COPY_DEFAULT(MeHeap); + HCORE_COPY_DEFAULT(HHeap); public: - static MeHeap *Shared() noexcept; + static HHeap *Shared() noexcept; public: - void Dispose(MeHeapPtr me) noexcept; - SizeT Tell(MeHeapPtr me) noexcept; - MeHeapPtr New(const SizeT &sz, const Int32 flags = kHeapNoFlags); + void Delete(HHeapPtr me) noexcept; + SizeT Tell(HHeapPtr me) noexcept; + HHeapPtr New(const SizeT &sz, const Int32 flags = kHeapNoFlags); }; -class MeMemoryException final +class HMemoryException final { public: - MeMemoryException() = default; - ~MeMemoryException() = default; + HMemoryException() = default; + ~HMemoryException() = default; public: - HCORE_COPY_DEFAULT(MeMemoryException); + HCORE_COPY_DEFAULT(HMemoryException); public: const char *Name(); @@ -64,5 +64,5 @@ class MeMemoryException final const char *mReason{"Memory error!"}; private: - friend MeHeap; + friend HHeap; }; diff --git a/Public/SDK/UIKit/UIKitCore.cxx b/Public/SDK/UIKit/UIKitCore.cxx index 1757a3f9..e43f5a14 100644 --- a/Public/SDK/UIKit/UIKitCore.cxx +++ b/Public/SDK/UIKit/UIKitCore.cxx @@ -1,2 +1,11 @@ +/* + * ======================================================== + * + * hCore + * Copyright Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + #include "UIKitCore.hxx" diff --git a/Public/SDK/UIKit/makefile b/Public/SDK/UIKit/makefile index 1e73a741..103bc0c8 100644 --- a/Public/SDK/UIKit/makefile +++ b/Public/SDK/UIKit/makefile @@ -1,4 +1,9 @@ -CC=x86_64-elf-g++ +################################################## +# ; (C) Mahrouss Logic, 2024, all rights reserved. +# This is the UIKit Makefile. +################################################## + +CC=x86_64-w64-mingw32-g++ CCFLAGS=-c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 ASM=nasm ASMFLAGS=-f elf64 diff --git a/Public/SDK/ZipKit/Makefile b/Public/SDK/ZipKit/Makefile index ded36b53..b015c393 100644 --- a/Public/SDK/ZipKit/Makefile +++ b/Public/SDK/ZipKit/Makefile @@ -1,4 +1,9 @@ -CC=x86_64-elf-g++ +################################################## +# ; (C) Mahrouss Logic, 2024, all rights reserved. +# This is the ZipKit Makefile. +################################################## + +CC=x86_64-w64-mingw32-g++ CCFLAGS=-c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 ASM=nasm ASMFLAGS=-f elf64 diff --git a/Public/SDK/ZipKit/NewFS-Addon.hpp b/Public/SDK/ZipKit/NewFS-Addon.hpp index 4bc0c4c1..de308389 100644 --- a/Public/SDK/ZipKit/NewFS-Addon.hpp +++ b/Public/SDK/ZipKit/NewFS-Addon.hpp @@ -11,7 +11,9 @@ // TODO: integrate NewFS compression. -// MeFS catalog is compressed. -#define kCatalogFlagZip 255 -// MeFS catalog has password. -#define kCatalogPassword 256
\ No newline at end of file +// NewFS catalog is compressed. +#define kNewFSIsZip 255 + +// NewFS catalog has password attached to it. +#define kNewFSHasPassword 256 + diff --git a/Public/SDK/ZipKit/Zip.cxx b/Public/SDK/ZipKit/Zip.cxx index 18bf4a0b..79788a8e 100644 --- a/Public/SDK/ZipKit/Zip.cxx +++ b/Public/SDK/ZipKit/Zip.cxx @@ -16,22 +16,22 @@ namespace ZipKit { -ZipStream::ZipStream() : fSharedData(MeHeap::Shared()->New(kInitialSz, kHeapExpandable)), fSharedSz(kInitialSz) +ZipStream::ZipStream() : fSharedData(HHeap::Shared()->New(kInitialSz, kHeapExpandable)), fSharedSz(kInitialSz) { } ZipStream::~ZipStream() noexcept { if (fSharedData) - MeHeap::Shared()->Dispose(fSharedData); + HHeap::Shared()->Delete(fSharedData); } -MeFilePtr ZipStream::FlushToFile(const char *name) +HFilePtr ZipStream::FlushToFile(const char *name) { - MeFilePtr fp = new MeFile(name); + HFilePtr fp = new HFile(name); MUST_PASS(fp); - this->fSharedSz = MeHeap::Shared()->Tell(this->fSharedData); + this->fSharedSz = HHeap::Shared()->Tell(this->fSharedData); fp->SetMIME("application/x-bzip"); fp->Write(this->fSharedData, this->fSharedSz); diff --git a/Public/SDK/ZipKit/Zip.hpp b/Public/SDK/ZipKit/Zip.hpp index 601e5ae7..0130a021 100644 --- a/Public/SDK/ZipKit/Zip.hpp +++ b/Public/SDK/ZipKit/Zip.hpp @@ -30,7 +30,7 @@ class ZipStream final HCORE_COPY_DEFAULT(ZipStream); public: - MeFilePtr FlushToFile(const char *name); + HFilePtr FlushToFile(const char *name); void *Deflate(const char *name); void Inflate(const char *name, void *data); diff --git a/Public/Subsystems/.gitkeep b/Public/Subsystems/.gitkeep deleted file mode 100644 index e69de29b..00000000 --- a/Public/Subsystems/.gitkeep +++ /dev/null |
