中文
MacroDefineHelper README
A vscode extension to generate a config tree from the describe files in project.
Then you can edit the describe tree and generate head files from the tree
developement
pack
vsce package
first open
npm install
install
You can download it from releases.
use
generate and open config file
right click side bar or input command
choose the first selection
remove the ’//‘ and set the values
"libConfFilePath" the path of generated headers
"defaultConfFileName" default head file name
"libSrcPath" the directory path need to look for describe file
"describeFileFolderName" the name of the folder which contains the describe file
"describeFileName" the name of describe file
for example
{
"libConfFilePath": "./AutoGenHeader",
"defaultConfFileName": "AllConfig.h",
"libSrcPath": "./paLibSubs",
"describeFileFolderName": "",
"describeFileName": "describe.txt"
}
add describe file(describe.txt in the example above) in libs need define setting
for example:
there is a define value needed in my oled lib
then I created a describe.txt in oled lib's directory
use a |
to divide the define value and default value
if it needs a special head file we can add a line like following:
generate config json tree
right click or input command, choose the second option
we will get a json tree file
we can easily change the tree node value and save the file
generate head files from tree
right click or input command, choose the third option
the head file will be generated in the target directory