Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

Commit 9afbb79

Browse files
authored
Merge pull request #599 from jellyfin/qt6
Change to Qt 6
2 parents 713ac65 + 6f54621 commit 9afbb79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1576
-1702
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
- name: Install dependencies
1515
run: |
1616
brew update
17-
brew install ninja mpv qt@5 || true
17+
brew install ninja mpv qt@6 || true
1818
- name: Release build
1919
run: |
2020
mkdir build
2121
sed -i '' 's|await loadScript('\''qrc:///qtwebchannel/qwebchannel.js'\'');|document.body.style.overscrollBehavior = "none";&|g' native/nativeshell.js
2222
cd build
23-
cmake -GNinja -DQTROOT=/usr/local/opt/qt@5 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
23+
cmake -GNinja -DQTROOT=/usr/local/opt/qt@6 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
2424
ninja install
2525
- name: Fix library paths and create dmg
2626
run: |
@@ -53,13 +53,13 @@ jobs:
5353
- name: Install dependencies
5454
run: |
5555
brew update
56-
brew install ninja mpv qt@5 || true
56+
brew install ninja mpv qt@6 || true
5757
- name: Release build
5858
run: |
5959
mkdir build
6060
sed -i '' 's|await loadScript('\''qrc:///qtwebchannel/qwebchannel.js'\'');|document.body.style.overscrollBehavior = "none";&|g' native/nativeshell.js
6161
cd build
62-
cmake -GNinja -DQTROOT=/opt/homebrew/opt/qt@5 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
62+
cmake -GNinja -DQTROOT=/opt/homebrew/opt/qt@6 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output ..
6363
ninja install
6464
- name: Fix library paths and create dmg
6565
run: |
@@ -78,10 +78,10 @@ jobs:
7878
runs-on: windows-latest
7979
steps:
8080
- uses: actions/checkout@v4
81-
- name: Install Qt 5.15.2
81+
- name: Install Qt 6
8282
uses: jurplel/install-qt-action@v3
8383
with:
84-
version: "5.15.2"
84+
version: "6.8.0"
8585
arch: "win64_msvc2019_64"
8686
modules: "qtwebengine"
8787
- name: Install dependencies
@@ -107,7 +107,7 @@ jobs:
107107
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
108108
cd build
109109
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
110-
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 ..
110+
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 ..
111111
lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X64
112112
ninja
113113
ninja windows_package
@@ -122,10 +122,10 @@ jobs:
122122
runs-on: windows-latest
123123
steps:
124124
- uses: actions/checkout@v4
125-
- name: Install Qt 5.15.2
125+
- name: Install Qt 6
126126
uses: jurplel/install-qt-action@v4
127127
with:
128-
version: "5.15.2"
128+
version: "6.8.0"
129129
arch: "win64_msvc2019_64"
130130
modules: "qtwebengine"
131131
- name: Install dependencies
@@ -151,7 +151,7 @@ jobs:
151151
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
152152
cd build
153153
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
154-
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 ..
154+
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 ..
155155
lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X64
156156
ninja
157157
ninja windows_package
@@ -166,10 +166,10 @@ jobs:
166166
runs-on: windows-latest
167167
steps:
168168
- uses: actions/checkout@v4
169-
- name: Install Qt 5.15.2
169+
- name: Install Qt 6
170170
uses: jurplel/install-qt-action@v4
171171
with:
172-
version: "5.15.2"
172+
version: "6.8.0"
173173
arch: "win32_msvc2019"
174174
modules: "qtwebengine"
175175
- name: Install dependencies
@@ -195,7 +195,7 @@ jobs:
195195
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
196196
cd build
197197
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
198-
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 ..
198+
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 ..
199199
lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X86
200200
ninja
201201
ninja windows_package

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ elseif(UNIX AND (NOT APPLE))
7070
include(LinuxConfiguration)
7171
endif(APPLE)
7272

73-
if (Qt5_POSITION_INDEPENDENT_CODE)
73+
if (Qt6_POSITION_INDEPENDENT_CODE)
7474
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
75-
endif(Qt5_POSITION_INDEPENDENT_CODE)
75+
endif(Qt6_POSITION_INDEPENDENT_CODE)
7676

7777
add_subdirectory(external)
7878
add_subdirectory(src)

CMakeModules/DependencyConfiguration.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ endif(IS_DIRECTORY ${DEPENDENCY_ROOT})
4141

4242
find_package(Threads REQUIRED)
4343
find_package(PythonInterp REQUIRED)
44+
find_package(MpvQt REQUIRED)

