2
0
Эх сурвалжийг харах

Merge pull request #231 from defold/bundle-schematic-doc

Added schematic of a game bundle
Mathias Westerdahl 3 жил өмнө
parent
commit
76d44640b9

+ 24 - 0
docs/en/manuals/bundling.md

@@ -55,4 +55,28 @@ It is possible to create a special version of an HTML5 application bundle specif
 
 ## Bundling from the command line
 
+The editor uses our command line tool [Bob](/manuals/bob/) to bundle the application.
+
 While doing day to day development of your application it is likely that you build and bundle from within the Defold editor. In other circumstances you may wish to automatically generate application bundles, for instance batch building for all targets when releasing a new version or when creating nightly builds of the latest version of the game, perhaps in a CI environment. Building and bundling of an application can be done outside the normal editor workflow using the [Bob command line tool](/manuals/bob/).
+
+## The bundle layout
+
+The logical bundle layout is structured like this:
+
+![](images/bundling/bundle_schematic_01.png)
+
+A bundle is output into a folder. Depending on platform, that folder may also be zip archived into an `.apk` or `.ipa`.
+The contents of the folder depends on the platform.
+
+Apart from the executable files, our bundling process also collects the required assets for the platform (e.g. the .xml resource files for Android).
+
+Using the [bundle_resources](https://defold.com/manuals/project-settings/#bundle-resources) setting, you can configure assets that should be placed within the bundle as-is.
+You can control this per platform.
+
+The game assets are located in the `game.arcd` file, and they are individually compressed using LZ4 compression.
+Using the [custom_resources](https://defold.com/manuals/project-settings/#custom-resources) setting, you can configure assets that should be placed (with compression) within the game.arcd.
+These assets can be accessed via the [sys.load_resource()](https://defold.com/ref/sys/#sys.load_resource) function.
+
+
+
+

BIN
docs/en/manuals/images/bundling/bundle_schematic_01.png


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

@@ -37,17 +37,24 @@ Enables compression of archives when bundling. Note that this currently applies
 A list of URLs to the project *Library URL*s. Refer to the [Libraries manual](/manuals/libraries/) for more information.
 
 #### Custom Resources
+`custom_resources`
 A comma separated list of resources that will be included in the project. If directories are specified, all files and directories in that directory are recursively included. The resources can be loaded using [`sys.load_resource()`](/ref/sys/#sys.load_resource).
 
 #### Bundle Resources
+`bundle_resources`
 A comma separated list of directories containing resource files and folders that should be copied as-is into the resulting package when bundling. The directories must be specified with an absolute path from the project root, for example `/res`. The resource directory must contain subfolders named by `platform`, or `architecure-platform`.
 
-  Supported platforms are `ios`, `android`, `osx`, `win32`, `linux`, `web`.
+Supported platforms are `ios`, `android`, `osx`, `win32`, `linux`, `web`, `switch`
 
-  A subfolder named `common` is also allowed, containing resource files common for all platforms.
+A subfolder named `common` is also allowed, containing resource files common for all platforms.
+
+Access to files within the the bundle resources is platform specific. The Lua module `io` is one way to do it. Care must be taken to have the correct file paths for the platform.
+(e.g. prefix using "file:///android_asset/" on Android)
 
 #### Bundle Exclude Resources
+`bundle_exclude_resources`
 A comma separated list of resources that should not be included in the bundle.
+That is, they're removed from the result of the collection of the `bundle_resources` step.
 
 ---
 
@@ -114,16 +121,16 @@ Check if the app should dynamically switch between portrait and landscape on dev
 ### Render
 
 #### Clear Color Red
-Clear color red channel, used by the render script and when the window is created. Added in 1.2.167.
+Clear color red channel, used by the render script and when the window is created.
 
 #### Clear Color Green
-Clear color green channel, used by the render script and when the window is created. Added in 1.2.167.
+Clear color green channel, used by the render script and when the window is created.
 
 #### Clear Color Blue
-Clear color blue channel, used by the render script and when the window is created. Added in 1.2.167.
+Clear color blue channel, used by the render script and when the window is created.
 
 #### Clear Color ALpha
-Clear color alpha channel, used by the render script and when the window is created. Added in 1.2.167.
+Clear color alpha channel, used by the render script and when the window is created.
 
 ---