Skip to content

Commit 7ebee92

Browse files
authored
v3.19.4
- add var: 'ChipPackDir', 'ChipName' - use 2 width indent to save eide.json
1 parent cead0fa commit 7ebee92

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"homepage": "https://em-ide.com",
3939
"license": "MIT",
4040
"description": "A mcu development environment for 8051/AVR/STM8/Cortex-M/MIPS/RISC-V",
41-
"version": "3.19.3",
41+
"version": "3.19.4",
4242
"preview": false,
4343
"engines": {
4444
"vscode": "^1.67.0"

src/EIDEProject.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2500,6 +2500,8 @@ $(OUT_DIR):
25002500
this.registerBuiltinVar('ConfigName', () => this.GetConfiguration().config.mode);
25012501
this.registerBuiltinVar('ProjectRoot', () => this.getRootDir().path);
25022502
this.registerBuiltinVar('ExecutableName', () => this.getExecutablePathWithoutSuffix());
2503+
this.registerBuiltinVar('ChipPackDir', () => this.GetConfiguration().config.packDir || '');
2504+
this.registerBuiltinVar('ChipName', () => this.GetConfiguration().config.deviceName || '');
25032505

25042506
// system vars
25052507
this.registerBuiltinVar('SYS_Platform', () => platform.osType());
@@ -2677,7 +2679,7 @@ $(OUT_DIR):
26772679
allFileOptions.push({ targetName: allTargets[idx], fileOptions: fileOptions });
26782680
} else {
26792681
GlobalEvent.emit('globalLog.append',
2680-
`This options file ".eide/${file.name}" not match any target. remove it !`);
2682+
`[Warn] This options file ".eide/${file.name}" not match any target. remove it !\n`);
26812683
}
26822684
try { fs.unlinkSync(file.path) } catch {} // delete file
26832685
}
@@ -2703,7 +2705,7 @@ $(OUT_DIR):
27032705
/* udpate project version to lastest */
27042706
if (this.isOldVersionProject) {
27052707
conf.version = EIDE_CONF_VERSION;
2706-
eideFile.Write(JSON.stringify(conf));
2708+
eideFile.Write(JSON.stringify(conf, undefined, 2));
27072709
}
27082710
}
27092711

src/EIDEProjectExplorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3316,7 +3316,7 @@ class ProjectDataProvider implements vscode.TreeDataProvider<ProjTreeItem>, vsco
33163316
const prjConf: ProjectConfigData<any> = JSON.parse(prjFile.Read());
33173317
prjConf.name = option.name; // set project name
33183318
if (prjConf.miscInfo) prjConf.miscInfo.uid = undefined; // reset uid
3319-
prjFile.Write(JSON.stringify(prjConf));
3319+
prjFile.Write(JSON.stringify(prjConf, undefined, 2));
33203320
} catch (error) {
33213321
throw Error(`Init project failed !, msg: ${error.message}`);
33223322
}

src/EIDEProjectModules.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ export abstract class CompileConfigModel<T> extends ConfigModel<T> {
463463
const _targetName = targetName || this.prjConfigData.mode;
464464
const _toolchain = toolchainName || this.prjConfigData.toolchain;
465465
if (this.prjConfigData.targets[_targetName] == undefined) {
466-
GlobalEvent.emit('globalLog.append', `target '${_targetName}' not exist !`);
466+
GlobalEvent.emit('globalLog.append', `[Warn] target '${_targetName}' not exist !\n`);
467467
GlobalEvent.emit('globalLog.show');
468468
return;
469469
}

0 commit comments

Comments
 (0)