Quick start
How to set up the development environment
Execute the following steps to bootstrap your development environment. At the end of the tutorial, you'll run the whitelabel Deltatre App within your local Roku device.
1. Development environment setup
-
VSCode (Text Editor/ IDE)
-
VSCode extension BrightScript Language
-
Roku device in Developer mode.
2. Create and clone your repository from the d3studio template
-
Visit your organization's GitHub page.
-
Click on the New button to create a repository.
-
Choose d3studio-roku-template from the Repository template dropdown.
-
Enter a Repository name (ie. using the following naming convention
client-x-roku), add a Description, adjust visibility, then click Create repository. -
Open a terminal and clone the just created repository locally:
git clone <repository-url>
-
Open the local project in VSCode and perform a codebase search for these markers:
- Replace
readable_project_namewith the actual project name (i.e.,Client X) - Replace
project_codewith the actual project code name (i.e.,clientxwith no spaces and letters only) - Replace
project_file_name_prefixwith the package application name prefix (i.e.,Client_xcan support spaces, dashes, and underscores) - Replace
repo-namewith the project's GitHub name (i.e.,client-x-rokushould match the GitHub repo name; convention is to include the platform) - Also rename the
project/project_codefolder with the actual project code name (ie.project/clientx)
- Replace
3. Generate the GitHub PAT (Personal Access Token)
-
Access to the core project
- Confirm you have (or request) read access to the
d3studio-roku(core) project.
- Confirm you have (or request) read access to the
-
Navigate to GitHub Developer Settings
- Open GitHub Developer Settings.
- Click "Generate new token"
-
Configure Token Settings
- Name the token (e.g., "
{project_code}_PAT"). - Set Resource owner
deltatre-vxp. - Set an expiration date (recommended for security).
- Set Repository access Only select repositories:
{repo-name}-rokuandd3studio-roku. - Select the necessary permissions (scopes):
- Repository permissions:
Read and Write accessto actions, contents, and environmentsRead accessto codespaces metadata and metadata
- Organization permissions:
Read and Write accessto custom properties
- Repository permissions:
- Name the token (e.g., "
-
Generate and store the Token
- Click "Generate token".
- Copy and store the token
- In the
d3studio-roku(core) project Actions secrets and variables, use the{project_code}_PATnaming convention. - In the
project_code(shell) projectActions secrets and variables, use the{project_code}_PATnaming convention. - Store the token on your local drive as it will be needed to configure the
project_code(shell) project
4. Installing tooling and dependencies
-
Install the Node tools and dependencies:
Within a Command line tool (
bash), navigate to the cloned project root folder locally and run:npm installAlso, within the same folder, run:
npm run vscode setup -
Within the project, open the newly created
.envfile in VSCode and update the following params:- Replace
{YOUR_ROKU_DEVICE_DEV_PASSWORD}with your Dev enabled Roku device Dev password - Replace
{YOUR_ROKU_DEVICE_IP_ADDRESS}with your Dev enabled Roku device IP address - Replace
{YOUR_MAC_PC_LINUX_IP_ADDRESS}with your development machine IP address. This enables Charles' proxy support. Note: Comment/uncomment this line to enable/disable the Charles support. - Replace
{YOUR_GITHUB_PERSONAL_ACCESS_TOKEN}with your Personal Access Token.
- Replace
-
Checkout a specific
d3studio-roku(core) project versionOpen
d3studio-rokucore project tags or releases Url and make a note of the tag version you would like to support on your shell project. (ie.D3studio-Roku 1.0.0is tagged at1.0.259)To checkout that core project version, within the Command line tool (
bash), navigate to the cloned project root folder locally and run:npm run update:coreApp -- --tagName 1.0.259The
coreAppscript will checkout the following folders based on thattagNameversion:- /lib
- /project/common
- /src
Note: Folders above are blocked from source control changes (
.gitignore) and show up in a VSCode codebase-wide search. They're not intended to be editable. You can make local changes to diagnose bugs. Any permanent changes must be made to thed3studio-roku(core) project codebase.For Continuous integration (CI) builds, the
tagNameis stored inActions secrets and variablesunderREF_APP_TAG_NAME.
5. Run the project
Sideload the project to your Roku device via Run and Debug menu in VSCode. The enviroment defaults to Axis Stable.