CMakeModules/QtConfiguration.cmake

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,59 +19,54 @@ list(APPEND CMAKE_FIND_ROOT_PATH ${QTROOT})
1919
list(APPEND CMAKE_PREFIX_PATH ${QTROOT})
2020
include_directories(${QTROOT}/include)
2121

22-
set(REQUIRED_QT_VERSION "5.7.0")
22+
set(REQUIRED_QT_VERSION "6.0.0")
2323

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

2727
if(UNIX AND (NOT APPLE) AND ((NOT BUILD_TARGET STREQUAL "RPI")))
28-
add_definitions(-DUSE_X11EXTRAS)
29-
set(components ${components} X11Extras Gui)
28+
set(components ${components} Gui)
3029
endif()
3130

3231
if(LINUX_DBUS)
3332
set(components ${components} DBus)
3433
endif(LINUX_DBUS)
3534

36-
if(WIN32)
37-
set(components ${components} WinExtras)
38-
endif(WIN32)
39-
4035
foreach(COMP ${components})
41-
set(mod Qt5${COMP})
42-
36+
set(mod Qt6${COMP})
37+
4338
# look for the config files in the QtConfigRoot defined above
4439
set(${mod}_DIR ${QTCONFIGROOT}${COMP})
4540

4641
# look for the actual package
47-
find_package(${mod} ${REQUIRED_QT_VERSION} REQUIRED)
42+
find_package(Qt6 REQUIRED COMPONENTS ${COMP})
4843

4944
include_directories(${${mod}_INCLUDE_DIRS})
5045
if(OPENELEC)
5146
include_directories(${${mod}_PRIVATE_INCLUDE_DIRS})
5247
endif(OPENELEC)
5348

5449
# Need private interfaces for qpa/qplatformnativeinterface.h:
55-
if(${mod} STREQUAL Qt5Gui)
56-
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
50+
if(${mod} STREQUAL Qt6Gui)
51+
include_directories(${Qt6Gui_PRIVATE_INCLUDE_DIRS})
5752
endif()
5853

59-
list(APPEND QT5_LIBRARIES ${${mod}_LIBRARIES})
60-
list(APPEND QT5_CFLAGS ${${mod}_EXECUTABLE_COMPILE_FLAGS})
54+
list(APPEND QT6_LIBRARIES ${${mod}_LIBRARIES})
55+
list(APPEND QT6_CFLAGS ${${mod}_EXECUTABLE_COMPILE_FLAGS})
6156
endforeach(COMP ${components})
6257

63-
if(QT5_CFLAGS)
64-
list(REMOVE_DUPLICATES QT5_CFLAGS)
58+
if(QT6_CFLAGS)
59+
list(REMOVE_DUPLICATES QT6_CFLAGS)
6560
if(WIN32)
66-
list(REMOVE_ITEM QT5_CFLAGS -fPIC)
61+
list(REMOVE_ITEM QT6_CFLAGS -fPIC)
6762
endif(WIN32)
68-
endif(QT5_CFLAGS)
63+
endif(QT6_CFLAGS)
6964

70-
message(STATUS "Qt version: ${Qt5Core_VERSION_STRING}")
71-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QT5_CFLAGS}")
65+
message(STATUS "Qt version: ${Qt6Core_VERSION}")
66+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QT6_CFLAGS}")
7267

73-
set(CMAKE_REQUIRED_INCLUDES ${Qt5WebEngine_INCLUDE_DIRS};${Qt5WebEngine_PRIVATE_INCLUDE_DIRS})
74-
set(CMAKE_REQUIRED_LIBRARIES ${QT5_LIBRARIES})
68+
set(CMAKE_REQUIRED_INCLUDES ${Qt6WebEngineCore_INCLUDE_DIRS};${Qt6WebEngineCore_PRIVATE_INCLUDE_DIRS})
69+
set(CMAKE_REQUIRED_LIBRARIES ${QT6_LIBRARIES})
7570

7671
include(CheckCXXSourceCompiles)
7772

@@ -83,9 +78,9 @@ CHECK_CXX_SOURCE_COMPILES(
8378
QSurfaceFormat::FormatOption o = QSurfaceFormat::UseOptimalOrientation;
8479
return 0;
8580
}
86-
" QT5_HAVE_OPTIMALORIENTATION)
81+
" QT6_HAVE_OPTIMALORIENTATION)
8782

