-
-
Notifications
You must be signed in to change notification settings - Fork 21
Development Guide
Important
The following method is the most recommended for all Samsung TV developers, regardless of which version of Tizen you use.
This section guides you through compiling the Moonlight application source code within a controlled Docker environment and preparing it for deployment. Once you have forked and cloned the repository locally, you must first ensure you meet the necessary prerequisites before proceeding. Follow these steps to build the Docker image, install the application, and launch it on the connected device.
Note
Before proceeding further with building the Moonlight app, you must have already installed WSL 2 and Docker Desktop on your system.
- Enable the Developer mode and find the TV IP Address on your Samsung TV by following these steps from the installation guide.
- Now, you need to run Docker Desktop and make sure to close any resource intensive applications.
- Open Windows PowerShell or a similar terminal depending on your OS, then change directory to the location where your repository is located:
cd ~/Documents/GitHub/moonlight-tizenNote: If you are using Docker Desktop on a Mac with a silicon chip (M1/M2 etc), then you should change the first line in the Dockerfile to
FROM --platform=linux/amd64 ubuntu:22.04 AS basebefore building the application to ensure compatibility. - Then, enter the following command to build the Docker image from the source folder:
docker build -t moonlight-tizen . --no-cache- This operation may take a while, please be patient.
- After that, enter the following command to run and enter the container:
docker run -it --rm moonlight-tizen - To proceed further, follow the steps below to install the application on your TV:
- Enter the following command to connect to your Samsung TV over SDB (Smart Development Bridge):
sdb connect YOUR_TV_IPNote: Replace
YOUR_TV_IPwithIP Addressof your TV.- Next, enter the following command to confirm that you are connected, then take note of the Device ID:
sdb devicesNote: Just to clarify Device ID will be the last column, something like
UE55AU7172UXXH.- Next, enter the following commands to install the package and launch the application:
tizen install -n Moonlight.wgt -t YOUR_DEVICE_IDtizen run -p MoonLightS.MoonlightWasm -t YOUR_DEVICE_IDNote: Replace
YOUR_DEVICE_IDwithDevice IDof your TV.- Next, enter the following command to exit the container:
exitNote: Now the Moonlight app will automatically open on the target device and can be available in Recent Apps on your Samsung TV.
- Optionally, enter the following command to remove the Docker image, unless you need it later:
docker image rm moonlight-tizenNote: At the end you can enter the
exitcommand to close the Windows PowerShell window.
After successfully building the Docker image (as described in the previous section), you may need to access specific files generated during the build process. This section details how to extract the application widget and the USB package directly from the container's filesystem. Follow these steps to prepare these necessary artifacts for installation and deployment on your connected device.
Note
Before proceeding further with extracting the files, confirm that the built Docker image is present locally.
- After entering the command to run the Docker container, you need to open Docker Desktop.
- Navigate to the Containers tab in the left sidebar and click on the name of your running container.
- Select the Files tab, where you can browse the container's filesystem.
- Copy the application widget and USB package from the container by following these steps:
- Find the
homedirectory and select themoonlightfolder. - Here you can find
Moonlight.wgt(app widget) andMoonlightUSB.zip(USB package). - Right-click on the file you want to save locally, select the
Saveoption, and choose the location where you want to save it.
- Find the
- You can now proceed with the further steps to install the application as described in the installation guide.