Skip to content

Commit

Permalink
update tizen studio to 5.5 and webos cli to 1.12.4-j27
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed Nov 28, 2023
1 parent 7a25245 commit 75be4a8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
.idea
.vscode

/vendor/web-cli_Tizen_Studio_*
/vendor
/todo.txt
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM --platform=linux/amd64 ubuntu:22.04

# Install prerequisites
RUN apt-get update && apt-get install -y \
Expand Down Expand Up @@ -58,11 +58,14 @@ RUN mv ${HOME}/tizen-studio /tizen-studio \
&& ln -s /tizen-studio ${HOME}/tizen-studio

# Copy and extract webOS CLI
ARG WEBOS_SDK_PATH=/webOS_TV_SDK
COPY vendor/webos_cli_tv.zip .
RUN unzip -q webos_cli_tv.zip -d ${WEBOS_SDK_PATH} \
&& chmod -R +x ${WEBOS_SDK_PATH}/CLI/bin \
&& rm webos_cli_tv.zip
ARG WEBOS_CLI_VERSION=1.12.4-j27
ENV LG_WEBOS_TV_SDK_HOME=/webOS_TV_SDK
ENV WEBOS_CLI_TV=${LG_WEBOS_TV_SDK_HOME}/CLI/bin
COPY vendor/webOS_TV_CLI_linux_${WEBOS_CLI_VERSION}.tgz ./webos_cli.tgz
RUN mkdir -p ${LG_WEBOS_TV_SDK_HOME}
RUN tar -xvzf webos_cli.tgz -C ${LG_WEBOS_TV_SDK_HOME} \
&& chmod -R +x ${WEBOS_CLI_TV} \
&& rm webos_cli.tgz

# Add tizen/webos cli to PATH
ENV PATH $PATH:/tizen-studio/tools/:/tizen-studio/tools/ide/bin/:/tizen-studio/package-manager/:${WEBOS_SDK_PATH}/CLI/bin
ENV PATH $PATH:/tizen-studio/tools/:/tizen-studio/tools/ide/bin/:/tizen-studio/package-manager/:${WEBOS_CLI_TV}
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ docker run -it --rm \
tbd

## Changelog
#### 3.0
- update Tizen Studio to 5.5
- update webOS sdk to 1.12.4-j27

#### 2.0
- update Tizen Studio to 4.1.1
- update webOS sdk to 1.11.0
Expand All @@ -323,33 +327,43 @@ Initial version
docker build -t vitalets/tizen-webos-sdk .
```
##### Fast way
1. Download Tizen Studio installer to `vendor` dir (once):
1. Download Tizen Studio installer to `vendor` dir (change version if needed):
```bash
TIZEN_STUDIO_VERSION=4.1.1
TIZEN_STUDIO_VERSION=5.5
wget http://download.tizen.org/sdk/Installer/tizen-studio_${TIZEN_STUDIO_VERSION}/web-cli_Tizen_Studio_${TIZEN_STUDIO_VERSION}_ubuntu-64.bin \
-O vendor/web-cli_Tizen_Studio_${TIZEN_STUDIO_VERSION}_ubuntu-64.bin
```

2. Build container using local Tizen Studio installer:
2. Build container using downloaded Tizen Studio installer (change version if needed):
```bash
TIZEN_STUDIO_VERSION=4.1.1
TIZEN_STUDIO_VERSION=5.5
docker run -d --rm --name nginx-temp -p 8080:80 -v $(pwd)/vendor:/usr/share/nginx/html:ro nginx \
&& docker build -t vitalets/tizen-webos-sdk . \
--build-arg TIZEN_STUDIO_URL=http://172.17.0.1:8080/web-cli_Tizen_Studio_${TIZEN_STUDIO_VERSION}_ubuntu-64.bin \
; docker stop nginx-temp
```

### Update webOS sdk
1. Download [latest installer for linux](https://webostv.developer.lge.com/sdk/installation/download-installer/#)
2. Unzip `webOS_SDK_TV_Installer_linux64_min.zip`
3. Unzip again `webOS_SDK_TV_linux64.zip`
4. Copy `webos_cli_tv.zip` to `vendor` dir
1. Download [latest installer for linux](https://webostv.developer.lge.com/develop/tools/cli-installation) and move it to `vendor` folder
2. In `Dockerfile` change `WEBOS_CLI_VERSION` to corresponding version
3. Build docker image

### Test
```bash
./test.sh
```

### Debug
```
docker run -it --rm --platform linux/amd64 -v /home/developer vitalets/tizen-webos-sdk bash
```
And check sdk commands, e.g.:
```
tizen version
# or
ares-setup-device --version
```

### Generate TOC
```
docker run --rm -it -v $(pwd):/usr/src jorgeandrada/doctoc --github README.md
Expand Down
6 changes: 3 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

cmd() {
echo $(docker run -it --rm -v /home/developer vitalets/tizen-webos-sdk $@) | tr -d '\r'
echo $(docker run -it --rm --platform linux/amd64 -v /home/developer vitalets/tizen-webos-sdk $@) | tr -d '\r'
}

assert() {
Expand All @@ -16,5 +16,5 @@ assert() {
}

assert "$(cmd tizen version)" "Tizen CLI 2.5.25"
assert "$(cmd sdb version)" "Smart Development Bridge version 4.2.16"
assert "$(cmd ares-setup-device --version)" "Version: 1.11.0-j31-k"
assert "$(cmd sdb version)" "Smart Development Bridge version 4.2.25"
assert "$(cmd ares -V)" "webOS TV CLI Version: 1.12.4-j27"
Binary file removed vendor/webos_cli_tv.zip
Binary file not shown.

0 comments on commit 75be4a8

Please sign in to comment.