summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2016-01-27 11:31:19 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-01-27 19:31:56 +0000
commit0f66e27e61c32d7447cbd463ec15ee8d950e58cb (patch)
tree5328d9400840addaa70d90f31f525183166c42a7 /src
parent4bf3b18d3089987e8b1e6a1a0bb9cd6a024e85c7 (diff)
Package devtools_resources separately
Move the resources for remote debugging out of qtwebengine_resources.pak, into a separate qtwebengine_devtools_resources.pak. This allows developers to decide at deployment phase whether to ship the (rather large) resources for the devtools feature, or not. Task-number: QTBUG-50646 Change-Id: I74c75ad30989b97a63e6bce3abbc33360d1452e4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/core_module.pro3
-rw-r--r--src/core/resource_bundle_qt.cpp1
-rw-r--r--src/core/resources/resources.gyp13
-rw-r--r--src/core/web_engine_library_info.cpp2
-rw-r--r--src/core/web_engine_library_info.h3
5 files changed, 19 insertions, 3 deletions
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index b001fef06..ef6921dd5 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -50,7 +50,8 @@ for(LOC, LOCALE_LIST) {
}
resources.files = $$REPACK_DIR/qtwebengine_resources.pak \
$$REPACK_DIR/qtwebengine_resources_100p.pak \
- $$REPACK_DIR/qtwebengine_resources_200p.pak
+ $$REPACK_DIR/qtwebengine_resources_200p.pak \
+ $$REPACK_DIR/qtwebengine_devtools_resources.pak
icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
diff --git a/src/core/resource_bundle_qt.cpp b/src/core/resource_bundle_qt.cpp
index 932f40af8..55d3b30bd 100644
--- a/src/core/resource_bundle_qt.cpp
+++ b/src/core/resource_bundle_qt.cpp
@@ -47,6 +47,7 @@ void ResourceBundle::LoadCommonResources()
AddDataPackFromPath(WebEngineLibraryInfo::getPath(QT_RESOURCES_PAK), SCALE_FACTOR_NONE);
AddDataPackFromPath(WebEngineLibraryInfo::getPath(QT_RESOURCES_100P_PAK), SCALE_FACTOR_100P);
AddDataPackFromPath(WebEngineLibraryInfo::getPath(QT_RESOURCES_200P_PAK), SCALE_FACTOR_200P);
+ AddDataPackFromPath(WebEngineLibraryInfo::getPath(QT_RESOURCES_DEVTOOLS_PAK), SCALE_FACTOR_NONE);
}
gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl)
diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp
index 157b78780..f2acab670 100644
--- a/src/core/resources/resources.gyp
+++ b/src/core/resources/resources.gyp
@@ -30,7 +30,6 @@
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
- '<(SHARED_INTERMEDIATE_DIR)/blink/devtools_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
@@ -70,6 +69,18 @@
'includes': [ 'repack_resources.gypi' ],
},
{
+ 'action_name': 'repack_resources_devtools',
+ 'variables': {
+ 'pak_inputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/blink/devtools_resources.pak',
+ ],
+ 'pak_outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/repack/qtwebengine_devtools_resources.pak'
+ ]
+ },
+ 'includes': [ 'repack_resources.gypi' ],
+ },
+ {
'action_name': 'repack_locales',
'includes': [ 'repack_locales.gypi' ],
},
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index 8ec18c87d..95a36c398 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -267,6 +267,8 @@ base::FilePath WebEngineLibraryInfo::getPath(int key)
return toFilePath(resourcesDataPath() % QLatin1String("/qtwebengine_resources_100p.pak"));
case QT_RESOURCES_200P_PAK:
return toFilePath(resourcesDataPath() % QLatin1String("/qtwebengine_resources_200p.pak"));
+ case QT_RESOURCES_DEVTOOLS_PAK:
+ return toFilePath(resourcesDataPath() % QLatin1String("/qtwebengine_devtools_resources.pak"));
case base::FILE_EXE:
case content::CHILD_PROCESS_EXE:
return toFilePath(subProcessPath());
diff --git a/src/core/web_engine_library_info.h b/src/core/web_engine_library_info.h
index cd3e5be94..4b84e7129 100644
--- a/src/core/web_engine_library_info.h
+++ b/src/core/web_engine_library_info.h
@@ -43,7 +43,8 @@
enum {
QT_RESOURCES_PAK = 5000,
QT_RESOURCES_100P_PAK = 5001,
- QT_RESOURCES_200P_PAK = 5002
+ QT_RESOURCES_200P_PAK = 5002,
+ QT_RESOURCES_DEVTOOLS_PAK = 5003
};
class WebEngineLibraryInfo {