Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/en/manuals/bob.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Compatible OpenJDK 25 mirrors (from Defold 1.12.0):

If you are on Windows you want the `.msi` file installer for OpenJDK.

Legacy Live Update manifest-signing flags `--manifest-private-key` and `--manifest-public-key` have been removed from Bob. The `publickey` and `privatekey` entries in `liveupdate.settings` are now deprecated and unused, `game.public.der` is no longer generated or bundled, and the deprecated manifest/archive validation flow now checks supported engine versions instead of bundled key signatures.

## Usage

Bob is run from a shell or from the command line by invoking `java` (or `java.exe` on Windows) and providing the bob java archive as argument:
Expand Down Expand Up @@ -84,10 +86,6 @@ usage: bob [options] [commands]
keystore (Android)
-l,--liveupdate <arg> Yes if liveupdate content should
be published
--manifest-private-key <arg> Private key to use when signing
manifest and archive.
--manifest-public-key <arg> Public key to use when signing
manifest and archive.
--max-cpu-threads <arg> Max count of threads that bob.jar
can use
-mp,--mobileprovisioning <arg> mobileprovisioning profile (iOS)
Expand Down
40 changes: 35 additions & 5 deletions docs/en/manuals/live-update-scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ The api only consists of a few functions:
* `liveupdate.remove_mount()`
* `liveupdate.get_mounts()`.

::: important
The legacy single-resource Live Update flow is deprecated. Avoid `collectionproxy.missing_resources()` and the old `resource.*` helper aliases in new code. Current Live Update workflows download and mount whole archives, optionally using `collectionproxy.get_resources()` to inspect which excluded content belongs to a proxy.
:::

## Get mounts

If you are using more than one live update archive, it is recommended to loop over each mount
Expand Down Expand Up @@ -48,7 +52,21 @@ end

A collection proxy that has been excluded from bundling works as a normal collection proxy, with one important difference. Sending it a `load` message while it still has resources not available in the bundle storage will cause it to fail.

So before we send it a `load`, we need to check if there are any missing resources. If there are, we have to download the archive containing those assets and then store it.
In the current archive-based workflow, you generally decide which archive or archives a proxy needs ahead of time and mount them before loading. If you need to inspect whether a proxy has excluded content, use `collectionproxy.get_resources()`. The older `collectionproxy.missing_resources()` function belongs to the deprecated single-resource Live Update flow.

With *Strip Live Update Entries from Main Manifest* enabled, which is the default when publishing archive-based Live Update content:

* If no mounted archive contains the proxy's excluded content, `collectionproxy.get_resources("#proxy")` returns an empty table `{}`.
* After the relevant archive has been mounted, `collectionproxy.get_resources("#proxy")` returns a non-empty table of resource hashes for that proxy, for example:

```lua
{
"a1b2c3...",
"d4e5f6...",
"7890ab...",
...
}
```

The following example code assumes that the resources are available via the url specified in the setting `game.http_url`.

Expand Down Expand Up @@ -76,6 +94,15 @@ local function mount_zip(self, name, priority, path, callback)
end)
end

local function has_mount(name)
for _, mount in ipairs(liveupdate.get_mounts()) do
if mount.name == name then
return true
end
end
return false
end

function init(self)
self.http_url = sys.get_config_string("game.http_url", nil) -- <2>

Expand All @@ -88,9 +115,12 @@ end

function on_message(self, message_id, message, sender)
if message_id == hash("load_level") then
local missing_resources = collectionproxy.missing_resources("#" .. message.level) -- <5>
local proxy_resources = collectionproxy.get_resources("#" .. message.level) -- <5>

if #missing_resources then
-- With Strip Live Update Entries from Main Manifest enabled, this table is
-- empty until the relevant archive is mounted. After mounting, it contains
-- the resource hashes belonging to the proxy.
if message.info and #proxy_resources == 0 and not has_mount(message.info.name) then
msg.post("#", "download_archive", message) -- <6>
else
msg.post("#" .. message.level, "load")
Expand Down Expand Up @@ -125,8 +155,8 @@ The mount info is stored and will be automatically re-added upon next engine res
2. You need to store the archive online (e.g. on S3), where you can download it from.
3. Given a collection proxy name, you need to figure our which archive(s) to download, and how to mount them
4. At startup, we try to load the level.
5. Check if the collection proxy has all resources available.
6. If there are resources missing, then we need to download the archive and mount it.
5. Use `collectionproxy.get_resources()` to inspect the proxy's excluded content. With the default stripped-manifest setting enabled, it returns `{}` until the relevant archive is mounted, and a non-empty table of resource hashes after mounting.
6. If the proxy uses Live Update content and the matching archive is not mounted yet, we download and mount it before loading the proxy.
7. Make a http request and download the archive to `download_path`
8. The data is downloaded, and it's time to mount it to the running engine.

