CDT Cloud Blueprint is a template for building custom web-based C/C++ tools. It is made up of existing open source components and can be easily downloaded and installed on all major operating system platforms.
Visit the CDT Cloud website for more information.
- Eclipse Public License 2.0
- 一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception
CDT Cloud Blueprint is a template for building custom web-based C/C++ tools. It is made up of existing open source components and can be easily downloaded and installed on all major operating system platforms.
CDT Cloud Blueprint is not a production-ready product. Therefore, it is also not meant to be a replacement for Visual Studio Code or any other IDE.
CDT Cloud Blueprint is in an early alpha state and undergoing active development. See this milestone for release 1.0.
CDT Cloud Blueprint is based on Eclipse Theia Blueprint.
Please check Theia's prerequisites, and keep node versions aligned between CDT Cloud Blueprint and that of the referenced Theia version.
Documentation on how to package Theia as a Desktop Product may be found here
- Root level configures mono-repo build with lerna
applications
groups the different app targetsbrowser
contains a browser based version of Eclipse Theia Blueprint that may be packaged as a Docker imageelectron
contains the Electron app to package, packaging configuration, and E2E tests for the Electron target.
theia-extensions
groups the various custom theia extensions for Blueprintproduct
contains a Theia extension contributing the product branding (about dialogue and welcome page).updater
contains a Theia extension contributing the update mechanism and corresponding UI elements (based on the Electron updater).launcher
contains a Theia extension contributing, for AppImage applications, the option to create a script that allows to start blueprint from the command line by calling the 'theia' command.
This repository contains three application variants: browser, Docker and Electron. Below are instructions for building each variant.
First, download the necessary dependencies, VS Code extensions, and tracecompass-server. This step is not necessary when building the Docker image.
yarn setup
The setup
script runs these scripts, which can also be executed individually:
yarn
yarn build:extensions
yarn download:plugins
yarn tracecompass-server:download
Note: Downloading plugins and tracecompass-server is optional but recommended for full functionality.
In the Docker-based development environment, this step is automated.
The Electron application is the main product of CDT Cloud Blueprint.
yarn electron build
yarn electron start
Packaging the Electron application produces an installer or standalone executable for the current platform.
yarn package:applications
# or (if the trace-compass server was already downloaded)
yarn electron package
The packaged application is located in applications/electron/dist
.
Generate a preview of the Electron application directory without packaging, useful for directory layout debugging.
yarn package:applications:preview
# or (if the trace-compass server was already downloaded)
yarn electron package:preview
Locate the preview in applications/electron/dist
.
A variant of CDT Cloud Blueprint that runs in the browser.
yarn browser build
yarn browser start
The application will be available at http://localhost:3000/
The browser variant of the application packaged in a reproducible environment with all the required dependencies and tools. Ideal for testing the application without setting up any prerequisites or for cloud use cases.
docker build -t cdt-cloud-blueprint:latest .
docker run -it -p 0.0.0.0:3000:3000 cdt-cloud-blueprint:latest
The application will be available at http://localhost:3000/
Transpile the sources and build all three applications (browser, Docker and Electron) with one script. Useful for preparing all three variants for testing. Note that the build process may be time-consuming.
For development and casual testing of Blueprint, build CDT Cloud Blueprint in "dev" mode. This permits building Blueprint on systems with less resources, like a Raspberry Pi. Note that minification is turned off then.
yarn build:dev
For production Blueprint applications use:
yarn build
- Install the Remote Dev extension pack in VS Code
- Open this repository in VS Code
- Confirm to open this folder in the remote container when prompted.
- Once VS Code is opened in the container and the
Configuring Dev Container
task is finished, runyarn browser start
in the container's terminal to start the CDT Cloud Blueprint backend. - Access CDT Cloud Blueprint at 127.0.0.1:3000 from the host.
Make changes to the source code and rebuild with yarn build:extensions && yarn browser build
or run yarn watch
beforehand.
After a browser refresh, the changes should take effect.
The E2E tests basic UI tests of the actual application. This is done based on the preview of the packaged application.
yarn electron package:preview
yarn electron test
- To use the trace view, download and start the TraceCompassServer
- Example traces can be found here: TraceCompassTutorialTraces
- An example workspace including a trace can be found here
- Clangd contexts also provides an example workspace, see here.
The features in CDT Cloud Blueprint are based on Theia and the included extensions/plugins. For bugs in Theia please consider opening an issue in the Theia project on Github. CDT Cloud Blueprint only packages existing functionality into a product and installers for the product. If you believe there is a mistake in packaging, something needs to be added to the packaging or the installers do not work properly, please open an issue on Github to let us know.