Skip to content

Commit c88c9ac

Browse files
committed
Initial commit
0 parents  commit c88c9ac

35 files changed

+32704
-0
lines changed

.enyoconfig

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"title": "",
3+
"libDir": "lib",
4+
"paths": [],
5+
"libraries": [
6+
"enyo",
7+
"moonstone",
8+
"spotlight",
9+
"layout",
10+
"svg",
11+
"enyo-ilib",
12+
"enyo-webos"
13+
],
14+
"sources": {
15+
"enyo": "https://github.com/enyojs/enyo.git",
16+
"moonstone": "https://github.com/enyojs/moonstone.git",
17+
"spotlight": "https://github.com/enyojs/spotlight.git",
18+
"layout": "https://github.com/enyojs/layout.git",
19+
"svg": "https://github.com/enyojs/svg.git",
20+
"enyo-ilib": "https://github.com/enyojs/enyo-ilib.git",
21+
"enyo-webos": "https://github.com/enyojs/enyo-webos.git"
22+
},
23+
"targets": {
24+
"enyo": "2.7.0",
25+
"moonstone": "2.7.0",
26+
"spotlight": "2.7.0",
27+
"layout": "2.7.0",
28+
"svg": "2.7.0",
29+
"enyo-ilib": "2.7.0",
30+
"enyo-webos": "2.7.0"
31+
},
32+
"production": false,
33+
"devMode": true,
34+
"cache": true,
35+
"resetCache": false,
36+
"trustCache": false,
37+
"cacheFile": ".enyocache",
38+
"clean": false,
39+
"sourceMaps": true,
40+
"externals": true,
41+
"strict": false,
42+
"skip": [],
43+
"library": false,
44+
"wip": false,
45+
"outDir": "dist",
46+
"outFile": "index.html",
47+
"lessPlugins": [
48+
{
49+
"name": "resolution-independence",
50+
"options": {
51+
"baseSize": 24
52+
}
53+
}
54+
],
55+
"assetRoots": [],
56+
"lessOnlyLess": false,
57+
"minifyCss": false,
58+
"inlineCss": true,
59+
"outCssFile": "output.css",
60+
"outJsFile": "output.js",
61+
"inlineJs": true,
62+
"templateIndex": "",
63+
"watch": false,
64+
"watchPaths": [],
65+
"polling": false,
66+
"pollingInterval": 100,
67+
"headScripts": [],
68+
"tailScripts": [],
69+
"promisePolyfill": false,
70+
"styleOnly": false,
71+
"lessVars": []
72+
}

.eslintrc.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"airbnb-typescript/base",
5+
"prettier"
6+
],
7+
"parser": "@typescript-eslint/parser",
8+
"plugins": [
9+
"prettier"
10+
],
11+
"rules": {
12+
"prettier/prettier": [
13+
"error"
14+
],
15+
"no-console": "off",
16+
"no-restricted-syntax": "off",
17+
"import/no-extraneous-dependencies": [
18+
"error",
19+
{
20+
"devDependencies": true,
21+
"packageDir": "./"
22+
}
23+
],
24+
"@typescript-eslint/ban-ts-comment": "off"
25+
},
26+
"ignorePatterns": [
27+
"frontend/**",
28+
"lib/**",
29+
"node_modules/**",
30+
"dist/**",
31+
"hyperion.ng/**",
32+
"service/**"
33+
],
34+
"parserOptions": {
35+
"project": "./tsconfig.json"
36+
}
37+
}

.github/workflows/build.yml

