File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ function archive_compiled_chromium() {
136
136
137
137
if [[ $1 == " --compile-win" * ]]; then
138
138
$COPY_COMMAND " ${CR_CHECKOUT_PATH} /src/out/Default/" * .manifest " output/${CHROMIUM_FOLDER_NAME} /"
139
+ # See https://github.com/microsoft/playwright/issues/6390
140
+ node " ${SCRIPT_PATH} /fix_windows_swiftshader.js" " output/${CHROMIUM_FOLDER_NAME} /vk_swiftshader_icd.json"
139
141
fi
140
142
141
143
cd output
Original file line number Diff line number Diff line change
1
+ // See https://github.com/microsoft/playwright/issues/6390
2
+ const fs = require ( 'fs' ) ;
3
+
4
+ const FILE_PATH = process . argv [ 2 ] ;
5
+ if ( ! fs . existsSync ( FILE_PATH ) || ! FILE_PATH . endsWith ( '.json' ) )
6
+ return ;
7
+
8
+ const json = JSON . parse ( fs . readFileSync ( FILE_PATH , 'utf8' ) ) ;
9
+
10
+ if ( json . ICD && json . ICD . library_path && json . ICD . library_path . startsWith ( '.\\' ) ) {
11
+ json . ICD . library_path = json . ICD . library_path . substring ( 2 ) ;
12
+ fs . writeFileSync ( FILE_PATH , JSON . stringify ( json ) , 'utf8' ) ;
13
+ }
You can’t perform that action at this time.
0 commit comments