Skip to content

Commit b6f8723

Browse files
committed
update stage 1
-- solve some problems
1 parent 302759f commit b6f8723

File tree

120 files changed

+1609
-10276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1609
-10276
lines changed

README.md

+51-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Lithium
22
=======
3+
34
<p align="center">
45
<img src="https://img.shields.io/badge/dialect-C%2B%2B20-blue">
56
<img src="https://img.shields.io/badge/license-GPL3-blue">
@@ -14,6 +15,7 @@ Lithium
1415
Lithium, a lively and lightweight astrophotography terminal.
1516

1617
Features:
18+
1719
- Can be used as imaging software, device server, and system manager.
1820
- Based on the latest C++20 standard, providing efficient functionality implementation (compatible with some C++17 features).
1921
- Supports open loading, allowing dynamic loading of C++ dynamic libraries for hot updates.
@@ -25,7 +27,29 @@ Features:
2527
- Supports complex shooting sequences, enabling a programmable user experience.
2628
- Uses the GPL3 open source license, __where the world belongs to open source__
2729

28-
## How to build:
30+
## About Mod/Plugin
31+
32+
In Lithium, the component function is the most special function, providing a mod mechanism similar to Minecraft. The component function supports dynamic addition and insertion of functions, but due to the limitations of C++, we have imposed certain restrictions on the insertion of components to ensure system stability and security.
33+
34+
### Form of Components
35+
36+
- Injective Components: These components replace the implemented functions in `Lithium`. They inject `shared_ptr` into each Manager (similar to `ConfigManager`). The target of the injected function is the same as that of the Manager that has been injected into `GlobalPtrManager`. Components in this form can flexibly replace existing functions.
37+
38+
- Independent Components: These components use a distributed architecture and run in independent processes to ensure system security. When it is necessary to process sensitive data or perform complex calculations, these independent components can provide additional protection and isolation. To increase the security of components, `Lithium` also provides sandboxing functionality.
39+
40+
It should be noted that except for injective and independent components, other forms of components will be considered illegal and unsupported for loading, and will be directly ignored by the system.
41+
42+
### Component Levels
43+
44+
- Addon: The highest level of component, containing a series of Modules and Components
45+
46+
- Module: A module containing a dynamic library of an indefinite number of Components (depending on the platform)
47+
48+
- Component: A `shared_ptr` of a specific actual function or an executable function
49+
50+
All functions are declared in `package.json` for ease of use.
51+
52+
## How to build
2953

3054
### Install dependencies
3155

@@ -46,7 +70,7 @@ pacman -S mingw-w64-x86_64-fmt
4670
pacman -S mingw-w64-x86_64-libnova
4771
```
4872

49-
#### On Ubuntu or other similar Linux platforms (No INDI needed):
73+
#### On Ubuntu or other similar Linux platforms (No INDI needed)
5074

5175
```shell
5276
sudo apt-get update && sudo apt-get upgrade -y
@@ -87,6 +111,7 @@ make -j4 or cmake --build . -j4
87111
Everything is very simple. The entire process is straightforward.
88112

89113
Here is a poem adapted from a quote :
114+
90115
```
91116
Learning requires not mere imagination,
92117
Nor can it be attained through mediocre dedication.
@@ -112,6 +137,7 @@ And never lose sight of this noble race.
112137
锂,轻量化的天文摄影终端
113138

114139
## 特性
140+
115141
- 可用作成像软件、设备服务器和系统管理器
116142
- 基于最新的C++20标准,提供高效的功能实现(兼容部分C++17特性)
117143
- 支持开放式加载,允许动态加载C++动态库以进行热更新
@@ -123,6 +149,28 @@ And never lose sight of this noble race.
123149
- 支持复杂的拍摄序列,实现编程化的使用体验
124150
- 采用GPL3开源许可协议,__世界属于开源__
125151

152+
## 关于模组/插件
153+
154+
在Lithium,组件功能是最特殊的功能,提供类似于Minecraft的模组机制。组件功能支持动态添加和插入功能,但由于C++自身的限制,我们对组件的插入进行了一定的限制,以确保系统的稳定性和安全性。
155+
156+
### 组件形式
157+
158+
- 注入式组件:这些组件替换了`Lithium`中已实现的功能。它们通过使用`shared_ptr`注入各个Manager(类似与`ConfigManager`),目标与已注入`GlobalPtrManager`的管理器相同。这种形式的组件可以灵活替换现有功能。
159+
160+
- 独立式组件:这些组件采用分布式架构,在独立的进程中运行,以确保系统的安全性。当需要处理敏感数据或进行复杂的计算时,这种独立的组件能够提供额外的保护和隔离。为了增加组件的安全性,`Lithium`还提供了沙盒功能.
161+
162+
需要注意的是,除了注入式和独立式组件外,其他形式的组件都将被视为非法形式,不支持加载,并将被系统直接忽略。
163+
164+
### 组件级别
165+
166+
- Addon:最高级的组件,包含一系列的Module和Component
167+
168+
- Module:模块,包含不定数量Component的动态库(根据平台而定)
169+
170+
- Component:组件,具体实际功能的`shared_ptr`,或者是可执行的函
171+
172+
所有功能均在`package.json`中声明,以方便使用。
173+
126174
## 如何构建
127175

128176
### 安装依赖项
@@ -176,6 +224,7 @@ make -j4 或 cmake --build . -j4
176224
一切都非常简单整个过程很简单
177225

178226
下面是一首小诗,改编自《三体》中的一句话:
227+
179228
```text
180229
学习不仅仅需要想象,
181230
也不能只凭平庸的奉献

0 commit comments

Comments
 (0)