mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
remove temp files in design folder and update docs
This commit is contained in:
parent
7e46fff409
commit
897fe47586
@ -1,23 +1,31 @@
|
||||
# demos的资源数据
|
||||
# 资源数据
|
||||
|
||||
### 一、raw目录下是原始资源
|
||||
## 1. res 和 design 目录的区别
|
||||
|
||||
* 请将资源放在相应的子目录下。
|
||||
一般在应用程序根目录下有 res 和 design 目录,这两个目录有些类似,又有些不同,这里解释一下:
|
||||
|
||||
* 如果支持从文件中加载资源,需要将本目录与可执行文件一起发布。
|
||||
* design 目录是设计时用的资源目录,设计时增加的资源都放到这个目录。
|
||||
|
||||
* AWTK中的字符串、主题和UI都使用二进制的资源格式,update\_res.py负责将XML文件转成对应的二进制文件,并放在同一目录下。
|
||||
* res 目录是临时目录,由 design 中的资源数据生成,可以不用放到代码仓库中。一般用 designer 的资源打包命令生成,或者使用下面的脚本生成:
|
||||
|
||||
### 二、inc目录下是C代码资源
|
||||
```
|
||||
python scripts/update_res.py all
|
||||
```
|
||||
|
||||
* update\_res.py负责将原始资源转换成可以编译成C语言的常量数组,按原始资源相同的目录结构放在本目录中。
|
||||
## 2. res 目录下的 inc 和 raw 子目录的区别
|
||||
|
||||
* 在没有文件系统时,assets.c会自动将本目录下的文件编译到代码中。
|
||||
### 2.1 raw 目录
|
||||
|
||||
### 三、.data和.res
|
||||
如果目标平台有文件系统,可以从本目录找到相应的资源数据,此时本目录需要和可执行文件一起拷贝到目标平台。
|
||||
|
||||
### 2.2 inc 目录
|
||||
|
||||
如果目标平台没有文件系统,那么编译器会把本目录下的数据,直接编译到代码中,生成一个 bin 文件。
|
||||
|
||||
## 3. .data扩展名 和 .res扩展名的资源
|
||||
|
||||
对于图片来说:
|
||||
|
||||
* .res文件是将图片文件(如png/jpg)转换成可以编译成C语言的常量数组。
|
||||
* .res 文件是将图片文件(如 png/jpg) 转换成可以编译成 C 语言的常量数组。
|
||||
|
||||
* .data文件是将图片文件(如png/jpg)界面成位图数据,然后转换成可以编译成C语言的常量数组。
|
||||
* .data 文件是将图片文件(如 png/jpg) 转换成位图数据,然后进一步转换成可以编译成 C 语言的常量数组。
|
||||
|
14
design/default/README.md
Normal file
14
design/default/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
## 目录结构说明
|
||||
```
|
||||
+
|
||||
├─data 输入法的数据和应用程序自身的数据。
|
||||
│ ├─gpinyin.dat是拼音输入法数据
|
||||
│ └─suggest\_words\_zh\_cn.dat是联想字数据
|
||||
├─fonts 字体(请看目录内部的README)。
|
||||
├─images 图片(请看目录内部的README)。
|
||||
├─scripts 脚本(C/C++开发不需要)
|
||||
├─strings 国际化字符串翻译的数据。
|
||||
├─styles 界面风格描述数据。
|
||||
├─ui 界面描述数据。
|
||||
└─xml XML格式的数据(放到data目录也可以)。
|
||||
```
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user