* build: @jasonetco said that this will make codespaces work * tmp * Codespaces * Update docker-compose.yml * Update docker-compose.yml * tada? * e use * do not use pizza... * point at correct goma file * use ghcr for codespaces * pass --yes to npx * build: use auth.notgoma codespace token auth to auto-auth goma * build: move build-tools set up to Dockerfile * build: provide default extensions list * Fix locale tests * add vnc support * use prebuilt devcontainer image * update docker images * update docker images * update docker images * add docs for codespaces * chore: update docker images * build: do not overwrite modified buildtools configs on container rebuilds * use gn language server * update docker images * update docker images * fill in missing links Co-authored-by: Codespaces <codespaces@github.com>
2.1 KiB
Electron Dev on Codespaces
Welcome to the Codespaces Electron Developer Environment.
Quick Start
Upon creation of your codespace you should have build tools installed and an initialized gclient checkout of Electron. In order to build electron you'll need to run the following commands.
e sync -vv
e build
The initial sync will take approximately ~30 minutes and the build will take ~8 minutes. Incremental syncs and incremental builds are substantially quicker.
Directory Structure
Codespaces doesn't lean very well into gclient based checkouts, the directory structure is slightly strange. There are two locations for the electron
checkout that both map to the same files under the hood.
# Primary gclient checkout container
/workspaces/gclient/*
└─ src/* - # Chromium checkout
└─ electron - # Electron checkout
# Symlinked Electron checkout (identical to the above)
/workspaces/electron
Goma
If you are a maintainer with Goma access it should be automatically configured and authenticated when you spin up a new codespaces instance. You can validate this by checking e d goma_auth info
or by checking that your build-tools configuration has a goma mode of cluster
.
Running Electron
You can run Electron in a few ways. If you just want to see if it launches:
# Enter an interactive JS prompt headlessly
xvfb-run e start -i
But if you want to actually see Electron you will need to use the built-in VNC capability. If you click "Ports" in codespaces and then open the VNC web client
forwarded port you should see a web based VNC portal in your browser. When you are asked for a password use builduser
.
Once in the VNC UI you can open Applications -> System -> XTerm
which will open a VNC based terminal app and then you can run e start
like normal and Electron will open in your VNC session.
Running Tests
You run tests via build-tools and xvfb
.
# Run all tests
xvfb-run e test
# Run the main process tests
xvfb-run e test --runners=main
# Run the old remote tests
xvfb-run e test --runners=remote