88-
if(QT5_HAVE_OPTIMALORIENTATION)
83+
if(QT6_HAVE_OPTIMALORIENTATION)
8984
message(STATUS "QSurfaceFormat::UseOptimalOrientation found")
9085
add_definitions(-DHAVE_OPTIMALORIENTATION)
9186
endif()

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ git clone https://github.com/jellyfin/jellyfin-media-player.git --branch v1.9.1
3131

3232
Install dependencies:
3333
```bash
34-
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
35-
```
36-
37-
Build commands for Ubuntu:
38-
```bash
34+
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
3935
mkdir ~/jmp; cd ~/jmp
4036
git clone https://github.com/mpv-player/mpv-build.git
4137
cd mpv-build
@@ -62,7 +58,7 @@ rm -rf ~/jmp/
6258

6359
Install dependencies:
6460
```bash
65-
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
61+
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
6662
```
6763

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

122118
```
123119
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin
124-
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 ..
120+
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 ..
125121
lib /def:mpv\mpv.def /out:mpv\mpv.dll.lib /MACHINE:X64
126122
ninja
127123
ninja windows_package
128124
```
129125

130126
## Building for MacOS
131127

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

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

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
jellyfin-media-player (1.13.0-1) unstable; urgency=medium
2+
3+
* Update to Qt 6
4+
5+
-- Izzie Walton <izzie@iwalton.com> Fri, 22 Nov 2024 00:00:00 -0500
6+
17
jellyfin-media-player (1.12.0-1) unstable; urgency=medium
28

39
* Prevent issue where wayland has black screen due to broken gpu accel (#165, #610)

debian/control

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ Build-Depends: debhelper (>= 10),
2929
wget,
3030
python3,
3131
g++,
32-
qtwebengine5-dev,
33-
qtquickcontrols2-5-dev,
34-
libqt5x11extras5-dev,
32+
qt6-webengine-dev,
33+
qt6-declarative-dev,
34+
qt6-base-dev,
3535
libcec-dev,
3636
libmpv-dev,
3737
wget,
3838
unzip,
39-
qtbase5-private-dev
39+
qt6-base-private-dev
4040
Standards-Version: 3.9.4
4141
Homepage: https://jellyfin.org/
4242
Vcs-Git: https://github.org/jellyfin/jellyfin-media-player.git
@@ -45,8 +45,8 @@ Vcs-Browser: https://github.org/jellyfin/jellyfin-media-player
4545
Package: jellyfin-media-player
4646
Architecture: any
4747
Depends: ${shlibs:Depends},
48-
qml-module-qtwebengine,
49-
qml-module-qtwebchannel,
50-
qml-module-qtquick-controls
48+
qml6-module-qtwebengine,
49+
qml6-module-qtwebchannel,
50+
qml6-module-qtquick-controls
5151
Description: Jellyfin is the Free Software Media System.
5252
This package provides the Jellyfin desktop media player.

external/plistparser/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ add_library(plistparser STATIC
77
plistserializer.h
88
)
99
std_target_properties(plistparser)
10+
target_link_libraries(plistparser
11+
Qt6::Core
12+
Qt6::Xml
13+
)

for-web-developers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ after less than a second.
272272

273273
### Client API Usage
274274

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

277277
To invoke a function:
278278

native/jmpInputPlugin.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const remap = {
1414
}
1515

1616
class jmpInputPlugin {
17-
constructor({ inputManager }) {
17+
constructor({ inputManager, playbackManager }) {
1818
this.name = 'JMP Input Plugin';
1919
this.type = 'input';
2020
this.id = 'jmpInputPlugin';
@@ -31,6 +31,22 @@ class jmpInputPlugin {
3131
});
3232
});
3333

34+
// Listen for fullscreen setting changes and trigger fullscreenchange event
35+
let lastFullscreenState = window.jmpInfo.settings.main.fullscreen;
36+
window.jmpInfo.settingsUpdate.push(function(section) {
37+
if (section === 'main') {
38+
const currentFullscreenState = window.jmpInfo.settings.main.fullscreen;
39+
if (currentFullscreenState !== lastFullscreenState) {
40+
lastFullscreenState = currentFullscreenState;
41+
console.log('[jmpInputPlugin] Fullscreen setting changed, triggering fullscreenchange event');
42+
const currentPlayer = playbackManager._currentPlayer;
43+
if (currentPlayer) {
44+
window.Events.trigger(currentPlayer, 'fullscreenchange');
45+
}
46+
}
47+
}
48+
});
49+
3450
api.system.hello("jmpInputPlugin");
3551
})();
3652
}

0 commit comments

Comments
 (0)