From cd0a5c5b16ea1db81c0c8144b607002c1f947f6a Mon Sep 17 00:00:00 2001 From: github0null Date: Thu, 28 Aug 2025 09:29:18 +0800 Subject: [PATCH] - fix workspace file missed - dot not use github assert url --- CHANGELOG.md | 2 +- package.json | 2 +- src/EIDETypeDefine.ts | 12 +++++------- src/ResInstaller.ts | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83000058..f8412482 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable version changes will be recorded in this file. *** -### [v3.24.0] update +### [v3.24.1] update **New**: - `8051 Toolchain`: Support new SDCC + Binutils Toolchain for mcs51 https://github.com/github0null/sdcc-binutils-mcs51/blob/master/README_zh.md diff --git a/package.json b/package.json index 8424c3d4..41cb08c9 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "homepage": "https://em-ide.com", "license": "MIT", "description": "A mcu development environment for 8051/AVR/STM8/Cortex-M/MIPS/RISC-V", - "version": "3.24.0", + "version": "3.24.1", "preview": false, "engines": { "vscode": "^1.67.0" diff --git a/src/EIDETypeDefine.ts b/src/EIDETypeDefine.ts index f4a04009..3fb30977 100644 --- a/src/EIDETypeDefine.ts +++ b/src/EIDETypeDefine.ts @@ -1538,7 +1538,7 @@ export interface WorkspaceConfig { export class WorkspaceConfiguration extends Configuration { isDelUnknownKeysWhenLoad = false; - isLoaded = false; + isLoadFailed = false; protected readTypeFromFile(configFile: File): ProjectType | undefined { return undefined; @@ -1547,13 +1547,13 @@ export class WorkspaceConfiguration extends Configuration { protected Parse(jsonStr: string): WorkspaceConfig { try { const obj = jsonc.parse(jsonStr); - this.isLoaded = true; + this.isLoadFailed = false; return obj; } catch (error) { GlobalEvent.log_error(error); GlobalEvent.emit('msg', newMessage('Warning', view_str$prompt$loadws_cfg_failed.replace('{}', this.FILE_NAME))); - this.isLoaded = false; + this.isLoadFailed = true; return this.GetDefault(); } } @@ -1565,10 +1565,8 @@ export class WorkspaceConfiguration extends Configuration { // workspace only can be force save, because user will modify this file, // so we can not override it Save(force?: boolean) { - if (this.isLoaded) { - if (force) - super.Save(); - } + if (force || !this.isLoadFailed) + super.Save(); } GetDefault(): WorkspaceConfig { diff --git a/src/ResInstaller.ts b/src/ResInstaller.ts index 13ff6bba..e4c1600c 100644 --- a/src/ResInstaller.ts +++ b/src/ResInstaller.ts @@ -199,12 +199,12 @@ export class ResInstaller { const r_sdcc_mcs51: ToolPlatformInfo = { 'win32': { - url: 'https://github.com/github0null/sdcc-binutils-mcs51/releases/latest/download/sdcc-4.5.0-with-binutils-win32.zip', + url: 'https://em-ide.com/resource/sdcc-4.5.0-with-binutils-win32.zip', zip_type: 'zip', bin_dir: 'sdcc-4.5.0-with-binutils/bin' }, 'linux': { - url: 'https://github.com/github0null/sdcc-binutils-mcs51/releases/latest/download/sdcc-4.5.0-with-binutils-linux.tar.gz', + url: 'https://em-ide.com/resource/sdcc-4.5.0-with-binutils-linux.tar.gz', zip_type: 'tar.gz', bin_dir: 'sdcc-4.5.0-with-binutils/bin' }