Skip to content

Commit

Permalink
[GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=138134

Patch by Milan Crha <mcrha@redhat.com> on 2015-04-17
Reviewed by Carlos Garcia Campos.

.:

* GNUmakefile.am: Command line with expanded resources exceeds 32KB, which
is a limit on Windows. It's better to expand wildcards inside the
python script.

Source/WebInspectorUI:

* GNUmakefile.am: Command line with expanded resources exceeds 32KB, which
is a limit on Windows. It's better to expand wildcards inside the
python script.

Source/WebKit2:

* PlatformGTK.cmake: Command line with expanded resources exceeds 32KB, which
is a limit on Windows. It's better to expand wildcards inside the
python script.

Tools:

* gtk/generate-inspector-gresource-manifest.py:
(get_filenames): Command line with expanded resources exceeds 32KB, which
is a limit on Windows. It's better to expand wildcards inside the
python script.
  • Loading branch information
mcrha authored and carlosgcampos committed May 19, 2015
1 parent 98a8056 commit 13da596
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 17 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
@@ -1,3 +1,14 @@
2015-04-17 Milan Crha <mcrha@redhat.com>

[GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
https://bugs.webkit.org/show_bug.cgi?id=138134

Reviewed by Carlos Garcia Campos.

* GNUmakefile.am: Command line with expanded resources exceeds 32KB, which
is a limit on Windows. It's better to expand wildcards inside the
python script.

2015-04-15 Руслан Ижбулатов <lrn1986@gmail.com>

[W32] Wrong configure tests for OpenGL on Windows, wrong ifdefs
Expand Down
1 change: 0 additions & 1 deletion GNUmakefile.am
Expand Up @@ -124,7 +124,6 @@ DISTCLEANFILES :=
MAINTAINERCLEANFILES :=
pkgconfig_DATA :=
gdom_symbol_files :=
inspector_files :=

if ENABLE_INTROSPECTION
gir_DATA :=
Expand Down
11 changes: 11 additions & 0 deletions Source/WebInspectorUI/ChangeLog
@@ -1,3 +1,14 @@
2015-04-17 Milan Crha <mcrha@redhat.com>

[GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
https://bugs.webkit.org/show_bug.cgi?id=138134

Reviewed by Carlos Garcia Campos.

* GNUmakefile.am: Command line with expanded resources exceeds 32KB, which
is a limit on Windows. It's better to expand wildcards inside the
python script.

2015-04-15 Руслан Ижбулатов <lrn1986@gmail.com>

[W32] Buildsystem may use wrong Python interpreter
Expand Down
23 changes: 13 additions & 10 deletions Source/WebInspectorUI/GNUmakefile.am
@@ -1,4 +1,14 @@
inspector_files += \
inspector_files = \
"$(WebInspectorUI)/Localizations/en.lproj/localizedStrings.js" \
"$(WebInspectorUI)/UserInterface/*.html" \
"$(WebInspectorUI)/UserInterface/*.js" \
"$(WebInspectorUI)/UserInterface/*.css" \
"$(WebInspectorUI)/UserInterface/Images/gtk/*.png" \
"$(WebInspectorUI)/UserInterface/Images/gtk/*.svg" \
"$(WebInspectorUI)/UserInterface/External/CodeMirror/*.js" \
"$(WebInspectorUI)/UserInterface/External/CodeMirror/*.css"

inspector_files_dependencies = \
$(WebInspectorUI)/Localizations/en.lproj/localizedStrings.js \
$(shell ls $(WebInspectorUI)/UserInterface/*.html) \
$(shell ls $(WebInspectorUI)/UserInterface/*.js) \
Expand All @@ -9,7 +19,7 @@ inspector_files += \
$(shell ls $(WebInspectorUI)/UserInterface/External/CodeMirror/*.css)

${GENSOURCES_WEBINSPECTOR_UI}/GResourceBundle.xml: GNUmakefile \
$(inspector_files) \
$(inspector_files_dependencies) \
$(srcdir)/Tools/gtk/generate-inspector-gresource-manifest.py
$(AM_V_GEN)
$(AM_V_at)mkdir -p ${GENSOURCES_WEBINSPECTOR_UI}
Expand All @@ -27,11 +37,4 @@ webcore_built_sources += \
DerivedSources/WebInspectorUI/GResourceBundle.c

EXTRA_DIST += \
$(WebInspectorUI)/Localizations/en.lproj/localizedStrings.js \
$(shell ls $(WebInspectorUI)/UserInterface/*.html) \
$(shell ls $(WebInspectorUI)/UserInterface/*.js) \
$(shell ls $(WebInspectorUI)/UserInterface/*.css) \
$(shell ls $(WebInspectorUI)/UserInterface/Images/gtk/*.png) \
$(shell ls $(WebInspectorUI)/UserInterface/Images/gtk/*.svg) \
$(shell ls $(WebInspectorUI)/UserInterface/External/CodeMirror/*.js) \
$(shell ls $(WebInspectorUI)/UserInterface/External/CodeMirror/*.css)
$(inspector_files_dependencies)
11 changes: 11 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,14 @@
2015-04-17 Milan Crha <mcrha@redhat.com>

[GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
https://bugs.webkit.org/show_bug.cgi?id=138134

Reviewed by Carlos Garcia Campos.

* PlatformGTK.cmake: Command line with expanded resources exceeds 32KB, which
is a limit on Windows. It's better to expand wildcards inside the
python script.

2015-05-18 Alexander Tsoy <alexander@tsoy.me>

[GTK] fails to build with --disable-accelerated-compositing
Expand Down
8 changes: 6 additions & 2 deletions Source/WebKit2/PlatformGTK.cmake
Expand Up @@ -369,7 +369,7 @@ set(WebKit2WebExtension_INSTALLED_HEADERS
${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
)

file(GLOB InspectorFiles
set(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/*
Expand All @@ -379,6 +379,10 @@ file(GLOB InspectorFiles
${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.js
)

file(GLOB InspectorFilesDependencies
${InspectorFiles}
)

# This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore.
list(INSERT WebKit2_INCLUDE_DIRECTORIES 0
"${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
Expand Down Expand Up @@ -481,7 +485,7 @@ add_custom_command(

add_custom_command(
OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
DEPENDS ${InspectorFiles}
DEPENDS ${InspectorFilesDependencies}
${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py
COMMAND ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
VERBATIM
Expand Down
12 changes: 12 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,15 @@
2015-04-17 Milan Crha <mcrha@redhat.com>

[GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
https://bugs.webkit.org/show_bug.cgi?id=138134

Reviewed by Carlos Garcia Campos.

* gtk/generate-inspector-gresource-manifest.py:
(get_filenames): Command line with expanded resources exceeds 32KB, which
is a limit on Windows. It's better to expand wildcards inside the
python script.

2015-04-15 Руслан Ижбулатов <lrn1986@gmail.com>

[W32] Buildsystem may use wrong Python interpreter
Expand Down
16 changes: 12 additions & 4 deletions Tools/gtk/generate-inspector-gresource-manifest.py
Expand Up @@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

import argparse
import glob
import os
import sys

Expand All @@ -26,10 +27,17 @@
def get_filenames(args):
filenames = []

for filename in args:
base_dir_index = filename.rfind(BASE_DIR)
if base_dir_index != -1:
filenames.append(filename[base_dir_index + len(BASE_DIR):])
for pattern in args:
paths = glob.glob(pattern)
for filename in paths:
base_dir_index = filename.rfind(BASE_DIR)
if base_dir_index != -1:
name = filename[base_dir_index + len(BASE_DIR):]
# The result should use forward slashes, thus make sure any os-specific
# separator, added by the glob.glob() call, is properly replaced
if os.sep != '/':
name = name.replace(os.sep, '/')
filenames.append(name)
return filenames


Expand Down

0 comments on commit 13da596

Please sign in to comment.