sourcepawn-vscode
sourcepawn-vscode copied to clipboard
AutoCompile?
Hello, I feel like a complete kettle, but I can not figure out how to enable auto-complation of plugins.
Auto-compilation is currently not supported by the extension, though it is a possible future feature.
it is will very conveniently. (Open notepad++ sake of compile not convenient) :)
It is very easy to make a custom build task in vscode.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Compile plugin",
"type": "process",
"command": ".\\spcomp.exe",
"args": [
"${fileBasename}",
"-w205"
],
"group": "build"
},
{
"label": "Compile && deploy",
"type": "shell",
"command": ".\\spc.bat",
"args": [
"${fileBasename}"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
@ECHO OFF
move /Y "..\plugins\%~n1.smx" "..\plugins\disabled\%~n1.smx.bak"
spcomp.exe "%~1"
move /Y "%~n1.smx" "..\plugins"
The first one is using spcomp.exe to compile the plugin; the second one is a custom bat file that compile and copy the plugin to plugins folder.