Skip to content
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
26 changes: 13 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
- name: Install dependencies
run: |
brew update
brew install ninja mpv qt@5 || true
brew install ninja mpv qt@6 || true
- name: Release build
run: |
mkdir build
sed -i '' 's|await loadScript('\''qrc:///qtwebchannel/qwebchannel.js'\'');|document.body.style.overscrollBehavior = "none";&|g' native/nativeshell.js
cd build
cmake -GNinja -DQTROOT=/usr/local/opt/qt@5 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
cmake -GNinja -DQTROOT=/usr/local/opt/qt@6 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
ninja install
- name: Fix library paths and create dmg
run: |
Expand Down Expand Up @@ -53,13 +53,13 @@ jobs:
- name: Install dependencies
run: |
brew update
brew install ninja mpv qt@5 || true
brew install ninja mpv qt@6 || true
- name: Release build
run: |
mkdir build
sed -i '' 's|await loadScript('\''qrc:///qtwebchannel/qwebchannel.js'\'');|document.body.style.overscrollBehavior = "none";&|g' native/nativeshell.js
cd build
cmake -GNinja -DQTROOT=/opt/homebrew/opt/qt@5 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
cmake -GNinja -DQTROOT=/opt/homebrew/opt/qt@6 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
ninja install
- name: Fix library paths and create dmg
run: |
Expand All @@ -78,10 +78,10 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt 5.15.2
- name: Install Qt 6
uses: jurplel/install-qt-action@v3
with:
version: "5.15.2"
version: "6.8.0"
arch: "win64_msvc2019_64"
modules: "qtwebengine"
- name: Install dependencies
Expand All @@ -107,7 +107,7 @@ jobs:
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cd build
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt5_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output ..
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt6_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output ..
lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X64
ninja
ninja windows_package
Expand All @@ -122,10 +122,10 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt 5.15.2
- name: Install Qt 6
uses: jurplel/install-qt-action@v4
with:
version: "5.15.2"
version: "6.8.0"
arch: "win64_msvc2019_64"
modules: "qtwebengine"
- name: Install dependencies
Expand All @@ -151,7 +151,7 @@ jobs:
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cd build
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt5_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output ..
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt6_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output ..
lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X64
ninja
ninja windows_package
Expand All @@ -166,10 +166,10 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt 5.15.2
- name: Install Qt 6
uses: jurplel/install-qt-action@v4
with:
version: "5.15.2"
version: "6.8.0"
arch: "win32_msvc2019"
modules: "qtwebengine"
- name: Install dependencies
Expand All @@ -195,7 +195,7 @@ jobs:
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
cd build
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt5_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output ..
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt6_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output ..
lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X86
ninja
ninja windows_package
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ elseif(UNIX AND (NOT APPLE))
include(LinuxConfiguration)
endif(APPLE)

if (Qt5_POSITION_INDEPENDENT_CODE)
if (Qt6_POSITION_INDEPENDENT_CODE)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif(Qt5_POSITION_INDEPENDENT_CODE)
endif(Qt6_POSITION_INDEPENDENT_CODE)

add_subdirectory(external)
add_subdirectory(src)
Expand Down
1 change: 1 addition & 0 deletions CMakeModules/DependencyConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ endif(IS_DIRECTORY ${DEPENDENCY_ROOT})

find_package(Threads REQUIRED)
find_package(PythonInterp REQUIRED)
find_package(MpvQt REQUIRED)
47 changes: 21 additions & 26 deletions CMakeModules/QtConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,59 +19,54 @@ list(APPEND CMAKE_FIND_ROOT_PATH ${QTROOT})
list(APPEND CMAKE_PREFIX_PATH ${QTROOT})
include_directories(${QTROOT}/include)

set(REQUIRED_QT_VERSION "5.7.0")
set(REQUIRED_QT_VERSION "6.0.0")

