Skip to content

Commit

Permalink
Add defines to Config
Browse files Browse the repository at this point in the history
  • Loading branch information
karniv00l committed Dec 29, 2023
1 parent bc2313c commit cc51114
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/ini_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class INIParser {
lines.addAll(preProcessor.lines);
settings.addAll(preProcessor.settings);
defines.addAll(preProcessor.defines);
_config.defines = defines;

for (final line in lines) {
_parseSections(line);
Expand Down
2 changes: 2 additions & 0 deletions lib/models/ini_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@ class FrontPage {

class INIConfig {
Header header = Header();
Map<String, String> defines = {};
List<SettingGroup> settingGroups = [];
List<PcVariable> pcVariables = [];
Constants constants = Constants();
Expand All @@ -1216,6 +1217,7 @@ class INIConfig {
Map<String, dynamic> toJson() {
return {
'header': header.toJson(),
'defines': defines,
'settingGroups': settingGroups.map((c) => c.toJson()).toList(),
'pcVariables': pcVariables.map((c) => c.toJson()).toList(),
'constants': constants.toJson(),
Expand Down
1 change: 1 addition & 0 deletions test/data/fome/json/fome_proteus_f4.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"iniSpecVersion": null,
"hyperTunerCloudUrl": "tunes.fome.tech"
},
"defines": {},
"settingGroups": [],
"pcVariables": [
{
Expand Down
Loading

0 comments on commit cc51114

Please sign in to comment.