Skip to content

Build on Windows

Dmitry Lyzo edited this page Sep 17, 2023 · 14 revisions

Commands in this guide are for Windows Command Prompt or Batch files. Most of them will work in Windows PowerShell. Special cases will be in collapsible command blocks.

Prerequisites

All tools (node, tizen) are assumed to be added to the PATH environment variable.

Getting Started

  1. Install prerequisites.

  2. Install Certificate Manager using Tizen Studio Package Manager.

  3. Setup Tizen certificate in Certificate Manager.

  4. Clone or download Jellyfin Web repository (https://github.com/jellyfin/jellyfin-web).

    It is recommended that the web version match the server version.

    git clone -b release-10.8.z https://github.com/jellyfin/jellyfin-web.git

    Replace release-10.8.z with the name of the branch you want to build.

    You can also use git checkout to switch branches.

  5. Clone or download Jellyfin Tizen (this) repository.

    git clone https://github.com/jellyfin/jellyfin-tizen.git

Build Jellyfin Web

cd jellyfin-web
set SKIP_PREPARE=1
set USE_SYSTEM_FONTS=1
npm ci --no-audit
npm run build:production
For Windows PowerShell
cd jellyfin-web
$env:SKIP_PREPARE=1
$env:USE_SYSTEM_FONTS=1
npm ci --no-audit
npm run build:production

You should get jellyfin-web/dist/ directory.

set SKIP_PREPARE=1 can be omitted for 10.9+.

USE_SYSTEM_FONTS=1 is required to discard unused fonts and to reduce the size of the app. (Since Jellyfin Web 10.9)

Use npm run build:development if you want to debug the app.

If any changes are made to jellyfin-web/, the jellyfin-web/dist/ directory will need to be rebuilt using the command above.

Prepare Interface

cd jellyfin-tizen
set JELLYFIN_WEB_DIR=C:\jellyfin\jellyfin-web\dist
npm ci --no-audit
For Windows PowerShell
cd jellyfin-tizen
$env:JELLYFIN_WEB_DIR="C:\jellyfin\jellyfin-web\dist"
npm ci --no-audit

You should get jellyfin-tizen/www/ directory.

The JELLYFIN_WEB_DIR environment variable can be used to override the location of jellyfin-web.

Add DISCARD_UNUSED_FONTS=1 environment variable to discard unused fonts and to reduce the size of the app. (Until Jellyfin Web 10.9)
Don't use it with Jellyfin Web 10.9+. Instead, use USE_SYSTEM_FONTS=1 environment variable when building Jellyfin Web.

If any changes are made to jellyfin-web/dist/, the jellyfin-tizen/www/ directory will need to be rebuilt using the command above.

Build WGT

Make sure you select the appropriate Certificate Profile in Tizen Certificate Manager. This determines which devices you can install the widget on.

tizen.bat build-web -e ".*" -e gulpfile.js -e README.md -e "node_modules/*" -e "package*.json" -e "yarn.lock"
tizen.bat package -t wgt -o . -- .buildResult

You should get Jellyfin.wgt.