mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
use native osx_arm64 sts bits (#22122)
* use native osx-arm64 sts bits * universal app * update package
This commit is contained in:
@@ -28,17 +28,16 @@ async function main() {
|
||||
const outAppPath = path.join(buildDir, `azuredatastudio-darwin-${arch}`, appName); // {{SQL CARBON EDIT}} - CHANGE VSCode to azuredatastudio
|
||||
const productJsonPath = path.resolve(outAppPath, 'Contents', 'Resources', 'app', 'product.json');
|
||||
// {{SQL CARBON EDIT}}
|
||||
// Current STS arm64 builds doesn't work on osx-arm64, we need to use the x64 version of STS on osx-arm64 until the issue is fixed.
|
||||
// Tracked by: https://github.com/microsoft/azuredatastudio/issues/20775
|
||||
// makeUniversalApp function will complain if the x64 ADS and arm64 ADS have the same STS binaries, to workaround the issue, we need
|
||||
// to delete STS from both of them and then copy it to the universal app.
|
||||
// STS binaries for x64 and arm64 have different file count and cannot be combined
|
||||
// Remove them from the package before the makeUniversalApp step and copy them to the universal package after it.
|
||||
const stsPath = '/Contents/Resources/app/extensions/mssql/sqltoolsservice';
|
||||
const tempSTSDir = path.join(buildDir, 'sqltoolsservice');
|
||||
const x64STSDir = path.join(x64AppPath, stsPath);
|
||||
const arm64STSDir = path.join(arm64AppPath, stsPath);
|
||||
const targetSTSDirs = [x64STSDir, arm64STSDir];
|
||||
// backup the x64 STS to a temporary directory, later it will be copied to the universal app directory.
|
||||
// backup the STS folders to a temporary directory, later they will be copied to the universal app directory.
|
||||
await fs.copy(x64STSDir, tempSTSDir);
|
||||
await fs.copy(arm64STSDir, tempSTSDir);
|
||||
// delete STS directories from both x64 ADS and arm64 ADS.
|
||||
console.debug(`Removing SqlToolsService folders.`);
|
||||
targetSTSDirs.forEach(async (dir) => {
|
||||
@@ -89,7 +88,8 @@ async function main() {
|
||||
}
|
||||
// {{SQL CARBON EDIT}}
|
||||
console.debug(`Copying SqlToolsService to the universal app folder.`);
|
||||
await fs.copy(tempSTSDir, path.join(outAppPath, stsPath), { overwrite: true });
|
||||
await fs.copy(path.join(tempSTSDir, 'OSX'), path.join(outAppPath, stsPath, 'OSX'), { overwrite: true });
|
||||
await fs.copy(path.join(tempSTSDir, 'OSX_ARM64'), path.join(outAppPath, stsPath, 'OSX_ARM64'), { overwrite: true });
|
||||
}
|
||||
if (require.main === module) {
|
||||
main().catch(err => {
|
||||
|
||||
@@ -34,17 +34,16 @@ async function main() {
|
||||
const productJsonPath = path.resolve(outAppPath, 'Contents', 'Resources', 'app', 'product.json');
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// Current STS arm64 builds doesn't work on osx-arm64, we need to use the x64 version of STS on osx-arm64 until the issue is fixed.
|
||||
// Tracked by: https://github.com/microsoft/azuredatastudio/issues/20775
|
||||
// makeUniversalApp function will complain if the x64 ADS and arm64 ADS have the same STS binaries, to workaround the issue, we need
|
||||
// to delete STS from both of them and then copy it to the universal app.
|
||||
// STS binaries for x64 and arm64 have different file count and cannot be combined
|
||||
// Remove them from the package before the makeUniversalApp step and copy them to the universal package after it.
|
||||
const stsPath = '/Contents/Resources/app/extensions/mssql/sqltoolsservice';
|
||||
const tempSTSDir = path.join(buildDir, 'sqltoolsservice');
|
||||
const x64STSDir = path.join(x64AppPath, stsPath);
|
||||
const arm64STSDir = path.join(arm64AppPath, stsPath);
|
||||
const targetSTSDirs = [x64STSDir, arm64STSDir];
|
||||
// backup the x64 STS to a temporary directory, later it will be copied to the universal app directory.
|
||||
// backup the STS folders to a temporary directory, later they will be copied to the universal app directory.
|
||||
await fs.copy(x64STSDir, tempSTSDir);
|
||||
await fs.copy(arm64STSDir, tempSTSDir);
|
||||
// delete STS directories from both x64 ADS and arm64 ADS.
|
||||
console.debug(`Removing SqlToolsService folders.`);
|
||||
targetSTSDirs.forEach(async dir => {
|
||||
@@ -100,7 +99,8 @@ async function main() {
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
console.debug(`Copying SqlToolsService to the universal app folder.`);
|
||||
await fs.copy(tempSTSDir, path.join(outAppPath, stsPath), { overwrite: true });
|
||||
await fs.copy(path.join(tempSTSDir, 'OSX'), path.join(outAppPath, stsPath, 'OSX'), { overwrite: true });
|
||||
await fs.copy(path.join(tempSTSDir, 'OSX_ARM64'), path.join(outAppPath, stsPath, 'OSX_ARM64'), { overwrite: true });
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
|
||||
Reference in New Issue
Block a user