Development of C++ apps on Linux is supported for:
Linux is one of the three available development platforms for You.i Platform. See Choose a Development Platform for a complete list of target platforms and associated development platforms.
If you’re developing a C++ app for Roku with You.i Roku Cloud, you’ll need Ubuntu 18.04.
The instructions below offer a detailed list of mandatory and optional installation components.
Before you get going, there are a few third-party tools to install.
We recommend using a package manager, such as apt-get
, to install Dynamic Kernel Module Support (DKMS), GCC, and OpenGL for Embedded Systems (GLES) rendering libraries.
If you’re using VirtualBox to run a Linux guest on a macOS or Windows host, you must install the DKMS package, which allows resolution scaling.
sudo apt-get install virtualbox-guest-dkms
You.i C++ projects on Linux require GCC 7.4.x to compile correctly.
To verify your default version of GCC, run gcc --version
.
If the displayed version is 7.4.x, you can install the next dependency as you don’t need to update GCC.
Otherwise, if the displayed version is not GCC 7.4.x, use apt-get to install and set GCC 7.4.x as the default version.
sudo apt-get update
sudo apt-get install build-essential software-properties-common gcc g++ -y
Confirm the installed GCC version using gcc --version
.
Install GLES rendering libraries to render 2D and 3D graphics.
sudo apt-get install xorg-dev libglu1-mesa-dev libxml2-dev
sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev
Install the recommended versions of Yarn, Watchman, Node.js, CMake, and Ruby (including ruby-build).
When installed, update your PATH variable to include the newly installed packages.
The following tools are optional, but most developers need them. We suggest you install them.
Install the You.i TV command line interface tool. Then, using your provided API key, install You.i Platform.
yarn global add youi-cli
youi-tv login # Enter your API key or user name when prompted.
youi-tv install 6.15.0 # If asked, accept most recent version of Babel or other dependencies
Our CLI comes with a special command, youi-tv doctor
, that verifies the availability and versions of third party tools on your system.
Use youi-tv doctor
to identify any dependency mismatches.
Install any missing tools or versions and run doctor again to verify.
If you’re not planning to develop for a given platform, don’t worry too much about its requirements for now.
Just remember the youi-tv doctor
command and run it again if you expand your target platforms.
You can always use youi-tv doctor --help
to get more information about doctor.
Congratulations, you’ve completed the You.i Platform installation for your development platform.
If you’re creating a Roku app, you need to configure environment variables.
Now you can build and generate your first app.