Merge "Load wayland proto definitions if available otherwise load stubs" into rvc-dev am: 2e4598b0c9 am: 54c3f9033c am: a97edef6ee

Change-Id: I75fc935b12c9fcfabdb38273d977f26479992ca5
This commit is contained in:
TreeHugger Robot
2020-05-20 18:30:20 +00:00
committed by Automerger Merge Worker
2 changed files with 5 additions and 4 deletions

View File

@@ -19,5 +19,4 @@ contain the proto definitions for their internal states.
### Building with internal extensions
Internal paths in vendor/ which are not available in AOSP must be replaced by
stub files. Actual path can be optionally picked up using env args. For
example, to pick up Wayland support, run `WAYLAND=yes yarn run dev`
stub files. See getWaylandSafePath for an example

View File

@@ -14,14 +14,16 @@
* limitations under the License.
*/
const fs = require('fs');
var path = require('path')
var webpack = require('webpack')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin')
function getWaylandSafePath() {
if (process.env.WAYLAND) {
return path.resolve(__dirname, '../../../vendor/google_arc/libs/wayland_service');
waylandPath = path.resolve(__dirname, '../../../vendor/google_arc/libs/wayland_service');
if (fs.existsSync(waylandPath)) {
return waylandPath;
}
return path.resolve(__dirname, 'src/stubs');
}