Skip to content

Commit d3fbf48

Browse files
committed
update lu info
1 parent 623e24a commit d3fbf48

10 files changed

Lines changed: 310 additions & 238 deletions

File tree

docs/en/manuals/bob.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Compatible OpenJDK 25 mirrors (from Defold 1.12.0):
1717

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

20+
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.
21+
2022
## Usage
2123

2224
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:
@@ -84,10 +86,6 @@ usage: bob [options] [commands]
8486
keystore (Android)
8587
-l,--liveupdate <arg> Yes if liveupdate content should
8688
be published
87-
--manifest-private-key <arg> Private key to use when signing
88-
manifest and archive.
89-
--manifest-public-key <arg> Public key to use when signing
90-
manifest and archive.
9189
--max-cpu-threads <arg> Max count of threads that bob.jar
9290
can use
9391
-mp,--mobileprovisioning <arg> mobileprovisioning profile (iOS)

docs/en/manuals/live-update-scripting.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ The api only consists of a few functions:
1111
* `liveupdate.remove_mount()`
1212
* `liveupdate.get_mounts()`.
1313

14+
::: important
15+
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.
16+
:::
17+
1418
## Get mounts
1519

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

4953
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.
5054

51-
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.
55+
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.
56+
57+
With *Strip Live Update Entries from Main Manifest* enabled, which is the default when publishing archive-based Live Update content:
58+
59+
* If no mounted archive contains the proxy's excluded content, `collectionproxy.get_resources("#proxy")` returns an empty table `{}`.
60+
* After the relevant archive has been mounted, `collectionproxy.get_resources("#proxy")` returns a non-empty table of resource hashes for that proxy, for example:
61+
62+
```lua
63+
{
64+
"a1b2c3...",
65+
"d4e5f6...",
66+
"7890ab...",
67+
...
68+
}
69+
```
5270

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

@@ -76,6 +94,15 @@ local function mount_zip(self, name, priority, path, callback)
7694
end)
7795
end
7896

97+
local function has_mount(name)
98+
for _, mount in ipairs(liveupdate.get_mounts()) do
99+
if mount.name == name then
100+
return true
101+
end
102+
end
103+
return false
104+
end
105+
79106
function init(self)
80107
self.http_url = sys.get_config_string("game.http_url", nil) -- <2>
81108

@@ -88,9 +115,12 @@ end
88115

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

93-
if #missing_resources then
120+
-- With Strip Live Update Entries from Main Manifest enabled, this table is
121+
-- empty until the relevant archive is mounted. After mounting, it contains
122+
-- the resource hashes belonging to the proxy.
123+
if message.info and #proxy_resources == 0 and not has_mount(message.info.name) then
94124
msg.post("#", "download_archive", message) -- <6>
95125
else
96126
msg.post("#" .. message.level, "load")
@@ -125,8 +155,8 @@ The mount info is stored and will be automatically re-added upon next engine res
125155
2. You need to store the archive online (e.g. on S3), where you can download it from.
126156
3. Given a collection proxy name, you need to figure our which archive(s) to download, and how to mount them
127157
4. At startup, we try to load the level.
128-
5. Check if the collection proxy has all resources available.
129-
6. If there are resources missing, then we need to download the archive and mount it.
158+
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.
159+
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.
130160
7. Make a http request and download the archive to `download_path`
131161
8. The data is downloaded, and it's time to mount it to the running engine.
132162

docs/en/manuals/live-update.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ To bundle with Live update is easy. Select <kbd>Project ▸ Bundle ▸ ...</kbd>
6464

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

67-
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.
67+
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.
68+
69+
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`.
70+
71+
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.
6872

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

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

138+
::: important
139+
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.
140+
141+
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.
142+
:::
143+
134144
## Development caveats
135145

136146
Debugging

docs/ko/manuals/bob.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ title: Defold manual
55
# Bob the builder
66
Bob은 에디터 외부에서 Defold 프로젝트를 빌드하기 위한 도구입니다. 이 메뉴얼은 이 도구를 사용하는 방법에 대해 설명합니다.
77

8+
예전 Live Update 매니페스트 서명 옵션인 `--manifest-private-key``--manifest-public-key` 는 Bob에서 제거되었습니다. `liveupdate.settings``publickey``privatekey` 항목도 이제는 폐기되었으며 더 이상 사용되지 않고, `game.public.der` 파일도 더 이상 생성되거나 번들에 포함되지 않습니다. 또한 예전 매니페스트/아카이브 검증 흐름은 번들된 키 서명 대신 지원되는 엔진 버전만 확인합니다.
9+
810
## Overview
911
Bob은 데이터를 빌드(에디터에서 **Project ▸ Build And Launch** 선택하는 것에 해당함)하고 압축하고 독립(standalone) 및 배포 가능한 어플리케이션 번들을 생성(에디터에서 **Project ▸ Bundle ▸ \*** 을 선택하는 것에 해당함)할 수 있습니다.
1012

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

0 commit comments

Comments
 (0)