Changeset 205692 in webkit
- Timestamp:
- Sep 8, 2016 9:33:11 PM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r205676 r205692 1 2016-09-08 Brian Burg <bburg@apple.com> 2 3 Web Inspector: get rid of extra copies of jsmin.py and cssmin.py 4 https://bugs.webkit.org/show_bug.cgi?id=161770 5 <rdar://problem/28216813> 6 7 Reviewed by Joseph Pecoraro. 8 9 * Scripts/copy-user-interface-resources-dryrun.rb: 10 - Keep track of the original working directory. 11 - Stage scripts from PrivateHeaders into the temporary directory. 12 - Add a comment to clarify what this script is simulating. 13 - Use system instead of exec so we can print an error message. 14 15 * Scripts/copy-user-interface-resources.pl: 16 - Use jsmin.py and cssmin.py from JavaScriptCore instead of 17 WebInspectorUI. There are no differences between the two copies. 18 19 * Scripts/cssmin.py: Removed. 20 * Scripts/jsmin.py: Removed. 21 22 * WebInspectorUI.xcodeproj/project.pbxproj: 23 - Remove unused copies of jsmin.py and cssmin.py. 24 1 25 2016-09-08 Matt Baker <mattbaker@apple.com> 2 26 -
trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources-dryrun.rb
r205418 r205692 32 32 end 33 33 34 JAVASCRIPTCORE_PATH = File.expand_path File.join(File.dirname(__FILE__), "..", "..", "JavaScriptCore") 34 35 WEB_INSPECTOR_PATH = File.expand_path File.join(File.dirname(__FILE__), "..") 35 36 COPY_USER_INTERFACE_RESOURCES_PATH = File.join WEB_INSPECTOR_PATH, "Scripts", "copy-user-interface-resources.pl" 36 37 38 # This script simulates processing user interface resources located in SRCROOT. 39 # It places processed files in the specified output directory. This is most similar 40 # to an isolated OBJROOT since it includes DerivedSources. It doesn't place files 41 # into their DSTROOT locations, such as inside of WebInspectorUI.framework. 37 42 $output_directory = File.expand_path ARGV[0] 43 $start_directory = FileUtils.pwd 38 44 39 45 Dir.mktmpdir do |tmpdir| … … 47 53 # Setup the environment and run. 48 54 ENV["DERIVED_SOURCES_DIR"] = tmpdir 55 # Stage some scripts expected to be in various framework PrivateHeaders. 49 56 ENV["JAVASCRIPTCORE_PRIVATE_HEADERS_DIR"] = tmpdir 57 FileUtils.cp(File.join(JAVASCRIPTCORE_PATH, "Scripts", "cssmin.py"), tmpdir) 58 FileUtils.cp(File.join(JAVASCRIPTCORE_PATH, "Scripts", "jsmin.py"), tmpdir) 50 59 ENV["SRCROOT"] = WEB_INSPECTOR_PATH 51 60 ENV["TARGET_BUILD_DIR"] = $output_directory … … 53 62 ENV["COMBINE_INSPECTOR_RESOURCES"] = "YES" 54 63 ENV["COMBINE_TEST_RESOURCES"] = "YES" 55 exec COPY_USER_INTERFACE_RESOURCES_PATH 64 ENV["FORCE_TOOL_INSTALL"] = "NO" 65 FileUtils.cd $start_directory 66 system(COPY_USER_INTERFACE_RESOURCES_PATH) or raise "Failed to process user interface resources." 56 67 57 68 end -
trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl
r205418 r205692 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'}); … … 223 224 224 225 # 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');226 my $jsMinScript = File::Spec->catfile($sharedScriptsRoot, 'jsmin.py'); 227 my $cssMinScript = File::Spec->catfile($sharedScriptsRoot, 'cssmin.py'); 227 228 system(qq("$python" "$jsMinScript" < "$derivedSourcesMainJS" >> "$targetMainJS")) and die "Failed to minify $derivedSourcesMainJS: $!"; 228 229 system(qq("$python" "$cssMinScript" < "$derivedSourcesMainCSS" >> "$targetMainCSS")) and die "Failed to minify $derivedSourcesMainCSS: $!"; -
trunk/Source/WebInspectorUI/WebInspectorUI.xcodeproj/project.pbxproj
r205418 r205692 13 13 14 14 /* 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 15 1C60FE2F14E5F3CD006CD77D /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; }; 18 16 1C60FE3114E5F3CD006CD77D /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; }; … … 55 53 1C60FF1914E73C64006CD77D /* combine-resources.pl */, 56 54 1C60FFE114E79B0F006CD77D /* copy-user-interface-resources.pl */, 57 1C435CAC14E7B287004E10EA /* cssmin.py */,58 1C435CAD14E7B287004E10EA /* jsmin.py */,59 55 1C60FF1A14E73DCA006CD77D /* remove-console-asserts.pl */, 60 56 );
Note: See TracChangeset
for help on using the changeset viewer.