Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxuser committed Mar 11, 2022
0 parents commit c88c9ac
Show file tree
Hide file tree
Showing 35 changed files with 32,704 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .enyoconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"title": "",
"libDir": "lib",
"paths": [],
"libraries": [
"enyo",
"moonstone",
"spotlight",
"layout",
"svg",
"enyo-ilib",
"enyo-webos"
],
"sources": {
"enyo": "https://github.com/enyojs/enyo.git",
"moonstone": "https://github.com/enyojs/moonstone.git",
"spotlight": "https://github.com/enyojs/spotlight.git",
"layout": "https://github.com/enyojs/layout.git",
"svg": "https://github.com/enyojs/svg.git",
"enyo-ilib": "https://github.com/enyojs/enyo-ilib.git",
"enyo-webos": "https://github.com/enyojs/enyo-webos.git"
},
"targets": {
"enyo": "2.7.0",
"moonstone": "2.7.0",
"spotlight": "2.7.0",
"layout": "2.7.0",
"svg": "2.7.0",
"enyo-ilib": "2.7.0",
"enyo-webos": "2.7.0"
},
"production": false,
"devMode": true,
"cache": true,
"resetCache": false,
"trustCache": false,
"cacheFile": ".enyocache",
"clean": false,
"sourceMaps": true,
"externals": true,
"strict": false,
"skip": [],
"library": false,
"wip": false,
"outDir": "dist",
"outFile": "index.html",
"lessPlugins": [
{
"name": "resolution-independence",
"options": {
"baseSize": 24
}
}
],
"assetRoots": [],
"lessOnlyLess": false,
"minifyCss": false,
"inlineCss": true,
"outCssFile": "output.css",
"outJsFile": "output.js",
"inlineJs": true,
"templateIndex": "",
"watch": false,
"watchPaths": [],
"polling": false,
"pollingInterval": 100,
"headScripts": [],
"tailScripts": [],
"promisePolyfill": false,
"styleOnly": false,
"lessVars": []
}
37 changes: 37 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"root": true,
"extends": [
"airbnb-typescript/base",
"prettier"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": [
"error"
],
"no-console": "off",
"no-restricted-syntax": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"packageDir": "./"
}
],
"@typescript-eslint/ban-ts-comment": "off"
},
"ignorePatterns": [
"frontend/**",
"lib/**",
"node_modules/**",
"dist/**",
"hyperion.ng/**",
"service/**"
],
"parserOptions": {
"project": "./tsconfig.json"
}
}
213 changes: 213 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
name: WebOS build
on:
push:
pull_request:
workflow_dispatch:

env:
TOOLCHAIN_URL: https://api.cirrus-ci.com/v1/artifact/task/6155872014434304/sdk/output/images/arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
TOOLCHAIN_DIR: /opt/arm-webos-linux-gnueabi_sdk-buildroot
TOOLCHAIN_FILE: /opt/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake
BUILD_DIR_NATIVE: build-x86x64
BUILD_DIR_CROSS: build-cross
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
CCACHE_MAXSIZE: 600M

jobs:
build_hyperion_ng:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./hyperion.ng

steps:
- uses: actions/checkout@v3
with:
repository: tuxuser/hyperion.ng
ref: tmp/webos/lil_patches
path: hyperion.ng
submodules: recursive

- name: Restore/Cache build directories
uses: actions/cache@v2
with:
path: |
${{ github.workspace }}/ccache_basedir
key: ${{ runner.os }}-hyperion.ng-ccache

