Command-line tools
Routine workflows need only build.py. Below are automatic incremental entry points, followed by advanced commands for individual examples and external projects.
Default: automatic discovery and incremental builds#
See the build guide for routine automatic, single-side, watch, and project-listing commands. This page covers selected examples, external projects, standalone packaging, and toolchains.
Advanced: build selected glasses examples#
Run these commands from the complete toolkit root. Default builds already cover these examples; use them only to narrow the build scope. On Windows, replace python3 with py.
python3 GlassSDK/build.py build --example game/breakout
python3 GlassSDK/build.py build --example web_bridge
python3 GlassSDK/build.py build --example display_control_labAdvanced: build an external glasses project#
python3 GlassSDK/build.py build --project /work/my-plugin --source-root /work --include-dir /work/shared/includeAdvanced: manually package any static Web directory#
Run these commands from the complete toolkit root. Prefer automatic build.py for PhoneSDK/examples projects. Call this tool directly only for standalone static-output packaging.
The input directory must contain manifest.json and the file referenced by entry. Framework projects must run their npm run build first, then use dist as input. Write the output MMPKG outside the input directory.
node PhoneSDK/tools/build-mmpkg.mjs PhoneSDK/examples/hello-web PhoneSDK/dist/hello-web-0.1.0.mmpkgCheck the compiler and clean the build cache#
Run from the complete toolkit root. toolchain prints the actual RISC-V GCC version and may download the toolchain on first use. clean removes temporary build files but retains existing GMP files. Rebuild afterward; an old GMP is not a new post-clean output.
python3 GlassSDK/build.py toolchain
# Clear the SDK example build cache, then rebuild Breakout.
python3 GlassSDK/build.py clean
python3 GlassSDK/build.py build --example game/breakoutReference files in the toolkit#
- GlassSDK/build.py
- PhoneSDK/build.py
- PhoneSDK/tools/build-mmpkg.mjs