+213
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
name: WebOS build
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
env:
8+
TOOLCHAIN_URL: https://api.cirrus-ci.com/v1/artifact/task/6155872014434304/sdk/output/images/arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
9+
TOOLCHAIN_DIR: /opt/arm-webos-linux-gnueabi_sdk-buildroot
10+
TOOLCHAIN_FILE: /opt/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake
11+
BUILD_DIR_NATIVE: build-x86x64
12+
BUILD_DIR_CROSS: build-cross
13+
CCACHE_COMPRESS: true
14+
CCACHE_COMPRESSLEVEL: 6
15+
CCACHE_MAXSIZE: 600M
16+
17+
jobs:
18+
build_hyperion_ng:
19+
runs-on: ubuntu-latest
20+
defaults:
21+
run:
22+
working-directory: ./hyperion.ng
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
repository: tuxuser/hyperion.ng
28+
ref: tmp/webos/lil_patches
29+
path: hyperion.ng
30+
submodules: recursive
31+
32+
- name: Restore/Cache build directories
33+
uses: actions/cache@v2
34+
with:
35+
path: |
36+
${{ github.workspace }}/ccache_basedir
37+
key: ${{ runner.os }}-hyperion.ng-ccache
38+
39+
- name: Create build directories
40+
run: |
41+
mkdir -p ${{ github.workspace }}/ccache_basedir
42+
mkdir -p ./${BUILD_DIR_NATIVE}
43+
mkdir -p ./${BUILD_DIR_CROSS}
44+
45+
- name: Download and unpack toolchain
46+
working-directory: /opt
47+
run: |
48+
wget -q -O toolchain.tar.gz ${TOOLCHAIN_URL}
49+
tar xf toolchain.tar.gz
50+
51+
- name: Relocate toolchain
52+
run: |
53+
pushd ${TOOLCHAIN_DIR}
54+
./relocate-sdk.sh
55+
popd
56+
57+
- name: Install native dependencies
58+
env:
59+
apt_deps: ccache git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev python3-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libturbojpeg0-dev libssl-dev libmbedtls-dev
60+
run: |
61+
sudo apt update
62+
sudo apt install -y ${{ env.apt_deps }}
63+
64+
- name: Build native
65+
env:
66+
CCACHE_BASEDIR: ${{ github.workspace }}/ccache_basedir
67+
CCACHE_DIR: ${{ github.workspace }}/ccache_basedir/.ccache-native
68+
run: |
69+
pushd ./${BUILD_DIR_NATIVE}
70+
cmake .. \
71+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
72+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
73+
-DCMAKE_BUILD_TYPE=Release \
74+
-DENABLE_FLATBUF_SERVER=OFF \
75+
-DENABLE_DISPMANX=OFF \
76+
-DENABLE_FB=OFF \
77+
-DENABLE_V4L2=OFF \
78+
-DENABLE_X11=OFF \
79+
-DENABLE_XCB=OFF \
80+
-DENABLE_BOBLIGHT_SERVER=OFF \
81+
-DENABLE_CEC=OFF \
82+
-DENABLE_DEV_NETWORK=OFF \
83+
-DENABLE_DEV_SERIAL=OFF \
84+
-DENABLE_DEV_TINKERFORGE=OFF \
85+
-DENABLE_DEV_USB_HID=OFF \
86+
-DENABLE_AVAHI=OFF \
87+
-DENABLE_EFFECTENGINE=OFF \
88+
-DENABLE_REMOTE_CTL=OFF \
89+
-Wno-dev
90+
make
91+
popd
92+
93+
- name: Build cross (webos arm)
94+
env:
95+
CCACHE_BASEDIR: ${{ github.workspace }}/ccache_basedir
96+
CCACHE_DIR: ${{ github.workspace }}/ccache_basedir/.ccache-cross
97+
run: |
98+
pushd ./${BUILD_DIR_CROSS}
99+
cmake .. \
100+
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
101+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
102+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
103+
-DCMAKE_BUILD_TYPE=Release \
104+
-DPLATFORM=rpi \
105+
-DHYPERION_LIGHT=ON \
106+
-DENABLE_QT=OFF \
107+
-DENABLE_EFFECTENGINE=OFF \
108+
-DENABLE_JSONCHECKS=OFF \
109+
-DENABLE_DEV_SERIAL=ON \
110+
-DENABLE_DEV_USB_HID=ON \
111+
-DENABLE_DEV_WS281XPWM=OFF \
112+
-DENABLE_DEV_TINKERFORGE=ON \
113+
-DENABLE_AVAHI=OFF \
114+
-DENABLE_DEPLOY_DEPENDENCIES=OFF \
115+
-DENABLE_BOBLIGHT_SERVER=ON \
116+
-DENABLE_FLATBUF_SERVER=ON \
117+
-DENABLE_PROTOBUF_SERVER=OFF \
118+
-DENABLE_FORWARDER=ON \
119+
-DENABLE_FLATBUF_CONNECT=ON \
120+
-DIMPORT_FLATC=${GITHUB_WORKSPACE}/hyperion.ng/${BUILD_DIR_NATIVE}/flatc_export.cmake
121+
make
122+
popd
123+
124+
- name: Copy built binaries to release/
125+
run: |
126+
mkdir ./release
127+
cp -r ./${BUILD_DIR_CROSS}/bin/* ./release/
128+
find ./release
129+
130+
- name: Copy dependencies to release/
131+
env:
132+
dependency_libs: libpng16.so.16 libjpeg.so.8 libcrypto.so.1.1 libz.so.1 libssl.so.1.1 libQt5Sql.so.5.15.2 libpcre2-16.so.0 libQt5Gui.so.5 libQt5Network.so.5 libQt5Widgets.so.5 libk5crypto.so.3 libatomic.so.1 libQt5Core.so.5 libkrb5support.so.0 libcom_err.so.3 libstdc++.so.6 libkrb5.so.3 libQt5Sql.so.5 libgssapi_krb5.so.2 libQt5SerialPort.so.5 libQt5Sql.so.5.15 libusb-1.0.so.0
133+
run: |
134+
for i in ${{ env.dependency_libs }}; do find ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/ -name $i -exec cp {} ./release/ \;; done
135+
mkdir -p ./release/sqldrivers
136+
mkdir -p ./release/imageformats
137+
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/sqldrivers/libqsqlite.so ./release/sqldrivers/
138+
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqico.so ./release/imageformats/
139+
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqjpeg.so ./release/imageformats/
140+
find ./release
141+
142+
- name: Upload artifacts
143+
uses: actions/upload-artifact@v3
144+
with:
145+
name: hyperion.ng-build
146+
path: ${{ github.workspace }}/hyperion.ng/release/*
147+
if-no-files-found: error
148+
149+
build_ipk:
150+
runs-on: ubuntu-latest
151+
needs: build_hyperion_ng
152+
153+
steps:
154+
- uses: actions/checkout@v1
155+
with:
156+
submodules: recursive
157+
158+
- uses: actions/download-artifact@v3
159+
with:
160+
name: hyperion.ng-build
161+
path: hyperion.ng-build
162+
163+
- name: Display structure of downloaded files
164+
run: ls -R
165+
166+
- name: Setup Node.js
167+
uses: actions/setup-node@v1
168+
with:
169+
node-version: 14.x
170+
171+
- name: Reconfigure git to use HTTP authentication
172+
run: >
173+
git config --global url."https://github.com/".insteadOf
174+
175+
176+
- run: npm ci
177+
- run: npm run lint
178+
- run: npm run build -- --production
179+
- run: npm run build-service -- --env production
180+
181+
- name: Copy hyperion.ng into dist/service/
182+
run: |
183+
ls -R
184+
cp -r ./hyperion.ng-build/* ./dist/service/
185+
ls -R
186+
187+
- name: Ensure executables +x
188+
run: |
189+
chmod +x ./dist/service/hyperiond
190+
chmod +x ./dist/service/hyperion-remote
191+
chmod +x ./dist/service/flatc
192+
chmod +x ./dist/service/flathash
193+
194+
chmod +x ./dist/assets/autostart.sh
195+
196+
- run: npm run package
197+
198+
- name: Upload artifact
199+
uses: actions/upload-artifact@v3
200+
with:
201+
name: hyperion.ng-ipk
202+
path: |
203+
${{github.workspace}}/*.ipk
204+
205+
- uses: marvinpinto/action-automatic-releases@latest
206+
if: "github.ref == 'refs/heads/master'"
207+
with:
208+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
209+
automatic_release_tag: latest
210+
prerelease: true
211+
title: "Development Build"
212+
files: |
213+
${{github.workspace}}/*.ipk

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build/
2+
node_modules/
3+
dist/
4+
.enyocache
5+
**/*.ipk

