mirror of
https://github.com/jellyfin/jellyfin-desktop.git
synced 2026-10-26 16:45:24 +00:00
Working 2.0.0 build for Windows
It is really late so I'm calling it here. I wanted to put this out for relevant people to get eyes on, in order to aid in getting the Windows build of v2.0.0 out. Apologies in advance for not following any contrib guidelines or there being messes. I'm leaving in the build scripts I used for now. The build scripts still contain a few hardcoded visual studio related values for now. At the moment when I run the app on a different machine to the dev VM I'm using the qt web view doesn't seem to be rendering. summary of where this is at: the whole thing builds works on my Windows 11 virtual machine short summary of what I did: A couple of qt6 updates specific to windows were addressed. Some build system issues were addressed did some minor refactoring to sieve out binary build dependencies from generated build files since its a lot easier when you can just delete the build folder to run a clean build
This commit is contained in:
1 parent
e0cff7bc88
commit
52d5067676
19 files changed
+1085
-19
No files matched your search
@@ -3,6 +3,8 @@ dependencies/*
|
||||
CMakeLists.txt.user
|
||||
CMakeLists.txt.user.*
|
||||
build/*
|
||||
build_deps/*
|
||||
build_vs_debug/*
|
||||
.idea
|
||||
.install_pkg
|
||||
.openelec-unpack
|
||||
|
||||
@@ -13,9 +13,12 @@ endforeach()
|
||||
get_filename_component(CEC_DIR @CEC_LIBRARY@ DIRECTORY)
|
||||
list(APPEND SEARCHDIRS ${CEC_DIR})
|
||||
|
||||
# fixup_bundle("${CMAKE_INSTALL_PREFIX}/Jellyfin Desktop.exe" "" "${SEARCHDIRS}")
|
||||
# fixup_bundle("${CMAKE_INSTALL_PREFIX}/Jellyfin Desktop.exe" "" "${SEARCHDIRS}")
|
||||
#install(PROGRAMS ${VCREDIST_DIR}/vcredist_msvc2017_x64.exe DESTINATION .)
|
||||
file(INSTALL @MPV_LIBRARY@ DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Install MPV DLL (MPV_LIBRARY points to .lib, we need the .dll)
|
||||
get_filename_component(MPV_DIR "@MPV_LIBRARY@" DIRECTORY)
|
||||
file(INSTALL "${MPV_DIR}/libmpv-2.dll" DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
if(@DO_ENABLE_ANGLE_DEP@)
|
||||
message(STATUS "Deploying separate ANGLE deps")
|
||||
|
||||
@@ -7,7 +7,7 @@ get_filename_component(WIX_BIN_DIR ${WIX_CANDLE} DIRECTORY)
|
||||
|
||||
configure_file(${PROJECT_SOURCE_DIR}/bundle/win/Version.wxi.in Version.wxi)
|
||||
|
||||
set(WIX_VARIABLES -dDeploymentPath="${CMAKE_INSTALL_PREFIX}" -dOutputPath="${CMAKE_BINARY_DIR}")
|
||||
set(WIX_VARIABLES -dDeploymentPath="${CMAKE_INSTALL_PREFIX}" -dOutputPath="${CMAKE_INSTALL_PREFIX}" -dBuildPath="${CMAKE_BINARY_DIR}")
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
# Building Jellyfin Desktop on Windows
|
||||
|
||||
## Quick Start
|
||||
|
||||
```cmd
|
||||
setup_build_deps.bat # First time: download dependencies
|
||||
build_windows.bat # Build
|
||||
```
|
||||
|
||||
Output: `build\output\Jellyfin Desktop.exe`
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Visual Studio 2022/2026** with C++ tools
|
||||
- Install "MSVC v143 - VS 2022 C++ x64/x86 build tools" (required for Qt 6.10.1)
|
||||
- **Qt 6.10.1** MSVC 2022 64-bit at `C:\Qt\6.10.1\msvc2022_64`
|
||||
- **Build dependencies**: Ninja, libmpv, VC++ redistributable
|
||||
|
||||
## Directory Structure
|
||||
|
||||
- `build_deps/` - External dependencies (persisted)
|
||||
- `build/` - Generated files (safe to delete)
|
||||
- `build_vs_debug/` - VS debug build
|
||||
|
||||
## Scripts
|
||||
|
||||
- `build_windows.bat` - Release build + installer
|
||||
- `build_vs.bat` - Debug build for Visual Studio
|
||||
- `setup_build_deps.bat` - Download dependencies
|
||||
- `rebuild.bat` - Quick rebuild
|
||||
|
||||
## Clean Build
|
||||
|
||||
```cmd
|
||||
rmdir /s /q build
|
||||
build_windows.bat
|
||||
```
|
||||
|
||||
## Debugging
|
||||
|
||||
```cmd
|
||||
build_vs.bat
|
||||
```
|
||||
|
||||
Opens VS solution at `build_vs_debug\jellyfin-desktop.sln`
|
||||
|
||||
Requires Qt debug libraries (install via Qt Maintenance Tool).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Black Screen / GPU Issues
|
||||
|
||||
If the app opens but shows a black screen instead of the web interface:
|
||||
|
||||
1. **Try software rendering** (disables GPU acceleration):
|
||||
```cmd
|
||||
launch_software_mode.bat
|
||||
```
|
||||
Or rebuild with the fix and run:
|
||||
```cmd
|
||||
"build\output\Jellyfin Desktop.exe" --software-rendering
|
||||
```
|
||||
|
||||
2. **Test different GPU configurations**:
|
||||
```cmd
|
||||
try_gpu_workarounds.bat
|
||||
```
|
||||
This interactive script tests various rendering modes to find what works.
|
||||
|
||||
3. **Gather diagnostics**:
|
||||
```cmd
|
||||
diagnose_black_screen.bat
|
||||
```
|
||||
Collects logs, GPU info, and process details to `diagnostics/` folder.
|
||||
|
||||
Common causes:
|
||||
- Outdated GPU drivers
|
||||
- Missing DirectX components
|
||||
- Hardware acceleration incompatibility
|
||||
- Older/unsupported graphics cards
|
||||
|
||||
### Log Files
|
||||
|
||||
Application logs are located at:
|
||||
```
|
||||
%LOCALAPPDATA%\Jellyfin Desktop\logs\jellyfin-desktop.log
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Qt 6.10.1 requires VS 2022 toolset (v143) for ABI compatibility
|
||||
- QtWebEngine resources auto-copied by build scripts
|
||||
- Installer created after 5-second countdown (press key to skip)
|
||||
@@ -0,0 +1,177 @@
|
||||
@echo off
|
||||
REM Build script for Visual Studio solution with full Debug configuration
|
||||
REM Requires Qt debug libraries to be installed
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo ========================================
|
||||
echo Jellyfin Desktop - Visual Studio Debug Build
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Set Qt root - adjust this path if needed
|
||||
set QTROOT=C:\Qt\6.10.1\msvc2022_64
|
||||
set BUILD_DEPS_DIR=%~dp0build_deps
|
||||
set BUILD_DIR=%~dp0build_vs_debug
|
||||
|
||||
REM Verify Qt installation
|
||||
if not exist "%QTROOT%" (
|
||||
echo ERROR: Qt directory not found at %QTROOT%
|
||||
echo Please verify your Qt installation path
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Verify Qt debug libraries are installed
|
||||
if not exist "%QTROOT%\bin\Qt6Cored.dll" (
|
||||
echo ERROR: Qt debug libraries not found!
|
||||
echo Please install Qt debug libraries using Qt Maintenance Tool:
|
||||
echo - Run Qt Maintenance Tool
|
||||
echo - Select "Add or remove components"
|
||||
echo - Expand Qt -^> Qt 6.10.1 -^> MSVC 2022 64-bit
|
||||
echo - Check "Qt Debug Information Files"
|
||||
echo - Click Update/Install
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Verify build dependencies
|
||||
if not exist "%BUILD_DEPS_DIR%\ninja.exe" (
|
||||
echo ERROR: ninja.exe not found in %BUILD_DEPS_DIR%
|
||||
echo Please run setup_build_deps.bat first
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%BUILD_DEPS_DIR%\mpv\libmpv-2.dll" (
|
||||
echo ERROR: MPV library not found in %BUILD_DEPS_DIR%\mpv
|
||||
echo Please run setup_build_deps.bat first
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Force VS 2022 toolset (v143) for Qt compatibility
|
||||
echo Forcing VS 2022 toolset (v143) for Qt compatibility...
|
||||
call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.44
|
||||
|
||||
echo Visual Studio tools configured with v143 toolset (14.44)!
|
||||
echo.
|
||||
|
||||
REM Clean and create build directory
|
||||
if exist "%BUILD_DIR%" (
|
||||
echo Cleaning existing build directory...
|
||||
rmdir /s /q "%BUILD_DIR%"
|
||||
)
|
||||
echo Creating build directory...
|
||||
mkdir "%BUILD_DIR%"
|
||||
|
||||
cd /d "%BUILD_DIR%"
|
||||
|
||||
REM Add WiX to PATH for installer creation
|
||||
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files (x86)\WiX Toolset v3.11\bin
|
||||
|
||||
REM Convert paths to forward slashes for CMake
|
||||
set QTROOT_CMAKE=%QTROOT:\=/%
|
||||
set BUILD_DEPS_CMAKE=%BUILD_DEPS_DIR:\=/%
|
||||
|
||||
REM Print compiler version information
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Compiler Version Information
|
||||
echo ========================================
|
||||
cl.exe 2>&1 | findstr /C:"Version"
|
||||
echo.
|
||||
|
||||
REM Configure with CMake - Generate Visual Studio solution for Debug
|
||||
echo Running CMake configuration for Visual Studio (Debug mode)...
|
||||
cmake -G "Visual Studio 18 2026" -A x64 ^
|
||||
-DCMAKE_CONFIGURATION_TYPES="Debug;RelWithDebInfo;Release" ^
|
||||
-DCMAKE_INSTALL_PREFIX=output ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDebugDLL" ^
|
||||
-DQTROOT=%QTROOT_CMAKE% ^
|
||||
-DMPV_INCLUDE_DIR="%BUILD_DEPS_CMAKE%/mpv/include" ^
|
||||
-DMPV_LIBRARY="%BUILD_DEPS_CMAKE%/mpv/libmpv-2.dll.lib" ^
|
||||
-DCHECK_FOR_UPDATES=OFF ^
|
||||
-DUSE_STATIC_MPVQT=ON ^
|
||||
..
|
||||
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo.
|
||||
echo ERROR: CMake configuration failed
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Building Debug Configuration
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Build the Debug configuration
|
||||
cmake --build . --config Debug
|
||||
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo.
|
||||
echo ERROR: Build failed
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Copying Dependencies to Debug Output
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Copy Qt debug DLLs to output directory
|
||||
set DEBUG_OUTPUT=%BUILD_DIR%\src\Debug
|
||||
if not exist "%DEBUG_OUTPUT%" mkdir "%DEBUG_OUTPUT%"
|
||||
|
||||
echo Copying all Qt debug DLLs...
|
||||
for %%f in ("%QTROOT%\bin\Qt6*d.dll") do (
|
||||
echo - %%~nxf
|
||||
copy /Y "%%f" "%DEBUG_OUTPUT%\" >nul
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Copying Qt plugins...
|
||||
xcopy /Y /E /I "%QTROOT%\plugins" "%DEBUG_OUTPUT%\plugins\" >nul
|
||||
|
||||
echo.
|
||||
echo Copying Qt QML modules...
|
||||
xcopy /Y /E /I "%QTROOT%\qml" "%DEBUG_OUTPUT%\qml\" >nul
|
||||
|
||||
echo.
|
||||
echo Copying QtWebEngine resources (CRITICAL!)...
|
||||
xcopy /Y /E /I "%QTROOT%\resources" "%DEBUG_OUTPUT%\resources\" >nul
|
||||
|
||||
echo.
|
||||
echo Copying QtWebEngineProcess (debug version)...
|
||||
copy /Y "%QTROOT%\bin\QtWebEngineProcessd.exe" "%DEBUG_OUTPUT%\" >nul
|
||||
|
||||
echo.
|
||||
echo Copying MPV DLL...
|
||||
copy /Y "%BUILD_DEPS_DIR%\mpv\libmpv-2.dll" "%DEBUG_OUTPUT%\" >nul
|
||||
copy /Y "%BUILD_DEPS_DIR%\mpv\libmpv-2.dll.lib" "%DEBUG_OUTPUT%\" >nul
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Configuration Complete!
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Visual Studio solution created at:
|
||||
echo %BUILD_DIR%\jellyfin-desktop.sln
|
||||
echo.
|
||||
echo Debug executable at:
|
||||
echo %DEBUG_OUTPUT%\Jellyfin Desktop.exe
|
||||
echo.
|
||||
echo To debug in Visual Studio:
|
||||
echo 1. Open: %BUILD_DIR%\jellyfin-desktop.sln
|
||||
echo 2. Select "Debug" configuration (top toolbar)
|
||||
echo 3. Right-click "Jellyfin Desktop" project ^> Set as Startup Project
|
||||
echo 4. Press F5 to start debugging
|
||||
echo.
|
||||
pause
|
||||
@@ -0,0 +1,317 @@
|
||||
@echo off
|
||||
REM ========================================
|
||||
REM Jellyfin Desktop - Windows Build Script
|
||||
REM ========================================
|
||||
REM
|
||||
REM This script uses the new build_deps/ structure
|
||||
REM All external dependencies are in build_deps/
|
||||
REM All generated files are in build/
|
||||
REM
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Jellyfin Desktop - Windows Build Script
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Change to project root directory
|
||||
cd /d "%~dp0"
|
||||
|
||||
REM Define directories
|
||||
set BUILD_DEPS_DIR=%CD%\build_deps
|
||||
set BUILD_DIR=%CD%\build
|
||||
set OUTPUT_DIR=%BUILD_DIR%\output
|
||||
|
||||
REM Force VS 2022 toolset (v143) for Qt compatibility
|
||||
echo Forcing VS 2022 toolset (v143) for Qt compatibility...
|
||||
call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.44
|
||||
|
||||
echo Visual Studio tools configured with v143 toolset (14.44)!
|
||||
echo.
|
||||
|
||||
REM Step 1: Check build dependencies
|
||||
echo ========================================
|
||||
echo Step 1/6: Checking Build Dependencies
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
if not exist "%BUILD_DEPS_DIR%\ninja.exe" (
|
||||
echo.
|
||||
echo ERROR: ninja.exe not found in build_deps\
|
||||
echo.
|
||||
echo Please run: setup_build_deps.bat
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%BUILD_DEPS_DIR%\mpv\libmpv-2.dll" (
|
||||
echo.
|
||||
echo ERROR: MPV not found in build_deps\mpv\
|
||||
echo.
|
||||
echo Please run: setup_build_deps.bat
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%BUILD_DEPS_DIR%\mpv\include\mpv\client.h" (
|
||||
echo.
|
||||
echo ERROR: MPV headers not found in build_deps\mpv\include\mpv\
|
||||
echo.
|
||||
echo Please run: setup_build_deps.bat
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo All build dependencies found:
|
||||
echo - Ninja: %BUILD_DEPS_DIR%\ninja.exe
|
||||
echo - MPV DLL: %BUILD_DEPS_DIR%\mpv\libmpv-2.dll
|
||||
echo - MPV Headers: %BUILD_DEPS_DIR%\mpv\include\
|
||||
echo.
|
||||
|
||||
REM Step 2: Generate/verify MPV import library
|
||||
echo ========================================
|
||||
echo Step 2/6: Verifying MPV Import Library
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
if not exist "%BUILD_DEPS_DIR%\mpv\libmpv-2.dll.lib" (
|
||||
echo Generating MPV import library from DLL...
|
||||
|
||||
if not exist "scripts\generate_mpv_def.py" (
|
||||
echo ERROR: scripts\generate_mpv_def.py not found
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
python scripts\generate_mpv_def.py "%BUILD_DEPS_DIR%\mpv\libmpv-2.dll" "%BUILD_DEPS_DIR%\mpv\mpv.def"
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo ERROR: Failed to generate mpv.def
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
lib /def:"%BUILD_DEPS_DIR%\mpv\mpv.def" /out:"%BUILD_DEPS_DIR%\mpv\libmpv-2.dll.lib" /MACHINE:X64
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo ERROR: Failed to create import library
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Import library created successfully!
|
||||
) else (
|
||||
echo Import library already exists: %BUILD_DEPS_DIR%\mpv\libmpv-2.dll.lib
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
REM Step 3: Detect Qt
|
||||
echo ========================================
|
||||
echo Step 3/6: Detecting Qt Installation
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
REM Try to detect Qt installation
|
||||
set QTROOT=
|
||||
for %%Q in (
|
||||
"C:\Qt\6.10.1\msvc2022_64"
|
||||
"C:\Qt\6.10.0\msvc2022_64"
|
||||
"C:\Qt\6.9.0\msvc2022_64"
|
||||
"C:\Qt\6.8.0\msvc2022_64"
|
||||
"C:\Qt\6.8.0\msvc2019_64"
|
||||
"C:\Qt\6.7.0\msvc2019_64"
|
||||
) do (
|
||||
if exist %%Q (
|
||||
set QTROOT=%%~Q
|
||||
goto :qt_found
|
||||
)
|
||||
)
|
||||
|
||||
:qt_found
|
||||
if "%QTROOT%"=="" (
|
||||
echo ERROR: Could not find Qt installation
|
||||
echo.
|
||||
echo Please install Qt 6.x with MSVC 2022 or set QTROOT environment variable
|
||||
echo Example: C:\Qt\6.10.1\msvc2022_64
|
||||
echo.
|
||||
echo Download from: https://www.qt.io/download-open-source
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Found Qt at: %QTROOT%
|
||||
echo.
|
||||
|
||||
REM Step 4: Create build directory
|
||||
echo ========================================
|
||||
echo Step 4/6: Configuring Build with CMake
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
if not exist "%BUILD_DIR%" (
|
||||
echo Creating build directory...
|
||||
mkdir "%BUILD_DIR%"
|
||||
)
|
||||
|
||||
cd /d "%BUILD_DIR%"
|
||||
|
||||
REM Add WiX to PATH for installer creation
|
||||
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files (x86)\WiX Toolset v3.11\bin
|
||||
|
||||
REM Convert paths to forward slashes for CMake
|
||||
set QTROOT_CMAKE=%QTROOT:\=/%
|
||||
set BUILD_DEPS_CMAKE=%BUILD_DEPS_DIR:\=/%
|
||||
|
||||
REM Print compiler version information
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Compiler Version Information
|
||||
echo ========================================
|
||||
cl.exe 2>&1 | findstr /C:"Version"
|
||||
echo.
|
||||
|
||||
REM Configure with CMake - IMPORTANT: Use .lib file, not .dll
|
||||
echo Running CMake configuration...
|
||||
cmake -GNinja ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DCMAKE_INSTALL_PREFIX=output ^
|
||||
-DCMAKE_MAKE_PROGRAM="%BUILD_DEPS_CMAKE%/ninja.exe" ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" ^
|
||||
-DCMAKE_CXX_FLAGS="/MD" ^
|
||||
-DCMAKE_C_FLAGS="/MD" ^
|
||||
-DQTROOT=%QTROOT_CMAKE% ^
|
||||
-DMPV_INCLUDE_DIR="%BUILD_DEPS_CMAKE%/mpv/include" ^
|
||||
-DMPV_LIBRARY="%BUILD_DEPS_CMAKE%/mpv/libmpv-2.dll.lib" ^
|
||||
-DCHECK_FOR_UPDATES=OFF ^
|
||||
-DUSE_STATIC_MPVQT=ON ^
|
||||
..
|
||||
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo.
|
||||
echo ERROR: CMake configuration failed
|
||||
echo.
|
||||
echo Check the error messages above for details
|
||||
cd /d "%~dp0"
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
REM Step 5: Build
|
||||
echo ========================================
|
||||
echo Step 5/6: Building with Ninja
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
"%BUILD_DEPS_DIR%\ninja.exe"
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo.
|
||||
echo ERROR: Build failed
|
||||
echo.
|
||||
echo Check the error messages above for details
|
||||
cd /d "%~dp0"
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
REM Step 6: Install
|
||||
echo ========================================
|
||||
echo Step 6/6: Installing to Output Directory
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
"%BUILD_DEPS_DIR%\ninja.exe" install
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo.
|
||||
echo ERROR: Install failed
|
||||
echo.
|
||||
cd /d "%~dp0"
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Copy VC++ redistributable (for installer packaging)
|
||||
echo.
|
||||
echo Copying VC++ redistributable for installer...
|
||||
if exist "%BUILD_DEPS_DIR%\vc_redist.x64.exe" (
|
||||
echo - vc_redist.x64.exe
|
||||
copy /Y "%BUILD_DEPS_DIR%\vc_redist.x64.exe" "%OUTPUT_DIR%\" >nul
|
||||
) else (
|
||||
echo [WARNING] vc_redist.x64.exe not found - installer build will fail
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Qt dependencies copied by windeployqt (CMake install step)
|
||||
|
||||
cd /d "%~dp0"
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo BUILD COMPLETED SUCCESSFULLY!
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Build output: %OUTPUT_DIR%
|
||||
echo Executable: %OUTPUT_DIR%\Jellyfin Desktop.exe
|
||||
echo.
|
||||
echo.
|
||||
echo Building installer in 5 seconds...
|
||||
echo Press any key to skip installer build.
|
||||
echo.
|
||||
|
||||
REM Wait 5 seconds or until key is pressed
|
||||
timeout /t 5 >nul
|
||||
set TIMEOUT_RESULT=%ERRORLEVEL%
|
||||
|
||||
if %TIMEOUT_RESULT% EQU 0 (
|
||||
REM Timeout expired - build installer
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Building Installer
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
cd /d "%BUILD_DIR%"
|
||||
"%BUILD_DEPS_DIR%\ninja.exe" windows_package
|
||||
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo.
|
||||
echo WARNING: Installer build failed
|
||||
echo.
|
||||
cd /d "%~dp0"
|
||||
) else (
|
||||
echo.
|
||||
echo ========================================
|
||||
echo INSTALLER BUILD COMPLETED!
|
||||
echo ========================================
|
||||
echo.
|
||||
REM Find the installer file
|
||||
for %%f in ("%BUILD_DIR%\*.exe") do (
|
||||
echo Installer created: %%f
|
||||
)
|
||||
if not exist "%BUILD_DIR%\*.exe" (
|
||||
echo NOTE: Installer executable not found in %BUILD_DIR%
|
||||
echo Check the Ninja output above for details.
|
||||
)
|
||||
echo.
|
||||
cd /d "%~dp0"
|
||||
)
|
||||
) else (
|
||||
REM Key was pressed - skip installer
|
||||
echo.
|
||||
echo Skipping installer build.
|
||||
echo To build installer later, run:
|
||||
echo cd build
|
||||
echo ..\build_deps\ninja.exe windows_package
|
||||
echo.
|
||||
cd /d "%~dp0"
|
||||
)
|
||||
|
||||
pause
|
||||
@@ -238,7 +238,7 @@
|
||||
<MsiPackage Id="pmp"
|
||||
Name="PMP.msi"
|
||||
Compressed="yes"
|
||||
SourceFile="$(var.OutputPath)/PMP.msi"
|
||||
SourceFile="$(var.BuildPath)/PMP.msi"
|
||||
Vital="yes">
|
||||
<MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
|
||||
<MsiProperty Name="AUTOLAUNCH" Value="[autolaunch]" />
|
||||
@@ -246,7 +246,7 @@
|
||||
<MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcut]" />
|
||||
</MsiPackage>
|
||||
<ExePackage Id="vcredist_repair"
|
||||
SourceFile="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\v142\vcredist_x64.exe"
|
||||
SourceFile="$(var.OutputPath)/vc_redist.x64.exe"
|
||||
Name="vcredist_x64.exe"
|
||||
InstallCommand="/repair /quiet /norestart"
|
||||
InstallCondition="Bad_VCRedist"
|
||||
@@ -256,7 +256,7 @@
|
||||
<ExitCode Value="1638" Behavior="success"/>
|
||||
</ExePackage>
|
||||
<ExePackage Id="vcredist"
|
||||
SourceFile="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\v142\vcredist_x64.exe"
|
||||
SourceFile="$(var.OutputPath)/vc_redist.x64.exe"
|
||||
Name="vcredist_x64.exe"
|
||||
InstallCommand="/install /quiet /norestart"
|
||||
InstallCondition="NOT Bad_VCRedist"
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
[Paths]
|
||||
Prefix = .
|
||||
Plugins = .
|
||||
Plugins = plugins
|
||||
Binaries = .
|
||||
Imports = .
|
||||
Qml2Imports = .
|
||||
Imports = qml
|
||||
Qml2Imports = qml
|
||||
LibraryExecutables = .
|
||||
|
||||
[Platforms]
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
@echo off
|
||||
echo Checking Qt installation for required modules...
|
||||
echo.
|
||||
|
||||
set QTROOT=C:/Qt/6.10.1/msvc2022_64
|
||||
|
||||
echo Qt Root: %QTROOT%
|
||||
echo.
|
||||
|
||||
echo Required Qt Modules:
|
||||
echo ====================
|
||||
echo.
|
||||
|
||||
set MISSING=0
|
||||
|
||||
echo Checking Qt6Core...
|
||||
if exist "%QTROOT%\lib\cmake\Qt6Core" (
|
||||
echo [OK] Qt6Core
|
||||
) else (
|
||||
echo [MISSING] Qt6Core
|
||||
set MISSING=1
|
||||
)
|
||||
|
||||
echo Checking Qt6WebEngineCore...
|
||||
if exist "%QTROOT%\lib\cmake\Qt6WebEngineCore" (
|
||||
echo [OK] Qt6WebEngineCore
|
||||
) else (
|
||||
echo [MISSING] Qt6WebEngineCore - REQUIRED FOR JELLYFIN DESKTOP
|
||||
set MISSING=1
|
||||
)
|
||||
|
||||
echo Checking Qt6WebEngineQuick...
|
||||
if exist "%QTROOT%\lib\cmake\Qt6WebEngineQuick" (
|
||||
echo [OK] Qt6WebEngineQuick
|
||||
) else (
|
||||
echo [MISSING] Qt6WebEngineQuick - REQUIRED FOR JELLYFIN DESKTOP
|
||||
set MISSING=1
|
||||
)
|
||||
|
||||
echo Checking Qt6WebChannel...
|
||||
if exist "%QTROOT%\lib\cmake\Qt6WebChannel" (
|
||||
echo [OK] Qt6WebChannel
|
||||
) else (
|
||||
echo [MISSING] Qt6WebChannel - REQUIRED FOR JELLYFIN DESKTOP
|
||||
set MISSING=1
|
||||
)
|
||||
|
||||
echo Checking Qt6Quick...
|
||||
if exist "%QTROOT%\lib\cmake\Qt6Quick" (
|
||||
echo [OK] Qt6Quick
|
||||
) else (
|
||||
echo [MISSING] Qt6Quick
|
||||
set MISSING=1
|
||||
)
|
||||
|
||||
echo Checking Qt6Qml...
|
||||
if exist "%QTROOT%\lib\cmake\Qt6Qml" (
|
||||
echo [OK] Qt6Qml
|
||||
) else (
|
||||
echo [MISSING] Qt6Qml
|
||||
set MISSING=1
|
||||
)
|
||||
|
||||
echo Checking Qt6Network...
|
||||
if exist "%QTROOT%\lib\cmake\Qt6Network" (
|
||||
echo [OK] Qt6Network
|
||||
) else (
|
||||
echo [MISSING] Qt6Network
|
||||
set MISSING=1
|
||||
)
|
||||
|
||||
echo Checking Qt6Widgets...
|
||||
if exist "%QTROOT%\lib\cmake\Qt6Widgets" (
|
||||
echo [OK] Qt6Widgets
|
||||
) else (
|
||||
echo [MISSING] Qt6Widgets
|
||||
set MISSING=1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo.
|
||||
|
||||
if %MISSING%==1 (
|
||||
echo ========================================
|
||||
echo WARNING: Some required Qt modules are missing!
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Please install the missing modules using Qt Maintenance Tool:
|
||||
echo 1. Run Qt Maintenance Tool
|
||||
echo 2. Select "Add or remove components"
|
||||
echo 3. Navigate to Qt ^> Qt 6.10.1 ^> MSVC 2022 64-bit
|
||||
echo 4. Make sure these are checked:
|
||||
echo - Qt WebEngine
|
||||
echo - Qt WebChannel
|
||||
echo - Qt Quick
|
||||
echo 5. Click Update/Install
|
||||
echo.
|
||||
echo After installing, rebuild Jellyfin Desktop with build_windows.bat
|
||||
echo.
|
||||
) else (
|
||||
echo ========================================
|
||||
echo All required Qt modules are installed!
|
||||
echo ========================================
|
||||
)
|
||||
|
||||
echo.
|
||||
pause
|
||||
@@ -0,0 +1,277 @@
|
||||
@echo off
|
||||
REM ========================================
|
||||
REM Jellyfin Desktop - Build Dependencies Setup
|
||||
REM ========================================
|
||||
REM
|
||||
REM This script helps you set up the build dependencies
|
||||
REM in the build_deps folder
|
||||
REM
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Jellyfin Desktop Build Dependencies Setup
|
||||
echo ========================================
|
||||
echo.
|
||||
echo This script will help you set up the required build dependencies.
|
||||
echo.
|
||||
echo Build dependencies will be stored in: %CD%\build_deps
|
||||
echo.
|
||||
|
||||
set BUILD_DEPS_DIR=%CD%\build_deps
|
||||
|
||||
if not exist "%BUILD_DEPS_DIR%" (
|
||||
echo Creating build_deps directory...
|
||||
mkdir "%BUILD_DEPS_DIR%"
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Dependency 1: Ninja Build System
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Ninja is a fast build system used for compiling Jellyfin Desktop.
|
||||
echo.
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\ninja.exe" (
|
||||
echo [OK] Ninja already installed: %BUILD_DEPS_DIR%\ninja.exe
|
||||
) else (
|
||||
echo Ninja not found.
|
||||
echo.
|
||||
echo Please download ninja.exe:
|
||||
echo 1. Go to: https://github.com/ninja-build/ninja/releases/latest
|
||||
echo 2. Download: ninja-win.zip
|
||||
echo 3. Extract ninja.exe to: %BUILD_DEPS_DIR%\
|
||||
echo.
|
||||
echo After downloading, press any key to continue...
|
||||
pause >nul
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\ninja.exe" (
|
||||
echo [OK] Ninja installed successfully!
|
||||
) else (
|
||||
echo [WARNING] Ninja still not found. Please install manually.
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Dependency 2: libmpv (Media Player)
|
||||
echo ========================================
|
||||
echo.
|
||||
echo libmpv is the media player library used by Jellyfin Desktop.
|
||||
echo.
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\mpv\libmpv-2.dll" (
|
||||
echo [OK] libmpv already installed: %BUILD_DEPS_DIR%\mpv\libmpv-2.dll
|
||||
) else (
|
||||
echo libmpv not found.
|
||||
echo.
|
||||
echo Opening MPV download page in your browser...
|
||||
timeout /t 1 >nul
|
||||
start https://sourceforge.net/projects/mpv-player-windows/files/libmpv/
|
||||
echo.
|
||||
echo ========================================
|
||||
echo MPV Installation Instructions
|
||||
echo ========================================
|
||||
echo.
|
||||
echo 1. Download mpv-dev-x86_64-YYYYMMDD.7z from the page that just opened
|
||||
echo 2. Extract the .7z file (you may need 7-Zip: https://www.7-zip.org/)
|
||||
echo 3. From the extracted folder, copy:
|
||||
echo.
|
||||
echo libmpv-2.dll ==^> %BUILD_DEPS_DIR%\mpv\libmpv-2.dll
|
||||
echo.
|
||||
echo 4. Copy the include folder:
|
||||
echo.
|
||||
echo include\mpv\ ==^> %BUILD_DEPS_DIR%\mpv\include\mpv\
|
||||
echo.
|
||||
echo Final structure should be:
|
||||
echo %BUILD_DEPS_DIR%\mpv\libmpv-2.dll
|
||||
echo %BUILD_DEPS_DIR%\mpv\include\mpv\client.h
|
||||
echo %BUILD_DEPS_DIR%\mpv\include\mpv\... (other headers)
|
||||
echo.
|
||||
echo After downloading and extracting, press any key to continue...
|
||||
pause >nul
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\mpv\libmpv-2.dll" (
|
||||
echo [OK] libmpv installed successfully!
|
||||
) else (
|
||||
echo [WARNING] libmpv still not found. Please install manually.
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\mpv\include\mpv\client.h" (
|
||||
echo [OK] libmpv headers found
|
||||
) else (
|
||||
echo [WARNING] libmpv headers not found at: %BUILD_DEPS_DIR%\mpv\include\mpv\
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Dependency 3: Visual C++ Redistributable
|
||||
echo ========================================
|
||||
echo.
|
||||
echo The VC++ redistributable is bundled with the installer.
|
||||
echo.
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\vc_redist.x64.exe" (
|
||||
echo [OK] vc_redist.x64.exe already downloaded: %BUILD_DEPS_DIR%\vc_redist.x64.exe
|
||||
) else (
|
||||
echo vc_redist.x64.exe not found.
|
||||
echo.
|
||||
echo Opening download page in your browser...
|
||||
timeout /t 1 >nul
|
||||
start https://aka.ms/vs/17/release/vc_redist.x64.exe
|
||||
echo.
|
||||
echo ========================================
|
||||
echo VC++ Redistributable Installation Instructions
|
||||
echo ========================================
|
||||
echo.
|
||||
echo 1. Your browser should have started downloading vc_redist.x64.exe
|
||||
echo 2. Move the downloaded file to: %BUILD_DEPS_DIR%\vc_redist.x64.exe
|
||||
echo.
|
||||
echo After downloading, press any key to continue...
|
||||
pause >nul
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\vc_redist.x64.exe" (
|
||||
echo [OK] vc_redist.x64.exe installed successfully!
|
||||
) else (
|
||||
echo [WARNING] vc_redist.x64.exe still not found. Please install manually.
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Dependency 4: Qt Framework
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Qt 6 is the GUI framework used by Jellyfin Desktop.
|
||||
echo.
|
||||
echo Please ensure Qt 6.x with MSVC 2022 is installed.
|
||||
echo Common installation paths:
|
||||
echo - C:\Qt\6.10.1\msvc2022_64
|
||||
echo - C:\Qt\6.8.0\msvc2022_64
|
||||
echo.
|
||||
echo If not installed, download from:
|
||||
echo https://www.qt.io/download-open-source
|
||||
echo.
|
||||
echo Install Qt 6.x with these components:
|
||||
echo - Qt 6.x for desktop development (MSVC 2022 64-bit)
|
||||
echo - Qt WebEngine
|
||||
echo - Qt WebChannel
|
||||
echo - Qt Quick Controls
|
||||
echo.
|
||||
|
||||
REM Try to detect Qt
|
||||
set QT_FOUND=0
|
||||
for %%Q in (
|
||||
"C:\Qt\6.10.1\msvc2022_64"
|
||||
"C:\Qt\6.10.0\msvc2022_64"
|
||||
"C:\Qt\6.9.0\msvc2022_64"
|
||||
"C:\Qt\6.8.0\msvc2022_64"
|
||||
"C:\Qt\6.8.0\msvc2019_64"
|
||||
) do (
|
||||
if exist %%Q (
|
||||
echo [OK] Found Qt at: %%~Q
|
||||
set QT_FOUND=1
|
||||
goto :qt_check_done
|
||||
)
|
||||
)
|
||||
|
||||
:qt_check_done
|
||||
if !QT_FOUND!==0 (
|
||||
echo [WARNING] Qt not found in standard locations
|
||||
echo.
|
||||
echo You may need to specify QTROOT manually or install Qt.
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Dependency 5: Visual Studio 2022
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Visual Studio 2022 with C++ tools is required for compilation.
|
||||
echo.
|
||||
|
||||
where cl >nul 2>&1
|
||||
if %ERRORLEVEL%==0 (
|
||||
echo [OK] Visual Studio C++ compiler found in PATH
|
||||
) else (
|
||||
REM Try to find VS
|
||||
set VS_FOUND=0
|
||||
if exist "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
echo [OK] Found Visual Studio 2022 Community
|
||||
set VS_FOUND=1
|
||||
) else if exist "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
echo [OK] Found Visual Studio 2022 Professional
|
||||
set VS_FOUND=1
|
||||
) else if exist "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
echo [OK] Found Visual Studio 2022 Build Tools
|
||||
set VS_FOUND=1
|
||||
) else (
|
||||
echo [WARNING] Visual Studio 2022 not detected
|
||||
echo.
|
||||
echo Please install:
|
||||
echo - Visual Studio 2022 Community (free) OR
|
||||
echo - Visual Studio 2022 Build Tools
|
||||
echo.
|
||||
echo Download from:
|
||||
echo https://visualstudio.microsoft.com/downloads/
|
||||
echo.
|
||||
echo Required components:
|
||||
echo - Desktop development with C++
|
||||
echo - MSVC v143 - VS 2022 C++ x64/x86 build tools
|
||||
echo - Windows 10/11 SDK
|
||||
set VS_FOUND=0
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Setup Summary
|
||||
echo ========================================
|
||||
echo.
|
||||
echo Build dependencies directory: %BUILD_DEPS_DIR%
|
||||
echo.
|
||||
|
||||
set ALL_READY=1
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\ninja.exe" (
|
||||
echo [OK] Ninja
|
||||
) else (
|
||||
echo [MISSING] Ninja
|
||||
set ALL_READY=0
|
||||
)
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\mpv\libmpv-2.dll" (
|
||||
echo [OK] libmpv DLL
|
||||
) else (
|
||||
echo [MISSING] libmpv DLL
|
||||
set ALL_READY=0
|
||||
)
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\mpv\include\mpv\client.h" (
|
||||
echo [OK] libmpv headers
|
||||
) else (
|
||||
echo [MISSING] libmpv headers
|
||||
set ALL_READY=0
|
||||
)
|
||||
|
||||
if exist "%BUILD_DEPS_DIR%\vc_redist.x64.exe" (
|
||||
echo [OK] VC++ Redistributable
|
||||
) else (
|
||||
echo [MISSING] VC++ Redistributable
|
||||
set ALL_READY=0
|
||||
)
|
||||
|
||||
echo.
|
||||
if !ALL_READY!==1 (
|
||||
echo All build dependencies are ready!
|
||||
echo.
|
||||
echo You can now run: build_windows.bat
|
||||
) else (
|
||||
echo Some dependencies are missing. Please install them and run this script again.
|
||||
)
|
||||
|
||||
echo.
|
||||
pause
|
||||
+8
-2
@@ -22,7 +22,10 @@ add_subdirectory(system)
|
||||
add_subdirectory(settings)
|
||||
add_subdirectory(power)
|
||||
add_subdirectory(taskbar)
|
||||
add_subdirectory(mpris)
|
||||
|
||||
if(LINUX_DBUS)
|
||||
add_subdirectory(mpris)
|
||||
endif()
|
||||
|
||||
get_property(ALL_SRCS GLOBAL PROPERTY SRCS_LIST)
|
||||
set(MAIN_SRCS main.cpp)
|
||||
@@ -186,10 +189,13 @@ target_link_libraries(jmp_core
|
||||
Qt6::OpenGL
|
||||
Qt6::Xml
|
||||
Qt6::Gui
|
||||
Qt6::DBus
|
||||
${MPVQT_TARGET}
|
||||
)
|
||||
|
||||
if(LINUX_DBUS)
|
||||
target_link_libraries(jmp_core Qt6::DBus)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${MAIN_TARGET} jmp_core)
|
||||
install(TARGETS ${MAIN_TARGET} DESTINATION ${INSTALL_BIN_DIR})
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
#include "settings/SettingsComponent.h"
|
||||
#include "taskbar/TaskbarComponent.h"
|
||||
#include "ui/WindowManager.h"
|
||||
#ifdef LINUX_DBUS
|
||||
#include "mpris/MprisComponent.h"
|
||||
#endif
|
||||
#include "ProfileManager.h"
|
||||
|
||||
#ifdef KONVERGO_OPENELEC
|
||||
@@ -65,7 +67,9 @@ void ComponentManager::initialize()
|
||||
registerComponent(&PowerComponent::Get());
|
||||
registerComponent(&TaskbarComponent::Get());
|
||||
registerComponent(&WindowManager::Get());
|
||||
#ifdef LINUX_DBUS
|
||||
registerComponent(&MprisComponent::Get());
|
||||
#endif
|
||||
|
||||
#ifdef KONVERGO_OPENELEC
|
||||
registerComponent(&OESystemComponent::Get());
|
||||
|
||||
@@ -115,6 +115,7 @@ int main(int argc, char *argv[])
|
||||
{"windowed", "Start in windowed mode"},
|
||||
{"fullscreen", "Start in fullscreen"},
|
||||
{"disable-gpu", "Disable QtWebEngine gpu accel"},
|
||||
{"software-rendering", "Use software rendering (compatibility mode)"},
|
||||
{"ignore-certificate-errors", "Ignore certificate errors"}});
|
||||
|
||||
auto scaleOption = QCommandLineOption("scale-factor", "Set to a integer or default auto which controls" \
|
||||
@@ -491,6 +492,16 @@ int main(int argc, char *argv[])
|
||||
if (parser.isSet("ignore-certificate-errors"))
|
||||
chromiumFlags << "--ignore-certificate-errors";
|
||||
|
||||
// Software rendering mode for compatibility with problematic GPUs
|
||||
if (parser.isSet("software-rendering"))
|
||||
{
|
||||
chromiumFlags << "--disable-gpu";
|
||||
chromiumFlags << "--disable-gpu-compositing";
|
||||
chromiumFlags << "--disable-accelerated-2d-canvas";
|
||||
chromiumFlags << "--disable-accelerated-video-decode";
|
||||
qInfo() << "Software rendering mode enabled (GPU disabled)";
|
||||
}
|
||||
|
||||
if (!chromiumFlags.isEmpty())
|
||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromiumFlags.join(" ").toUtf8());
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include "CodecsComponent.h"
|
||||
#include <clocale>
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
#include <Qt>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
add_sources(TaskbarComponent.h TaskbarComponent.cpp)
|
||||
|
||||
if(WIN32)
|
||||
add_sources(TaskbarComponentWin.cpp TaskbarComponentWin.h)
|
||||
add_sources(TaskbarComponentWin.cpp TaskbarComponentWin.h QWinTaskbarStubs.h QWinTaskbarStubs.cpp)
|
||||
endif(WIN32)
|
||||
@@ -0,0 +1,9 @@
|
||||
// Qt6 compatibility stubs implementation
|
||||
// These classes were removed from Qt6 - providing minimal stubs for compilation
|
||||
|
||||
#include "QWinTaskbarStubs.h"
|
||||
|
||||
// The implementations are all inline in the header, but we need this
|
||||
// file to exist so that MOC can generate the meta-object code for the Q_OBJECT macros
|
||||
|
||||
// MOC will generate the necessary meta-object implementations when this file is compiled
|
||||
@@ -0,0 +1,60 @@
|
||||
#ifndef QWINTASKBARSTUBS_H
|
||||
#define QWINTASKBARSTUBS_H
|
||||
|
||||
// Qt6 compatibility stubs for removed QWinTaskbar classes
|
||||
// These classes were removed from Qt6 and have not been replaced yet
|
||||
// This provides minimal stub implementations to allow compilation
|
||||
|
||||
#include <QObject>
|
||||
#include <QQuickWindow>
|
||||
#include <QIcon>
|
||||
|
||||
class QWinTaskbarProgress : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWinTaskbarProgress(QObject *parent = nullptr) : QObject(parent) {}
|
||||
void setVisible(bool) {}
|
||||
void setValue(int) {}
|
||||
void setMinimum(int) {}
|
||||
void setMaximum(int) {}
|
||||
void setPaused(bool) {}
|
||||
};
|
||||
|
||||
class QWinTaskbarButton : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWinTaskbarButton(QObject *parent = nullptr) : QObject(parent), m_progress(new QWinTaskbarProgress(this)) {}
|
||||
void setWindow(QWindow*) {}
|
||||
QWinTaskbarProgress* progress() { return m_progress; }
|
||||
private:
|
||||
QWinTaskbarProgress* m_progress;
|
||||
};
|
||||
|
||||
class QWinThumbnailToolButton : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWinThumbnailToolButton(QObject *parent = nullptr) : QObject(parent) {}
|
||||
void setToolTip(const QString&) {}
|
||||
void setIcon(const QIcon&) {}
|
||||
void setEnabled(bool) {}
|
||||
void setVisible(bool) {}
|
||||
Q_SIGNALS:
|
||||
void clicked();
|
||||
};
|
||||
|
||||
class QWinThumbnailToolBar : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWinThumbnailToolBar(QObject *parent = nullptr) : QObject(parent) {}
|
||||
void setWindow(QWindow*) {}
|
||||
void addButton(QWinThumbnailToolButton* button) { m_buttons.append(button); }
|
||||
QList<QWinThumbnailToolButton*> buttons() const { return m_buttons; }
|
||||
private:
|
||||
QList<QWinThumbnailToolButton*> m_buttons;
|
||||
};
|
||||
|
||||
#endif // QWINTASKBARSTUBS_H
|
||||
@@ -1,10 +1,7 @@
|
||||
#ifndef TASKBARCOMPONENTWIN_H
|
||||
#define TASKBARCOMPONENTWIN_H
|
||||
|
||||
#include <QWinTaskbarButton>
|
||||
#include <QWinTaskbarProgress>
|
||||
#include <QWinThumbnailToolBar>
|
||||
#include <QWinThumbnailToolButton>
|
||||
#include "QWinTaskbarStubs.h"
|
||||
|
||||
#include <wrl.h>
|
||||
#include <Windows.Media.h>
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
import QtQuick
|
||||
import Konvergo 1.0
|
||||
import QtWebEngine
|
||||
import QtWebChannel 1.0
|
||||
import QtQuick.Window 2.2
|
||||
import QtQuick.Controls 6.0
|
||||
import QtWebChannel
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
|
||||
Window
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user