Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion dev/macos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

## Quick Start

### Setup and build
```bash
dev/macos/setup.sh # First time: install dependencies
dev/macos/build.sh # Build
dev/macos/run.sh # Run
```
### Run the application
```bash
dev/macos/run.sh
```
### Run the unit tests
```bash
dev/macos/test.sh
```

## Prerequisites
Expand All @@ -31,6 +39,7 @@ dev/macos/run.sh # Run
- `build.sh` - Configure and build
- `bundle.sh` - Create DMG for distribution
- `run.sh` - Run the built app (passes arguments through)
- `test.sh` - Run unit tests (sets up Qt/mpv in PATH)
- `common.sh` - Shared variables (sourced by other scripts)

## Clean Build
Expand Down
15 changes: 15 additions & 0 deletions dev/macos/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,18 @@ PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
DEPS_DIR="${SCRIPT_DIR}/deps"
BUILD_DIR="${PROJECT_ROOT}/build"
APP_NAME="Jellyfin Desktop.app"

# Setup runtime environment for Qt libs from aqt installation (unbundled dev build).
# Call from run.sh / test.sh after sourcing this file.
setup_runtime() {
QTROOT="${DEPS_DIR}/qt/${QT_VERSION}/macos"

if [ ! -d "${BUILD_DIR}" ]; then
echo "error: Build not found. Run build.sh first" >&2
exit 1
fi

export DYLD_FRAMEWORK_PATH="${QTROOT}/lib"
export QT_PLUGIN_PATH="${QTROOT}/plugins"
export QML_IMPORT_PATH="${QTROOT}/qml"
}
11 changes: 3 additions & 8 deletions dev/macos/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ set -eu

SCRIPT_DIR="$(cd "$(dirname "${0}")" && pwd)"
. "${SCRIPT_DIR}/common.sh"
setup_runtime

QTROOT="${DEPS_DIR}/qt/${QT_VERSION}/macos"
APP_PATH="${BUILD_DIR}/src/${APP_NAME}"

# Check build exists
if [ ! -d "${APP_PATH}" ]; then
echo "error: Build not found. Run build.sh first" >&2
echo "error: App bundle not found at ${APP_PATH}" >&2
exit 1
fi

# Run with Qt libs from aqt installation (unbundled dev build)
export DYLD_FRAMEWORK_PATH="${QTROOT}/lib"
export QT_PLUGIN_PATH="${QTROOT}/plugins"
export QML_IMPORT_PATH="${QTROOT}/qml"
exec "${APP_PATH}/Contents/MacOS/Jellyfin Desktop" "${@}"
exec "${APP_PATH}/Contents/MacOS/Jellyfin Desktop" ${1+"$@"}
11 changes: 11 additions & 0 deletions dev/macos/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env sh
# Jellyfin Desktop - Run unit tests
# Run build.sh first
set -eu

SCRIPT_DIR="$(cd "$(dirname "${0}")" && pwd)"
. "${SCRIPT_DIR}/common.sh"
setup_runtime

cd "${BUILD_DIR}"
ctest --output-on-failure "$@"
11 changes: 10 additions & 1 deletion dev/windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

## Quick Start

### Setup and build
```cmd
dev\windows\setup.bat # First time: download dependencies
dev\windows\build.bat # Build
dev\windows\run.bat # Run
```
### Run the application
```cmd
dev\windows\run.bat
```
### Run the unit tests
```cmd
dev\windows\test.bat
```

## Prerequisites
Expand All @@ -31,6 +39,7 @@ dev\windows\run.bat # Run
- `build.bat` - Configure and build
- `bundle.bat` - Create installer and portable ZIP
- `run.bat` - Run executable (sets up Qt/mpv in PATH)
- `test.bat` - Run unit tests (sets up Qt/mpv in PATH)
- `common.bat` - Shared variables (sourced by other scripts)

## Clean Build
Expand Down
14 changes: 14 additions & 0 deletions dev/windows/common.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,17 @@ if not defined VCVARS if exist "%VS_CM%" set "VCVARS=%VS_CM%"
if not defined VCVARS if exist "%VS_PR%" set "VCVARS=%VS_PR%"
if not defined VCVARS if exist "%VS_EN%" set "VCVARS=%VS_EN%"
if not defined VCVARS if exist "%VS_BT86%" set "VCVARS=%VS_BT86%"

if "%~1"=="" goto :eof
goto %~1

REM === Setup runtime PATH for DLLs ===
REM Call with: call "%~dp0common.bat" :setup_runtime
:setup_runtime
if not exist "%BUILD_DIR%" (
echo ERROR: Build not found. Run build.bat first
exit /b 1
)
set "PATH=%DEPS_DIR%\mpv;%PATH%"
set "PATH=%DEPS_DIR%\qt\%QT_VERSION%\msvc2022_64\bin;%PATH%"
goto :eof
11 changes: 1 addition & 10 deletions dev/windows/run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@ REM Run build.bat first

setlocal
call "%~dp0common.bat"

REM === Check build exists ===
if not exist "%BUILD_DIR%\src\%EXE_NAME%" (
echo ERROR: Build not found. Run build.bat first
exit /b 1
)

REM === Setup PATH for DLLs ===
set "PATH=%DEPS_DIR%\mpv;%PATH%"
set "PATH=%DEPS_DIR%\qt\%QT_VERSION%\msvc2022_64\bin;%PATH%"
call "%~dp0common.bat" :setup_runtime || exit /b 1

REM === Run ===
"%BUILD_DIR%\src\%EXE_NAME%" %*
Expand Down
14 changes: 14 additions & 0 deletions dev/windows/test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo off
REM Jellyfin Desktop - Run unit tests
REM Run build.bat first

setlocal
call "%~dp0common.bat"
call "%~dp0common.bat" :setup_runtime || exit /b 1

REM === Run tests ===
cd /d "%BUILD_DIR%"
ctest --output-on-failure %*
set EXIT_CODE=%ERRORLEVEL%

endlocal & exit /b %EXIT_CODE%