set(QTCONFIGROOT ${QTROOT}/lib/cmake/Qt5)
set(components Core Network WebChannel Qml Quick Xml WebChannel WebEngine WebEngineWidgets Widgets)
set(QTCONFIGROOT ${QTROOT}/lib/cmake/Qt6)
set(components Core Network WebChannel Qml Quick Xml WebEngineQuick WebEngineCore Widgets OpenGL)

if(UNIX AND (NOT APPLE) AND ((NOT BUILD_TARGET STREQUAL "RPI")))
add_definitions(-DUSE_X11EXTRAS)
set(components ${components} X11Extras Gui)
set(components ${components} Gui)
endif()

if(LINUX_DBUS)
set(components ${components} DBus)
endif(LINUX_DBUS)

if(WIN32)
set(components ${components} WinExtras)
endif(WIN32)

foreach(COMP ${components})
set(mod Qt5${COMP})
set(mod Qt6${COMP})

# look for the config files in the QtConfigRoot defined above
set(${mod}_DIR ${QTCONFIGROOT}${COMP})

# look for the actual package
find_package(${mod} ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6 REQUIRED COMPONENTS ${COMP})

include_directories(${${mod}_INCLUDE_DIRS})
if(OPENELEC)
include_directories(${${mod}_PRIVATE_INCLUDE_DIRS})
endif(OPENELEC)

# Need private interfaces for qpa/qplatformnativeinterface.h:
if(${mod} STREQUAL Qt5Gui)
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
if(${mod} STREQUAL Qt6Gui)
include_directories(${Qt6Gui_PRIVATE_INCLUDE_DIRS})
endif()

list(APPEND QT5_LIBRARIES ${${mod}_LIBRARIES})
list(APPEND QT5_CFLAGS ${${mod}_EXECUTABLE_COMPILE_FLAGS})
list(APPEND QT6_LIBRARIES ${${mod}_LIBRARIES})
list(APPEND QT6_CFLAGS ${${mod}_EXECUTABLE_COMPILE_FLAGS})
endforeach(COMP ${components})

if(QT5_CFLAGS)
list(REMOVE_DUPLICATES QT5_CFLAGS)
if(QT6_CFLAGS)
list(REMOVE_DUPLICATES QT6_CFLAGS)
if(WIN32)
list(REMOVE_ITEM QT5_CFLAGS -fPIC)
list(REMOVE_ITEM QT6_CFLAGS -fPIC)
endif(WIN32)
endif(QT5_CFLAGS)
endif(QT6_CFLAGS)

message(STATUS "Qt version: ${Qt5Core_VERSION_STRING}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QT5_CFLAGS}")
message(STATUS "Qt version: ${Qt6Core_VERSION}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QT6_CFLAGS}")