- name: Create build directories
run: |
mkdir -p ${{ github.workspace }}/ccache_basedir
mkdir -p ./${BUILD_DIR_NATIVE}
mkdir -p ./${BUILD_DIR_CROSS}
- name: Download and unpack toolchain
working-directory: /opt
run: |
wget -q -O toolchain.tar.gz ${TOOLCHAIN_URL}
tar xf toolchain.tar.gz
- name: Relocate toolchain
run: |
pushd ${TOOLCHAIN_DIR}
./relocate-sdk.sh
popd
- name: Install native dependencies
env:
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
run: |
sudo apt update
sudo apt install -y ${{ env.apt_deps }}
- name: Build native
env:
CCACHE_BASEDIR: ${{ github.workspace }}/ccache_basedir
CCACHE_DIR: ${{ github.workspace }}/ccache_basedir/.ccache-native
run: |
pushd ./${BUILD_DIR_NATIVE}
cmake .. \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_FLATBUF_SERVER=OFF \
-DENABLE_DISPMANX=OFF \
-DENABLE_FB=OFF \
-DENABLE_V4L2=OFF \
-DENABLE_X11=OFF \
-DENABLE_XCB=OFF \
-DENABLE_BOBLIGHT_SERVER=OFF \
-DENABLE_CEC=OFF \
-DENABLE_DEV_NETWORK=OFF \
-DENABLE_DEV_SERIAL=OFF \
-DENABLE_DEV_TINKERFORGE=OFF \
-DENABLE_DEV_USB_HID=OFF \
-DENABLE_AVAHI=OFF \
-DENABLE_EFFECTENGINE=OFF \
-DENABLE_REMOTE_CTL=OFF \
-Wno-dev
make
popd
- name: Build cross (webos arm)
env:
CCACHE_BASEDIR: ${{ github.workspace }}/ccache_basedir
CCACHE_DIR: ${{ github.workspace }}/ccache_basedir/.ccache-cross
run: |
pushd ./${BUILD_DIR_CROSS}
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DPLATFORM=rpi \
-DHYPERION_LIGHT=ON \
-DENABLE_QT=OFF \
-DENABLE_EFFECTENGINE=OFF \
-DENABLE_JSONCHECKS=OFF \
-DENABLE_DEV_SERIAL=ON \
-DENABLE_DEV_USB_HID=ON \
-DENABLE_DEV_WS281XPWM=OFF \
-DENABLE_DEV_TINKERFORGE=ON \
-DENABLE_AVAHI=OFF \
-DENABLE_DEPLOY_DEPENDENCIES=OFF \
-DENABLE_BOBLIGHT_SERVER=ON \
-DENABLE_FLATBUF_SERVER=ON \
-DENABLE_PROTOBUF_SERVER=OFF \
-DENABLE_FORWARDER=ON \
-DENABLE_FLATBUF_CONNECT=ON \
-DIMPORT_FLATC=${GITHUB_WORKSPACE}/hyperion.ng/${BUILD_DIR_NATIVE}/flatc_export.cmake
make
popd
- name: Copy built binaries to release/
run: |
mkdir ./release
cp -r ./${BUILD_DIR_CROSS}/bin/* ./release/
find ./release
- name: Copy dependencies to release/
env:
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
run: |
for i in ${{ env.dependency_libs }}; do find ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/ -name $i -exec cp {} ./release/ \;; done
mkdir -p ./release/sqldrivers
mkdir -p ./release/imageformats
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/sqldrivers/libqsqlite.so ./release/sqldrivers/
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqico.so ./release/imageformats/
cp ${TOOLCHAIN_DIR}/arm-webos-linux-gnueabi/sysroot/usr/lib/qt/plugins/imageformats/libqjpeg.so ./release/imageformats/
find ./release
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: hyperion.ng-build
path: ${{ github.workspace }}/hyperion.ng/release/*
if-no-files-found: error

build_ipk:
runs-on: ubuntu-latest
needs: build_hyperion_ng

steps:
- uses: actions/checkout@v1
with:
submodules: recursive

- uses: actions/download-artifact@v3
with:
name: hyperion.ng-build
path: hyperion.ng-build

- name: Display structure of downloaded files
run: ls -R

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- run: npm ci
- run: npm run lint
- run: npm run build -- --production
- run: npm run build-service -- --env production

- name: Copy hyperion.ng into dist/service/
run: |
ls -R
cp -r ./hyperion.ng-build/* ./dist/service/
ls -R
- name: Ensure executables +x
run: |
chmod +x ./dist/service/hyperiond
chmod +x ./dist/service/hyperion-remote
chmod +x ./dist/service/flatc
chmod +x ./dist/service/flathash
chmod +x ./dist/assets/autostart.sh
- run: npm run package

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: hyperion.ng-ipk
path: |
${{github.workspace}}/*.ipk
- uses: marvinpinto/action-automatic-releases@latest
if: "github.ref == 'refs/heads/master'"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: latest
prerelease: true
title: "Development Build"
files: |
${{github.workspace}}/*.ipk
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build/
node_modules/
dist/
.enyocache
**/*.ipk
21 changes: 21 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[submodule "lib/enyo"]
path = lib/enyo
url = https://github.com/enyojs/enyo.git
[submodule "lib/moonstone"]
path = lib/moonstone
url = https://github.com/enyojs/moonstone.git
[submodule "lib/spotlight"]
path = lib/spotlight
url = https://github.com/enyojs/spotlight.git
[submodule "lib/layout"]
path = lib/layout
url = https://github.com/enyojs/layout.git
[submodule "lib/svg"]
path = lib/svg
url = https://github.com/enyojs/svg.git
[submodule "lib/enyo-ilib"]
path = lib/enyo-ilib
url = https://github.com/enyojs/enyo-ilib.git
[submodule "lib/enyo-webos"]
path = lib/enyo-webos
url = https://github.com/enyojs/enyo-webos.git
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
frontend/**/*
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"printWidth": 140,
"trailingComma": "all"
}
15 changes: 15 additions & 0 deletions appinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"id": "org.webosbrew.hyperion.ng.loader",
"version": "0.1.0",
"vendor": "webosbrew.org",
"title": "Hyperion.NG",
"icon": "assets/logo_small.png",
"largeIcon": "assets/logo_big.png",
"splashBackground": "assets/splash_1080p.png",
"bgImage": "assets/splash_1080p.png",
"main": "index.html",
"iconColor": "black",
"type": "web",
"supportGIP": true,
"appDescription": "Hyperion.NG for WebOS"
}
8 changes: 8 additions & 0 deletions assets/autostart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Elevate service to run as root
# * needs to be done before calling into the service
/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.hyperion.ng.loader.service

# Start hyperiond
luna-send -n 1 'luna://org.webosbrew.hyperion.ng.loader.service/start' '{}'
Binary file added assets/logo_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/splash_1080p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c88c9ac

Please sign in to comment.