mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Initial Tizen CI setup
This commit is contained in:
parent
f46e52c84d
commit
fb28e780b8
8 changed files with 88 additions and 8 deletions
1
receivers/tizen/.gitignore
vendored
1
receivers/tizen/.gitignore
vendored
|
@ -1,6 +1,7 @@
|
|||
/.metadata/
|
||||
dist
|
||||
|
||||
.env
|
||||
FCastReceiver/.buildResult
|
||||
FCastReceiver/.settings
|
||||
FCastReceiver/.sign
|
||||
|
|
25
receivers/tizen/Dockerfile
Normal file
25
receivers/tizen/Dockerfile
Normal file
|
@ -0,0 +1,25 @@
|
|||
# FROM ubuntu:20.04
|
||||
FROM node:23.8.0-bullseye
|
||||
|
||||
USER root
|
||||
RUN apt update && apt install -y wget expect
|
||||
RUN useradd -ms /bin/bash ubuntu
|
||||
RUN usermod -a -G root ubuntu
|
||||
|
||||
# Tizen Studio installer requires non-root user install
|
||||
USER ubuntu
|
||||
WORKDIR /home/ubuntu
|
||||
|
||||
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
|
||||
RUN chmod +x ./dotnet-install.sh
|
||||
RUN ./dotnet-install.sh --channel 2.1
|
||||
ENV DOTNET_ROOT=/home/ubuntu/.dotnet
|
||||
ENV PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
|
||||
|
||||
RUN wget https://download.tizen.org/sdk/Installer/tizen-studio_6.0/web-cli_Tizen_Studio_6.0_ubuntu-64.bin
|
||||
RUN chmod +x web-cli_Tizen_Studio_6.0_ubuntu-64.bin
|
||||
RUN yes | ./web-cli_Tizen_Studio_6.0_ubuntu-64.bin --accept-license
|
||||
RUN /home/ubuntu/tizen-studio/package-manager/package-manager-cli.bin install --accept-license Baseline-SDK WebCLI TV-SAMSUNG-Public-WebAppDevelopment cert-add-on TV-SAMSUNG-Extension-Tools
|
||||
ENV PATH=$PATH:/home/ubuntu/tizen-studio/tools/:/home/ubuntu/tizen-studio/tools/ide/bin/
|
||||
|
||||
USER root
|
|
@ -1,3 +1,5 @@
|
|||
@REM Local development build script
|
||||
|
||||
cd FCastReceiver
|
||||
cmd /C tizen build-web -- .
|
||||
cd .buildResult
|
30
receivers/tizen/scripts/build.sh
Executable file
30
receivers/tizen/scripts/build.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Docker container build script
|
||||
npm run build
|
||||
cd FCastReceiverService
|
||||
dotnet build -c Release
|
||||
cd ..
|
||||
cd FCastReceiver
|
||||
tizen build-web -- .
|
||||
cd .buildResult
|
||||
|
||||
# Tizen OS typically uses GNOME keyring to store certificate passwords. However setting up keying
|
||||
# requires dbus access and is dependent on the host envrionment. The second alternative is to put
|
||||
# passwords directly in profiles.xml, but after every package it overwrites the password entries, so
|
||||
# it has to be regenerated on every packaging...
|
||||
# https://stackoverflow.com/a/61718469
|
||||
|
||||
tizen security-profiles add --active --force --name default --author /home/ubuntu/author/default/author.p12 --password $CERT_AUTHOR_PASSWORD --dist /home/ubuntu/SamsungCertificate/default/distributor.p12 --dist-password $CERT_DIST_PASSWORD
|
||||
tizen cli-config "profiles.path=/home/ubuntu/tizen-studio-data/profile/profiles.xml"
|
||||
sed -i "s/\/home\/ubuntu\/author\/default\/author.pwd/$CERT_AUTHOR_PASSWORD/g" /home/ubuntu/tizen-studio-data/profile/profiles.xml
|
||||
sed -i "s/\/home\/ubuntu\/SamsungCertificate\/default\/distributor.pwd/$CERT_DIST_PASSWORD/g" /home/ubuntu/tizen-studio-data/profile/profiles.xml
|
||||
../../scripts/package.sh tizen package -t wgt -s default -- .
|
||||
|
||||
tizen security-profiles add --active --force --name default --author /home/ubuntu/author/default/author.p12 --password $CERT_AUTHOR_PASSWORD --dist /home/ubuntu/SamsungCertificate/default/distributor.p12 --dist-password $CERT_DIST_PASSWORD
|
||||
tizen cli-config "profiles.path=/home/ubuntu/tizen-studio-data/profile/profiles.xml"
|
||||
sed -i "s/\/home\/ubuntu\/author\/default\/author.pwd/$CERT_AUTHOR_PASSWORD/g" /home/ubuntu/tizen-studio-data/profile/profiles.xml
|
||||
sed -i "s/\/home\/ubuntu\/SamsungCertificate\/default\/distributor.pwd/$CERT_DIST_PASSWORD/g" /home/ubuntu/tizen-studio-data/profile/profiles.xml
|
||||
../../scripts/package.sh tizen package -t wgt -s default -r ../../FCastReceiverService/bin/Release/netcoreapp2.1/com.futo.FCastReceiverService-1.0.0.tpk -- FCastReceiver.wgt
|
||||
|
||||
cd ../../
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Local development build script
|
||||
npm run build
|
||||
cd FCastReceiverService
|
||||
dotnet build -c Release
|
||||
cd ..
|
||||
cd FCastReceiver
|
||||
tizen build-web -- .
|
||||
cd .buildResult
|
|
@ -1,13 +1,13 @@
|
|||
@REM cmd /C tizen install -n FCastReceiver/.buildResult/FCastReceiver.wgt -t T-samsung-9.0-x86
|
||||
@REM cmd /C C:\tizen-studio\tools\sdb.exe -s emulator-26101 shell 0 debug qL5oFoTHoJ.FCastReceiver
|
||||
|
||||
@REM Local development debug script
|
||||
cmd /C tizen install -n FCastReceiver.wgt -t UN43DU7200FXZA -- FCastReceiver/.buildResult
|
||||
cmd /C C:\tizen-studio\tools\sdb.exe -s 192.168.0.218:26101 shell 0 debug qL5oFoTHoJ.FCastReceiver
|
||||
|
||||
@REM Emulators
|
||||
@REM cmd /C tizen install -n FCastReceiver/.buildResult/FCastReceiver.wgt -t T-samsung-9.0-x86
|
||||
@REM cmd /C C:\tizen-studio\tools\sdb.exe -s emulator-26101 shell 0 debug qL5oFoTHoJ.FCastReceiver
|
||||
|
||||
@REM Samsung remote lab
|
||||
@REM cmd /C tizen install -n FCastReceiver.wgt -t QN55Q89RAFXKR -- FCastReceiver/.buildResult
|
||||
@REM cmd /C C:\tizen-studio\tools\sdb.exe -s 127.0.0.1:52513 shell 0 debug qL5oFoTHoJ.FCastReceiver
|
||||
@REM C:\tizen-studio\tools\sdb.exe forward tcp:34445 tcp:34445
|
||||
|
||||
@REM must forward port after setting in chrome inspector?
|
||||
@REM https://forum.developer.samsung.com/t/tizen-studio-build-for-web-app-takes-30-mins/11025/7
|
||||
@REM C:\tizen-studio\tools\sdb.exe forward tcp:34445 tcp:34445
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Local development debug script
|
||||
tizen install -n FCastReceiver/.buildResult/FCastReceiver.wgt -t T-samsung-5.0-x86
|
||||
~/tizen-studio/tools/sdb -s emulator-26101 shell 0 debug qL5oFoTHoJ.FCastReceiver
|
||||
# ~/tizen-studio/tools/sdb forward tcp:34445 tcp:34445
|
||||
# ~/tizen-studio/tools/sdb forward tcp:34445 tcp:34445
|
16
receivers/tizen/scripts/package.sh
Executable file
16
receivers/tizen/scripts/package.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/expect -f
|
||||
|
||||
set timeout -1
|
||||
spawn {*}$argv
|
||||
|
||||
expect "Author password: "
|
||||
send -- "$env(CERT_AUTHOR_PASSWORD)\n"
|
||||
expect "Yes: (Y), No: (N) ?"
|
||||
send -- "n\n"
|
||||
|
||||
expect "Distributor1 password: "
|
||||
send -- "$env(CERT_DIST_PASSWORD)\n"
|
||||
expect "Yes: (Y), No: (N) ?"
|
||||
send -- "n\n"
|
||||
|
||||
expect eof
|
Loading…
Add table
Add a link
Reference in a new issue