Set default values for webrtc related flags
- Disable the vnc server by default if --start_webrtc is provided
- The build process produces the webrtc assets and certs as artifacts,
which in turn allows to add them to the cvd host package
- Provide default paths for the webrtc assets and certs
Bug: 141887532
Test: launch_cvd -start_webrtc -webrtc_public_ip=127.0.0.1
Change-Id: I09b136c47dacd8dc0bf23ab42620a3f37f9d0313
diff --git a/host_package.mk b/host_package.mk
index 2aa5c93..8c1d134 100644
--- a/host_package.mk
+++ b/host_package.mk
@@ -14,6 +14,7 @@
bin_path := $(notdir $(HOST_OUT_EXECUTABLES))
lib_path := $(notdir $(HOST_OUT_SHARED_LIBRARIES))
tests_path := $(notdir $(HOST_OUT_NATIVE_TESTS))
+webrtc_files_path := usr/share/webrtc
cvd_host_executables := \
adb \
@@ -82,11 +83,27 @@
libyuv.so \
libjpeg.so \
+webrtc_assets := \
+ index.html \
+ style.css \
+ js/receive.js \
+ js/logcat.js \
+
+webrtc_certs := \
+ server.crt \
+ server.key \
+ server.p12 \
+ trusted.pem \
+
+cvd_host_webrtc_files := \
+ $(addprefix assets/,$(webrtc_assets)) \
+ $(addprefix certs/,$(webrtc_certs)) \
cvd_host_package_files := \
$(addprefix $(bin_path)/,$(cvd_host_executables)) \
$(addprefix $(lib_path)/,$(cvd_host_shared_libraries)) \
$(foreach test,$(cvd_host_tests), ${tests_path}/$(test)/$(test)) \
+ $(addprefix $(webrtc_files_path)/,$(cvd_host_webrtc_files)) \
$(cvd_host_package_tar): PRIVATE_FILES := $(cvd_host_package_files)
$(cvd_host_package_tar): $(addprefix $(HOST_OUT)/,$(cvd_host_package_files))