Преглед на файлове

Bundle Updates (#232)

* update physics

* update input

* update

* update code sharing in getting-help.md

* Export Compliance

* update on file i/o

* pi / 4

* inputs

* forum url

* read only user

* html5 gamepad

* sdk api update

* update

* image properties

* update editor

* defold sdk update

* animation updates

* animation fix

* run as admin

* update bob

* update about AndroidX support

* software render

* linux-faq.md update

* 4.28.2021 updates

* Basis Universal format

* sound & mesh

* gamepad event mapping

* admob url

* Minor edit to building blocks intro text

* update gamepad & ios

* project settings

* libffi version

* scaling

* image compression

* update gamepads

* increase memory

* caching assets

* update 2021/10/6

* update 2021/10/16
blend-modes.md

* update 2021/11/12

* allow dynamic transforms update

* Bundle update
COCO преди 3 години
родител
ревизия
be021132ee
променени са 2 файла, в които са добавени 36 реда и са изтрити 6 реда
  1. 23 0
      docs/zh/manuals/bundling.md
  2. 13 6
      docs/zh/manuals/project-settings.md

+ 23 - 0
docs/zh/manuals/bundling.md

@@ -56,4 +56,27 @@ brief: 本教程介绍了如何打包应用.
 
 ## 命令行打包
 
+编辑器使用命令行工具 [Bob](/manuals/bob/) 进行应用打包.
+
 日常开发中一般使用 Defold 编辑器编译和打包应用. 如果需要自动生成机制, 比如发布新版本时批处理所有平台或者使用持续集成环境持续生成最新版本. 可以使用 [Bob 命令行工具](/manuals/bob/) 编译和打包.
+
+## Bundle 结构
+
+Bundle 的逻辑结构是这样的:
+
+![](images/bundling/bundle_schematic_01.png)
+
+Bundle 会被输出到一个文件夹. 不同平台位置各异, 还有可能作为 zip 文件包含进 `.apk` 或者 `.ipa` 中.
+Bundle 文件夹的内容每个平台也不一样.
+
+除了可执行文件, 打包过程中也会收集相关平台所必须的资源 (比如安卓平台用的 .xml 资源文件).
+
+通过 [bundle_resources](https://defold.com/manuals/project-settings/#bundle-resources) 项, 设置应打包进 bundle 里的资源.
+可以针对不同平台分别设置.
+
+游戏资源被保存在 `game.arcd` 文件中, 使用 LZ4 算法逐个压缩.
+通过 [custom_resources](https://defold.com/manuals/project-settings/#custom-resources) 项, 设置应打包 (同时也被压缩) 进 game.arcd 里的资源.
+这类资源可以使用 [sys.load_resource()](https://defold.com/ref/sys/#sys.load_resource) 函数来进行访问.
+
+
+

+ 13 - 6
docs/zh/manuals/project-settings.md

@@ -37,17 +37,24 @@ $ adb shell cat /mnt/sdcard/Android/data/com.defold.dmengine/files/log.txt
 项目的 *Library URL* 列表. 详情请见 [Libraries 教程](/manuals/libraries/).
 
 #### Custom Resources
+`custom_resources`
 项目中包含的以逗号分隔的资源列表. 如指定的是目录, 则目录下所有文件及其子目录都会包含进去. 这些资源可以通过 [`sys.load_resource()`](/ref/sys/#sys.load_resource) 载入.
 
 #### Bundle Resources
+`bundle_resources`
 需要根据平台单独打包的以逗号分隔的资源目录列表. 目录必须是以项目根目录开始的绝对路径, 比如像 `/res`. 资源目录里要包含 `platform`, 或者 `architecure-platform` 的子目录.
 
-  支持的 platform 有 `ios`, `android`, `osx`, `win32`, `linux`, `web`.
+支持的 platform 有 `ios`, `android`, `osx`, `win32`, `linux`, `web`, `switch`.
 
-  允许名叫 `common` 的子目录, 用以容纳平台间共享的资源.
+支持包含名为 `common` 的文件夹, 可以在其中加入各平台公用的资源文件.
+
+不同平台访问 bundle 资源的方法不一样. 使用 Lua 的 `io` 模块是可行的. 但是要特别注意写对各平台的文件路径.
+(举例: 在安卓平台上要这么写 "file:///android_asset/")
 
 #### Bundle Exclude Resources
+`bundle_exclude_resources`
 项目中排除的以逗号分隔的资源列表.
+也就是说, 这些资源会被从 `bundle_resources` 设置的基础上被剔除.
 
 ---
 
@@ -114,16 +121,16 @@ $ adb shell cat /mnt/sdcard/Android/data/com.defold.dmengine/files/log.txt
 ### Render
 
 #### Clear Color Red
-清除红色通道, 建立游戏窗口和渲染脚本中使用. 1.2.167 版新增.
+清除红色通道, 建立游戏窗口和渲染脚本中使用.
 
 #### Clear Color Green
-清除绿色通道, 建立游戏窗口和渲染脚本中使用. 1.2.167 版新增.
+清除绿色通道, 建立游戏窗口和渲染脚本中使用.
 
 #### Clear Color Blue
-清除蓝色通道, 建立游戏窗口和渲染脚本中使用. 1.2.167 版新增.
+清除蓝色通道, 建立游戏窗口和渲染脚本中使用.
 
 #### Clear Color ALpha
-清除alpha通道, 建立游戏窗口和渲染脚本中使用. 1.2.167 版新增.
+清除alpha通道, 建立游戏窗口和渲染脚本中使用.
 
 ---