Qt WebEngine 5.8 & Proprietary codecs with Visual Studio 2015
-
The compilation guide from here seems out of date and there is still no noticeable tutorials on how to use the new qt 5.8 build systems, so far it already made me wasting more than 6 hours for the compilation only.
My env variables and batch script snippet are :
SET ICU_SOURCE=%_CD%\icu\source SET ICU_DIST=%_CD%\icu\dist-64 SET QT_SOURCE=%_CD%\qt-everywhere-opensource-src-5.8.0 SET QT_BUILD=%_CD%\msvc2015_64 SET QT_DIST=C:\Dev\Qt\Qt5.8.0\msvc2015_64 SET PSQL_DEP=C:\Dev\postgresql\x64 SET MYSQL_DEP=C:\Dev\mysql\x64 SET LLVM_INSTALL_DIR=C:\Dev\clang\3.8.1\x64 SET OPENSSL_STATIC=C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug SET OPENSSL_SHARED=C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Shared\Debug SET LIBJPEG=C:\Users\nameless\Documents\Works\Compiling\jpeg-9b SET LIBPNG=C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libpng\Static\Debug SET OPENAL=C:\Dev\dependencies\OpenAL SET ZLIB=C:\Dev\dependencies\zlib SET DOXYGEN=C:\Users\nameless\Documents\Tools\Doxygen SET SQLITE3=C:\Dev\dependencies\sqlite3 SET LIBXML2=C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libxml2\Static\Release SET PATH=%PATH%;%OPENSSL_STATIC%;%OPENAL%;%OPENAL%\bin;%LIBJPEG%;%LIBPNG%\bin;%ZLIB%\lib;%SQLITE3%\lib;%DOXYGEN%;%LIBXML2%\bin;%MYSQL_DEP%\bin;%PSQL_DEP%\bin SET LIB=%LIB%;%OPENSSL_STATIC%\lib;%OPENAL%\lib;%LIBJPEG%;%LIBPNG%\lib;%ZLIB%\lib;%SQLITE3%\lib;%LIBXML2%\lib;%MYSQL_DEP%\lib;%PSQL_DEP%\lib SET INCLUDE=%INCLUDE%;%OPENSSL_STATIC%\include;%OPENAL%\include;%LIBJPEG%;%LIBPNG%\include;%ZLIB%\include;%SQLITE3%\include;%LIBXML2%\include\libxml2;%MYSQL_DEP%\include;%PSQL_DEP%\include SET QMAKESPEC=win32-msvc SET PATH=%PATH%;%ICU_DIST%\bin SET LIB=%LIB%;%ICU_DIST%\lib SET INCLUDE=%INCLUDE%;%ICU_DIST%\include CALL %QT_SOURCE%\configure -confirm-license -prefix %QT_DIST% -mp -debug-and-release -icu -system-sqlite -I C:\Dev\dependencies\sqlite3\include -L C:\Dev\dependencies\sqlite3\lib -sql-odbc -sql-psql -I C:\Dev\postgresql\x64\include -L C:\Dev\postgresql\x64\lib -sql-mysql -I C:\Dev\mysql\x64\include -L C:\Dev\mysql\x64\lib -system-zlib -I C:\Dev\dependencies\zlib\include -L C:\Dev\dependencies\zlib\lib -system-libjpeg -I C:\Users\nameless\Documents\Works\Compiling\jpeg-9b -L C:\Users\nameless\Documents\Works\Compiling\jpeg-9b -system-libpng -I C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libpng\Static\Debug\include -L C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libpng\Static\Debug\lib -gif -ico -v -icu -qt-pcre -qt-freetype -nomake tests -opensource -openssl-linked -I C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug\include -L C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug\lib
The problem is how to enable proprietary codecs on web engine?, on 5.7.x i am just put it on .qmake.conf inside the qtwebengine folder and qt build system will automatically picked it up. But now on 5.8 i could not found a way to do it automatically.
My two variant of .qmake.conf from qtwebengine :
QMAKEPATH += $$PWD/tools/qmake WEBENGINE_CONFIG += use_proprietary_codecs # Resolve root directories for sources QTWEBENGINE_ROOT = $$PWD QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean MODULE_VERSION = 5.8.1
QMAKEPATH += $$PWD/tools/qmake # Resolve root directories for sources QTWEBENGINE_ROOT = $$PWD QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) WEBENGINE_CONFIG += use_proprietary_codecs CONFIG += warning_clean MODULE_VERSION = 5.8.1
But still no luck, the qt configure test still not detecting that i wanted proprietary codecs :
Qt WebEngine: Proprietary Codecs ..................... no Spellchecker ........................... yes
-
Looks like adding the use_proprietary_codecs define in .qmake.conf is not allowed by design?, i need to add these changes in order qt 5.8 to pick up the additional WEBENGINE_CONFIG :
#Edit ..\qt-everywhere-opensource-src-5.8.1\qtwebengine\.qmake.conf #Add WEBENGINE_CONFIG += use_proprietary_codecs #Edit ..C:\QT-Build\qt-everywhere-opensource-src-5.8.1\qtwebengine\configure.json #Line 45 "autoDetect": false, into "autoDetect": true,