Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit c392b07

Browse files
[Win] Bundle Inspector Resources in Release builds
https://bugs.webkit.org/show_bug.cgi?id=210942 Reviewed by Fujii Hironori. .: Add ENABLE_WEBINSPECTORUI so the resource copy can be disabled on platforms without inspector frontends. * CMakeLists.txt: * Source/CMakeLists.txt: * Source/PlatformWin.cmake: * Source/cmake/OptionsJSCOnly.cmake: * Source/cmake/OptionsPlayStation.cmake: Source/WebCore: * CMakeLists.txt: Source/WebInspectorUI: Add CMake files for copying inspector resources * CMakeLists.txt: Added. * PlatformGTK.cmake: Added. * PlatformWin.cmake: Added. Source/WebKit: Move CMake logic for the inspector resource copy script to Source/WebInspectorUI so it can be shared with Win and other platforms. * InspectorGResources.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@260844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent bed33c6 commit c392b07

18 files changed

+156
-105
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ if (NOT DEFINED ENABLE_TOOLS AND EXISTS "${CMAKE_SOURCE_DIR}/Tools")
3131
set(ENABLE_TOOLS ON)
3232
endif ()
3333

34+
if (NOT DEFINED ENABLE_WEBINSPECTORUI)
35+
set(ENABLE_WEBINSPECTORUI ON)
36+
endif ()
37+
3438
# -----------------------------------------------------------------------------
3539
# Determine which port will be built
3640
# -----------------------------------------------------------------------------

ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2020-04-28 Christopher Reid <[email protected]>
2+
3+
[Win] Bundle Inspector Resources in Release builds
4+
https://bugs.webkit.org/show_bug.cgi?id=210942
5+
6+
Reviewed by Fujii Hironori.
7+
8+
Add ENABLE_WEBINSPECTORUI so the resource copy can be disabled
9+
on platforms without inspector frontends.
10+
11+
* CMakeLists.txt:
12+
* Source/CMakeLists.txt:
13+
* Source/PlatformWin.cmake:
14+
* Source/cmake/OptionsJSCOnly.cmake:
15+
* Source/cmake/OptionsPlayStation.cmake:
16+
117
2020-04-28 Philippe Normand <[email protected]>
218

319
[GStreamer][MediaStream] Doesn't build with GStreamer 1.10

Source/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ if (USE_LIBWEBRTC)
2929
add_subdirectory(ThirdParty/libwebrtc)
3030
endif ()
3131

32+
if (ENABLE_WEBINSPECTORUI)
33+
add_subdirectory(WebInspectorUI)
34+
endif ()
35+
3236
if (ENABLE_WEBCORE)
3337
add_subdirectory(WebCore)
3438
endif ()

Source/PlatformWin.cmake

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
set(WEBINSPECTORUI_DIR "${CMAKE_SOURCE_DIR}/Source/WebInspectorUI")
2-
set(WEB_INSPECTOR_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/WebInspectorUI)
3-
4-
add_custom_target(
5-
web-inspector-resources ALL
6-
COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBINSPECTORUI_DIR}/UserInterface ${WEB_INSPECTOR_DIR}
7-
COMMAND ${CMAKE_COMMAND} -E copy ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}/Protocol
8-
COMMAND ${CMAKE_COMMAND} -E copy ${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
9-
DEPENDS JavaScriptCore WebCore
10-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
11-
)
12-
131
if (EXISTS ${CMAKE_SOURCE_DIR}/../Internal/Tools/WKTestBrowser/CMakeLists.txt)
142
add_subdirectory(${CMAKE_SOURCE_DIR}/../Internal/Tools/WKTestBrowser ${CMAKE_CURRENT_BINARY_DIR}/WKTestBrowser)
153
endif ()

Source/WebCore/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,10 @@ GENERATE_BINDINGS(WebCoreBindings
18861886
--paintWorkletGlobalScopeConstructorsFile ${PAINTWORKLETGLOBALSCOPE_CONSTRUCTORS_FILE})
18871887
list(APPEND WebCore_DEPENDENCIES WebCoreBindings)
18881888

