Skip to content

Instantly share code, notes, and snippets.

@Bara
Last active June 2, 2023 00:41
Show Gist options
  • Save Bara/6ea238cffadc8446044691d86a1192ce to your computer and use it in GitHub Desktop.
Save Bara/6ea238cffadc8446044691d86a1192ce to your computer and use it in GitHub Desktop.
[Updated] Current tasks.json to compile sourcemod plugins with visual studio code
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Compile plugin with 1.10",
"type": "shell",
"presentation": {
"panel": "new"
},
"windows":{
"command": "D:\\Cloud\\SourcePawn\\Compiler\\1.10\\spcomp.exe",
"args": [
"${file}",
"-E", // Treat warnings as errors
"-O2", // Optimization level (0=none, 2=full)
"-v2",// Verbosity level; 0=quiet, 1=normal, 2=verbose
"-iD:\\Cloud\\SourcePawn\\Compiler\\1.10", // Include folder for sourcemod
"-i${workspaceFolder}\\addons\\sourcemod\\scripting\\include", // All other 3rd-party-includes
"-o${workspaceFolder}\\addons\\sourcemod\\plugins\\${fileBasenameNoExtension}.smx" // Output path for the compiled smx file
],
},
"linux":{
"command": "/media/x/Documents/Cloud/SourcePawn/Compiler/1.10/spcomp",
"args": [
"${file}",
"-E",
"-O2",
"-v2",
"-i/media/x/Documents/Cloud/SourcePawn/Compiler/1.10/",
"-i${workspaceFolder}/addons/sourcemod/scripting/include",
"-o${workspaceFolder}/addons/sourcemod/plugins/${fileBasenameNoExtension}.smx"
],
},
"problemMatcher": {
"owner": "sp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*)\\((.+)\\)\\s:\\s(((warning|error|fatal error)\\s\\d+):\\s.*)$",
"file": 1,
"line": 2,
"severity": 5,
"message": 3
}
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Compile plugin with 1.11",
"type": "shell",
"presentation": {
"panel": "new"
},
"windows":{
"command": "D:\\Cloud\\SourcePawn\\Compiler\\1.11\\spcomp.exe",
"args": [
"${file}",
"-E",
"-O2",
"-v2",
"-iD:\\Cloud\\SourcePawn\\Compiler\\1.11",
"-i${workspaceFolder}\\addons\\sourcemod\\scripting\\include",
"-o${workspaceFolder}\\addons\\sourcemod\\plugins\\${fileBasenameNoExtension}.smx"
],
},
"linux":{
"command": "/media/x/Documents/Cloud/SourcePawn/Compiler/1.11/spcomp",
"args": [
"${file}",
"-E",
"-O2",
"-v2",
"-i/media/x/Documents/Cloud/SourcePawn/Compiler/1.11/",
"-i${workspaceFolder}/addons/sourcemod/scripting/include",
"-o${workspaceFolder}/addons/sourcemod/plugins/${fileBasenameNoExtension}.smx"
],
},
"problemMatcher": {
"owner": "sp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*)\\((.+)\\)\\s:\\s(((warning|error|fatal error)\\s\\d+):\\s.*)$",
"file": 1,
"line": 2,
"severity": 5,
"message": 3
}
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment