Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (160984 => 160985)
--- trunk/Source/WebInspectorUI/ChangeLog 2013-12-23 04:40:05 UTC (rev 160984)
+++ trunk/Source/WebInspectorUI/ChangeLog 2013-12-23 06:08:44 UTC (rev 160985)
@@ -1,3 +1,13 @@
+2013-12-22 Martin Robinson <[email protected]>
+
+ [GTK][CMake] Integrate GResource for inspector files (and others?)
+ https://bugs.webkit.org/show_bug.cgi?id=125569
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * GNUmakefile.am: Use the new generation script instead of generating with
+ shell scripting in the makefile.
+
2013-12-19 Joseph Pecoraro <[email protected]>
Web Inspector: Frontend Error when selecting Database folder in Resources Sidebar
Modified: trunk/Source/WebInspectorUI/GNUmakefile.am (160984 => 160985)
--- trunk/Source/WebInspectorUI/GNUmakefile.am 2013-12-23 04:40:05 UTC (rev 160984)
+++ trunk/Source/WebInspectorUI/GNUmakefile.am 2013-12-23 06:08:44 UTC (rev 160985)
@@ -5,21 +5,11 @@
$(WebInspectorUI)/UserInterface/Images/*.png \
$(WebInspectorUI)/UserInterface/Images/*.svg \
$(WebInspectorUI)/UserInterface/External/CodeMirror/* \
- $(WebInspectorUI)/Localizations/en.lproj/localizedStrings.js
+ $(WebInspectorUI)/Localizations/en.lproj/localizedStrings.js \
+ $(srcdir)/Tools/gtk/generate-inspector-gresource-manifest.py
$(AM_V_GEN)
$(AM_V_at)mkdir -p ${GENSOURCES_WEBINSPECTOR_UI}
- $(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > ${GENSOURCES_WEBINSPECTOR_UI}/GResourceBundle.xml
- $(AM_V_at)echo '<gresources>' >> ${GENSOURCES_WEBINSPECTOR_UI}/GResourceBundle.xml
- $(AM_V_at)echo ' <gresource prefix="/org/webkitgtk/inspector">' >> ${GENSOURCES_WEBINSPECTOR_UI}/GResourceBundle.xml
- $(AM_V_at)\
- basepath=`echo $(WebInspectorUI)/ | sed 's,^./,,g'`; \
- for file in $^; do \
- if [ "$$file" = "GNUmakefile" ]; then continue; fi; \
- file=`echo $$file | sed "s,$$basepath,,g"`; \
- echo " <file>$$file</file>" >> ${GENSOURCES_WEBINSPECTOR_UI}/GResourceBundle.xml; \
- done
- $(AM_V_at)echo ' </gresource>' >> ${GENSOURCES_WEBINSPECTOR_UI}/GResourceBundle.xml
- $(AM_V_at)echo '</gresources>' >> ${GENSOURCES_WEBINSPECTOR_UI}/GResourceBundle.xml
+ $(AM_V_at)$(srcdir)/Tools/gtk/generate-inspector-gresource-manifest.py $@
${GENSOURCES_WEBINSPECTOR_UI}/GResourceBundle.c: DerivedSources/WebInspectorUI/GResourceBundle.xml
$(AM_V_GEN)
Modified: trunk/Source/WebKit2/ChangeLog (160984 => 160985)
--- trunk/Source/WebKit2/ChangeLog 2013-12-23 04:40:05 UTC (rev 160984)
+++ trunk/Source/WebKit2/ChangeLog 2013-12-23 06:08:44 UTC (rev 160985)
@@ -1,3 +1,15 @@
+2013-12-22 Martin Robinson <[email protected]>
+
+ [GTK][CMake] Integrate GResource for inspector files (and others?)
+ https://bugs.webkit.org/show_bug.cgi?id=125569
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * GNUmakefile.am: Use the newly added static WebKit2InspectorGResourceBundle.xml
+ instead of generating the same file each time.
+ * PlatformGTK.cmake: Add support for building the GResource bundles into WebKit2.
+ * UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml: Added.
+
2013-12-22 Csaba Osztrogonác <[email protected]>
URTBF after r160971 to try to make EFL build again.
Modified: trunk/Source/WebKit2/GNUmakefile.am (160984 => 160985)
--- trunk/Source/WebKit2/GNUmakefile.am 2013-12-23 04:40:05 UTC (rev 160984)
+++ trunk/Source/WebKit2/GNUmakefile.am 2013-12-23 06:08:44 UTC (rev 160985)
@@ -19,25 +19,13 @@
Programs/WebKitPluginProcess
endif
-${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml: GNUmakefile \
- $(WebKit2)/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
+${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.c: \
+ $(WebKit2)/UIProcess/InspectorServer/front-end/inspectorPageIndex.html \
+ $(WebKit2)/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
$(AM_V_GEN)
- $(AM_V_at)mkdir -p ${GENSOURCES_WEBINSPECTOR_UI}
- $(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml
- $(AM_V_at)echo '<gresources>' >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml
- $(AM_V_at)echo ' <gresource prefix="/org/webkitgtk/inspector/UserInterface">' >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml
- $(AM_V_at)echo " <file>inspectorPageIndex.html</file>" >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml
- $(AM_V_at)echo ' </gresource>' >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml
- $(AM_V_at)echo '</gresources>' >> ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml
-
-${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.c: DerivedSources/WebInspectorUI/WebKit2GResourceBundle.xml
- $(AM_V_GEN)
$(AM_V_at)glib-compile-resources --generate --sourcedir=$(WebKit2)/UIProcess/InspectorServer/front-end \
- --target=${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.c ${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.xml
+ --target=${GENSOURCES_WEBINSPECTOR_UI}/WebKit2GResourceBundle.c $(WebKit2)/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
-BUILT_SOURCES += \
- DerivedSources/WebInspectorUI/WebKit2GResourceBundle.xml
-
webkit2gtk_built_sources += \
DerivedSources/WebInspectorUI/WebKit2GResourceBundle.c
Modified: trunk/Source/WebKit2/PlatformGTK.cmake (160984 => 160985)
--- trunk/Source/WebKit2/PlatformGTK.cmake 2013-12-23 04:40:05 UTC (rev 160984)
+++ trunk/Source/WebKit2/PlatformGTK.cmake 2013-12-23 06:08:44 UTC (rev 160985)
@@ -15,6 +15,9 @@
add_definitions(-DLIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}")
list(APPEND WebKit2_SOURCES
+ ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
+ ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
+
${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
@@ -352,7 +355,16 @@
${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h
${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
+)
+file(GLOB InspectorFiles
+ ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
+ ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.css
+ ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*
+ ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html
+ ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/*.png
+ ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/*.svg
+ ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.js
)
list(APPEND WebKit2_MESSAGES_IN_FILES
@@ -445,6 +457,30 @@
COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.cpp.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ > ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
VERBATIM)
+add_custom_command(
+ OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
+ DEPENDS ${InspectorFiles}
+ ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py
+ COMMAND ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
+ VERBATIM
+)
+
+add_custom_command(
+ OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
+ DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
+ ${InspectorFiles}
+ COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebInspectorUI --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
+ VERBATIM
+)
+
+add_custom_command(
+ OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
+ DEPENDS ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
+ ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
+ COMMAND glib-compile-resources --generate --sourcedir=${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
+ VERBATIM
+)
+
# This symbolic link allows includes like #include <webkit2/WebkitWebView.h> which simulates installed headers.
add_custom_target(fake-installed-headers
mkdir -p ${DERIVED_SOURCES_WEBKIT2_DIR}/webkit2gtk/include
Added: trunk/Source/WebKit2/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml (0 => 160985)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml 2013-12-23 06:08:44 UTC (rev 160985)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/webkitgtk/inspector/UserInterface">
+ <file>inspectorPageIndex.html</file>
+ </gresource>
+</gresources>
Property changes on: trunk/Source/WebKit2/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Tools/ChangeLog (160984 => 160985)
--- trunk/Tools/ChangeLog 2013-12-23 04:40:05 UTC (rev 160984)
+++ trunk/Tools/ChangeLog 2013-12-23 06:08:44 UTC (rev 160985)
@@ -1,3 +1,12 @@
+2013-12-22 Martin Robinson <[email protected]>
+
+ [GTK][CMake] Integrate GResource for inspector files (and others?)
+ https://bugs.webkit.org/show_bug.cgi?id=125569
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * gtk/generate-inspector-gresource-manifest.py: Added.
+
2013-12-22 Csaba Osztrogonác <[email protected]>
Last URTBF after r160971 to make EFL build happy.
Added: trunk/Tools/gtk/generate-inspector-gresource-manifest.py (0 => 160985)
--- trunk/Tools/gtk/generate-inspector-gresource-manifest.py (rev 0)
+++ trunk/Tools/gtk/generate-inspector-gresource-manifest.py 2013-12-23 06:08:44 UTC (rev 160985)
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+# Copyright (C) 2013 Igalia S.L.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import common
+import glob
+import os
+import sys
+
+resources_path = common.top_level_path() + "/Source/WebInspectorUI/"
+inspector_files = \
+ glob.glob(resources_path + 'UserInterface/*.html') + \
+ glob.glob(resources_path + 'UserInterface/*.js') + \
+ glob.glob(resources_path + 'UserInterface/*.css') + \
+ glob.glob(resources_path + 'UserInterface/Images/*.png') + \
+ glob.glob(resources_path + 'UserInterface/Images/*.svg') + \
+ glob.glob(resources_path + 'UserInterface/External/CodeMirror/*') + \
+ glob.glob(resources_path + 'Localizations/en.lproj/localizedStrings.js')
+
+gresources_file_content = \
+"""<?xml version=1.0 encoding=UTF-8?>
+<gresources>
+ <gresource prefix="/org/webkitgtk/inspector">
+"""
+
+for file in inspector_files:
+ gresources_file_content += " <file>" + file.replace(resources_path, '') + "</file>\n"
+
+gresources_file_content += \
+""" </gresource>
+</gresources>
+"""
+
+open(sys.argv[1], 'w').write(gresources_file_content)
Property changes on: trunk/Tools/gtk/generate-inspector-gresource-manifest.py
___________________________________________________________________
Added: svn:executable
Added: svn:eol-style