Add support for VSCode

This commit is contained in:
陈湛明 2024-03-26 11:51:51 +00:00
parent cf0aea6c4c
commit aeb8dda6c8
2 changed files with 39 additions and 1 deletions

View file

@ -0,0 +1,37 @@
{
"configurations": [
{
"name": "fx-9860G",
"compilerPath": "~/.local/bin/sh-elf-gcc",
"compilerArgs": [ "-D FX9860G" ],
"cStandard": "c17",
"cppStandard": "gnu++17",
"includePath": [],
"intelliSenseMode": "${default}",
"mergeConfigurations": false,
"browse": {
"path": [],
"limitSymbolsToIncludedHeaders": true
}
},
{
"name": "fx-CG50",
"compilerPath": "~/.local/bin/sh-elf-gcc",
"compilerArgs": [ "-D FXCG50" ],
"cStandard": "c17",
"cppStandard": "gnu++17",
"includePath": [],
"intelliSenseMode": "${default}",
"mergeConfigurations": false,
"browse": {
"path": [],
"limitSymbolsToIncludedHeaders": true
}
}
],
"version": 4
}

View file

@ -100,7 +100,7 @@ fxsdk_new_project() {
# Copy initial files to project folder # Copy initial files to project folder
assets="$PREFIX/share/fxsdk/assets" assets="$PREFIX/share/fxsdk/assets"
mkdir -p "$1"/{,src,assets-fx,assets-cg} mkdir -p "$1"/{,src,assets-fx,assets-cg,.vscode}
case "$generator" in case "$generator" in
"Makefile") "Makefile")
@ -125,6 +125,7 @@ fxsdk_new_project() {
cp "$assets"/icon-fx.png "$1"/assets-fx/icon.png cp "$assets"/icon-fx.png "$1"/assets-fx/icon.png
cp "$assets"/icon-cg-uns.png "$1"/assets-cg/icon-uns.png cp "$assets"/icon-cg-uns.png "$1"/assets-cg/icon-uns.png
cp "$assets"/icon-cg-sel.png "$1"/assets-cg/icon-sel.png cp "$assets"/icon-cg-sel.png "$1"/assets-cg/icon-sel.png
cp "$assets"/vscode/c_cpp_properties.json "$1"/.vscode/c_cpp_properties.json
echo "Created a new project $NAME (build system: $generator)." echo "Created a new project $NAME (build system: $generator)."
echo "Type 'fxsdk build-fx' or 'fxsdk build-cg' to compile the program." echo "Type 'fxsdk build-fx' or 'fxsdk build-cg' to compile the program."