Changeset 205415 in webkit
- Timestamp:
- Sep 3, 2016 9:34:57 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 deleted
- 16 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r205310 r205415 1 2016-09-01 Brian Burg <bburg@apple.com> 2 3 Web Inspector: unify Main.html and Test.html sources and generate different copies with the preprocessor 4 https://bugs.webkit.org/show_bug.cgi?id=161212 5 <rdar://problem/28017961> 6 7 Reviewed by Joseph Pecoraro. 8 9 Rearrange some CMake rules so most Inspector UI work is done in WebInspectorUI. 10 11 * Source/CMakeLists.txt: Add 'WebInspectorUI' subdirectory. 12 * Source/PlatformEfl.cmake: 13 - Move the rule to copy InspectorBackendCommands.js into WebInspectorUI/CMakeLists.txt. 14 - Add a FIXME to use the cross-port list of Inspector resources instead of copying everything. 15 - Add new dependency so generated WebInspectorUI files are made by web-inspector-resources. 16 - Copy over generated files Main.html and Test.html. 17 18 * Source/PlatformWin.cmake: 19 - Add a FIXME to use the cross-port list of Inspector resources instead of copying everything. 20 - Add new dependency so generated WebInspectorUI files are made by web-inspector-resources. 21 - Copy over generated files Main.html and Test.html. 22 23 * Source/cmake/WebKitFS.cmake: 24 - Set up WEBINSPECTORUI_DIR and use it. 25 - Move directory creation commands here from JavaScriptCore. 26 27 * Source/cmake/WebKitMacros.cmake: 28 Add a helper to turn a CMake list into a space-delimited string of elements. 29 1 30 2016-09-01 Brian Burg <bburg@apple.com> 2 31 -
trunk/Source/CMakeLists.txt
r198766 r205415 25 25 if (ENABLE_WEBCORE) 26 26 add_subdirectory(WebCore) 27 endif () 28 29 if (ENABLE_WEBKIT OR ENABLE_WEBKIT2) 30 add_subdirectory(WebInspectorUI) 27 31 endif () 28 32 -
trunk/Source/JavaScriptCore/CMakeLists.txt
r205198 r205415 1200 1200 1201 1201 # Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders 1202 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol)1203 file(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector)1204 1202 add_custom_command( 1205 1203 OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.cpp -
trunk/Source/JavaScriptCore/ChangeLog
r205405 r205415 1 2016-09-01 Brian Burg <bburg@apple.com> 2 3 Web Inspector: unify Main.html and Test.html sources and generate different copies with the preprocessor 4 https://bugs.webkit.org/show_bug.cgi?id=161212 5 <rdar://problem/28017961> 6 7 Reviewed by Joseph Pecoraro. 8 9 * CMakeLists.txt: Remove some unnecessary MAKE_DIRECTORY commands. 10 1 11 2016-09-03 Joseph Pecoraro <pecoraro@apple.com> 2 12 -
trunk/Source/PlatformEfl.cmake
r182315 r205415 1 1 add_subdirectory(${WEBCORE_DIR}/platform/efl/DefaultTheme) 2 2 3 # DerivedSources/JavaScriptCore/inspector/InspectorBackendCommands.js is 4 # expected in DerivedSources/WebInspectorUI/UserInterface/Protocol/. 5 add_custom_command( 6 OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js 7 DEPENDS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js 8 COMMAND cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js 9 ) 10 3 # FIXME: This should move to Source/WebInspectorUI/PlatformWin.cmake and use the WebInspectorUI_RESOURCES list. 11 4 add_custom_target( 12 5 web-inspector-resources ALL 13 6 COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBINSPECTORUI_DIR}/UserInterface ${WEB_INSPECTOR_DIR} 14 7 COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}/Protocol 8 COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Main.html ${WEB_INSPECTOR_DIR}/UserInterface 9 COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Test.html ${WEB_INSPECTOR_DIR}/UserInterface 15 10 COMMAND ${CMAKE_COMMAND} -E copy ${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR} 16 11 COMMAND ${CMAKE_COMMAND} -E copy ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html ${WEB_INSPECTOR_DIR} 17 DEPENDS JavaScriptCore WebCore ${ DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js12 DEPENDS JavaScriptCore WebCore ${WebInspectorUI_RESOURCES} 18 13 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 19 14 ) -
trunk/Source/PlatformWin.cmake
r191958 r205415 1 set(WEBINSPECTORUI_DIR "${CMAKE_SOURCE_DIR}/Source/WebInspectorUI")2 1 set(WEB_INSPECTOR_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/WebInspectorUI) 3 2 3 # FIXME: This should move to Source/WebInspectorUI/PlatformWin.cmake and use the WebInspectorUI_RESOURCES list. 4 4 add_custom_target( 5 5 web-inspector-resources ALL 6 6 COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBINSPECTORUI_DIR}/UserInterface ${WEB_INSPECTOR_DIR} 7 COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}/Protocol 7 COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}/Protocol 8 COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Main.html ${WEB_INSPECTOR_DIR}/UserInterface 9 COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Test.html ${WEB_INSPECTOR_DIR}/UserInterface 8 10 COMMAND ${CMAKE_COMMAND} -E copy ${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR} 9 11 COMMAND ${CMAKE_COMMAND} -E copy ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html ${WEB_INSPECTOR_DIR} 10 DEPENDS JavaScriptCore WebCore 12 DEPENDS JavaScriptCore WebCore generate-inspector-resources 11 13 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 12 14 ) -
trunk/Source/WebInspectorUI/ChangeLog
r205414 r205415 1 2016-09-01 Brian Burg <bburg@apple.com> 2 3 Web Inspector: unify Main.html and Test.html sources and generate different copies with the preprocessor 4 https://bugs.webkit.org/show_bug.cgi?id=161212 5 <rdar://problem/28017961> 6 7 Reviewed by Joseph Pecoraro. 8 9 Add a Derived Sources build phase to WebInspectorUI project. Generate 10 Test.html and Main.html from a combined Inspector.html.in which has preprocessor 11 macros to include/exclude files not needed by all main resource versions. 12 13 Similarly, start generating these Inspector files in WebInspectorUI/CMakeLists.txt. 14 Move platform-specific bundling commands into PlatformGTK.cmake. 15 16 * CMakeLists.txt: Added. 17 Set up a list of common frontend resources that specific ports can extend, such as 18 with their own port-specific image resources. This list is the input to port-specific 19 packaging/bundling scripts. Eventually, minification and concatenation should happen 20 independently of the specific port by constructing the list of resources dynamically. 21 22 To ensure resources are always generated in WebInspectorUI and accessible from WebKit2, 23 add a dummy target that is always out of date and depends on generated files, causing 24 them to be built. 25 26 Also create a macro to run the preprocessor over Inspector.html.in using various 27 preprocessor macro definitions. These are customizable by ports to control the 28 appearance of ENGINEERING_BUILD, which guards resources not meant for shipping builds. 29 30 * Configurations/WebInspectorUIFramework.xcconfig: 31 We need to use preprocessor.pm from WebCore. On Mac, this is a private header. 32 Teach xcodebuild how to compute WEBCORE_PRIVATE_HEADERS_DIR. This is copied 33 from WebKit2's configuration files. 34 35 * PlatformGTK.cmake: Added. 36 Add GTK image resources to the resource list. Generate GResource catalog and embedded 37 C file into DerivedSources. WebKit2 will copy over this file and compile it. 38 39 * Scripts/combine-resources.pl: 40 (concatenateFiles): 41 Remove the --strip option as this patch removes the only use of it. 42 43 * DerivedSources.make: Added. 44 Generate Test.html and Main.html from the new combined Inspector.html.in. 45 The 'preprocess_main_resource' rule was copied from WebCore's DerivedSources.make. 46 47 * Scripts/cssmin.py: Removed. 48 * Scripts/jsmin.py: Removed. 49 These scripts are copied from JavaScriptCore but nobody uses these copies. Remove them. 50 51 * Scripts/copy-user-interface-resources-dryrun.rb: Do some cleanup. 52 - Stage scripts from SRCROOT into the tmpdir so dryrun doesn't require 53 a previous build to process WebInspectorUI resources. 54 - Run DerivedSources.make before copying/processing resources. 55 - Add some environment variables for new phase and group by script affected. 56 - Add a comment to clarify what this script is simulating. 57 58 * Scripts/copy-user-interface-resources.pl: 59 - Use Main.html and Test.html from DerivedSources/ instead of SRCROOT. 60 - Copy over Main.html and Test.html manually if not combining resources. 61 - Remove the command to strip files from Debug/ for production. This is 62 now redundant with ENGINEERING_BUILD guards in Inspector.html.in. 63 - Use jsmin.py from JavaScriptCore instead of the local copy. 64 - Wrap all multi-argument 'system' invocations so they are readable. 65 66 * Scripts/generate-webinspectorui-derived-sources: Added. 67 Added boilerplate script to run DerivedSources.make for Mac port. 68 69 * Scripts/preprocess-main-resource.pl: Added. 70 Trivially invoke the preprocessor on $0 using the given defines. 71 72 * UserInterface/Inspector.html.in: Renamed from Source/WebInspectorUI/UserInterface/Main.html. 73 * UserInterface/Test.html: Removed. 74 Combine Test.html and Main.html into Inspector.html.in. Add these guards: 75 - INCLUDE_TEST_RESOURCES: for resources excluded from Main.html. 76 - INCLUDE_UI_RESOURCES: for resources excluded from model tests. 77 - ENGINEERING_BUILD: for resources not to be shipped (Debug/ directory). 78 79 * WebInspectorUI.xcodeproj/project.pbxproj: 80 - Add new aggregate target 'Derived Sources' to project 'WebInspectorUI'. 81 - Add dependency on 'Derived Sources' to WebInspectorUI.framework. 82 - Remove unused copies of jsmin.py and cssmin.py. 83 1 84 2016-09-03 Devin Rousso <dcrousso+webkit@gmail.com> 2 85 -
trunk/Source/WebInspectorUI/Configurations/WebInspectorUIFramework.xcconfig
r194821 r205415 31 31 JAVASCRIPTCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/PrivateHeaders; 32 32 33 UMBRELLA_FRAMEWORKS_DIR = $(UMBRELLA_FRAMEWORKS_DIR_$(CONFIGURATION)); 34 UMBRELLA_FRAMEWORKS_DIR_Debug = $(UMBRELLA_FRAMEWORKS_DIR_engineering); 35 UMBRELLA_FRAMEWORKS_DIR_Release = $(UMBRELLA_FRAMEWORKS_DIR_engineering); 36 UMBRELLA_FRAMEWORKS_DIR_Production[sdk=iphone*] = $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks; 37 UMBRELLA_FRAMEWORKS_DIR_Production[sdk=macosx*] = $(SDKROOT)$(UMBRELLA_FRAMEWORKS_DIR_Production_macosx_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR)); 38 UMBRELLA_FRAMEWORKS_DIR_Production_macosx_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks; 39 UMBRELLA_FRAMEWORKS_DIR_Production_macosx_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR); 40 UMBRELLA_FRAMEWORKS_DIR_engineering = $(BUILT_PRODUCTS_DIR); 41 42 WEBCORE_PRIVATE_HEADERS_DIR = $(UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders; 43 33 44 SKIP_INSTALL[sdk=iphone*] = YES; -
trunk/Source/WebInspectorUI/Scripts/combine-resources.pl
r198353 r205415 36 36 our $htmlDirectory; 37 37 our $htmlFile; 38 our $strip;39 38 40 39 GetOptions('output-dir=s' => \$outputDirectory, … … 44 43 'input-dir=s' => \$inputDirectory, 45 44 'input-html-dir=s' => \$htmlDirectory, 46 'input-html=s' => \$htmlFile, 47 'strip' => \$strip); 45 'input-html=s' => \$htmlFile); 48 46 49 unless (defined $htmlFile and defined $derivedSourcesDirectory and defined $outputDirectory and (defined $ strip or defined $outputScriptName or defined $outputStylesheetName)) {50 print "Usage: $0 --input-html <path> --derived-sources-dir <path> --output-dir <path> [--output-script-name <name>] [--output-style-name <name>] [--strip]\n";47 unless (defined $htmlFile and defined $derivedSourcesDirectory and defined $outputDirectory and (defined $outputScriptName or defined $outputStylesheetName)) { 48 print "Usage: $0 --input-html <path> --derived-sources-dir <path> --output-dir <path> [--output-script-name <name>] [--output-style-name <name>]\n"; 51 49 exit; 52 50 } … … 91 89 my $replacementExpression = "([\t ]*)" . $tagExpression . "[\t ]*\n+"; 92 90 93 if (defined $strip) { 94 # Just strip all occurrences of the pattern. 95 $headContents =~ s/$replacementExpression//gi; 96 } else { 97 # Replace the first occurrence with a token so we can inject the concatenated tag in the same place 98 # as the first file that got consolidated. This makes sure we preserve some order if there are other 99 # items in the head that we didn't consolidate. 100 $headContents =~ s/$replacementExpression/$1%CONCATENATED%\n/i; 101 $headContents =~ s/$replacementExpression//gi; 102 $headContents =~ s/%CONCATENATED%/$concatenatedTag/; 103 } 91 # Replace the first occurrence with a token so we can inject the concatenated tag in the same place 92 # as the first file that got consolidated. This makes sure we preserve some order if there are other 93 # items in the head that we didn't consolidate. 94 $headContents =~ s/$replacementExpression/$1%CONCATENATED%\n/i; 95 $headContents =~ s/$replacementExpression//gi; 96 $headContents =~ s/%CONCATENATED%/$concatenatedTag/; 104 97 } 105 98 -
trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources-dryrun.rb
r199168 r205415 32 32 end 33 33 34 JAVASCRIPTCORE_PATH = File.expand_path File.join(File.dirname(__FILE__), "..", "..", "JavaScriptCore") 35 WEBCORE_PATH = File.expand_path File.join(File.dirname(__FILE__), "..", "..", "WebCore") 34 36 WEB_INSPECTOR_PATH = File.expand_path File.join(File.dirname(__FILE__), "..") 37 GENERATE_DERIVED_SOURCES_PATH = File.join WEB_INSPECTOR_PATH, "Scripts", "generate-webinspectorui-derived-sources" 35 38 COPY_USER_INTERFACE_RESOURCES_PATH = File.join WEB_INSPECTOR_PATH, "Scripts", "copy-user-interface-resources.pl" 36 39 40 # This script simulates processing user interface resources located in SRCROOT. 41 # It places processed files in the specified output directory. This is most similar 42 # to an isolated OBJROOT since it includes DerivedSources. It doesn't place files 43 # into their DSTROOT locations, such as inside of WebInspectorUI.framework. 37 44 $output_directory = File.expand_path ARGV[0] 45 $start_directory = FileUtils.pwd 38 46 39 47 Dir.mktmpdir do |tmpdir| … … 41 49 # Create the output directory if needed. 42 50 FileUtils.mkdir_p $output_directory 43 51 44 52 # Create empty derived sources expected to exist. 45 53 FileUtils.touch(File.join(tmpdir, 'InspectorBackendCommands.js')) 46 47 # Setup the environment and run. 48 ENV["DERIVED_SOURCES_DIR"] = tmpdir 54 55 # Stage some scripts expected to be in various framework PrivateHeaders. 49 56 ENV["JAVASCRIPTCORE_PRIVATE_HEADERS_DIR"] = tmpdir 57 ENV["WEBCORE_PRIVATE_HEADERS_DIR"] = tmpdir 58 FileUtils.cp(File.join(JAVASCRIPTCORE_PATH, "Scripts", "cssmin.py"), tmpdir) 59 FileUtils.cp(File.join(JAVASCRIPTCORE_PATH, "Scripts", "jsmin.py"), tmpdir) 60 FileUtils.cp(File.join(WEBCORE_PATH, "bindings", "scripts", "preprocessor.pm"), tmpdir) 61 62 # Setup the environment and generate derived sources. 50 63 ENV["SRCROOT"] = WEB_INSPECTOR_PATH 64 ENV["BUILT_PRODUCTS_DIR"] = $output_directory 65 ENV["ACTION"] = "install" 66 FileUtils.cd $start_directory 67 system(GENERATE_DERIVED_SOURCES_PATH) or raise "Failed to generate derived sources." 68 69 # Setup the environment and combine/process/stage resources. 70 ENV["DERIVED_SOURCES_DIR"] = File.join($output_directory, "DerivedSources", "WebInspectorUI") 51 71 ENV["TARGET_BUILD_DIR"] = $output_directory 52 72 ENV["UNLOCALIZED_RESOURCES_FOLDER_PATH"] = "" 53 73 ENV["COMBINE_INSPECTOR_RESOURCES"] = "YES" 54 74 ENV["COMBINE_TEST_RESOURCES"] = "YES" 55 exec COPY_USER_INTERFACE_RESOURCES_PATH 75 ENV["FORCE_TOOL_INSTALL"] = "NO" 76 FileUtils.cd $start_directory 77 system(COPY_USER_INTERFACE_RESOURCES_PATH) or raise "Failed to process user interface resources." 56 78 57 79 end -
trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl
r200774 r205415 91 91 my $inspectorLicense = <<'EOF'; 92 92 /* 93 * Copyright (C) 2007-201 5Apple Inc. All rights reserved.93 * Copyright (C) 2007-2016 Apple Inc. All rights reserved. 94 94 * Copyright (C) 2008 Matt Lilek. All rights reserved. 95 95 * Copyright (C) 2008-2009 Anthony Ricaud <rik@webkit.org> … … 136 136 my $derivedSourcesDir = $ENV{'DERIVED_SOURCES_DIR'}; 137 137 my $scriptsRoot = File::Spec->catdir($ENV{'SRCROOT'}, 'Scripts'); 138 my $sharedScriptsRoot = File::Spec->catdir($ENV{'JAVASCRIPTCORE_PRIVATE_HEADERS_DIR'}); 138 139 my $uiRoot = File::Spec->catdir($ENV{'SRCROOT'}, 'UserInterface'); 139 140 my $targetResourcePath = File::Spec->catdir($ENV{'TARGET_BUILD_DIR'}, $ENV{'UNLOCALIZED_RESOURCES_FOLDER_PATH'}); … … 162 163 # but overwrite Main.html / Main.js with optimized versions. 163 164 ditto($uiRoot, $targetResourcePath); 165 copy(File::Spec->catfile($derivedSourcesDir, "Main.html"), $targetResourcePath) or die "Copy of Main.html failed: $!"; 166 copy(File::Spec->catfile($derivedSourcesDir, "Test.html"), $targetResourcePath) or die "Copy of Test.html failed: $!"; 167 unlink File::Spec->catfile($targetResourcePath, "Inspector.html.in"); 164 168 165 169 # Also force combining test resources for tool installs. … … 168 172 169 173 if ($shouldCombineMain) { 170 # Remove Debug JavaScript and CSS files in Production builds.171 system($perl, $combineResourcesCmd, '--input-dir', 'Debug', '--input-html', File::Spec->catfile($uiRoot, 'Main.html'), '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'Debug.js', '--output-style-name', 'Debug.css', '--strip');172 173 174 # Combine the JavaScript and CSS files in Production builds into single files (Main.js and Main.css). 174 175 my $derivedSourcesMainHTML = File::Spec->catfile($derivedSourcesDir, 'Main.html'); 175 system($perl, $combineResourcesCmd, '--input-html', $derivedSourcesMainHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'Main.js', '--output-style-name', 'Main.css'); 176 system($perl, $combineResourcesCmd, 177 '--input-html', $derivedSourcesMainHTML, 178 '--input-html-dir', $uiRoot, 179 '--derived-sources-dir', $derivedSourcesDir, 180 '--output-dir', $derivedSourcesDir, 181 '--output-script-name', 'Main.js', 182 '--output-style-name', 'Main.css'); 176 183 177 184 # Combine the CodeMirror JavaScript and CSS files in Production builds into single files (CodeMirror.js and CodeMirror.css). 178 system($perl, $combineResourcesCmd, '--input-dir', 'External/CodeMirror', '--input-html', $derivedSourcesMainHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'CodeMirror.js', '--output-style-name', 'CodeMirror.css'); 185 system($perl, $combineResourcesCmd, 186 '--input-dir', 'External/CodeMirror', 187 '--input-html', $derivedSourcesMainHTML, 188 '--input-html-dir', $uiRoot, 189 '--derived-sources-dir', $derivedSourcesDir, 190 '--output-dir', $derivedSourcesDir, 191 '--output-script-name', 'CodeMirror.js', 192 '--output-style-name', 'CodeMirror.css'); 179 193 180 194 # Combine the Esprima JavaScript files in Production builds into a single file (Esprima.js). 181 system($perl, $combineResourcesCmd, '--input-dir', 'External/Esprima', '--input-html', $derivedSourcesMainHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'Esprima.js'); 195 system($perl, $combineResourcesCmd, 196 '--input-dir', 'External/Esprima', 197 '--input-html', $derivedSourcesMainHTML, 198 '--input-html-dir', $uiRoot, 199 '--derived-sources-dir', $derivedSourcesDir, 200 '--output-dir', $derivedSourcesDir, 201 '--output-script-name', 'Esprima.js'); 182 202 183 203 # Combine the ESLint JavaScript files in Production builds into a single file (ESLint.js). 184 system($perl, $combineResourcesCmd, '--input-dir', 'External/ESLint', '--input-html', $derivedSourcesMainHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'ESLint.js'); 204 system($perl, $combineResourcesCmd, 205 '--input-dir', 'External/ESLint', 206 '--input-html', $derivedSourcesMainHTML, 207 '--input-html-dir', $uiRoot, 208 '--derived-sources-dir', $derivedSourcesDir, 209 '--output-dir', $derivedSourcesDir, 210 '--output-script-name', 'ESLint.js'); 185 211 186 212 # Remove console.assert calls from the Main.js file. 187 213 my $derivedSourcesMainJS = File::Spec->catfile($derivedSourcesDir, 'Main.js'); 188 system($perl, File::Spec->catfile($scriptsRoot, 'remove-console-asserts.pl'), '--input-script', $derivedSourcesMainJS, '--output-script', $derivedSourcesMainJS); 214 system($perl, File::Spec->catfile($scriptsRoot, 'remove-console-asserts.pl'), 215 '--input-script', $derivedSourcesMainJS, 216 '--output-script', $derivedSourcesMainJS); 189 217 190 218 # Fix Image URLs in the Main.css file by removing the "../". … … 223 251 224 252 # Minify the Main.js and Main.css files, with Main.js appending to the license that was exported above. 225 my $jsMinScript = File::Spec->catfile($s criptsRoot, 'jsmin.py');226 my $cssMinScript = File::Spec->catfile($s criptsRoot, 'cssmin.py');253 my $jsMinScript = File::Spec->catfile($sharedScriptsRoot, 'jsmin.py'); 254 my $cssMinScript = File::Spec->catfile($sharedScriptsRoot, 'cssmin.py'); 227 255 system(qq("$python" "$jsMinScript" < "$derivedSourcesMainJS" >> "$targetMainJS")) and die "Failed to minify $derivedSourcesMainJS: $!"; 228 256 system(qq("$python" "$cssMinScript" < "$derivedSourcesMainCSS" >> "$targetMainCSS")) and die "Failed to minify $derivedSourcesMainCSS: $!"; … … 258 286 259 287 # Remove console.assert calls from the Worker js files. 260 system($perl, File::Spec->catfile($scriptsRoot, 'remove-console-asserts.pl'), '--input-directory', $workersDir); 288 system($perl, File::Spec->catfile($scriptsRoot, 'remove-console-asserts.pl'), 289 '--input-directory', $workersDir); 261 290 262 291 # Fix import references in Workers directories. This rewrites "../../External/script.js" import paths to their new locations. 263 system($perl, File::Spec->catfile($scriptsRoot, 'fix-worker-imports-for-optimized-builds.pl'), '--input-directory', $workersDir) and die "Failed to update Worker imports for optimized builds."; 292 system($perl, File::Spec->catfile($scriptsRoot, 'fix-worker-imports-for-optimized-builds.pl'), 293 '--input-directory', $workersDir) 294 and die "Failed to update Worker imports for optimized builds."; 264 295 } else { 265 296 # Keep the files separate for engineering builds. 266 297 ditto($uiRoot, $targetResourcePath); 298 copy(File::Spec->catfile($derivedSourcesDir, 'Main.html'), File::Spec->catfile($targetResourcePath, 'Main.html')) or die "Copy of Main.html failed: $!"; 299 copy(File::Spec->catfile($derivedSourcesDir, 'Test.html'), File::Spec->catfile($targetResourcePath, 'Test.html')) or die "Copy of Test.html failed: $!";; 300 unlink File::Spec->catfile($targetResourcePath, 'Inspector.html.in'); 267 301 } 268 302 269 303 if ($shouldCombineTest) { 304 my $derivedSourcesTestHTML = File::Spec->catfile($derivedSourcesDir, 'Test.html'); 305 270 306 # Combine the JavaScript files for testing into a single file (TestCombined.js). 271 system($perl, $combineResourcesCmd, '--input-html', File::Spec->catfile($uiRoot, 'Test.html'), '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'TestCombined.js', '--output-style-name', 'TestCombined.css'); 272 273 my $derivedSourcesTestHTML = File::Spec->catfile($derivedSourcesDir, 'Test.html'); 274 my $derivedSourcesTestJS = File::Spec->catfile($derivedSourcesDir, 'TestCombined.js'); 307 system($perl, $combineResourcesCmd, 308 '--input-html', $derivedSourcesTestHTML, 309 '--input-html-dir', $uiRoot, 310 '--derived-sources-dir', $derivedSourcesDir, 311 '--output-dir', $derivedSourcesDir, 312 '--output-script-name', 'TestCombined.js', 313 '--output-style-name', 'TestCombined.css'); 314 315 my $derivedSourcesTestCombinedJS = File::Spec->catfile($derivedSourcesDir, 'TestCombined.js'); 275 316 # Combine the Esprima JavaScript files for testing into a single file (Esprima.js). 276 system($perl, $combineResourcesCmd, '--input-dir', 'External/Esprima', '--input-html', $derivedSourcesTestHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'TestEsprima.js'); 317 system($perl, $combineResourcesCmd, 318 '--input-dir', 'External/Esprima', 319 '--input-html', $derivedSourcesTestHTML, 320 '--input-html-dir', $uiRoot, 321 '--derived-sources-dir', $derivedSourcesDir, 322 '--output-dir', $derivedSourcesDir, 323 '--output-script-name', 'TestEsprima.js'); 277 324 278 325 # Export the license into TestCombined.js. … … 280 327 seedFile($targetTestJS, $inspectorLicense); 281 328 329 # Append TestCombined.js to the license that was exported above. 330 appendFile($targetTestJS, $derivedSourcesTestCombinedJS); 331 282 332 # Export the license into Esprima.js. 283 333 my $targetEsprimaJS = File::Spec->catfile($targetResourcePath, 'TestEsprima.js'); 284 334 seedFile($targetEsprimaJS, $esprimaLicense); 285 335 286 # Append TestCombined.js to the license that was exported above.287 appendFile($targetTestJS, $derivedSourcesTestJS);288 289 336 # Append Esprima.js to the license that was exported above. 290 337 my $derivedSourcesEsprimaJS = File::Spec->catfile($derivedSourcesDir, 'TestEsprima.js'); … … 292 339 293 340 # Copy over Test.html. 294 copy($derivedSourcesTestHTML, File::Spec->catfile($targetResourcePath, 'Test.html')) ;341 copy($derivedSourcesTestHTML, File::Spec->catfile($targetResourcePath, 'Test.html')) or die "Copy of Test.html failed: $!"; 295 342 296 343 # Copy the Legacy directory. -
trunk/Source/WebInspectorUI/Scripts/generate-webinspectorui-derived-sources
r205414 r205415 1 #!/ usr/bin/ruby1 #!/bin/sh 2 2 3 # Copyright (C) 201 5Apple Inc. All rights reserved.3 # Copyright (C) 2016 Apple Inc. All rights reserved. 4 4 # 5 5 # Redistribution and use in source and binary forms, with or without … … 24 24 # THE POSSIBILITY OF SUCH DAMAGE. 25 25 26 require 'fileutils' 27 require 'tmpdir' 26 mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/WebInspectorUI" 27 cd "${BUILT_PRODUCTS_DIR}/DerivedSources/WebInspectorUI" 28 28 29 if ARGV.size != 1 || ARGV[0].include?("-h") 30 puts "usage: #{File.basename $0} <output-directory>" 31 exit 1 32 end 29 export WebInspectorUI="${SRCROOT}" 33 30 34 WEB_INSPECTOR_PATH = File.expand_path File.join(File.dirname(__FILE__), "..") 35 COPY_USER_INTERFACE_RESOURCES_PATH = File.join WEB_INSPECTOR_PATH, "Scripts", "copy-user-interface-resources.pl"31 /bin/ln -sfh "${WEBCORE_PRIVATE_HEADERS_DIR}" WebCorePrivateHeaders 32 export WebCore_SCRIPTS_DIR="WebCorePrivateHeaders" 36 33 37 $output_directory = File.expand_path ARGV[0] 34 if [ ! $CC ]; then 35 export CC="`xcrun -find clang`" 36 fi 38 37 39 Dir.mktmpdir do |tmpdir| 40 41 # Create the output directory if needed. 42 FileUtils.mkdir_p $output_directory 43 44 # Create empty derived sources expected to exist. 45 FileUtils.touch(File.join(tmpdir, 'InspectorBackendCommands.js')) 46 47 # Setup the environment and run. 48 ENV["DERIVED_SOURCES_DIR"] = tmpdir 49 ENV["JAVASCRIPTCORE_PRIVATE_HEADERS_DIR"] = tmpdir 50 ENV["SRCROOT"] = WEB_INSPECTOR_PATH 51 ENV["TARGET_BUILD_DIR"] = $output_directory 52 ENV["UNLOCALIZED_RESOURCES_FOLDER_PATH"] = "" 53 ENV["COMBINE_INSPECTOR_RESOURCES"] = "YES" 54 ENV["COMBINE_TEST_RESOURCES"] = "YES" 55 exec COPY_USER_INTERFACE_RESOURCES_PATH 56 57 end 38 if [ "${ACTION}" = "build" -o "${ACTION}" = "install" -o "${ACTION}" = "installhdrs" ]; then 39 make --no-builtin-rules -f "${WebInspectorUI}/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.activecpu` 40 fi -
trunk/Source/WebInspectorUI/UserInterface/Inspector.html.in
r205414 r205415 1 1 <!-- 2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2014, 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 11 11 * documentation and/or other materials provided with the distribution. 12 12 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS" 14 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR … … 27 27 <head> 28 28 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 29 #if !INCLUDE_TEST_RESOURCES 29 30 <meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src * file: blob: resource:; connect-src * ws:; media-src * blob:; font-src * blob:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'"> 30 31 #endif 32 33 #if INCLUDE_UI_RESOURCES 31 34 <link rel="stylesheet" href="External/CodeMirror/codemirror.css"> 32 35 … … 199 202 <link rel="stylesheet" href="Controllers/CodeMirrorDragToAdjustNumberController.css"> 200 203 <link rel="stylesheet" href="Controllers/CodeMirrorTokenTrackingController.css"> 201 204 #endif // INCLUDE_UI_RESOURCES 205 206 #if ENGINEERING_BUILD && !INCLUDE_TEST_RESOURCES 202 207 <link rel="stylesheet" href="Debug/UncaughtExceptionReporter.css"> 203 204 208 <script src="Debug/UncaughtExceptionReporter.js"></script> 209 #endif 205 210 206 211 <script src="External/CodeMirror/codemirror.js"></script> 207 212 213 <script src="External/CodeMirror/css.js"></script> 214 <script src="External/CodeMirror/htmlmixed.js"></script> 215 <script src="External/CodeMirror/javascript.js"></script> 216 217 #if INCLUDE_UI_RESOURCES 208 218 <script src="External/CodeMirror/clojure.js"></script> 209 219 <script src="External/CodeMirror/closebrackets.js"></script> 210 220 <script src="External/CodeMirror/coffeescript.js"></script> 211 221 <script src="External/CodeMirror/comment.js"></script> 212 <script src="External/CodeMirror/css.js"></script>213 <script src="External/CodeMirror/htmlmixed.js"></script>214 <script src="External/CodeMirror/javascript.js"></script>215 222 <script src="External/CodeMirror/livescript.js"></script> 216 223 <script src="External/CodeMirror/matchbrackets.js"></script> … … 223 230 <script src="External/CodeMirror/sublime.js"></script> 224 231 <script src="External/CodeMirror/xml.js"></script> 232 #endif 225 233 226 234 <script src="External/Esprima/esprima.js"></script> … … 232 240 <script src="Base/ListMultimap.js"></script> 233 241 <script src="Base/Object.js"></script> 242 243 #if INCLUDE_TEST_RESOURCES 244 <script src="Test/TestHarness.js"></script> 245 <script src="Test/FrontendTestHarness.js"></script> 246 <script src="Test/TestSuite.js"></script> 247 <script src="Test/Test.js"></script> 248 #else 249 <script src="Base/Main.js"></script> 250 #endif 234 251 235 252 <script src="Base/DOMUtilities.js"></script> … … 349 366 <script src="Models/PropertyDescriptor.js"></script> 350 367 <script src="Models/PropertyPath.js"></script> 351 <script src="Models/PropertyPreview.js"></script> 368 <script src="Models/PropertyPreview.js"></script> 352 369 <script src="Models/RenderingFrameTimelineRecord.js"></script> 353 370 <script src="Models/ReplayDashboard.js"></script> … … 390 407 <script src="Proxies/HeapSnapshotWorkerProxy.js"></script> 391 408 409 <script src="Views/CodeMirrorAdditions.js"></script> 410 <script src="Views/CodeMirrorFormatters.js"></script> 411 412 #if INCLUDE_UI_RESOURCES 392 413 <script src="Views/View.js"></script> 393 414 … … 475 496 <script src="Views/CircleChart.js"></script> 476 497 <script src="Views/ClusterContentView.js"></script> 477 <script src="Views/CodeMirrorAdditions.js"></script>478 498 <script src="Views/CodeMirrorEditor.js"></script> 479 <script src="Views/CodeMirrorFormatters.js"></script>480 499 <script src="Views/CodeMirrorTextMarkers.js"></script> 481 500 <script src="Views/ColorPicker.js"></script> … … 672 691 <script src="Views/VisualStyleURLInput.js"></script> 673 692 <script src="Views/VisualStyleUnitSlider.js"></script> 674 693 #endif // INCLUDE_UI_RESOURCES 694 695 <script src="Controllers/Formatter.js"></script> 696 <script src="Controllers/FormatterSourceMap.js"></script> 697 <script src="Controllers/ResourceQueryController.js"></script> 698 699 <script src="Controllers/AnalyzerManager.js"></script> 700 <script src="Controllers/ApplicationCacheManager.js"></script> 701 <script src="Controllers/BranchManager.js"></script> 702 <script src="Controllers/CSSStyleManager.js"></script> 703 <script src="Controllers/CSSStyleManager.js"></script> 704 <script src="Controllers/DashboardManager.js"></script> 705 <script src="Controllers/DebuggerManager.js"></script> 706 <script src="Controllers/DOMTreeManager.js"></script> 707 <script src="Controllers/FrameResourceManager.js"></script> 708 <script src="Controllers/HeapManager.js"></script> 709 <script src="Controllers/IssueManager.js"></script> 710 <script src="Controllers/LayerTreeManager.js"></script> 711 <script src="Controllers/LogManager.js"></script> 712 <script src="Controllers/MemoryManager.js"></script> 713 <script src="Controllers/ProbeManager.js"></script> 714 <script src="Controllers/ReplayManager.js"></script> 715 <script src="Controllers/RuntimeManager.js"></script> 716 <script src="Controllers/SourceMapManager.js"></script> 717 <script src="Controllers/StorageManager.js"></script> 718 <script src="Controllers/TimelineManager.js"></script> 719 720 #if INCLUDE_UI_RESOURCES 675 721 <script src="Controllers/Annotator.js"></script> 676 722 <script src="Controllers/CodeMirrorEditingController.js"></script> 677 723 678 <script src="Controllers/AnalyzerManager.js"></script>679 <script src="Controllers/ApplicationCacheManager.js"></script>680 724 <script src="Controllers/BasicBlockAnnotator.js"></script> 681 <script src="Controllers/BranchManager.js"></script>682 725 <script src="Controllers/BreakpointPopoverController.js"></script> 683 <script src="Controllers/CSSStyleManager.js"></script>684 726 <script src="Controllers/CodeMirrorColorEditingController.js"></script> 685 727 <script src="Controllers/CodeMirrorCompletionController.js"></script> … … 690 732 <script src="Controllers/CodeMirrorTokenTrackingController.js"></script> 691 733 <script src="Controllers/CodeMirrorTextKillController.js"></script> 692 <script src="Controllers/DOMTreeManager.js"></script>693 <script src="Controllers/DashboardManager.js"></script>694 <script src="Controllers/DebuggerManager.js"></script>695 734 <script src="Controllers/DragToAdjustController.js"></script> 696 <script src="Controllers/Formatter.js"></script>697 <script src="Controllers/FormatterSourceMap.js"></script>698 <script src="Controllers/FrameResourceManager.js"></script>699 <script src="Controllers/HeapManager.js"></script>700 <script src="Controllers/IssueManager.js"></script>701 735 <script src="Controllers/JavaScriptLogViewController.js"></script> 702 736 <script src="Controllers/JavaScriptRuntimeCompletionProvider.js"></script> 703 <script src="Controllers/LayerTreeManager.js"></script>704 <script src="Controllers/LogManager.js"></script>705 <script src="Controllers/MemoryManager.js"></script>706 <script src="Controllers/ProbeManager.js"></script>707 <script src="Controllers/ReplayManager.js"></script>708 <script src="Controllers/ResourceQueryController.js"></script>709 <script src="Controllers/RuntimeManager.js"></script>710 <script src="Controllers/SourceMapManager.js"></script>711 <script src="Controllers/StorageManager.js"></script>712 <script src="Controllers/TimelineManager.js"></script>713 737 <script src="Controllers/TypeTokenAnnotator.js"></script> 714 738 <script src="Controllers/VisualStyleCompletionsController.js"></script> 739 #endif 715 740 716 741 <script src="Workers/Formatter/FormatterContentBuilder.js"></script> 717 742 718 <script src="Base/Main.js"></script> 719 743 #if ENGINEERING_BUILD 720 744 <script src="Debug/Bootstrap.js"></script> 721 745 <script src="Debug/CapturingProtocolTracer.js"></script> 722 746 <script src="Debug/ProtocolTrace.js"></script> 747 #endif 723 748 724 749 <script> 725 750 WebInspector.loaded(); 751 752 #if INCLUDE_TEST_RESOURCES 753 // Debug logging is synchronous on the test page. 754 InspectorTest.forceDebugLogging = false; 755 756 // Tee all TestHarness commands to stderr from within the Inspector. 757 InspectorTest.dumpActivityToSystemConsole = false; 758 759 // Best used in combination with dumpActivityToSystemConsole. 760 InspectorBackend.dumpInspectorProtocolMessages = false; 761 #endif 726 762 </script> 727 763 </head> -
trunk/Source/WebInspectorUI/WebInspectorUI.xcodeproj/project.pbxproj
r205089 r205415 7 7 objects = { 8 8 9 /* Begin PBXAggregateTarget section */ 10 99E9A7F21D70BAD300C247A6 /* Derived Sources */ = { 11 isa = PBXAggregateTarget; 12 buildConfigurationList = 99E9A7F31D70BAD300C247A6 /* Build configuration list for PBXAggregateTarget "Derived Sources" */; 13 buildPhases = ( 14 99E9A7F91D70BAF600C247A6 /* Generate Derived Sources */, 15 ); 16 dependencies = ( 17 ); 18 name = "Derived Sources"; 19 productName = "Derived Sources"; 20 }; 21 /* End PBXAggregateTarget section */ 22 9 23 /* Begin PBXBuildFile section */ 10 24 1C60FF1614E6E3F7006CD77D /* localizedStrings.js in Resources */ = {isa = PBXBuildFile; fileRef = 1C60FF1314E6E35D006CD77D /* localizedStrings.js */; }; … … 12 26 /* End PBXBuildFile section */ 13 27 28 /* Begin PBXContainerItemProxy section */ 29 99E9A7F71D70BADD00C247A6 /* PBXContainerItemProxy */ = { 30 isa = PBXContainerItemProxy; 31 containerPortal = A54C224D148B23DE00373FA3 /* Project object */; 32 proxyType = 1; 33 remoteGlobalIDString = 99E9A7F21D70BAD300C247A6; 34 remoteInfo = "Derived Sources"; 35 }; 36 /* End PBXContainerItemProxy section */ 37 14 38 /* Begin PBXFileReference section */ 15 1C435CAC14E7B287004E10EA /* cssmin.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = cssmin.py; sourceTree = "<group>"; };16 1C435CAD14E7B287004E10EA /* jsmin.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = jsmin.py; sourceTree = "<group>"; };17 39 1C60FE2F14E5F3CD006CD77D /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; }; 18 40 1C60FE3114E5F3CD006CD77D /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; }; … … 55 77 1C60FF1914E73C64006CD77D /* combine-resources.pl */, 56 78 1C60FFE114E79B0F006CD77D /* copy-user-interface-resources.pl */, 57 1C435CAC14E7B287004E10EA /* cssmin.py */,58 1C435CAD14E7B287004E10EA /* jsmin.py */,59 79 1C60FF1A14E73DCA006CD77D /* remove-console-asserts.pl */, 60 80 ); … … 96 116 ); 97 117 dependencies = ( 118 99E9A7F81D70BADD00C247A6 /* PBXTargetDependency */, 98 119 ); 99 120 name = WebInspectorUI; … … 111 132 LastUpgradeCheck = 0700; 112 133 ORGANIZATIONNAME = Apple; 134 TargetAttributes = { 135 99E9A7F21D70BAD300C247A6 = { 136 CreatedOnToolsVersion = 8.0; 137 ProvisioningStyle = Automatic; 138 }; 139 }; 113 140 }; 114 141 buildConfigurationList = A54C2250148B23DE00373FA3 /* Build configuration list for PBXProject "WebInspectorUI" */; … … 125 152 targets = ( 126 153 A54C2256148B23DF00373FA3 /* WebInspectorUI */, 154 99E9A7F21D70BAD300C247A6 /* Derived Sources */, 127 155 ); 128 156 }; … … 147 175 runOnlyForDeploymentPostprocessing = 0; 148 176 shellPath = /bin/sh; 149 shellScript = "/usr/bin/perl \"${SRCROOT}/Scripts/copy-user-interface-resources.pl\""; 177 shellScript = "# This is defined differently for Make/xcodebuild vs CMake ports.\nDERIVED_SOURCES_DIR=\"${BUILT_PRODUCTS_DIR}/DerivedSources/WebInspectorUI\"\n\n/usr/bin/perl \"${SRCROOT}/Scripts/copy-user-interface-resources.pl\""; 178 }; 179 99E9A7F91D70BAF600C247A6 /* Generate Derived Sources */ = { 180 isa = PBXShellScriptBuildPhase; 181 buildActionMask = 2147483647; 182 files = ( 183 ); 184 inputPaths = ( 185 ); 186 name = "Generate Derived Sources"; 187 outputPaths = ( 188 ); 189 runOnlyForDeploymentPostprocessing = 0; 190 shellPath = /bin/sh; 191 shellScript = "GENERATE_DERIVED_SOURCES_PATH=\"${SRCROOT}/Scripts/generate-webinspectorui-derived-sources\"\n[[ -x \"${GENERATE_DERIVED_SOURCES_PATH}\" ]] && exec \"${GENERATE_DERIVED_SOURCES_PATH}\"\nexit 0\n"; 150 192 }; 151 193 /* End PBXShellScriptBuildPhase section */ … … 162 204 /* End PBXSourcesBuildPhase section */ 163 205 206 /* Begin PBXTargetDependency section */ 207 99E9A7F81D70BADD00C247A6 /* PBXTargetDependency */ = { 208 isa = PBXTargetDependency; 209 target = 99E9A7F21D70BAD300C247A6 /* Derived Sources */; 210 targetProxy = 99E9A7F71D70BADD00C247A6 /* PBXContainerItemProxy */; 211 }; 212 /* End PBXTargetDependency section */ 213 164 214 /* Begin PBXVariantGroup section */ 165 215 1C60FF1314E6E35D006CD77D /* localizedStrings.js */ = { … … 189 239 name = Production; 190 240 }; 241 99E9A7F41D70BAD300C247A6 /* Debug */ = { 242 isa = XCBuildConfiguration; 243 baseConfigurationReference = 1C60FE3314E5F3CD006CD77D /* WebInspectorUIFramework.xcconfig */; 244 buildSettings = { 245 PRODUCT_NAME = "$(TARGET_NAME)"; 246 }; 247 name = Debug; 248 }; 249 99E9A7F51D70BAD300C247A6 /* Release */ = { 250 isa = XCBuildConfiguration; 251 baseConfigurationReference = 1C60FE3314E5F3CD006CD77D /* WebInspectorUIFramework.xcconfig */; 252 buildSettings = { 253 PRODUCT_NAME = "$(TARGET_NAME)"; 254 }; 255 name = Release; 256 }; 257 99E9A7F61D70BAD300C247A6 /* Production */ = { 258 isa = XCBuildConfiguration; 259 baseConfigurationReference = 1C60FE3314E5F3CD006CD77D /* WebInspectorUIFramework.xcconfig */; 260 buildSettings = { 261 PRODUCT_NAME = "$(TARGET_NAME)"; 262 }; 263 name = Production; 264 }; 191 265 A54C226A148B23DF00373FA3 /* Debug */ = { 192 266 isa = XCBuildConfiguration; … … 222 296 223 297 /* Begin XCConfigurationList section */ 298 99E9A7F31D70BAD300C247A6 /* Build configuration list for PBXAggregateTarget "Derived Sources" */ = { 299 isa = XCConfigurationList; 300 buildConfigurations = ( 301 99E9A7F41D70BAD300C247A6 /* Debug */, 302 99E9A7F51D70BAD300C247A6 /* Release */, 303 99E9A7F61D70BAD300C247A6 /* Production */, 304 ); 305 defaultConfigurationIsVisible = 0; 306 defaultConfigurationName = Production; 307 }; 224 308 A54C2250148B23DE00373FA3 /* Build configuration list for PBXProject "WebInspectorUI" */ = { 225 309 isa = XCConfigurationList; -
trunk/Source/WebKit2/ChangeLog
r205412 r205415 1 2016-09-01 Brian Burg <bburg@apple.com> 2 3 Web Inspector: unify Main.html and Test.html sources and generate different copies with the preprocessor 4 https://bugs.webkit.org/show_bug.cgi?id=161212 5 <rdar://problem/28017961> 6 7 Reviewed by Joseph Pecoraro. 8 9 Rearrange CMake rules so that most Inspector UI work is done in WebInspectorUI. 10 11 * PlatformGTK.cmake: 12 - Move the list of Inspector resources into WebInspectorUI/CMakeLists.txt. 13 - Move generation of InspectorGResourceBundle into WebInspectorUI. 14 - Copy over InspectorGResourceBundle.c into WebKit2's Derived Sources before compiling. 15 1 16 2016-09-03 Wenson Hsieh <wenson_hsieh@apple.com> 2 17 -
trunk/Source/WebKit2/PlatformGTK.cmake
r205294 r205415 553 553 554 554 list(APPEND WebKit2_DERIVED_SOURCES 555 ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c556 555 ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c 557 556 ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.c … … 964 963 ) 965 964 966 set(InspectorFiles967 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html968 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Base/*.js969 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.css970 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.js971 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Debug/*.css972 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Debug/*.js973 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.css974 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/CodeMirror/*.js975 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/ESLint/*.js976 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/External/Esprima/*.js977 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Models/*.js978 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Protocol/*.js979 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Proxies/*.js980 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Test/*.js981 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.css982 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.js983 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Workers/Formatter/*.js984 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/*.js985 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.png986 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.svg987 ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js988 )989 990 file(GLOB InspectorFilesDependencies991 ${InspectorFiles}992 )993 994 # DerivedSources/JavaScriptCore/inspector/InspectorBackendCommands.js is995 # expected in DerivedSources/WebInspectorUI/UserInterface/Protocol/.996 add_custom_command(997 OUTPUT ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js998 DEPENDS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js999 COMMAND cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js1000 )1001 1002 965 # This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore. 1003 966 list(INSERT WebKit2_INCLUDE_DIRECTORIES 0 … … 1147 1110 1148 1111 add_custom_command( 1149 OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml1150 DEPENDS ${InspectorFilesDependencies}1151 ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js1152 ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py1153 COMMAND ${PYTHON_EXECUTABLE} ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py --output=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml ${InspectorFiles} ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js1154 VERBATIM1155 )1156 1157 add_custom_command(1158 OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c1159 DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml1160 COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebInspectorUI --sourcedir=${DERIVED_SOURCES_WEBINSPECTORUI_DIR} --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml1161 VERBATIM1162 )1163 1164 add_custom_command(1165 1112 OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c 1166 1113 DEPENDS ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml … … 1189 1136 ) 1190 1137 endif () 1138 1139 add_custom_command( 1140 OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c 1141 DEPENDS ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.c 1142 COMMAND cp ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/InspectorGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectrGResourceBundle.c 1143 ) 1144 list(APPEND WebKit2_DERIVED_SOURCES 1145 ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c 1146 ) 1191 1147 1192 1148 file(WRITE ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml -
trunk/Source/cmake/WebKitFS.cmake
r198132 r205415 10 10 if (NOT WEBCORE_DIR) 11 11 set(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/Source/WebCore") 12 endif () 13 if (NOT WEBINSPECTORUI_DIR) 14 set(WEBINSPECTORUI_DIR "${CMAKE_SOURCE_DIR}/Source/WebInspectorUI") 12 15 endif () 13 16 if (NOT WEBKIT_DIR) … … 33 36 34 37 file(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}) 38 file(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector) 35 39 file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Source/JavaScriptCore/runtime) 36 40 -
trunk/Source/cmake/WebKitMacros.cmake
r204142 r205415 374 374 375 375 endmacro() 376 377 # Converts a CMake list to a string containing elements separated by spaces. 378 macro(TO_LIST_WITH_SPACES _in_list _out_string) 379 set(${_out_string} "") 380 foreach (_item ${_in_list}) 381 set(${_out_string} "${${_out_string}} ${_item}") 382 endforeach () 383 string(STRIP "${${_out_string}}" ${_out_string}) 384 endmacro()
Note: See TracChangeset
for help on using the changeset viewer.