Expand Down
12 changes: 11 additions & 1 deletion docs/en/manuals/live-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ To bundle with Live update is easy. Select <kbd>Project ▸ Bundle ▸ ...</kbd>

![Bundle Live application](images/live-update/bundle-app.png)

When bundling, any excluded resource will be left out of the application bundle. By checking the *Publish Live update content* checkbox, you tell Defold to either upload the excluded resources to Amazon or to create a Zip archive, depending on how you have set up your Live update settings (see above). The manifest file for the bundle will also be included in the excluded resources.
When bundling, any excluded resource will be left out of the application bundle. By checking the *Publish Live update content* checkbox, you tell Defold to either upload the excluded resources to Amazon or to create a Zip archive, depending on how you have set up your Live update settings (see above). The published Live Update content still includes `liveupdate.game.dmanifest`, which contains the full resource list needed for remote delivery.

When publishing archive-based Live Update content, *Strip Live Update Entries from Main Manifest* (`liveupdate.exclude_entries_from_main_manifest`) is enabled by default. With this setting enabled, Live Update-only resources are removed from the bundled `game.dmanifest`, which reduces bundle size and runtime memory usage. Disable it only if you need the deprecated behavior where excluded entries remain in the bundled `game.dmanifest`.

With the default setting enabled, `collectionproxy.get_resources()` returns `{}` until the relevant archive has been mounted. After mounting, it returns the resource hashes for that proxy.

Click *Package* and select a location for the application bundle. Now you can start the application and check that everything works as expected.

Expand Down Expand Up @@ -131,6 +135,12 @@ Mounting an archive doesn't copy or move the archive. The engine only stores the
To actually use the live update content, you need to download and mount the data to your game.
Read more about about how to [script with live update here](/manuals/live-update-scripting).

::: important
The legacy single-resource Live Update flow is deprecated. Avoid `collectionproxy.missing_resources()`, the deprecated manifest APIs (`liveupdate.get_current_manifest()`, `liveupdate.store_resource()`, `liveupdate.store_manifest()`, `liveupdate.store_archive()`, `liveupdate.is_using_liveupdate_data()`), and the old `resource.*` helper aliases (`resource.get_current_manifest()`, `resource.store_resource()`, `resource.store_manifest()`, `resource.store_archive()`, `resource.is_using_liveupdate_data()`) in new projects.

Current projects should publish archives, mount them with `liveupdate.add_mount()`, manage them with `liveupdate.get_mounts()` and `liveupdate.remove_mount()`, and use `collectionproxy.get_resources()` when they need to inspect excluded content for a proxy. Legacy manifest-signing keys are no longer part of this pipeline: `liveupdate.settings` `publickey` and `privatekey` are deprecated and unused, and `game.public.der` is no longer generated or bundled.
:::

## Development caveats

Debugging
Expand Down
6 changes: 2 additions & 4 deletions docs/ko/manuals/bob.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ title: Defold manual
# Bob the builder
Bob은 에디터 외부에서 Defold 프로젝트를 빌드하기 위한 도구입니다. 이 메뉴얼은 이 도구를 사용하는 방법에 대해 설명합니다.

예전 Live Update 매니페스트 서명 옵션인 `--manifest-private-key` 와 `--manifest-public-key` 는 Bob에서 제거되었습니다. `liveupdate.settings` 의 `publickey` 와 `privatekey` 항목도 이제는 폐기되었으며 더 이상 사용되지 않고, `game.public.der` 파일도 더 이상 생성되거나 번들에 포함되지 않습니다. 또한 예전 매니페스트/아카이브 검증 흐름은 번들된 키 서명 대신 지원되는 엔진 버전만 확인합니다.

## Overview
Bob은 데이터를 빌드(에디터에서 **Project ▸ Build And Launch** 선택하는 것에 해당함)하고 압축하고 독립(standalone) 및 배포 가능한 어플리케이션 번들을 생성(에디터에서 **Project ▸ Bundle ▸ \*** 을 선택하는 것에 해당함)할 수 있습니다.

Expand Down Expand Up @@ -76,10 +78,6 @@ usage: bob [options] [commands]
keystore (Android)
-l,--liveupdate <arg> Yes if liveupdate content should
be published
--manifest-private-key <arg> Private key to use when signing
manifest and archive.
--manifest-public-key <arg> Public key to use when signing
manifest and archive.
--max-cpu-threads <arg> Max count of threads that bob.jar
can use
-mp,--mobileprovisioning <arg> mobileprovisioning profile (iOS)
Expand Down
Loading
Loading