.gitmodules

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[submodule "lib/enyo"]
2+
path = lib/enyo
3+
url = https://github.com/enyojs/enyo.git
4+
[submodule "lib/moonstone"]
5+
path = lib/moonstone
6+
url = https://github.com/enyojs/moonstone.git
7+
[submodule "lib/spotlight"]
8+
path = lib/spotlight
9+
url = https://github.com/enyojs/spotlight.git
10+
[submodule "lib/layout"]
11+
path = lib/layout
12+
url = https://github.com/enyojs/layout.git
13+
[submodule "lib/svg"]
14+
path = lib/svg
15+
url = https://github.com/enyojs/svg.git
16+
[submodule "lib/enyo-ilib"]
17+
path = lib/enyo-ilib
18+
url = https://github.com/enyojs/enyo-ilib.git
19+
[submodule "lib/enyo-webos"]
20+
path = lib/enyo-webos
21+
url = https://github.com/enyojs/enyo-webos.git

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
frontend/**/*

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 140,
4+
"trailingComma": "all"
5+
}

appinfo.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"id": "org.webosbrew.hyperion.ng.loader",
3+
"version": "0.1.0",
4+
"vendor": "webosbrew.org",
5+
"title": "Hyperion.NG",
6+
"icon": "assets/logo_small.png",
7+
"largeIcon": "assets/logo_big.png",
8+
"splashBackground": "assets/splash_1080p.png",
9+
"bgImage": "assets/splash_1080p.png",
10+
"main": "index.html",
11+
"iconColor": "black",
12+
"type": "web",
13+
"supportGIP": true,
14+
"appDescription": "Hyperion.NG for WebOS"
15+
}

assets/autostart.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
# Elevate service to run as root
4+
# * needs to be done before calling into the service
5+
/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.hyperion.ng.loader.service
6+
7+
# Start hyperiond
8+
luna-send -n 1 'luna://org.webosbrew.hyperion.ng.loader.service/start' '{}'

assets/logo_big.png

14.9 KB
Loading

assets/logo_small.png

12.9 KB
Loading

assets/splash_1080p.png

26.4 KB
Loading

0 commit comments

Comments
 (0)