set(CMAKE_REQUIRED_INCLUDES ${Qt5WebEngine_INCLUDE_DIRS};${Qt5WebEngine_PRIVATE_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${QT5_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${Qt6WebEngineCore_INCLUDE_DIRS};${Qt6WebEngineCore_PRIVATE_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${QT6_LIBRARIES})

include(CheckCXXSourceCompiles)

Expand All @@ -83,9 +78,9 @@ CHECK_CXX_SOURCE_COMPILES(
QSurfaceFormat::FormatOption o = QSurfaceFormat::UseOptimalOrientation;
return 0;
}
" QT5_HAVE_OPTIMALORIENTATION)
" QT6_HAVE_OPTIMALORIENTATION)

if(QT5_HAVE_OPTIMALORIENTATION)
if(QT6_HAVE_OPTIMALORIENTATION)
message(STATUS "QSurfaceFormat::UseOptimalOrientation found")
add_definitions(-DHAVE_OPTIMALORIENTATION)
endif()
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ git clone https://github.com/jellyfin/jellyfin-media-player.git --branch v1.9.1

Install dependencies:
```bash
sudo apt install build-essential autoconf automake libtool libharfbuzz-dev libfreetype6-dev libfontconfig1-dev libx11-dev libxrandr-dev libvdpau-dev libva-dev mesa-common-dev libegl1-mesa-dev yasm libasound2-dev libpulse-dev libuchardet-dev zlib1g-dev libfribidi-dev git libgnutls28-dev libgl1-mesa-dev libsdl2-dev cmake wget meson nasm ninja-build python3 g++ qtwebengine5-dev qtquickcontrols2-5-dev libqt5x11extras5-dev libcec-dev qml-module-qtquick-controls qml-module-qtwebengine qml-module-qtwebchannel qtbase5-private-dev curl unzip
```

Build commands for Ubuntu:
```bash
sudo apt install autoconf automake build-essential cmake curl g++ git libasound2-dev libcec-dev libegl1-mesa-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgl1-mesa-dev libgnutls28-dev libharfbuzz-dev libpulse-dev libsdl2-dev libtool libuchardet-dev libva-dev libvdpau-dev libx11-dev libxrandr-dev mesa-common-dev meson python3 qml6-module-qtqml-workerscript qml6-module-qtquick-controls qml6-module-qtquick-templates qml6-module-qtquick-window qml6-module-qtwebchannel qml6-module-qtwebengine qml6-module-qtwebengine-controlsdelegates qml6-module-qtwebview qt6-base-private-dev qt6-webengine-private-dev unzip wget yasm zlib1g-dev
mkdir ~/jmp; cd ~/jmp
git clone https://github.com/mpv-player/mpv-build.git
cd mpv-build
Expand All @@ -62,7 +58,7 @@ rm -rf ~/jmp/

Install dependencies:
```bash
sudo dnf install autoconf automake libtool freetype-devel libXrandr-devel libvdpau-devel libva-devel mesa-libGL-devel libdrm-devel libX11-devel mesa-libEGL-devel yasm alsa-lib pulseaudio-libs-devel zlib-devel fribidi-devel git gnutls-devel mesa-libGLU-devel SDL2-devel cmake wget python g++ qt-devel libcec-devel qt5-qtbase-devel curl unzip qt5-qtwebchannel-devel qt5-qtwebengine-devel qt5-qtx11extras-devel mpv.x86_64 qwt-qt5-devel.x86_64 qt5-qtbase.x86_64 meson.noarch ninja-build.x86_64 qt5-qtbase-private-devel mpv-libs.x86_64 mpv-devel qt5-qtquickcontrols qt5-qtquickcontrols2 nasm libatomic libshaderc-2024.3
sudo dnf install autoconf automake libtool freetype-devel libXrandr-devel libvdpau-devel libva-devel mesa-libGL-devel libdrm-devel libX11-devel mesa-libEGL-devel yasm alsa-lib pulseaudio-libs-devel zlib-devel fribidi-devel git gnutls-devel mesa-libGLU-devel SDL2-devel cmake wget python g++ qt-devel libcec-devel qt6-qtbase-devel curl unzip qt6-qtwebchannel-devel qt6-qtwebengine-devel mpv.x86_64 qt6-qtbase.x86_64 meson.noarch ninja-build.x86_64 qt6-qtbase-private-devel mpv-libs.x86_64 mpv-devel qt6-qtdeclarative nasm libatomic libshaderc-2024.3
```

Build commands for Fedora:
Expand Down Expand Up @@ -99,7 +95,7 @@ Please install:
- Place this in the build directory.
- [QT](https://www.qt.io/download-thank-you?hsLang=en)
- This package is huge. You also need to make a QT account...
- Check "MSVC 2019 64-bit" and "Qt WebEngine" under QT 5.15.2.
- Check "MSVC 2019 64-bit" and "Qt WebEngine" under Qt 6.
- [VS2019 Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019)
- Again this will use a lot of disk space. The installer is small though.
- [libmpv1](https://sourceforge.net/projects/mpv-player-windows/files/libmpv/)
Expand All @@ -121,15 +117,15 @@ Open the "x86_x64 Cross Tools Command Prompt for VS 2019". `cd` to the `build` d

```
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=C:/Qt/5.15.2/msvc2019_64 -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output ..
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=C:/Qt/6.x.x/msvc2019_64 -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCMAKE_INSTALL_PREFIX=output ..
lib /def:mpv\mpv.def /out:mpv\mpv.dll.lib /MACHINE:X64
ninja
ninja windows_package
```

## Building for MacOS

Install [QT 5.15.2](https://www.qt.io/download-thank-you?hsLang=en), remember to check `Qt WebEngine`.
Install [Qt 6](https://www.qt.io/download-thank-you?hsLang=en), remember to check `Qt WebEngine`.

Then run the following commands (replace <QT_DIR> with your QT installation location):

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
jellyfin-media-player (1.13.0-1) unstable; urgency=medium

* Update to Qt 6

-- Izzie Walton <izzie@iwalton.com> Fri, 22 Nov 2024 00:00:00 -0500

jellyfin-media-player (1.12.0-1) unstable; urgency=medium

* Prevent issue where wayland has black screen due to broken gpu accel (#165, #610)
Expand Down
14 changes: 7 additions & 7 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ Build-Depends: debhelper (>= 10),
wget,
python3,
g++,
qtwebengine5-dev,
qtquickcontrols2-5-dev,
libqt5x11extras5-dev,
qt6-webengine-dev,
qt6-declarative-dev,
qt6-base-dev,
libcec-dev,
libmpv-dev,
wget,
unzip,
qtbase5-private-dev
qt6-base-private-dev
Standards-Version: 3.9.4
Homepage: https://jellyfin.org/
Vcs-Git: https://github.org/jellyfin/jellyfin-media-player.git
Expand All @@ -45,8 +45,8 @@ Vcs-Browser: https://github.org/jellyfin/jellyfin-media-player
Package: jellyfin-media-player
Architecture: any
Depends: ${shlibs:Depends},
qml-module-qtwebengine,
qml-module-qtwebchannel,
qml-module-qtquick-controls
qml6-module-qtwebengine,
qml6-module-qtwebchannel,
qml6-module-qtquick-controls
Description: Jellyfin is the Free Software Media System.
This package provides the Jellyfin desktop media player.
4 changes: 4 additions & 0 deletions external/plistparser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ add_library(plistparser STATIC
plistserializer.h
)
std_target_properties(plistparser)
target_link_libraries(plistparser
Qt6::Core
Qt6::Xml
)
2 changes: 1 addition & 1 deletion for-web-developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ after less than a second.

### Client API Usage

The API is a [QWebChannel](https://doc.qt.io/qt-5/qtwebchannel-javascript.html) API which is async and callback-driven.
The API is a [QWebChannel](https://doc.qt.io/qt-6/qtwebchannel-javascript.html) API which is async and callback-driven.

To invoke a function:

Expand Down
18 changes: 17 additions & 1 deletion native/jmpInputPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const remap = {
}

class jmpInputPlugin {
constructor({ inputManager }) {
constructor({ inputManager, playbackManager }) {
this.name = 'JMP Input Plugin';
this.type = 'input';
this.id = 'jmpInputPlugin';
Expand All @@ -31,6 +31,22 @@ class jmpInputPlugin {
});
});

// Listen for fullscreen setting changes and trigger fullscreenchange event
let lastFullscreenState = window.jmpInfo.settings.main.fullscreen;
window.jmpInfo.settingsUpdate.push(function(section) {
if (section === 'main') {
const currentFullscreenState = window.jmpInfo.settings.main.fullscreen;
if (currentFullscreenState !== lastFullscreenState) {
lastFullscreenState = currentFullscreenState;
console.log('[jmpInputPlugin] Fullscreen setting changed, triggering fullscreenchange event');
const currentPlayer = playbackManager._currentPlayer;
if (currentPlayer) {
window.Events.trigger(currentPlayer, 'fullscreenchange');
}
}
}
});

api.system.hello("jmpInputPlugin");
})();
}
Expand Down
Loading
Loading