Update Debugger Packages (#7858)
Debugger now ships using .NET 5 Runtime to run OpenDebugAD7. Supports: - win7-x86 - win-x64 - win10-arm64 - linux-x64 - linux-musl-x64 - linux-arm - linux-arm64 - osx-x64 Cleaned up unused setup files. Updated packageManager to download alpine dependencies. Removed 'removeUnnecessaryFile' step since that removed windows configurations for OpenDebugAD7.
This commit is contained in:
+72
-23
@@ -3309,18 +3309,50 @@
|
||||
"integrity": "6756365C82B5BD90C6A40C13CF8E3599E4A1DB50628111FFDB3A76FF85256BA4"
|
||||
},
|
||||
{
|
||||
"description": "Mono Framework Assemblies",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=2027135",
|
||||
"description": "OpenDebugAD7 (Windows x86)",
|
||||
"url": "https://download.visualstudio.microsoft.com/download/pr/65d2e4a8-b9e4-40e8-a131-51b3b6af7b43/de9fa59805117816e8a5f94c8266f08f/win7-x86.zip",
|
||||
"platforms": [
|
||||
"linux",
|
||||
"darwin"
|
||||
"win32"
|
||||
],
|
||||
"binaries": [],
|
||||
"integrity": "579295329C1825588B6251EEA56571D1B9555BD529AA1A319CDFE741BC22D786"
|
||||
"architectures": [
|
||||
"x86"
|
||||
],
|
||||
"binaries": [
|
||||
"./debugAdapters/bin/OpenDebugAD7.exe"
|
||||
],
|
||||
"integrity": "8144471564483F2CF2AD44F6E47FEE43CFE0DE935CC5B19AD057B2E9F17247EB"
|
||||
},
|
||||
{
|
||||
"description": "Mono Runtime (Linux / x86_64)",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=2027416",
|
||||
"description": "OpenDebugAD7 (Windows x64)",
|
||||
"url": "https://download.visualstudio.microsoft.com/download/pr/65d2e4a8-b9e4-40e8-a131-51b3b6af7b43/76746f7e2b206af62790f7c531c5ebfe/win-x64.zip",
|
||||
"platforms": [
|
||||
"win32"
|
||||
],
|
||||
"architectures": [
|
||||
"x64"
|
||||
],
|
||||
"binaries": [
|
||||
"./debugAdapters/bin/OpenDebugAD7.exe"
|
||||
],
|
||||
"integrity": "07BCB0E787B440D55377DA475BC6859694C5EDDFE4540DB11D5EC864B67C29E3"
|
||||
},
|
||||
{
|
||||
"description": "OpenDebugAD7 (Windows ARM64)",
|
||||
"url": "https://download.visualstudio.microsoft.com/download/pr/65d2e4a8-b9e4-40e8-a131-51b3b6af7b43/c6fc1101fc22085d80ee5b51b05cf75b/win10-arm64.zip",
|
||||
"platforms": [
|
||||
"win32"
|
||||
],
|
||||
"architectures": [
|
||||
"arm64"
|
||||
],
|
||||
"binaries": [
|
||||
"./debugAdapters/bin/OpenDebugAD7.exe"
|
||||
],
|
||||
"integrity": "98E7434DA74545FE0731E2BB08A14B92B075A0A888181223E45221EA823EE42C"
|
||||
},
|
||||
{
|
||||
"description": "OpenDebugAD7 (Linux x64)",
|
||||
"url": "https://download.visualstudio.microsoft.com/download/pr/65d2e4a8-b9e4-40e8-a131-51b3b6af7b43/cab96f290df15021d58396616c833fa4/linux-x64.zip",
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
@@ -3328,13 +3360,13 @@
|
||||
"x64"
|
||||
],
|
||||
"binaries": [
|
||||
"./debugAdapters/mono.linux-x86_64"
|
||||
"./debugAdapters/bin/OpenDebugAD7"
|
||||
],
|
||||
"integrity": "927C5094E83CE64EDC3A267EE1F13267CFA09FC1E9A5ADC870A752C05AD26F17"
|
||||
"integrity": "4912413127724649A10A0925316D7E735159F49405D7DD3EA2F54750D6F65964"
|
||||
},
|
||||
{
|
||||
"description": "Mono Runtime (Linux / armhf)",
|
||||
"url": "https://aka.ms/mono-runtime-linux-arm",
|
||||
"description": "OpenDebugAD7 (Linux ARM)",
|
||||
"url": "https://download.visualstudio.microsoft.com/download/pr/65d2e4a8-b9e4-40e8-a131-51b3b6af7b43/3aaff9a6621469d7efd1423fe2c1063e/linux-arm.zip",
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
@@ -3342,13 +3374,13 @@
|
||||
"arm"
|
||||
],
|
||||
"binaries": [
|
||||
"./debugAdapters/mono.linux-armhf"
|
||||
"./debugAdapters/bin/OpenDebugAD7"
|
||||
],
|
||||
"integrity": "D2D1FE7FB5CC5B2A60364F08829467509879D603FC951AC3805B530C8CEEF981"
|
||||
"integrity": "527426D22FCDD0F3A679F767DDEE82BE34A73A281A46FF3CD64771D37EF6B886"
|
||||
},
|
||||
{
|
||||
"description": "Mono Runtime (Linux / arm64)",
|
||||
"url": "https://aka.ms/mono-runtime-linux-arm64",
|
||||
"description": "OpenDebugAD7 (Linux ARM64)",
|
||||
"url": "https://download.visualstudio.microsoft.com/download/pr/65d2e4a8-b9e4-40e8-a131-51b3b6af7b43/3ab22dae7df3d59330d73ce58c9025b5/linux-arm64.zip",
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
@@ -3356,20 +3388,37 @@
|
||||
"arm64"
|
||||
],
|
||||
"binaries": [
|
||||
"./debugAdapters/mono.linux-arm64"
|
||||
"./debugAdapters/bin/OpenDebugAD7"
|
||||
],
|
||||
"integrity": "946C54C8C6BF5BF79AC05D4E152F8D8647700FA786C21505832B3C79988339B4"
|
||||
"integrity": "2EB2F631C70AB4C6717D5AC61009051F6EFD4BFAF68E7364D95533CA2A7F2F03"
|
||||
},
|
||||
{
|
||||
"description": "Mono Runtime (macOS)",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=2027403",
|
||||
"description": "OpenDebugAD7 (Alpine Linux x64)",
|
||||
"url": "https://download.visualstudio.microsoft.com/download/pr/65d2e4a8-b9e4-40e8-a131-51b3b6af7b43/df8be410ade3aea46110a64eb5afaf9f/linux-musl-x64.zip",
|
||||
"platforms": [
|
||||
"alpine-linux"
|
||||
],
|
||||
"architectures": [
|
||||
"x64"
|
||||
],
|
||||
"binaries": [
|
||||
"./debugAdapters/bin/OpenDebugAD7"
|
||||
],
|
||||
"integrity": "5C830E144F8E9329232EDFC9760034C8A79F7146BB6EF49AE9CFF91BAEF8D10D"
|
||||
},
|
||||
{
|
||||
"description": "OpenDebugAD7 (macOS x64)",
|
||||
"url": "https://download.visualstudio.microsoft.com/download/pr/65d2e4a8-b9e4-40e8-a131-51b3b6af7b43/f69c1f2f41c21872843df39a3ced3e97/osx-x64.zip",
|
||||
"platforms": [
|
||||
"darwin"
|
||||
],
|
||||
"binaries": [
|
||||
"./debugAdapters/mono.osx"
|
||||
"architectures": [
|
||||
"x64"
|
||||
],
|
||||
"integrity": "5D9E5AB3E921D138887BD12FF46B02BFC85B692B438EDFAAEB1E1E7837F1D40B"
|
||||
"binaries": [
|
||||
"./debugAdapters/bin/OpenDebugAD7"
|
||||
],
|
||||
"integrity": "6525551C0E7B64EC920BD527AC2C836841EBA7265151BC4EFC8B3FD56565CC80"
|
||||
},
|
||||
{
|
||||
"description": "LLDB-MI (macOS Mojave and higher)",
|
||||
|
||||
@@ -35,12 +35,10 @@ export class CppdbgDebugAdapterDescriptorFactory extends AbstractDebugAdapterDes
|
||||
|
||||
async createDebugAdapterDescriptor(session: vscode.DebugSession, executable?: vscode.DebugAdapterExecutable): Promise<vscode.DebugAdapterDescriptor> {
|
||||
if (await util.isExtensionReady()) {
|
||||
let command: string = path.join(this.context.extensionPath, './debugAdapters/OpenDebugAD7');
|
||||
|
||||
// Windows has the exe in debugAdapters/bin.
|
||||
if (os.platform() === 'win32') {
|
||||
command = path.join(this.context.extensionPath, "./debugAdapters/bin/OpenDebugAD7.exe");
|
||||
}
|
||||
const adapter: string = "./debugAdapters/bin/OpenDebugAD7" + (os.platform() === 'win32' ? ".exe" : "");
|
||||
|
||||
const command: string = path.join(this.context.extensionPath, adapter);
|
||||
|
||||
return new vscode.DebugAdapterExecutable(command, []);
|
||||
} else {
|
||||
|
||||
@@ -215,9 +215,6 @@ async function offlineInstallation(info: PlatformInformation): Promise<void> {
|
||||
setInstallationStage('makeOfflineBinariesExecutable');
|
||||
await makeOfflineBinariesExecutable(info);
|
||||
|
||||
setInstallationStage('removeUnnecessaryFile');
|
||||
await removeUnnecessaryFile();
|
||||
|
||||
setInstallationStage('rewriteManifest');
|
||||
await rewriteManifest();
|
||||
|
||||
@@ -233,9 +230,6 @@ async function onlineInstallation(info: PlatformInformation): Promise<void> {
|
||||
setInstallationStage('makeBinariesExecutable');
|
||||
await makeBinariesExecutable();
|
||||
|
||||
setInstallationStage('removeUnnecessaryFile');
|
||||
await removeUnnecessaryFile();
|
||||
|
||||
setInstallationStage('rewriteManifest');
|
||||
await rewriteManifest();
|
||||
|
||||
@@ -316,22 +310,6 @@ async function cleanUpUnusedBinaries(info: PlatformInformation): Promise<void> {
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
function removeUnnecessaryFile(): Promise<void> {
|
||||
if (os.platform() !== 'win32') {
|
||||
const sourcePath: string = util.getDebugAdaptersPath("bin/OpenDebugAD7.exe.config");
|
||||
if (fs.existsSync(sourcePath)) {
|
||||
fs.rename(sourcePath, util.getDebugAdaptersPath("bin/OpenDebugAD7.exe.config.unused"), (err: NodeJS.ErrnoException | null) => {
|
||||
if (err) {
|
||||
getOutputChannelLogger().appendLine(localize("rename.failed.delete.manually",
|
||||
'ERROR: fs.rename failed with "{0}". Delete {1} manually to enable debugging.', err.message, sourcePath));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
function touchInstallLockFile(info: PlatformInformation): Promise<void> {
|
||||
return util.touchInstallLockFile(info);
|
||||
}
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All Rights Reserved.
|
||||
* See 'LICENSE' in the project root for license information.
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* This file is used for packaging the application and should not be referenced
|
||||
* by any other source files
|
||||
*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
|
||||
// Change this to true to force a dev workflow.
|
||||
const EnableDevWorkflow: boolean = false;
|
||||
|
||||
const DebugAdapterPath: string = "./debugAdapters";
|
||||
const DebugAdapterBinPath: string = DebugAdapterPath + "/bin";
|
||||
|
||||
let CpptoolsExtensionRoot: string = null;
|
||||
let SearchCompleted: boolean = false;
|
||||
|
||||
interface RootsHashtable {
|
||||
"miEngineRoot": string;
|
||||
"openDebugRoot": string;
|
||||
"monoDeps": string;
|
||||
}
|
||||
|
||||
const internalBinaryRoots: RootsHashtable = {
|
||||
"miEngineRoot": process.env.CPPTOOLS_MIENGINE_ROOT,
|
||||
"openDebugRoot": process.env.CPPTOOLS_OPENDEBUG_ROOT,
|
||||
"monoDeps": process.env.CPPTOLS_MONODEPS_ROOT
|
||||
};
|
||||
|
||||
const externalBinaryRoots: RootsHashtable = {
|
||||
"miEngineRoot": DebugAdapterBinPath,
|
||||
"openDebugRoot": DebugAdapterBinPath,
|
||||
"monoDeps": DebugAdapterPath
|
||||
};
|
||||
|
||||
function findCppToolsExtensionDebugAdapterFolder(): string {
|
||||
const vscodeFolderRegExp: RegExp = new RegExp(/\.vscode-*[a-z]*$/);
|
||||
const cpptoolsFolderRegExp: RegExp = new RegExp(/ms\-vscode\.cpptools\-.*$/);
|
||||
|
||||
let dirPath: string = os.homedir();
|
||||
if (fs.existsSync(dirPath)) {
|
||||
const files: string[] = fs.readdirSync(dirPath);
|
||||
for (let i: number = 0; i < files.length; i++) {
|
||||
// Check to see if it starts with '.vscode'
|
||||
if (vscodeFolderRegExp.test(files[i])) {
|
||||
const extPath: string = path.join(dirPath, files[i], "extensions");
|
||||
if (fs.existsSync(extPath)) {
|
||||
const extFiles: string[] = fs.readdirSync(extPath);
|
||||
for (let j: number = 0; j < extFiles.length; j++) {
|
||||
if (cpptoolsFolderRegExp.test(path.join(extFiles[j]))) {
|
||||
dirPath = path.join(extPath, extFiles[j]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dirPath === os.homedir()) {
|
||||
console.error("Could not find installed C/C++ extension.");
|
||||
return null;
|
||||
}
|
||||
|
||||
return dirPath;
|
||||
} else {
|
||||
console.error("Unable to determine C/C++ extension installation location.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function enableDevWorkflow(): Boolean {
|
||||
if (process.env.AGENT_ID) {
|
||||
// Agent machines must not attempt any dev workflows
|
||||
return false;
|
||||
}
|
||||
|
||||
return (EnableDevWorkflow || (process.env.CPPTOOLS_DEV !== undefined));
|
||||
}
|
||||
|
||||
function copySourceDependencies(): void {
|
||||
copy("./", DebugAdapterBinPath, "cppdbg.ad7Engine.json");
|
||||
}
|
||||
|
||||
function getRoot(rootKey: string): string {
|
||||
const internal: string = internalBinaryRoots[rootKey];
|
||||
if (internal) {
|
||||
return internal;
|
||||
}
|
||||
|
||||
// Only search for the extension root once.
|
||||
if (!CpptoolsExtensionRoot && !SearchCompleted) {
|
||||
CpptoolsExtensionRoot = findCppToolsExtensionDebugAdapterFolder();
|
||||
SearchCompleted = true;
|
||||
}
|
||||
|
||||
if (CpptoolsExtensionRoot) {
|
||||
return path.join(CpptoolsExtensionRoot, externalBinaryRoots[rootKey]);
|
||||
}
|
||||
|
||||
console.error("Unable to determine internal/external location to copy from for root %s.", rootKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
function copyBinaryDependencies(): void {
|
||||
const miEngineRoot: string = getRoot("miEngineRoot");
|
||||
const openDebugRoot: string = getRoot("openDebugRoot");
|
||||
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "Microsoft.MICore.dll");
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "Microsoft.MICore.dll.mdb");
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "Microsoft.MICore.XmlSerializers.dll");
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "Microsoft.MIDebugEngine.dll");
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "Microsoft.MIDebugEngine.dll.mdb");
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "osxlaunchhelper.scpt");
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Debugger.Interop.15.0.dll");
|
||||
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Debugger.Interop.10.0.dll");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Debugger.Interop.11.0.dll");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Debugger.Interop.12.0.dll");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Debugger.InteropA.dll");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.DebugEngineHost.dll");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.DebugEngineHost.dll.mdb");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "OpenDebugAD7.exe");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "OpenDebugAD7.exe.config");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "OpenDebugAD7.exe.mdb");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Newtonsoft.Json.dll");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "WindowsDebugLauncher.exe");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.dll");
|
||||
}
|
||||
|
||||
function copyMonoDependencies(): void {
|
||||
const monoDeps: string = getRoot("monoDeps");
|
||||
|
||||
copy(monoDeps, DebugAdapterPath, "OpenDebugAD7");
|
||||
}
|
||||
|
||||
function copy(root: string, target: string, file: string): void {
|
||||
if (!root) {
|
||||
console.error("Unknown root location. Copy Failed for %s.", file);
|
||||
return;
|
||||
}
|
||||
|
||||
const source: string = path.join(root, file);
|
||||
const destination: string = path.join(target, file);
|
||||
|
||||
if (!fs.existsSync(target)) {
|
||||
console.log('Creating directory %s', target);
|
||||
makeDirectory(target);
|
||||
}
|
||||
|
||||
console.log('copying %s to %s', source, destination);
|
||||
if (fs.existsSync(source)) {
|
||||
fs.writeFileSync(destination, fs.readFileSync(source));
|
||||
} else {
|
||||
console.error('ERR: could not find file %s', source);
|
||||
}
|
||||
}
|
||||
|
||||
function removeFolder(root: string): void {
|
||||
if (!isDirectory(root)) {
|
||||
console.warn('Skipping deletion of %s; directory does not exist', root);
|
||||
return;
|
||||
}
|
||||
|
||||
const files: string[] = fs.readdirSync(root);
|
||||
for (let i: number = 0; i < files.length; i++) {
|
||||
const fullPath: string = path.join(root, files[i]);
|
||||
console.warn('Found entry %s', fullPath);
|
||||
if (!isDirectory(fullPath)) {
|
||||
console.warn('Deleting %s', fullPath);
|
||||
fs.unlinkSync(fullPath);
|
||||
} else {
|
||||
removeFolder(fullPath);
|
||||
}
|
||||
}
|
||||
|
||||
console.warn('Deleting %s', root);
|
||||
fs.rmdirSync(root);
|
||||
}
|
||||
|
||||
function isDirectory(dir: string): Boolean {
|
||||
try {
|
||||
return fs.statSync(dir).isDirectory();
|
||||
} catch (e) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function makeDirectory(dir: string): void {
|
||||
try {
|
||||
// Note: mkdir is limited to creating folders with one level of nesting. Creating "a/b" if 'a' doesn't exist will throw a ENOENT.
|
||||
fs.mkdirSync(dir);
|
||||
} catch (e) {
|
||||
if ((<NodeJS.ErrnoException>e).code !== "EEXIST") {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (enableDevWorkflow()) {
|
||||
removeFolder("./debugAdapters");
|
||||
}
|
||||
|
||||
makeDirectory("./debugAdapters");
|
||||
copySourceDependencies();
|
||||
|
||||
if (enableDevWorkflow()) {
|
||||
copyMonoDependencies();
|
||||
copyBinaryDependencies();
|
||||
} else {
|
||||
console.warn('WARNING: Debugger dependencies are missing.');
|
||||
console.log('If you are trying to build and run the extension from source and need the debugger dependencies, set the environment variable CPPTOOLS_DEV=1 and try again.');
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
# /* --------------------------------------------------------------------------------------------
|
||||
# * Copyright (c) Microsoft Corporation. All Rights Reserved.
|
||||
# * See 'LICENSE' in the project root for license information.
|
||||
# * ------------------------------------------------------------------------------------------ */
|
||||
#!/usr/bin/env bash
|
||||
|
||||
fail() {
|
||||
echo "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [-v] path-to-extension path-to-miengine path-to-opendebug"
|
||||
echo " e.g. $0 ~/.vscode/extensions/ms-vscode.cpptools-0.5.0 ~/src/MIEngine ~/src/OpenDebugAD7"
|
||||
echo
|
||||
echo " Parameters can also be provided by environment variables:"
|
||||
echo " CPPDBG_EXTENSION_PATH (current value: ${CPPDBG_EXTENSION_PATH:-(none)})"
|
||||
echo " MIENGINE_SRC_PATH (current value: ${MIENGINE_SRC_PATH:-(none)})"
|
||||
echo " OPENDEBUG_SRC_PATH (current value: ${OPENDEBUG_SRC_PATH:-(none)})"
|
||||
exit 0
|
||||
}
|
||||
|
||||
remove_existing_binaries() {
|
||||
local BIN_PATH=$1
|
||||
local RM_FLAGS="-f"
|
||||
|
||||
if [ "${VERBOSE}" == "1" ] ; then
|
||||
RM_FLAGS="${RM_FLAGS} -v"
|
||||
fi
|
||||
|
||||
rm ${RM_FLAGS} ${BIN_PATH}/*.dll || fail "Failed to clean up existing DLLs!"
|
||||
rm ${RM_FLAGS} ${BIN_PATH}/*.exe || fail "Failed to clean up existing EXEs!"
|
||||
rm ${RM_FLAGS} ${BIN_PATH}/*.mdb || fail "Failed to clean up existing MDBs!"
|
||||
}
|
||||
|
||||
link_file() {
|
||||
local SRC=$1
|
||||
local DEST=$2
|
||||
|
||||
if [ "${VERBOSE}" == "1" ] ; then
|
||||
echo "Linking '${SRC}' -> '${DEST}'"
|
||||
fi
|
||||
|
||||
ln -s ${SRC} ${DEST} || fail "Failed to link file '${SRC}' to '${DEST}'!"
|
||||
}
|
||||
|
||||
link_files() {
|
||||
local DEST_PATH=$1
|
||||
local SRC_PATH=$2
|
||||
|
||||
shift 2
|
||||
|
||||
while [ ! -z $1 ] ; do
|
||||
link_file ${SRC_PATH}/$1 ${DEST_PATH}/$1
|
||||
|
||||
# Link symbols, if present
|
||||
if [ -e ${SRC_PATH}/$1.mdb ] ; then
|
||||
link_file ${SRC_PATH}/$1.mdb ${DEST_PATH}/$1.mdb
|
||||
fi
|
||||
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
VERBOSE=0
|
||||
if [ "$1" == "-v" ] ; then
|
||||
VERBOSE=1
|
||||
shift
|
||||
fi
|
||||
|
||||
EXTENSION_PATH=${1:-${CPPDBG_EXTENSION_PATH}}
|
||||
MIENGINE_PATH=${2:-${MIENGINE_SRC_PATH}}
|
||||
OPENDEBUG_PATH=${3:-${OPENDEBUG_SRC_PATH}}
|
||||
|
||||
if [ "$1" == "--help" -o -z "${EXTENSION_PATH}" -o -z "${MIENGINE_PATH}" -o -z "${OPENDEBUG_PATH}" ] ; then
|
||||
usage
|
||||
fi
|
||||
|
||||
EXTENSION_BIN=${EXTENSION_PATH}/debugAdapters/bin
|
||||
|
||||
remove_existing_binaries ${EXTENSION_BIN}
|
||||
|
||||
# Link main binaries
|
||||
link_files ${EXTENSION_BIN} ${OPENDEBUG_PATH}/out/Desktop.Debug OpenDebugAD7.exe Microsoft.DebugEngineHost.dll
|
||||
link_files ${EXTENSION_BIN} ${MIENGINE_PATH}/bin/Desktop.Debug Microsoft.MICore.dll Microsoft.MIDebugEngine.dll Microsoft.MICore.XmlSerializers.dll osxlaunchhelper.scpt
|
||||
|
||||
# Link dependencies
|
||||
link_files ${EXTENSION_BIN} ${OPENDEBUG_PATH}/out/Desktop.Debug Newtonsoft.Json.dll
|
||||
link_files ${EXTENSION_BIN} ${MIENGINE_PATH}/bin/Desktop.Debug Microsoft.VisualStudio.Debugger.Interop.10.0.dll Microsoft.VisualStudio.Debugger.Interop.11.0.dll Microsoft.VisualStudio.Debugger.Interop.12.0.dll Microsoft.VisualStudio.Debugger.InteropA.dll
|
||||
|
||||
# Link engine JSON to real assembly location
|
||||
if [ ! -e ${OPENDEBUG_PATH}/out/Desktop.Debug/cppdbg.ad7Engine.json ] ; then
|
||||
link_files ${OPENDEBUG_PATH}/out/Desktop.Debug ${EXTENSION_BIN} cppdbg.ad7Engine.json
|
||||
fi
|
||||
|
||||
echo "Done!"
|
||||
@@ -31,13 +31,4 @@ tscCompileListStr.split(/\r?\n/).forEach(filePath => {
|
||||
if (!filePath.startsWith("#") && /\S/.test(filePath)) {
|
||||
compile(filePath);
|
||||
}
|
||||
});
|
||||
|
||||
// If the required debugger file doesn't exist, make sure it is copied.
|
||||
if (process.env.CPPTOOLS_DEV || !fs.existsSync('./debugAdapters/bin/cppdbg.ad7Engine.json')) {
|
||||
const copyDebuggerDependenciesJSFile = './out/tools/copyDebuggerDependencies.js';
|
||||
|
||||
// Required for nightly builds. Nightly builds do not enable CPPTOOLS_DEV.
|
||||
console.log(">> node " + copyDebuggerDependenciesJSFile);
|
||||
cp.execSync("node " + copyDebuggerDependenciesJSFile, { stdio: [0, 1, 2] });
|
||||
}
|
||||
});
|
||||
@@ -9,5 +9,4 @@
|
||||
# 3. If you created a new folder, please make sure it is added to the .vscodeignore
|
||||
|
||||
tools/GenerateOptionsSchema.ts
|
||||
tools/copyDebuggerDependencies.ts
|
||||
ui/settings.ts
|
||||
Reference in New Issue
Block a user