mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Support brokering from Linux x64 and Intel Macs (#278689)
* Support Linux & Intel Macs This grabs the native files directly since the ones at the root are not expected to work in our cases, namely Intel Mac where we use arm machines to build the x64 build. * actually include macOS intel bits
This commit is contained in:
committed by
GitHub
parent
fd9cf8e3dd
commit
4c96903608
@@ -8,20 +8,41 @@ import CopyWebpackPlugin from 'copy-webpack-plugin';
|
||||
import path from 'path';
|
||||
|
||||
const isWindows = process.platform === 'win32';
|
||||
const windowsArches = ['x64'];
|
||||
const isMacOS = process.platform === 'darwin';
|
||||
const macOSArches = ['arm64'];
|
||||
const isLinux = !isWindows && !isMacOS;
|
||||
|
||||
const arch = process.arch;
|
||||
const windowsArches = ['x64'];
|
||||
const linuxArches = ['x64'];
|
||||
|
||||
let platformFolder;
|
||||
switch (process.platform) {
|
||||
case 'win32':
|
||||
platformFolder = 'windows';
|
||||
break;
|
||||
case 'darwin':
|
||||
platformFolder = 'macos';
|
||||
break;
|
||||
case 'linux':
|
||||
platformFolder = 'linux';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unsupported platform: ${process.platform}`);
|
||||
}
|
||||
|
||||
const arch = process.env.VSCODE_ARCH || process.arch;
|
||||
console.log(`Building Microsoft Authentication Extension for ${process.platform} (${arch})`);
|
||||
|
||||
const plugins = [...nodePlugins(import.meta.dirname)];
|
||||
if ((isWindows && windowsArches.includes(arch)) || (isMacOS && macOSArches.includes(arch))) {
|
||||
if (
|
||||
(isWindows && windowsArches.includes(arch)) ||
|
||||
isMacOS ||
|
||||
(isLinux && linuxArches.includes(arch))
|
||||
) {
|
||||
plugins.push(new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
// The native files we need to ship with the extension
|
||||
from: '**/dist/(lib|)msal*.(node|dll|dylib)',
|
||||
from: `**/dist/${platformFolder}/${arch}/(lib|)msal*.(node|dll|dylib|so)`,
|
||||
to: '[name][ext]'
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user