From 53d27c682a3a10cae7087cf1ea432fcaa1379572 Mon Sep 17 00:00:00 2001 From: reis <29177546+reisxd@users.noreply.github.com> Date: Fri, 28 Jun 2024 14:48:48 +0300 Subject: [PATCH] feat: tizenbrew updater for desktop --- .github/workflows/build-new-release.yaml | 21 +- docs/README.md | 51 +- tizenbrew-updater/TizenBrewUpdater/index.html | 5 +- .../TizenBrewUpdater/js/wsClient.js | 10 +- .../TizenBrewUpdater/service/filePush.js | 1 + .../service/package-lock.json | 682 ++++++++++++++++++ .../TizenBrewUpdater/service/package.json | 1 + .../TizenBrewUpdater/service/service.js | 28 +- 8 files changed, 771 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-new-release.yaml b/.github/workflows/build-new-release.yaml index ac9079e..ce3f989 100644 --- a/.github/workflows/build-new-release.yaml +++ b/.github/workflows/build-new-release.yaml @@ -21,10 +21,11 @@ jobs: - name: Install modules and build standalone service working-directory: tizenbrew-app/TizenBrew/service run: | - sudo apt install -y expect zip coreutils + sudo apt install -y expect zip coreutils + sudo curl -Lo /usr/bin/ldid https://github.com/ProcursusTeam/ldid/releases/download/v2.1.5-procursus7/ldid_linux_x86_64 + sudo chmod a+rwx /usr/bin/ldid npm install - npm install -g @vercel/ncc - npm install -g wgt-to-usb + npm install -g @vercel/ncc wgt-to-usb pkg ncc build service.js rm -r node_modules @@ -113,6 +114,11 @@ jobs: run: | wgt-to-usb release/TizenBrewUpdater-Old.wgt + - name: Package Updater for Desktop + working-directory: tizenbrew-updater/TizenBrewUpdater + run: | + pkg -C GZip -t node18-win-x64,node18-linux-x64,node18-macos-arm64 -o dist/tizenbrew-updater service/dist/index.js + - name: Upload TizenBrew package artifact for Old Tizen uses: actions/upload-artifact@v2 with: @@ -152,9 +158,6 @@ jobs: with: tag_name: ${{ env.RELEASE_VERSION }} files: | - tizenbrew-app/TizenBrew/release/TizenBrewStandalone-Old.wgt - tizenbrew-app/TizenBrew/release/TizenBrewStandalone-New.wgt - tizenbrew-updater/TizenBrewUpdater/release/TizenBrewUpdater-Old.wgt - tizenbrew-updater/TizenBrewUpdater/release/TizenBrewUpdater-New.wgt - tizenbrew-app/TizenBrew/release/TizenBrewStandaloneUSBDemo.zip - tizenbrew-updater/TizenBrewUpdater/release/TizenBrewUpdaterUSBDemo.zip \ No newline at end of file + tizenbrew-app/TizenBrew/release/* + tizenbrew-updater/TizenBrewUpdater/release/* + tizenbrew-updater/TizenBrewUpdater/dist/* \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 4d5f8de..0c0b2ad 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,11 +6,27 @@ TizenBrew is a modular system, meaning you can install new modded websites and a ## Installation -To install TizenBrew, you need to have a Samsung TV (Tizen) device that has at least Tizen 3.0 (2017 or newer). There are three ways to install TizenBrew. +To install TizenBrew, you need to have a Samsung TV (Tizen) device that has at least Tizen 3.0 (2017 or newer). There are four ways to install TizenBrew. + +### Using TizenBrew Updater + +This method is easier than any other method and works on all Tizen versions. + +1. Change the Host PC IP address to your PC's IP address by following [this](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html#Connecting-the-TV-and-SDK) + +2. Download the latest TizenBrew Updater for your OS from the [releases page](https://github.com/reisxd/TizenBrew/releases/latest). + +3. Run the TizenBrew Updater and follow the instructions. + +4. Change the Host PC IP address to `127.0.0.1` by following [this](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html#Connecting-the-TV-and-SDK) + +5. You can now launch the TizenBrew app on your TV. + +Note that you may not be able to install TizenBrew to your TV if your TV is Tizen 8 or newer (2024+). You'll have to rebuild TizenBrew from source to install it on newer TVs. ### Using TizenBrew Installer -This method is easier than the USB Demo Package method, but it works only on Tizen 3.0 to 6.0 (2017 to 2021). If you have a newer TV, use the USB Demo Package method or the Command Line method. +This method is easier than the USB Demo Package method, but it works only on Tizen 3.0 to 6.0 (2017 to 2021). If you have a newer TV, use the TizenBrew Updater or the USB Demo Package method or the Command Line method. 1. Change the Host PC IP address to `127.0.0.1` by following [this](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html#Connecting-the-TV-and-SDK) @@ -22,7 +38,7 @@ This method is easier than the USB Demo Package method, but it works only on Tiz ### Using USB Demo Package -Note that this method could be temporary. If you want to have TizenBrew permanently installed, use the command line method. This method is the 2nd easiest way to install TizenBrew. +Note that if you want to install TizenBrew using this method, the app will be installed for only 30 days. If you want to have TizenBrew permanently installed, use the command line method. This method is the 2nd easiest way to install TizenBrew. 1. Download the latest TizenBrew USB Demo Package from the [releases page](https://github.com/reisxd/TizenBrew/releases/latest). @@ -61,3 +77,32 @@ Note that tizen is in `C:\tizen-studio\tools\ide\bin` on Windows and in `~/tizen 6. Set the Host PC IP address to `127.0.0.1` by following [this](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html#Connecting-the-TV-and-SDK) 7. You can now launch the TizenBrew app on your TV. + + +## Rebuiding TizenBrew + +To rebuild TizenBrew, you need to have Node.js installed on your system. You can install Node.js from [here](https://nodejs.org/). You also need to have Tizen Studio installed on your system. You can install Tizen Studio from [here](https://developer.samsung.com/smarttv/develop/getting-started/setting-up-sdk/installing-tv-sdk.html). + +1. Download the source code from the [releases page](https://github.com/reisxd/TizenBrew/releases/latest) (zip file) or clone the repository by running: +```bash +git clone https://github.com/reisxd/TizenBrew.git +``` + +2. Open up Tizen Studio and import the project by going to `File > Import > Tizen > Tizen Web Project` and import the `tizenbrew-app/TizenBrew` folder. + +3. Open up the `tizenbrew-app/TizenBrew/service` folder in a terminal and run: + +```bash +npm install +npx @vercel/ncc build service.js +``` + +4. Connect to your TV by following [this](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html#Connecting-the-TV-and-SDK) + +5. Open up Certificate Manager by going to `Tools > Certificate Manager` and create a new Samsung certificate. See [this](https://developer.samsung.com/smarttv/develop/getting-started/setting-up-sdk/creating-certificates.html) for more information. + +6. Now Run the project by right clicking on the project and clicking on `Run As > Tizen Web Application`. + +7. Change the Host PC IP address to `127.0.0.1` by following [this](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html#Connecting-the-TV-and-SDK) + +8. You can now launch the TizenBrew app on your TV. \ No newline at end of file diff --git a/tizenbrew-updater/TizenBrewUpdater/index.html b/tizenbrew-updater/TizenBrewUpdater/index.html index a27f961..54ae60f 100644 --- a/tizenbrew-updater/TizenBrewUpdater/index.html +++ b/tizenbrew-updater/TizenBrewUpdater/index.html @@ -101,12 +101,15 @@ break; + case 13: + selectedItem.click(); + } };