Development environment setup

This page will describe how to setup the development environment for developing/contribution on the CosmOS reference project. The guide will focus on installing the environment on a windows system but since we are using docker containers and VSCode it should work on most operating systems.

Prerequisites

First time code checkout

  1. Clone the dev environment repository by either downloading the zip from github or using this git command:
    git clone https://github.com/CosmOS-Creators/dev_environment.git
    
  2. Open the VSCode workspace.

  3. Install the recommended VSCode plugins.

  4. You now have two choices:
    1. Run with GUI support:
      • If you want to also run any graphical applications (like CustomBox) from the docker container make sure that you have WSLg installed if you are on windows.

      • Open the file .devcontainer/dev_container_GUI.yaml

      • If you are on windows make sure that under volumes the path on the left of the : symbol matches your particular installed WSL distro. The default one is set to Ubuntu-20.04

        If you are on linux you should be able to just mount it to the same location as it is mounted to inside the container.

    2. Run without GUI support:
      • Open the file .devcontainer/devcontainer.json and make sure that the property dockerComposeFile is set to use the dev_container.yaml file

  5. VSCode should ask you now if you would like to reopen the workspace in a new docker container. Select reopen in container:
    Reopen in container message
  6. After VSCode reopens open a new terminal window and run the following command:
    git clone https://github.com/CosmOS-Creators/reference_project_stmIDE.git . --recurse-submodules
    git submodule foreach git checkout master
    
  7. Now you might need to select workspace folder location inside the docker container in VSCode or you can also just close and reopen VSCode in order for it to to it for you.