TBR croupier: Changes needed to be up-to-date
Upgrades to vom81 compatible syncbase server and non-crashing discovery.
Flutter has changed where it placed flutter.mojo (now in a zip), so we
upload it to the cloud ourselves for easier shortcut access.
Change-Id: Iba90b4f2a5c4e410ee90616a958a7c88722a6492
diff --git a/.gitignore b/.gitignore
index f6910de..b3336a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@
# Don't commit the generated shortcut commands file.
shortcut_commands
+artifacts/
diff --git a/Makefile b/Makefile
index 63bb69c..86ed110 100644
--- a/Makefile
+++ b/Makefile
@@ -151,18 +151,26 @@
DISCOVERY_MOJO_DIR := $(PWD)/packages/v23discovery/mojo_services
GS_BUCKET_PATH := gs://mojo_services
+# TODO(alexfandrianto): Group services into same bucket subdirectory.
+# See https://github.com/vanadium/issues/issues/1156
# Note: The deploy assumes that the media_service.mojo file, which is used for
# audio, is already present at $(GS_BUCKET_PATH)/media_service.mojo.
# This file is developed separately from Croupier.
.PHONY: deploy
deploy: build
+ wget https://storage.googleapis.com/mojo_infra/flutter/9ee9721b1b0379da1dae7ed27243da7635d55a3a/android-arm/artifacts.zip
+ unzip artifacts.zip -d artifacts
gsutil cp $(APP_ICON) $(GS_BUCKET_PATH)/croupier
gsutil cp $(APP_FLX_FILE) $(GS_BUCKET_PATH)/croupier
+ gsutil cp $(PWD)/artifacts/flutter.mojo $(GS_BUCKET_PATH)/flutter
gsutil cp -r $(SYNCBASE_MOJO_DIR) $(GS_BUCKET_PATH)/syncbase
gsutil cp -r $(DISCOVERY_MOJO_DIR) $(GS_BUCKET_PATH)/v23discovery
gsutil -m acl set -R -a public-read $(GS_BUCKET_PATH)/croupier
+ gsutil -m acl set -R -a public-read $(GS_BUCKET_PATH)/flutter
gsutil -m acl set -R -a public-read $(GS_BUCKET_PATH)/syncbase
gsutil -m acl set -R -a public-read $(GS_BUCKET_PATH)/v23discovery
+ rm artifacts.zip
+ rm -r artifacts
CROUPIER_SHORTCUT_NAME := Croupier
CROUPIER_URL := mojo://storage.googleapis.com/mojo_services/croupier/croupier.flx
diff --git a/lib/main.dart b/lib/main.dart
index 8087ea3..3c091b6 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -53,7 +53,9 @@
SoundAssets _sounds = new SoundAssets(_bundle);
// Load sounds in parallel.
- await Future.wait([_sounds.load("whooshIn"), _sounds.load("whooshOut")]);
+ // TODO(alexfandrianto): Sound is turned off since it's not convenient to get
+ // HEAD Mojo Shell built with the media service.
+ //await Future.wait([_sounds.load("whooshIn"), _sounds.load("whooshOut")]);
return _sounds;
}
diff --git a/lib/src/syncbase/discovery_client.dart b/lib/src/syncbase/discovery_client.dart
index 050f963..672d413 100644
--- a/lib/src/syncbase/discovery_client.dart
+++ b/lib/src/syncbase/discovery_client.dart
@@ -46,7 +46,7 @@
discovery.Scanner scanner = await _discoveryClient.scan(query);
_scanners[key] = scanner;
- scanner.onUpdate.listen((discovery.Update update) {
+ scanner.onUpdate.listen((discovery.ScanUpdate update) {
if (update.updateType == discovery.UpdateType.found) {
onFound(update.service);
} else {
@@ -75,7 +75,6 @@
if (_advertisers.containsKey(key)) {
return _advertisers[key];
}
-
_advertisers[key] =
await _discoveryClient.advertise(service, visibility: visibility);
diff --git a/pubspec.lock b/pubspec.lock
index 6f073aa..0a088b1 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -4,7 +4,7 @@
analyzer:
description: analyzer
source: hosted
- version: "0.27.1+2"
+ version: "0.27.2"
archive:
description: archive
source: hosted
@@ -12,7 +12,7 @@
args:
description: args
source: hosted
- version: "0.13.3+1"
+ version: "0.13.3+3"
asn1lib:
description: asn1lib
source: hosted
@@ -126,7 +126,7 @@
intl:
description: intl
source: hosted
- version: "0.12.6"
+ version: "0.12.7"
logging:
description: logging
source: hosted
@@ -212,7 +212,7 @@
shelf_static:
description: shelf_static
source: hosted
- version: "0.2.3+2"
+ version: "0.2.3+3"
shelf_web_socket:
description: shelf_web_socket
source: hosted
@@ -244,7 +244,7 @@
stream_channel:
description: stream_channel
source: hosted
- version: "1.0.1"
+ version: "1.3.1"
string_scanner:
description: string_scanner
source: hosted
@@ -252,7 +252,7 @@
syncbase:
description: syncbase
source: hosted
- version: "0.0.28"
+ version: "0.0.29"
test:
description: test
source: hosted
@@ -268,11 +268,11 @@
v23discovery:
description: v23discovery
source: hosted
- version: "0.0.12"
+ version: "0.0.13"
vector_math:
description: vector_math
source: hosted
- version: "1.4.6"
+ version: "1.4.7"
watcher:
description: watcher
source: hosted
diff --git a/shortcut_template b/shortcut_template
index 37145a1..17ab9a8 100644
--- a/shortcut_template
+++ b/shortcut_template
@@ -1,4 +1,4 @@
---map-origin=http://flutter/=https://storage.googleapis.com/mojo/flutter/9ee9721b1b0379da1dae7ed27243da7635d55a3a/android-arm/
+--map-origin=http://flutter/=https://storage.googleapis.com/mojo_services/flutter/
--url-mappings=mojo:flutter=http://flutter/flutter.mojo,mojo:media_service=https://mojo3.v.io/media_service.mojo
--map-origin=https://mojo3.v.io=https://storage.googleapis.com/mojo_services/
--debug