1889+
if (ENABLE_WEBINSPECTORUI)
1890+
list(APPEND WebCore_DEPENDENCIES WebInspectorUI)
1891+
endif ()
1892+
18891893
GENERATE_BINDINGS(WebCoreTestSupportBindings
18901894
OUTPUT_SOURCE WebCoreTestSupport_SOURCES
18911895
INPUT_FILES ${WebCoreTestSupport_IDL_FILES}

Source/WebCore/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2020-04-28 Christopher Reid <[email protected]>
2+
3+
[Win] Bundle Inspector Resources in Release builds
4+
https://bugs.webkit.org/show_bug.cgi?id=210942
5+
6+
Reviewed by Fujii Hironori.
7+
8+
* CMakeLists.txt:
9+
110
2020-04-28 Rob Buis <[email protected]>
211

312
Remove downloadAttribute from DocumentLoader

Source/WebInspectorUI/CMakeLists.txt

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
set(InspectorFiles
3+
${WEBINSPECTORUI_DIR}/UserInterface/*.html
4+
${WEBINSPECTORUI_DIR}/UserInterface/Base/*.js
5+
${WEBINSPECTORUI_DIR}/UserInterface/Controllers/*.css
6+
${WEBINSPECTORUI_DIR}/UserInterface/Controllers/*.js
7+
${WEBINSPECTORUI_DIR}/UserInterface/Debug/*.css
8+
${WEBINSPECTORUI_DIR}/UserInterface/Debug/*.js
9+
${WEBINSPECTORUI_DIR}/UserInterface/External/CodeMirror/*.css
10+
${WEBINSPECTORUI_DIR}/UserInterface/External/CodeMirror/*.js
11+
${WEBINSPECTORUI_DIR}/UserInterface/External/Esprima/*.js
12+
${WEBINSPECTORUI_DIR}/UserInterface/External/three.js/*.js
13+
${WEBINSPECTORUI_DIR}/UserInterface/Models/*.js
14+
${WEBINSPECTORUI_DIR}/UserInterface/Protocol/*.js
15+
${WEBINSPECTORUI_DIR}/UserInterface/Proxies/*.js
16+
${WEBINSPECTORUI_DIR}/UserInterface/Test/*.js
17+
${WEBINSPECTORUI_DIR}/UserInterface/Views/*.css
18+
${WEBINSPECTORUI_DIR}/UserInterface/Views/*.js
19+
${WEBINSPECTORUI_DIR}/UserInterface/Workers/Formatter/*.js
20+
${WEBINSPECTORUI_DIR}/UserInterface/Workers/HeapSnapshot/*.js
21+
${WEBINSPECTORUI_DIR}/UserInterface/Images/*.png
22+
${WEBINSPECTORUI_DIR}/UserInterface/Images/*.svg
23+
${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js
24+
)
25+
26+
file(GLOB InspectorFilesDependencies
27+
${InspectorFiles}
28+
)
29+
30+
set(InspectorResourceScripts
31+
${WEBINSPECTORUI_DIR}/Scripts/combine-resources.pl
32+
${WEBINSPECTORUI_DIR}/Scripts/copy-user-interface-resources.pl
33+
${WEBINSPECTORUI_DIR}/Scripts/fix-worker-imports-for-optimized-builds.pl
34+
${WEBINSPECTORUI_DIR}/Scripts/remove-console-asserts.pl
35+
${JavaScriptCore_SCRIPTS_DIR}/cssmin.py
36+
${JavaScriptCore_SCRIPTS_DIR}/jsmin.py
37+
)
38+
39+
set(WebInspectorUI_RESOURCES_DIR "${WebInspectorUI_DERIVED_SOURCES_DIR}/InspectorResources")
40+
set(WebInspectorUI_LOCALIZED_STRINGS_DIR "${WebInspectorUI_RESOURCES_DIR}/WebInspectorUI/Localizations/en.lproj")
41+
42+
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
43+
44+
# DerivedSources/JavaScriptCore/inspector/InspectorBackendCommands.js is
45+
# expected in DerivedSources/WebInspectorUI/UserInterface/Protocol/.
46+
add_custom_command(
47+
OUTPUT ${WebInspectorUI_DERIVED_SOURCES_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
48+
DEPENDS JavaScriptCore
49+
${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js
50+
COMMAND ${CMAKE_COMMAND} -E copy ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js ${WebInspectorUI_DERIVED_SOURCES_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
51+
VERBATIM
52+
)
53+
54+
if (NOT DEFINED COMBINE_INSPECTOR_RESOURCES)
55+
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
56+
set(COMBINE_INSPECTOR_RESOURCES NO)
57+
else ()
58+
set(COMBINE_INSPECTOR_RESOURCES YES)
59+
endif ()
60+
endif ()
61+
if (NOT DEFINED COMBINE_TEST_RESOURCES)
62+
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR DEVELOPER_MODE)
63+
set(COMBINE_TEST_RESOURCES YES)
64+
else ()
65+
set(COMBINE_TEST_RESOURCES NO)
66+
endif ()
67+
endif ()
68+
69+
add_custom_target(
70+
WebInspectorUI
71+
DEPENDS ${InspectorFilesDependencies}
72+
${InspectorResourceScripts}
73+
${WebInspectorUI_DERIVED_SOURCES_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
74+
COMMAND ${CMAKE_COMMAND} -E copy ${WebInspectorUI_DERIVED_SOURCES_DIR}/UserInterface/Protocol/InspectorBackendCommands.js ${JavaScriptCore_SCRIPTS_DIR}/InspectorBackendCommands.js
75+
COMMAND ${CMAKE_COMMAND} -E env "DERIVED_SOURCES_DIR=${WebInspectorUI_DERIVED_SOURCES_DIR}" "SRCROOT=${WEBINSPECTORUI_DIR}" "JAVASCRIPTCORE_PRIVATE_HEADERS_DIR=${JavaScriptCore_SCRIPTS_DIR}" "TARGET_BUILD_DIR=${WebInspectorUI_RESOURCES_DIR}" "UNLOCALIZED_RESOURCES_FOLDER_PATH=WebInspectorUI" "COMBINE_INSPECTOR_RESOURCES=${COMBINE_INSPECTOR_RESOURCES}" "COMBINE_TEST_RESOURCES=${COMBINE_TEST_RESOURCES}" PYTHON=${PYTHON_EXECUTABLE} ${PERL_EXECUTABLE} ${WEBINSPECTORUI_DIR}/Scripts/copy-user-interface-resources.pl
76+
COMMAND ${CMAKE_COMMAND} -E make_directory ${WebInspectorUI_LOCALIZED_STRINGS_DIR}
77+
COMMAND ${CMAKE_COMMAND} -E copy "${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js" ${WebInspectorUI_LOCALIZED_STRINGS_DIR}/localizedStrings.js
78+
VERBATIM
79+
)

Source/WebInspectorUI/ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2020-04-28 Christopher Reid <[email protected]>
2+
3+
[Win] Bundle Inspector Resources in Release builds
4+
https://bugs.webkit.org/show_bug.cgi?id=210942
5+
6+
Reviewed by Fujii Hironori.
7+
8+
Add CMake files for copying inspector resources
9+
10+
* CMakeLists.txt: Added.
11+
* PlatformGTK.cmake: Added.
12+
* PlatformWin.cmake: Added.
13+
114
2020-04-28 Nikita Vasilyev <[email protected]>
215

316
Web Inspector: Elements: Classes toggle button has wrong outline on focus
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set(WebInspectorUI_RESOURCES_DIR "${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorResources")
2+
set(WebInspectorUI_LOCALIZED_STRINGS_DIR "${WebInspectorUI_RESOURCES_DIR}/WebInspectorUI/Localizations/en.lproj")
3+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set(WebInspectorUI_RESOURCES_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources")
2+
set(WebInspectorUI_LOCALIZED_STRINGS_DIR "${WebInspectorUI_RESOURCES_DIR}/WebInspectorUI")

0 commit comments

Comments
 (0)