From f8a905c8b0d2a08e0798a6341b2d8dd39eeb2cdb Mon Sep 17 00:00:00 2001 From: execjosh Date: Tue, 26 Mar 2013 17:36:19 +0900 Subject: [PATCH] Link with text codec plugins on mac and linux Fixes [#10249](https://github.com/ariya/phantomjs/issues/10249) --- src/main.cpp | 9 ++++++--- src/phantomjs.pro | 6 ++++++ src/qt/preconfig.sh | 5 +++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 734c084f..3b381627 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -42,9 +42,6 @@ #include #include -#ifdef Q_OS_WIN32 -using namespace google_breakpad; -static google_breakpad::ExceptionHandler* eh; #if !defined(QT_SHARED) && !defined(QT_DLL) #include @@ -52,6 +49,12 @@ Q_IMPORT_PLUGIN(qcncodecs) Q_IMPORT_PLUGIN(qjpcodecs) Q_IMPORT_PLUGIN(qkrcodecs) Q_IMPORT_PLUGIN(qtwcodecs) +#endif + +#ifdef Q_OS_WIN32 +using namespace google_breakpad; +static google_breakpad::ExceptionHandler* eh; +#if !defined(QT_SHARED) && !defined(QT_DLL) Q_IMPORT_PLUGIN(qico) #endif #endif diff --git a/src/phantomjs.pro b/src/phantomjs.pro index e6f5de87..0c8e7738 100644 --- a/src/phantomjs.pro +++ b/src/phantomjs.pro @@ -67,6 +67,12 @@ linux*|mac { breakpad/src/common/convert_UTF.c \ breakpad/src/common/md5.cc \ breakpad/src/common/string_conversion.cc + + QTPLUGIN += \ + qcncodecs \ + qjpcodecs \ + qkrcodecs \ + qtwcodecs } linux* { diff --git a/src/qt/preconfig.sh b/src/qt/preconfig.sh index 0ca56e0e..7cfafa08 100755 --- a/src/qt/preconfig.sh +++ b/src/qt/preconfig.sh @@ -108,3 +108,8 @@ export MAKEFLAGS=-j$COMPILE_JOBS ./configure -prefix $PWD $QT_CFG make -j$COMPILE_JOBS + +# Build text codecs +pushd src/plugins/codecs/ +make -j$COMPILE_JOBS +popd