Development environment
Install the build tools on your computer and confirm that their commands run in the terminal.
What to install#
Use this page when you start writing, changing or rebuilding plugins. To try the prebuilt examples in a complete toolkit, open desktop Studio first; you do not need this build environment yet.
For glasses-only C development, prepare Python, source-packaging dependencies and desktop Studio. Install Node.js and npm when starting the Web tutorial or building the complete toolkit. The Web tutorial also builds the glasses bridge plugin, so it still requires the Python dependencies.
Run the version checks on this page first. Existing tools that meet the requirements can be reused. If installation is needed, choose the release for your OS from the official links below and reopen the terminal afterward.
| Tools | Purpose | Requirement |
|---|---|---|
| Python | Run SDK build scripts | The SDK requires Python 3.8 or later. For a new installation, choose an officially maintained stable Python 3 release. |
| Node.js and npm | Web plugin and MMPKG packaging | PhoneSDK requires Node.js 18 or later. For a new installation, choose an official LTS release. Framework projects must also satisfy their own engines requirements. npm is installed with Node.js. |
| RISC-V GCC、CMake、Ninja | Build glasses GMP | GlassSDK installs missing tools and reuses cached ones. You do not need to configure a separate system C compiler. |
| PyNaCl | Generate encrypted source-review sidecars for glasses plugins | Install using the commands below. This dependency is needed for glasses C plugins and the glasses bridge plugin used in the Web tutorial. |
Windows: open PowerShell#
- Open the downloaded plugin-open-platform folder in File Explorer and confirm that it contains GlassSDK, PhoneSDK, Studio and build.py.
- Click the File Explorer address bar, type powershell and press Enter to open PowerShell in this folder. Alternatively, open a terminal with Win+X and use cd to enter your directory.
- The path below is an example; replace it with your actual directory. Run one line at a time and confirm that Python prints a version and dependency installation finishes without errors.
cd "C:\MemoMind\plugin-open-platform"
py --version
py -m pip install -r GlassSDK/build-host/tools/requirements-review.txtmacOS / Linux: open a terminal#
Replace /path/to/plugin-open-platform with your directory. Continue building once dependencies install successfully. If you see externally-managed-environment, use the virtual-environment commands in the next section.
cd /path/to/plugin-open-platform
python3 --version
python3 -m pip install -r GlassSDK/build-host/tools/requirements-review.txtmacOS / Linux: when system Python restricts installation#
Remain in the complete toolkit root. These commands create and activate a project-specific Python environment, then reinstall the dependencies. Use them when system installation is restricted or you want isolated dependencies.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r GlassSDK/build-host/tools/requirements-review.txtCheck Node.js and npm when starting Web development#
Skip this section for glasses-only C examples. For the complete toolkit build or Web tutorial, confirm that both commands below print versions. The PhoneSDK build script handles each Web project's npm dependencies.
node --version
npm --versionCheck your terminal working directory#
The toolkit root contains GlassSDK, PhoneSDK, Studio and build.py together. Check your location with Get-Location on Windows or pwd on macOS/Linux, and list files with dir or ls. Quote paths containing spaces.
Run commands in the terminal; save JSON, HTML and JavaScript in the files specified by the tutorial. Copy the code-block contents without shell prompts such as PS C:\...>, $ or >>>. If you enter Python's >>> interactive prompt, run exit() to return to the terminal.
This page and both from-scratch tutorials run commands from the toolkit root. Detailed examples such as Breakout explicitly tell you when to enter an SDK subdirectory. Check your location when switching tutorials. Use cd .. to return to the root only if you are already inside GlassSDK or PhoneSDK.
Choose a complete tutorial once your tools are ready#
From the toolkit root, use the command below to check the glasses build environment, including the existing bridge plugin used by the Web path. The first run builds discovered glasses examples. Alternatively, start your chosen tutorial and build after creating your project.
Once both sides' tools are ready, run ./build.py at the root (py build.py on Windows) to build the whole toolkit automatically. Use the same command after later code changes.
macOS / Linux
./build.py glassWindows PowerShell
py build.py glassReference files in the toolkit#
- README.md
- GlassSDK/README.md
- PhoneSDK/README.md