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

merging plists & Remove LSP (#436)

* 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

* update faq

* bullet & bob

* script properties update

* editor-styling

* build server url

* editor templates

* spine extension update

* Fix typo in the "optimizations" word in Chinese docs

* Update to material.md - Constants buffers

* Verify Graphics Calls

* H5 parameters

* OpenJDK downloads

* cn update corresponds to [pull 259](https://github.com/defold/doc/pull/259)

* application security

* porting guidelines

* update for 8f1651f

* cn update for 094bf6f

* cn update for 20fdfc5 & 6263317

* cn update for 7/19/2022

* title

* profiling update

* update editor.md

* update bob.md

* update shortcuts

* update fixed update note

* Update properties.md

* Update material.md

* Updates links

* Update bob help with the latest info

* camera & renderer

* Updated android keystore info zh_cn

* bundling.md release vs debug zh_cn

* update bob.md & gui-clipping.md

* contentless bundle

* consoles update

* model animation link

* gamepad & faq

* remove a camera lib

* font shadow render mode fix

* updates about app-manifest and others

* Update script.md

* includes in shaders

* editor scripts

* material updates

* Added dynamic atlas and texture creation

* fixes for atlas and some others

* update screenshots and add explanations (CN)

* add a line about Dynamic Prototype (CN)

* remove "inline" marks in pics

* de-translate the subtitle "Running the debugger" & images fix

* bundle identifier restrictions

* node properties Enabled and Visible (CN)

* release checklist & slice-9

* Update project-settings.md (CN)

* Update camera.md (CN)

* Update project-settings.md (CN)

* culling of meshes (CN)

* Update project-settings.md (CN)

* gltf model file support (CN)

* updates about factory (CN)

* Update bob.md (CN)

* Update bob.jar help (CN)

* Update about renderer and other things

* Update PS4 development and other things

* Dynamic prototype part of the collection factory.

* sync to atlas.md

* sync to design.md

* sync to gpgs.md

* sync to hot-reload.md

* sync to linux.md

* sync to live-update.md

* sync to lua.md

* sync to networking.md

* sync to physics-shapes.md

* sync to push.md

* sync to test.md

* sync to working-offline.md

* update material.md

* update zerobrane.md

* all done

* Splitting .zip archives in live-update.md

* manual for collision events

* Updated sprite documentation to include info about multiple textures

* update editor-scripts.md & physics-events.md

* update buffer.md & physics-shapes.md

* screen blend mode

* Update camera manual for zh with new function.

* Fix texture profile documentation for 1.7.0 zh

* update material.md & render.md

* notice about physics-events

* script-properties notes & PS5

* Clarified collision messages

* Update 3rd party camera list

* Fixed links in live update manual zh

* Update lua.md

* Update html5 manual with new information about CUSTOM_PARAMETERS. zh

* Added note on Apple Privacy Manifests zh

* typo

* Add info about collection proxies for zh

* fix minor mistakes

* typo

* custom resource & physics.set_shape

* Add missing type property in the physics.set_shape for zh

* html5 param & coordinates convertion

* Update install.md for zh

* Added app manifest manual for zh

* Added more info on build variants for zh

* lua transpilers and ImageMagick usage

* merging plists & Remove LSP
COCO преди 1 година
родител
ревизия
0450458b10
променени са 2 файла, в които са добавени 106 реда и са изтрити 31 реда
  1. 106 17
      docs/zh/manuals/extensions-manifest-merge-tool.md
  2. 0 14
      docs/zh/manuals/writing-code.md

+ 106 - 17
docs/zh/manuals/extensions-manifest-merge-tool.md

@@ -8,7 +8,7 @@ brief: 本教程介绍了应用的 manifests 混合是如何工作的
 一些平台上需要提供 manifests 片段 (或称存根) 来为扩展提供支持.
 可以是部分 `AndroidManifest.xml`, `Info.plist` 或者 `engine_template.html`
 
-从应用基础 manifest 开始, 每个扩展 manifest 存根一个一个的被使用.
+从应用基础 manifest 开始, 每个扩展 manifest 存根一个一个的被用.
 基础 manifest 可以是默认的 (位于 `builtins\manifests\<platforms>\...`), 也可以是由用户自定义的.
 
 ## 命名和结构
@@ -107,8 +107,7 @@ Android 平台提供了 manifest 混合工具 (基于 `ManifestMerger2`), `bob.j
 
 ## iOS / macOS
 
-对于 `Info.plist` 我们实现了专用的混合工具.
-列表和字典都是支持的.
+对于 `Info.plist` 我们实现了专用的工具混合列表和字典. 可以在键上指定混合属性 `merge`, `keep` 或 `replace`, 默认是 `merge`.
 
 ### 示例
 
@@ -119,23 +118,48 @@ Android 平台提供了 manifest 混合工具 (基于 `ManifestMerger2`), `bob.j
     <!DOCTYPE plist PUBLIC '-//Apple//DTD PLIST 1.0//EN' 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'>
     <plist version='1.0'>
     <dict>
-            <key>NSAppTransportSecurity</key>
+        <key>NSAppTransportSecurity</key>
+        <dict>
+            <key>NSExceptionDomains</key>
             <dict>
-                <key>NSExceptionDomains</key>
+                <key>foobar.net</key>
                 <dict>
-                    <key>foobar.net</key>
-                    <dict>
-                        <key>testproperty</key>
-                        <true/>
-                    </dict>
+                    <key>testproperty</key>
+                    <true/>
                 </dict>
             </dict>
-            <key>INT</key>
-            <integer>8</integer>
-            <key>REAL</key>
-            <real>8.0</real>
-            <key>BASE64</key>
-            <data>SEVMTE8gV09STEQ=</data>
+        </dict>
+        <key>INT</key>
+        <integer>8</integer>
+
+        <key>REAL</key>
+        <real>8.0</real>
+
+        <!-- 即使扩展清单里有这个键也要保持该键 -->
+        <key merge='keep'>BASE64</key>
+        <data>SEVMTE8gV09STEQ=</data>
+
+        <!-- 如果扩展清单里也有这个键的数组那么所有字典值会与基本数组第一个字典值合并 -->
+        <key>Array1</key>
+        <array>
+            <dict>
+                <key>Foobar</key>
+                <array>
+                    <string>a</string>
+                </array>
+            </dict>
+        </array>
+
+        <!-- 不要试图合并这个数组的值, 而应该把扩展清单的值添加到这个数组里去 -->
+        <key merge='keep'>Array2</key>
+        <array>
+            <dict>
+                <key>Foobar</key>
+                <array>
+                    <string>a</string>
+                </array>
+            </dict>
+        </array>
     </dict>
     </plist>
 ```
@@ -162,6 +186,33 @@ Android 平台提供了 manifest 混合工具 (基于 `ManifestMerger2`), `bob.j
         </dict>
         <key>INT</key>
         <integer>42</integer>
+
+        <!-- 改写基础清单里已存在的值 -->
+        <key merge='replace'>REAL</key>
+        <integer>16.0</integer>
+
+        <key>BASE64</key>
+        <data>Rk9PQkFS</data>
+
+        <key>Array1</key>
+        <array>
+            <dict>
+                <key>Foobar</key>
+                <array>
+                    <string>b</string>
+                </array>
+            </dict>
+        </array>
+
+        <key>Array2</key>
+        <array>
+            <dict>
+                <key>Foobar</key>
+                <array>
+                    <string>b</string>
+                </array>
+            </dict>
+        </array>
     </dict>
     </plist>
 ```
@@ -172,6 +223,7 @@ Android 平台提供了 manifest 混合工具 (基于 `ManifestMerger2`), `bob.j
     <?xml version='1.0'?>
     <!DOCTYPE plist SYSTEM 'file://localhost/System/Library/DTDs/PropertyList.dtd'>
     <plist version='1.0'>
+        <!-- 嵌套合并基础清单和扩展清单的字典 -->
         <dict>
             <key>NSAppTransportSecurity</key>
             <dict>
@@ -191,14 +243,51 @@ Android 平台提供了 manifest 混合工具 (基于 `ManifestMerger2`), `bob.j
                     </dict>
                 </dict>
             </dict>
+
+            <!-- 来自基础清单 -->
             <key>INT</key>
             <integer>8</integer>
+
+            <!-- 基础清单的值被改写因为扩展清单的合并标志是 "replace" -->
             <key>REAL</key>
-            <real>8.0</real>
+            <real>16.0</real>
+
+            <!-- 基础清单的值被使用因为基础清单的合并标志是 "keep" -->
             <key>BASE64</key>
             <data>SEVMTE8gV09STEQ=</data>
+
+            <!-- 扩展清单的值被加入进来因为没有指定合并标志 -->
             <key>INT</key>
             <integer>42</integer>
+
+            <!-- 数组的字典值被合并因为基础清单默认合并标志是 "merge" -->
+            <key>Array1</key>
+            <array>
+                <dict>
+                    <key>Foobar</key>
+                    <array>
+                        <string>a</string>
+                        <string>b</string>
+                    </array>
+                </dict>
+            </array>
+
+            <!-- 字典值被加入到数组因为基础清单使用了 "keep" -->
+            <key>Array2</key>
+            <array>
+                <dict>
+                    <key>Foobar</key>
+                    <array>
+                        <string>a</string>
+                    </array>
+                </dict>
+                <dict>
+                    <key>Foobar</key>
+                    <array>
+                        <string>b</string>
+                    </array>
+                </dict>
+            </array>
         </dict>
     </plist>
 ```

+ 0 - 14
docs/zh/manuals/writing-code.md

@@ -36,20 +36,6 @@ Defold 中内建编辑器可以打开和编辑 Lua 文件 (.lua), Defold 脚本
 
 ![](/images/editor/apireference.png)
 
-
-### 使用 LSP 进行 Lua 代码 linting
-
-Defold 支持 [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) 的子集, 可用于分析代码并将程序语句和错误进行高光显示, 这个处理被叫做 linting.
-
-Lua language server 和 code linter 作为插件可用. 使用 [加入依赖](/manuals/libraries/#setting-up-library-dependencies) 的功能安装插件:
-
-```
-https://github.com/defold/lua-language-server/releases/download/v0.0.5/release.zip
-```
-
-可用的版本可以在插件的 [发布页面](https://github.com/defold/lua-language-server/releases) 上查看. 关于该插件详细信息参见 [Defold 论坛的插件支持页面](https://forum.defold.com/t/linting-in-the-code-editor/72465).
-
-
 ## 使用第三方代码编辑器
 
 尽管 Defold 提供了编写脚本的基本功能, 但是对于需求更多功能的专业开发者来说还是希望让 Defold 使用自己喜欢的第三方编辑器. 在 [Code 页下的 Preferences 窗口 ](/manuals/editor-preferences/#code) 中可以指定使用第三方编辑器.