chore: move winldd to CDN
This commit is contained in:
parent
61ce37cd53
commit
c626270c6a
Binary file not shown.
|
|
@ -1,2 +0,0 @@
|
||||||
See building instructions at [`/browser_patches/winldd/README.md`](../../../browser_patches/winldd/README.md)
|
|
||||||
|
|
||||||
|
|
@ -52,6 +52,11 @@
|
||||||
"mac12-arm64": "1010"
|
"mac12-arm64": "1010"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "winldd",
|
||||||
|
"revision": "1007",
|
||||||
|
"installByDefault": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "android",
|
"name": "android",
|
||||||
"revision": "1001",
|
"revision": "1001",
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,8 @@ function checkBrowsersToInstall(args: string[], options: { noShell?: boolean, on
|
||||||
executables.push(executable);
|
executables.push(executable);
|
||||||
if (executable?.browserName === 'chromium')
|
if (executable?.browserName === 'chromium')
|
||||||
executables.push(registry.findExecutable('ffmpeg')!);
|
executables.push(registry.findExecutable('ffmpeg')!);
|
||||||
|
if (process.platform === 'win32')
|
||||||
|
executables.push(registry.findExecutable('winldd')!);
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const arg of args) {
|
for (const arg of args) {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import childProcess from 'child_process';
|
||||||
import * as utils from '../../utils';
|
import * as utils from '../../utils';
|
||||||
import { spawnAsync } from '../../utils/spawnAsync';
|
import { spawnAsync } from '../../utils/spawnAsync';
|
||||||
import { hostPlatform, isOfficiallySupportedPlatform } from '../../utils/hostPlatform';
|
import { hostPlatform, isOfficiallySupportedPlatform } from '../../utils/hostPlatform';
|
||||||
import { buildPlaywrightCLICommand } from '.';
|
import { buildPlaywrightCLICommand, registry } from '.';
|
||||||
import { deps } from './nativeDeps';
|
import { deps } from './nativeDeps';
|
||||||
import { getPlaywrightVersion } from '../../utils/userAgent';
|
import { getPlaywrightVersion } from '../../utils/userAgent';
|
||||||
|
|
||||||
|
|
@ -122,12 +122,12 @@ export async function installDependenciesLinux(targets: Set<DependencyGroup>, dr
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function validateDependenciesWindows(windowsExeAndDllDirectories: string[]) {
|
export async function validateDependenciesWindows(sdkLanguage: string, windowsExeAndDllDirectories: string[]) {
|
||||||
const directoryPaths = windowsExeAndDllDirectories;
|
const directoryPaths = windowsExeAndDllDirectories;
|
||||||
const lddPaths: string[] = [];
|
const lddPaths: string[] = [];
|
||||||
for (const directoryPath of directoryPaths)
|
for (const directoryPath of directoryPaths)
|
||||||
lddPaths.push(...(await executablesOrSharedLibraries(directoryPath)));
|
lddPaths.push(...(await executablesOrSharedLibraries(directoryPath)));
|
||||||
const allMissingDeps = await Promise.all(lddPaths.map(lddPath => missingFileDependenciesWindows(lddPath)));
|
const allMissingDeps = await Promise.all(lddPaths.map(lddPath => missingFileDependenciesWindows(sdkLanguage, lddPath)));
|
||||||
const missingDeps: Set<string> = new Set();
|
const missingDeps: Set<string> = new Set();
|
||||||
for (const deps of allMissingDeps) {
|
for (const deps of allMissingDeps) {
|
||||||
for (const dep of deps)
|
for (const dep of deps)
|
||||||
|
|
@ -302,8 +302,8 @@ async function executablesOrSharedLibraries(directoryPath: string): Promise<stri
|
||||||
return executablersOrLibraries as string[];
|
return executablersOrLibraries as string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
async function missingFileDependenciesWindows(filePath: string): Promise<Array<string>> {
|
async function missingFileDependenciesWindows(sdkLanguage: string, filePath: string): Promise<Array<string>> {
|
||||||
const executable = path.join(__dirname, '..', '..', '..', 'bin', 'PrintDeps.exe');
|
const executable = registry.findExecutable('winldd')!.executablePathOrDie(sdkLanguage);
|
||||||
const dirname = path.dirname(filePath);
|
const dirname = path.dirname(filePath);
|
||||||
const { stdout, code } = await spawnAsync(executable, [filePath], {
|
const { stdout, code } = await spawnAsync(executable, [filePath], {
|
||||||
cwd: dirname,
|
cwd: dirname,
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,11 @@ const EXECUTABLE_PATHS = {
|
||||||
'mac': ['ffmpeg-mac'],
|
'mac': ['ffmpeg-mac'],
|
||||||
'win': ['ffmpeg-win64.exe'],
|
'win': ['ffmpeg-win64.exe'],
|
||||||
},
|
},
|
||||||
|
'winldd': {
|
||||||
|
'linux': undefined,
|
||||||
|
'mac': undefined,
|
||||||
|
'win': ['PrintDeps.exe'],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
type DownloadPaths = Record<HostPlatform, string | undefined>;
|
type DownloadPaths = Record<HostPlatform, string | undefined>;
|
||||||
|
|
@ -315,6 +320,35 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
|
||||||
'mac15-arm64': 'builds/ffmpeg/%s/ffmpeg-mac-arm64.zip',
|
'mac15-arm64': 'builds/ffmpeg/%s/ffmpeg-mac-arm64.zip',
|
||||||
'win64': 'builds/ffmpeg/%s/ffmpeg-win64.zip',
|
'win64': 'builds/ffmpeg/%s/ffmpeg-win64.zip',
|
||||||
},
|
},
|
||||||
|
'winldd': {
|
||||||
|
'<unknown>': undefined,
|
||||||
|
'ubuntu18.04-x64': undefined,
|
||||||
|
'ubuntu20.04-x64': undefined,
|
||||||
|
'ubuntu22.04-x64': undefined,
|
||||||
|
'ubuntu24.04-x64': undefined,
|
||||||
|
'ubuntu18.04-arm64': undefined,
|
||||||
|
'ubuntu20.04-arm64': undefined,
|
||||||
|
'ubuntu22.04-arm64': undefined,
|
||||||
|
'ubuntu24.04-arm64': undefined,
|
||||||
|
'debian11-x64': undefined,
|
||||||
|
'debian11-arm64': undefined,
|
||||||
|
'debian12-x64': undefined,
|
||||||
|
'debian12-arm64': undefined,
|
||||||
|
'mac10.13': undefined,
|
||||||
|
'mac10.14': undefined,
|
||||||
|
'mac10.15': undefined,
|
||||||
|
'mac11': undefined,
|
||||||
|
'mac11-arm64': undefined,
|
||||||
|
'mac12': undefined,
|
||||||
|
'mac12-arm64': undefined,
|
||||||
|
'mac13': undefined,
|
||||||
|
'mac13-arm64': undefined,
|
||||||
|
'mac14': undefined,
|
||||||
|
'mac14-arm64': undefined,
|
||||||
|
'mac15': undefined,
|
||||||
|
'mac15-arm64': undefined,
|
||||||
|
'win64': 'builds/winldd/%s/winldd-win64.zip',
|
||||||
|
},
|
||||||
'android': {
|
'android': {
|
||||||
'<unknown>': 'builds/android/%s/android.zip',
|
'<unknown>': 'builds/android/%s/android.zip',
|
||||||
'ubuntu18.04-x64': undefined,
|
'ubuntu18.04-x64': undefined,
|
||||||
|
|
@ -442,7 +476,7 @@ function readDescriptors(browsersJSON: BrowsersJSON): BrowsersJSONDescriptor[] {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BrowserName = 'chromium' | 'firefox' | 'webkit' | 'bidi';
|
export type BrowserName = 'chromium' | 'firefox' | 'webkit' | 'bidi';
|
||||||
type InternalTool = 'ffmpeg' | 'firefox-beta' | 'chromium-tip-of-tree' | 'chromium-headless-shell' | 'chromium-tip-of-tree-headless-shell' | 'android';
|
type InternalTool = 'ffmpeg' | 'winldd' | 'firefox-beta' | 'chromium-tip-of-tree' | 'chromium-headless-shell' | 'chromium-tip-of-tree-headless-shell' | 'android';
|
||||||
type BidiChannel = 'bidi-firefox-stable' | 'bidi-firefox-beta' | 'bidi-firefox-nightly' | 'bidi-chrome-canary' | 'bidi-chrome-stable' | 'bidi-chromium';
|
type BidiChannel = 'bidi-firefox-stable' | 'bidi-firefox-beta' | 'bidi-firefox-nightly' | 'bidi-chrome-canary' | 'bidi-chrome-stable' | 'bidi-chromium';
|
||||||
type ChromiumChannel = 'chrome' | 'chrome-beta' | 'chrome-dev' | 'chrome-canary' | 'msedge' | 'msedge-beta' | 'msedge-dev' | 'msedge-canary';
|
type ChromiumChannel = 'chrome' | 'chrome-beta' | 'chrome-dev' | 'chrome-canary' | 'msedge' | 'msedge-beta' | 'msedge-dev' | 'msedge-canary';
|
||||||
const allDownloadable = ['android', 'chromium', 'firefox', 'webkit', 'ffmpeg', 'firefox-beta', 'chromium-tip-of-tree', 'chromium-headless-shell', 'chromium-tip-of-tree-headless-shell'];
|
const allDownloadable = ['android', 'chromium', 'firefox', 'webkit', 'ffmpeg', 'firefox-beta', 'chromium-tip-of-tree', 'chromium-headless-shell', 'chromium-tip-of-tree-headless-shell'];
|
||||||
|
|
@ -772,6 +806,22 @@ export class Registry {
|
||||||
_dependencyGroup: 'tools',
|
_dependencyGroup: 'tools',
|
||||||
_isHermeticInstallation: true,
|
_isHermeticInstallation: true,
|
||||||
});
|
});
|
||||||
|
const winldd = descriptors.find(d => d.name === 'winldd')!;
|
||||||
|
const winlddExecutable = findExecutablePath(winldd.dir, 'winldd');
|
||||||
|
this._executables.push({
|
||||||
|
type: 'tool',
|
||||||
|
name: 'winldd',
|
||||||
|
browserName: undefined,
|
||||||
|
directory: winldd.dir,
|
||||||
|
executablePath: () => winlddExecutable,
|
||||||
|
executablePathOrDie: (sdkLanguage: string) => executablePathOrDie('winldd', winlddExecutable, winldd.installByDefault, sdkLanguage),
|
||||||
|
installType: process.platform === 'win32' ? 'download-by-default' : 'none',
|
||||||
|
_validateHostRequirements: () => Promise.resolve(),
|
||||||
|
downloadURLs: this._downloadURLs(winldd),
|
||||||
|
_install: () => this._downloadExecutable(winldd, winlddExecutable),
|
||||||
|
_dependencyGroup: 'tools',
|
||||||
|
_isHermeticInstallation: true,
|
||||||
|
});
|
||||||
const android = descriptors.find(d => d.name === 'android')!;
|
const android = descriptors.find(d => d.name === 'android')!;
|
||||||
this._executables.push({
|
this._executables.push({
|
||||||
type: 'tool',
|
type: 'tool',
|
||||||
|
|
@ -944,7 +994,7 @@ export class Registry {
|
||||||
if (os.platform() === 'linux')
|
if (os.platform() === 'linux')
|
||||||
return await validateDependenciesLinux(sdkLanguage, linuxLddDirectories.map(d => path.join(browserDirectory, d)), dlOpenLibraries);
|
return await validateDependenciesLinux(sdkLanguage, linuxLddDirectories.map(d => path.join(browserDirectory, d)), dlOpenLibraries);
|
||||||
if (os.platform() === 'win32' && os.arch() === 'x64')
|
if (os.platform() === 'win32' && os.arch() === 'x64')
|
||||||
return await validateDependenciesWindows(windowsExeAndDllDirectories.map(d => path.join(browserDirectory, d)));
|
return await validateDependenciesWindows(sdkLanguage, windowsExeAndDllDirectories.map(d => path.join(browserDirectory, d)));
|
||||||
}
|
}
|
||||||
|
|
||||||
async installDeps(executablesToInstallDeps: Executable[], dryRun: boolean) {
|
async installDeps(executablesToInstallDeps: Executable[], dryRun: boolean) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue