Skip to content

Commit

Permalink
Fix use of local dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Yazwh0 committed May 11, 2024
1 parent d021bba commit 6bf69db
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Bitmagic.VscExtension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bitmagic",
"displayName": "BitMagic X16 Debugger",
"description": "BitMagic X16 Debugger and Development Solution",
"version": "0.1.24",
"version": "0.1.25",
"preview": false,
"publisher": "yazwh0",
"icon": "package/butterfly.png",
Expand Down
4 changes: 3 additions & 1 deletion Bitmagic.VscExtension/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ export default class Constants
public static readonly SettingsEmulatorLocation = 'bitMagic.officialEmulator.officialEmulatorLocation';
public static readonly SettingsEmulatorVersion = 'bitMagic.officialEmulator.version';
public static readonly SettingsCustomEmulatorLocation = 'bitMagic.officialEmulator.customOfficialEmulatorLocation';
}
public static readonly SettingsDebuggerPort = 'bitMagic.debugger.port';
public static readonly SettingsDisablePlatformCheck = 'bitMagic.debugger.disablePlatformCheck'
}
30 changes: 15 additions & 15 deletions Bitmagic.VscExtension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var _dni: DotNetInstaller;
export function activate(context: vscode.ExtensionContext) {
bmOutput.appendLine("BitMagic Activated!");

//provideVSCodeDesignSystem().register(vsCodeButton());
//provideVSCodeDesignSystem().register(vsCodeButton());

context.subscriptions.push(vscode.debug.registerDebugAdapterDescriptorFactory('bmasm', new BitMagicDebugAdapterServerDescriptorFactory()));

Expand Down Expand Up @@ -68,7 +68,7 @@ export function activate(context: vscode.ExtensionContext) {
);

let UpdateBitMagic = false;
let UpdateOfficialEmulator = false;
let UpdateOfficialEmulator = false;

vscode.workspace.onDidChangeConfiguration(evt => {
var startUpdater = false;
Expand All @@ -91,18 +91,18 @@ export function activate(context: vscode.ExtensionContext) {
}

if (evt.affectsConfiguration(Constants.SettingsEmulatorVersion))
{
{
UpdateOfficialEmulator = true;
startUpdater = true;
}

if (evt.affectsConfiguration(Constants.SettingsDownloadEmulator))
{
{
UpdateOfficialEmulator = true;
startUpdater = true;
}

if (startUpdater)
if (startUpdater)
{
setTimeout(() => {
if (UpdateBitMagic)
Expand Down Expand Up @@ -145,7 +145,7 @@ export function activate(context: vscode.ExtensionContext) {
// vscode.commands.registerCommand('x16-visualiser.view_palette', (i) => {
// vscode.debug.activeDebugSession?.customRequest("bm_palette").then(i => {


// });
// vscode.window.showInformationMessage("Palette!");
// })
Expand All @@ -156,20 +156,20 @@ export function activate(context: vscode.ExtensionContext) {
// first check that we have the framework installed
new AutoUpdater().CheckForUpdate(context, bmOutput, _dni).then(_ => {
new EmulatorDownloader().CheckEmulator(context, bmOutput);
});
});
}

class BitMagicDebugAdapterServerDescriptorFactory implements vscode.DebugAdapterDescriptorFactory {

private server?: Net.Server;
private readonly settingsPortNumber = 'bitMagic.debugger.port';
private readonly settingsDisablePlatformCheck = 'bitMagic.debugger.disablePlatformCheck';
private readonly settingsAlternativeDebugger = 'bitMagic.debugger.alternativePath';
private readonly settingsDebugger = 'bitMagic.debugger.path';
private readonly settingsUseOwnDotnet = "bitMagic.debugger.useOwnDotnet";

private readonly settingsEmulatorLocation = 'bitMagic.officialEmulator.officialEmulatorLocation';
private readonly settingsCustomEmulatorLocation = 'bitMagic.officialEmulator.customOfficialEmulatorLocation';
private readonly settingsPortNumber = Constants.SettingsDebuggerPort;
private readonly settingsDisablePlatformCheck = Constants.SettingsDisablePlatformCheck;
private readonly settingsAlternativeDebugger = Constants.SettingsAlternativeDebugger;
private readonly settingsDebugger = Constants.SettingsDebuggerPath;
private readonly settingsUseOwnDotnet = Constants.SettingsUseOwnDotnet;

private readonly settingsEmulatorLocation = Constants.SettingsEmulatorLocation;
private readonly settingsCustomEmulatorLocation = Constants.SettingsCustomEmulatorLocation;

createDebugAdapterDescriptor(session: vscode.DebugSession, executable: vscode.DebugAdapterExecutable | undefined): vscode.ProviderResult<vscode.DebugAdapterDescriptor> {
const config = vscode.workspace.getConfiguration();
Expand Down

0 comments on commit 6bf69db

Please sign in to comment.