mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add download task for SsmsMin (#5460)
* Add SsmsMin files * no message * Add script to install extension
This commit is contained in:
@@ -703,3 +703,25 @@ function installService() {
|
|||||||
gulp.task('install-sqltoolsservice', () => {
|
gulp.task('install-sqltoolsservice', () => {
|
||||||
return installService();
|
return installService();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function installSsmsMin() {
|
||||||
|
let config = require('../extensions/admin-tool-ext-win/src/config.json');
|
||||||
|
return platformInfo.getCurrent().then(p => {
|
||||||
|
let runtime = p.runtimeId;
|
||||||
|
// fix path since it won't be correct
|
||||||
|
config.installDirectory = path.join(__dirname, '..', 'extensions', 'admin-tool-ext-win', config.installDirectory);
|
||||||
|
var installer = new serviceDownloader(config);
|
||||||
|
let serviceInstallFolder = installer.getInstallDirectory(runtime);
|
||||||
|
console.log('Cleaning up the install folder: ' + serviceInstallFolder);
|
||||||
|
return del(serviceInstallFolder + '/*').then(() => {
|
||||||
|
console.log('Installing the service. Install folder: ' + serviceInstallFolder);
|
||||||
|
return installer.installService(runtime);
|
||||||
|
}, delError => {
|
||||||
|
console.log('failed to delete the install folder error: ' + delError);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
gulp.task('install-ssmsmin', () => {
|
||||||
|
return installSsmsMin();
|
||||||
|
});
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ out/test/**
|
|||||||
src/**
|
src/**
|
||||||
.gitignore
|
.gitignore
|
||||||
tsconfig.json
|
tsconfig.json
|
||||||
|
InstallSsmsMin.bat
|
||||||
4
extensions/admin-tool-ext-win/InstallSsmsMin.bat
Normal file
4
extensions/admin-tool-ext-win/InstallSsmsMin.bat
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
REM Run this command to install SsmsMin for local development testing
|
||||||
|
gulp install-ssmsmin
|
||||||
12
extensions/admin-tool-ext-win/src/config.json
Normal file
12
extensions/admin-tool-ext-win/src/config.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"downloadUrl": "https://sqlopsextensions.blob.core.windows.net/tools/ssmsmin/{#version#}/{#fileName#}",
|
||||||
|
"version": "15.0.18120.0",
|
||||||
|
"downloadFileNames": {
|
||||||
|
"Windows_64": "SsmsMin-15.0.18120.0-win-x64.zip",
|
||||||
|
"Windows_86": "SsmsMin-15.0.18120.0-win-x86.zip"
|
||||||
|
},
|
||||||
|
"installDirectory": "ssmsmin/{#platform#}/{#version#}",
|
||||||
|
"executableFiles": [
|
||||||
|
"SsmsMin.exe"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -12,6 +12,8 @@ import { doubleEscapeSingleQuotes, backEscapeDoubleQuotes } from './utils';
|
|||||||
import { ChildProcess, exec } from 'child_process';
|
import { ChildProcess, exec } from 'child_process';
|
||||||
|
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
const ssmsMinVer = JSON.parse(JSON.stringify(require('./config.json'))).version;
|
||||||
|
|
||||||
let exePath: string;
|
let exePath: string;
|
||||||
const runningProcesses: Map<number, ChildProcess> = new Map<number, ChildProcess>();
|
const runningProcesses: Map<number, ChildProcess> = new Map<number, ChildProcess>();
|
||||||
|
|
||||||
@@ -66,7 +68,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
|||||||
// This is for Windows-specific support so do nothing on other platforms
|
// This is for Windows-specific support so do nothing on other platforms
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
Telemetry.sendTelemetryEvent('startup/ExtensionActivated');
|
Telemetry.sendTelemetryEvent('startup/ExtensionActivated');
|
||||||
exePath = path.join(context.extensionPath, 'ssmsmin', 'ssmsmin.exe');
|
exePath = path.join(context.extensionPath, 'ssmsmin', 'Windows', ssmsMinVer, 'ssmsmin.exe');
|
||||||
registerCommands(context);
|
registerCommands(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user