Changeset 200774 in webkit
- Timestamp:
- May 12, 2016 8:47:45 AM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r200773 r200774 1 2016-05-12 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 Web Inspector: Windows Perl fails to run copy-user-interface-resources.pl 4 https://bugs.webkit.org/show_bug.cgi?id=157620 5 <rdar://problem/26241548> 6 7 Reviewed by Timothy Hatcher. 8 9 There are two problems on Windows platform. 'cat' command is 10 missing and can not execute shebang. 11 12 * Scripts/copy-user-interface-resources.pl: Invoke Perl scripts 13 with explicitly specifying Perl command instead of relying on 14 shebang. Add a new subroutine 'appendFile' to concatenate files 15 instread of 'cat' command. 16 1 17 2016-05-12 Joseph Pecoraro <pecoraro@apple.com> 2 18 -
trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl
r200229 r200774 60 60 close(TARGET_FILE); 61 61 } 62 } 63 64 sub appendFile($$) 65 { 66 my ($targetFile, $srcFile) = @_; 67 68 open(SRC_FILE, '<', $srcFile) or die "Unable to open $srcFile: $!"; 69 my @srcText = <SRC_FILE>; 70 close(SRC_FILE); 71 open(TARGET_FILE, '>>', $targetFile) or die "Unable to open $targetFile: $!"; 72 print TARGET_FILE @srcText; 73 close(TARGET_FILE); 62 74 } 63 75 … … 120 132 EOF 121 133 134 my $perl = $^X; 122 135 my $python = ($OSNAME =~ /cygwin/) ? "/usr/bin/python" : "python"; 123 136 my $derivedSourcesDir = $ENV{'DERIVED_SOURCES_DIR'}; … … 156 169 if ($shouldCombineMain) { 157 170 # Remove Debug JavaScript and CSS files in Production builds. 158 system($ 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');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'); 159 172 160 173 # Combine the JavaScript and CSS files in Production builds into single files (Main.js and Main.css). 161 174 my $derivedSourcesMainHTML = File::Spec->catfile($derivedSourcesDir, 'Main.html'); 162 system($ 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');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'); 163 176 164 177 # Combine the CodeMirror JavaScript and CSS files in Production builds into single files (CodeMirror.js and CodeMirror.css). 165 system($ 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');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'); 166 179 167 180 # Combine the Esprima JavaScript files in Production builds into a single file (Esprima.js). 168 system($ combineResourcesCmd, '--input-dir', 'External/Esprima', '--input-html', $derivedSourcesMainHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', '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'); 169 182 170 183 # Combine the ESLint JavaScript files in Production builds into a single file (ESLint.js). 171 system($ combineResourcesCmd, '--input-dir', 'External/ESLint', '--input-html', $derivedSourcesMainHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', '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'); 172 185 173 186 # Remove console.assert calls from the Main.js file. 174 187 my $derivedSourcesMainJS = File::Spec->catfile($derivedSourcesDir, 'Main.js'); 175 system( File::Spec->catfile($scriptsRoot, 'remove-console-asserts.pl'), '--input-script', $derivedSourcesMainJS, '--output-script', $derivedSourcesMainJS);188 system($perl, File::Spec->catfile($scriptsRoot, 'remove-console-asserts.pl'), '--input-script', $derivedSourcesMainJS, '--output-script', $derivedSourcesMainJS); 176 189 177 190 # Fix Image URLs in the Main.css file by removing the "../". … … 245 258 246 259 # Remove console.assert calls from the Worker js files. 247 system( File::Spec->catfile($scriptsRoot, 'remove-console-asserts.pl'), '--input-directory', $workersDir);260 system($perl, File::Spec->catfile($scriptsRoot, 'remove-console-asserts.pl'), '--input-directory', $workersDir); 248 261 249 262 # Fix import references in Workers directories. This rewrites "../../External/script.js" import paths to their new locations. 250 system( File::Spec->catfile($scriptsRoot, 'fix-worker-imports-for-optimized-builds.pl'), '--input-directory', $workersDir) and die "Failed to update Worker imports for optimized builds.";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."; 251 264 } else { 252 265 # Keep the files separate for engineering builds. … … 256 269 if ($shouldCombineTest) { 257 270 # Combine the JavaScript files for testing into a single file (TestCombined.js). 258 system($ 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');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'); 259 272 260 273 my $derivedSourcesTestHTML = File::Spec->catfile($derivedSourcesDir, 'Test.html'); 261 274 my $derivedSourcesTestJS = File::Spec->catfile($derivedSourcesDir, 'TestCombined.js'); 262 275 # Combine the Esprima JavaScript files for testing into a single file (Esprima.js). 263 system($ combineResourcesCmd, '--input-dir', 'External/Esprima', '--input-html', $derivedSourcesTestHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'TestEsprima.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'); 264 277 265 278 # Export the license into TestCombined.js. … … 272 285 273 286 # Append TestCombined.js to the license that was exported above. 274 system(qq(cat "$derivedSourcesTestJS" >> "$targetTestJS")) and die "Failed to append $derivedSourcesTestJS: $!";287 appendFile($targetTestJS, $derivedSourcesTestJS); 275 288 276 289 # Append Esprima.js to the license that was exported above. 277 290 my $derivedSourcesEsprimaJS = File::Spec->catfile($derivedSourcesDir, 'TestEsprima.js'); 278 system(qq(cat "$derivedSourcesEsprimaJS" >> "$targetEsprimaJS")) and die "Failed to append $derivedSourcesEsprimaJS: $!";291 appendFile($targetEsprimaJS, $derivedSourcesEsprimaJS); 279 292 280 293 # Copy over Test.html.
Note: See TracChangeset
for help on using the changeset viewer.