Skip to content

Commit b93282a

Browse files
committed
docs: update README.md
1 parent 7174868 commit b93282a

File tree

2 files changed

+58
-213
lines changed

2 files changed

+58
-213
lines changed

README.md

Lines changed: 15 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,10 @@
2828
- [Related projects](#related-projects)
2929
- [Design references](#design-references)
3030
- [Quick start](#quick-start)
31-
- [Windows](#windows)
32-
- [Create new LCUI project](#create-new-lcui-project)
33-
- [Install LCUI for existing project](#install-lcui-for-existing-project)
34-
- [Manual compilation and installation](#manual-compilation-and-installation)
35-
- [Ubuntu](#ubuntu)
36-
- [Roadmap](#roadmap)
37-
- [Primary Roadmap](#primary-roadmap)
38-
- [Secondary Roadmap](#secondary-roadmap)
31+
- [Use LCUI CLI](#use-lcui-cli)
32+
- [Manual compilation and installation](#manual-compilation-and-installation)
33+
- [Windows](#windows)
34+
- [Ubuntu](#ubuntu)
3935
- [Contribution](#contribution)
4036
- [Documentation](#documentation)
4137
- [FAQ](#faq)
@@ -111,11 +107,9 @@ Want to know what LCUI can do? You can view the following projects:
111107

112108
## Quick start
113109

114-
### Windows
110+
### Use LCUI CLI
115111

116-
#### Create new LCUI project
117-
118-
Quickly create an LCUI project using [lcui-cli](https://github.com/lc-ui/lcui-cli):
112+
LCUI CLI is a command line tool, you need to install [Node.js](https://nodejs.org/) before using it, and then run the following command to quickly experience it:
119113

120114
```bash
121115
# Install lcui-cli and lcpkg
@@ -127,30 +121,19 @@ lcui create myapp
127121
# Go into project directory
128122
cd myapp
129123

130-
# Install dependencies
131-
lcpkg install
132-
133-
# Run it
134-
lcpkg run start
135-
```
136-
137-
#### Install LCUI for existing project
124+
# set up the development environment for this project
125+
lcui setup
138126

139-
Use [lcpkg](https://github.com/lc-soft/lcpkg) to quick install LCUI in your project directory:
127+
# Build project
128+
lcui build
140129

141-
```bash
142-
# Initialize the lcpkg configuration file to tell lcpkg about your project
143-
lcpkg init
144-
145-
# Download and install the compiled LCUI library from GitHub
146-
lcpkg install github.com/lc-soft/LCUI
130+
# run project
131+
lcui run
147132
```
148133

149-
After successful installation, follow the help documentation output by lcpkg to configure your project's build configuration.
150-
151-
#### Manual compilation and installation
134+
### Manual compilation and installation
152135

153-
If you want to manually compile LCUI from source code:
136+
#### Windows
154137

155138
1. Open CMD window, and run following command in the LCUI source directory to install the dependency libraries:
156139
```bash
@@ -164,7 +147,7 @@ If you want to manually compile LCUI from source code:
164147
1. Rename `config.win32.h.in` in the include directory to `config.h`.
165148
1. Open the `build/windows/LCUI.sln` file with [Visual Studio](https://visualstudio.microsoft.com/), and then build LCUI.
166149

167-
### Ubuntu
150+
#### Ubuntu
168151

169152
```bash
170153
# Install the dependencies
@@ -197,25 +180,6 @@ cd test
197180

198181
> **Note:** If you want to customize the compiler, compile flags, install location, and other configuration items, read the [INSTALL](INSTALL) file.
199182

200-
## Roadmap
201-
202-
The roadmap for this project is divided into primary and secondary roadmaps, with the primary roadmap developed by the project maintainer and the secondary roadmap developed by the open source community contributors and developers like you.
203-
204-
### Primary Roadmap
205-
206-
- Make project code more standardized, readable, and maintainable
207-
- Improve relevant development tools and sample applications to improve the development efficiency and make it easier to use
208-
209-
### Secondary Roadmap
210-
211-
- Explore new GUI development methods to make LCUI unique
212-
- [Accessbility](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/What_is_accessibility) support
213-
- Research [SDL](https://github.com/SDL-mirror/SDL), [imgui](https://github.com/ocornut/imgui) and other similar open source projects, and try to fill in what LCUI is missing
214-
- Refactor the existing graphics processing interface to make it easy to integrate with mainstream 2D graphics libraries and bring better graphics rendering performance to LCUI
215-
- Add driver support for Mac OS, Android and iOS
216-
- Add more mouse cursor styles
217-
- Add clipboard support
218-
219183
## Contribution
220184

221185
Think LCUI is slow to update? there are many ways to [contribute](.github/CONTRIBUTING.md) to LCUI.

README.zh-cn.md

Lines changed: 43 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@
2828
- [相关项目](#%E7%9B%B8%E5%85%B3%E9%A1%B9%E7%9B%AE)
2929
- [设计参考](#%E8%AE%BE%E8%AE%A1%E5%8F%82%E8%80%83)
3030
- [快速上手](#%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B)
31-
- [Windows](#windows)
32-
- [创建新的 LCUI 应用项目](#%E5%88%9B%E5%BB%BA%E6%96%B0%E7%9A%84-lcui-%E5%BA%94%E7%94%A8%E9%A1%B9%E7%9B%AE)
33-
- [为已有的项目安装 LCUI](#%E4%B8%BA%E5%B7%B2%E6%9C%89%E7%9A%84%E9%A1%B9%E7%9B%AE%E5%AE%89%E8%A3%85-lcui)
34-
- [手动编译安装](#%E6%89%8B%E5%8A%A8%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85)
35-
- [Ubuntu](#ubuntu)
31+
- [使用 LCUI CLI](#%E4%BD%BF%E7%94%A8-lcui-cli)
32+
- [手动编译安装](#%E6%89%8B%E5%8A%A8%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85)
33+
- [Windows](#windows)
34+
- [Ubuntu](#ubuntu)
3635
- [文档](#%E6%96%87%E6%A1%A3)
3736
- [路线图](#%E8%B7%AF%E7%BA%BF%E5%9B%BE)
3837
- [贡献](#%E8%B4%A1%E7%8C%AE)
@@ -108,11 +107,9 @@ LCUI 是一个用 C 语言编写的桌面端图形界面开发库。
108107

109108
## 快速上手
110109

111-
### Windows
110+
### 使用 LCUI CLI
112111

113-
#### 创建新的 LCUI 应用项目
114-
115-
使用 [lcui-cli](https://github.com/lc-ui/lcui-cli) 快速创建一个 LCUI 应用项目:
112+
LCUI CLI 是一个命令行工具,在使用它之前需要安装 [Node.js](https://nodejs.org/) ,之后再运行以下命令即可快速体验:
116113

117114
```bash
118115
# 安装 lcui-cli 和 lcpkg
@@ -124,30 +121,22 @@ lcui create myapp
124121
# 进入项目目录
125122
cd myapp
126123

127-
# 安装依赖库
128-
lcpkg install
129-
130-
# 启动这个项目
131-
lcpkg run start
132-
```
133-
134-
#### 为已有的项目安装 LCUI
124+
# 设置开发环境
125+
lcui setup
135126

136-
在你的项目目录里使用 [lcpkg](https://github.com/lc-soft/lcpkg) 来快速安装 LCUI:
127+
# 构建项目
128+
lcui build
137129

138-
```bash
139-
# 初始化 lcpkg 配置文件,告诉 lcpkg 你的项目相关信息
140-
lcpkg init
141-
142-
# 从 GitHub 下载安装已编译好的 LCUI 库
143-
lcpkg install github.com/lc-soft/LCUI
130+
# 运行项目
131+
lcui run
144132
```
145133

146-
#### 手动编译安装
134+
### 手动编译安装
147135

148-
如果你想手动从源码编译 LCUI:
136+
#### Windows
149137

150138
1. 打开命令行窗口,在 LCUI 的源码目录中使用以下命令安装依赖库:
139+
151140
```bash
152141
lcpkg install
153142
# 如果你需要编译 x64 版本的话
@@ -156,10 +145,11 @@ lcpkg install github.com/lc-soft/LCUI
156145
lcpkg install --platform uwp
157146
lcpkg install --arch x64 --platform uwp
158147
```
148+
159149
1. 重命名 include 目录中的 `config.win32.h.in` 文件为 `config.h`
160150
1. 使用 [Visual Studio](https://visualstudio.microsoft.com/) 打开 `build/windows/LCUI.sln` 文件,然后编译生成 LCUI。
161151

162-
### Ubuntu
152+
#### Ubuntu
163153

164154
```bash
165155
# 安装依赖库
@@ -197,29 +187,14 @@ cd test
197187
- 在线教程:[https://docs.lcui.lc-soft.io](https://docs.lcui.lc-soft.io)
198188
- 更新日志:[CHANGELOG.zh-cn.md](CHANGELOG.zh-cn.md)
199189

200-
教程只有一部分,并且已经很久没有更新了,你可以参考头文件、源代码、示例程序以及上述的相关项目来了解基本用法。如果你希望我们能够为此项目提供完善的文档,可以考虑花时间帮助我们制定文档目录、章节和内容范围,相当于撰写一个文档模板,这样我们就不用花费时间在参考各种技术文档、思考初学者需要知道些什么、以及组织内容结构等工作上面,只需根据已定好的章节标题补全剩余内容即可。
201-
202190
## 路线图
203191

204-
此项目的开发计划分为主线和支线,主线中的开发任务主要由项目维护者负责推进,优先级较高,按照时间范围分为以下三类:
205-
206-
- 近期计划
207-
- 添加安卓端适配
208-
- 开发示例移动端应用
209-
- 撰写移动端应用开发教程
210-
- 中期计划
211-
- 开发移动端组件库
212-
- 未来计划
213-
- 为移动端组件库添加 React 实现,使之能应用在 Web 前端项目
214-
- 重新设计 Trad 语言并重写其编译器,使之能应付基础的 UI 开发需求
215-
- 重新设计图形抽象接口,支持引入主流的图形库来丰富图形元素的渲染方式
216-
- 优化 CSS 样式库的内存占用
217-
- 优化字体缓存库的内存占用
218-
- 支持编译为 WebAssembly 运行在浏览器上
219-
- 为 CSS 解析器添加支持 `@media` 查询
220-
- 完善文档和教程
221-
222-
其它的任务则归为支线,交给开源社区贡献者以及像你这样的开发者来推进。如需了解更多细节可查看 [issues](https://github.com/lc-soft/LCUI/issues) 和[项目](https://github.com/lc-soft/LCUI/projects/2)页面。
192+
此项目的开发计划分为主线和支线,主线中的开发任务主要由项目维护者负责推进,优先级较高,主要包括:
193+
194+
- LCUI 3.0 开发 ([#239](https://github.com/lc-soft/LCUI/issues/239))
195+
- 完善文档
196+
197+
其它的任务则归为支线,交给开源社区贡献者以及像你这样的开发者来推进。如需了解更多细节可查看 [issues](https://github.com/lc-soft/LCUI/issues) 和[项目](https://github.com/lc-soft/LCUI/projects)页面。
223198

224199
## 贡献
225200

@@ -283,126 +258,32 @@ cd test
283258
- 有良好的 CSS 编码风格
284259
- 了解前端工程化和相关开发工具
285260

286-
1. **和写网页一样吗?需要注意什么?**
287-
288-
不一样,主要有以下差异需要注意:
289-
290-
- 界面描述文件格式是 XML,与 HTML 有一点区别。
291-
- 本质上是在写 C 代码,开发效率比 JavaScript 低很多。
292-
- 没有 `<script>` 标签,你不能像 HTML 那样内嵌 JavaScript 或 C 代码。
293-
- 部件 (Widget) 是基本的界面布局元素,不是文字,不支持图文混排,不存在 `inline` 显示类型。
294-
- 滚动条是一个独立的部件,使用 `overflow: scroll;` 样式不会出现滚动条,你需要主动创建它并指定容器和滚动层。
295-
- 所有文本由 TextView 部件渲染,它的显示类型为 `block` 而不是 `inline`
296-
- 部件不会溢出父级部件的边界框,效果类似于已应用样式:`overflow: hidden;`
297-
- 绝对定位的部件始终相对于其父级部件,而不是父级第一个非静态定位的部件。
298-
- 没有像 [Chrome Devtools](https://developers.google.com/web/tools/chrome-devtools) 这样的工具来调试图形界面,你需要凭借自己的想象力和开发经验来验证 BUG 是来自你的代码还是 LCUI 内部的。
299-
300-
1. **CSS 支持度如何?**
301-
302-
以下是支持的 CSS 特性列表,已勾选的是表示已支持(至少支持基本功能),未列出的属性则默认不支持。
303-
304-
<details>
305-
<summary>CSS 特性覆盖范围</summary>
306-
307-
- at rules
308-
- [x] `@font-face`
309-
- [ ] `@keyframes`
310-
- [ ] `@media`
311-
- keywords
312-
- [ ] `!important`
313-
- selectors
314-
- [x] `*`
315-
- [x] `type`
316-
- [x] `#id`
317-
- [x] `.class`
318-
- [x] `:hover`
319-
- [x] `:focus`
320-
- [x] `:active`
321-
- [x] `:first-child`
322-
- [x] `:last-child`
323-
- [ ] `[attr="value"]`
324-
- [ ] `:not()`
325-
- [ ] `:nth-child()`
326-
- [ ] `parent > child`
327-
- [ ] `a ~ b`
328-
- [ ] `::after`
329-
- [ ] `::before`
330-
- [ ] ...
331-
- units
332-
- [x] px
333-
- [x] dp
334-
- [x] sp
335-
- [x] pt
336-
- [x] %
337-
- [ ] rem
338-
- [ ] vh
339-
- [ ] vw
340-
- properties
341-
- [x] top, right, bottom, left
342-
- [x] width, height
343-
- [x] visibility
344-
- [x] display
345-
- [x] none
346-
- [x] inline-block
347-
- [x] block
348-
- [x] flex
349-
- [ ] inline-flex
350-
- [ ] inline
351-
- [ ] grid
352-
- [ ] table
353-
- [ ] table-cell
354-
- [ ] table-row
355-
- [ ] table-column
356-
- [ ] ...
357-
- [x] position
358-
- [x] static
359-
- [x] relative
360-
- [x] absolute
361-
- [ ] fixed
362-
- [x] box-sizing
363-
- [x] border-box
364-
- [x] content-box
365-
- [x] border
366-
- [x] border-radius
367-
- [x] background-color
368-
- [x] background-image
369-
- [x] background-position
370-
- [x] background-cover
371-
- [ ] background
372-
- [x] pointer-events
373-
- [x] font-face
374-
- [x] font-family
375-
- [x] font-size
376-
- [x] font-style
377-
- [x] flex
378-
- [x] flex-shrink
379-
- [x] flex-grow
380-
- [x] flex-basis
381-
- [x] flex-wrap
382-
- [x] flex-direction
383-
- [x] justify-content
384-
- [x] flex-start
385-
- [x] center
386-
- [x] flex-end
387-
- [x] align-items
388-
- [x] flex-start
389-
- [x] center
390-
- [x] flex-end
391-
- [x] stretch
392-
- [ ] float
393-
- [ ] transition
394-
- [ ] transform
395-
- [ ] ...
396-
</details>
397-
398261
1. **我想要 ???? 功能,就像 ???? 里的那样。**
399262

400-
请先[新建 issue](https://github.com/lc-soft/LCUI/issues/new/choose),按照已有的模板补全内容。
263+
请先[新建 issue](https://github.com/lc-soft/LCUI/issues/new/choose),按照已有的模板补全内容,我们建议你尽量将你的需求描述清楚,如果能提供开发思路、相关参考文档等内容那是最好的,例如:
264+
265+
```markdown
266+
# 建议添加 xxx
267+
268+
(简介)xxx 是......
269+
(特性)它能够......
270+
(理由)对于 LCUI 它能解决 ...... 等问题
271+
(实现思路)大致的实现方法是先这样......然后......再......最后......
272+
(参考资料)具体可参考这些 ......
273+
```
274+
275+
不推荐的写法:
276+
277+
```markdown
278+
# 建议添加 xxx
279+
280+
如题,我觉得很有必要,请添加,谢谢。
281+
```
401282

402283
1. **求添加 JavaScript/Python/Go/Rust/PHP/C#/Java 语言绑定**
403284

404285
已有官方支持的 [Trad](https://github.com/lc-soft/trad) 语言绑定,不考虑添加其它语言绑定。如果你实在需要的话可以自己动手设计,毕竟你比作者更懂这些语言的编程思想和设计哲学,也算是一个展现技术实力的好机会。
405286

406287
## 许可
407288

408-
LCUI 采用的开源许可证是 [MIT](http://opensource.org/licenses/MIT)。
289+
LCUI 采用的开源许可证是 [MIT](http://opensource.org/licenses/MIT)。

0 commit comments

Comments
 (0)