FNA-VSCode-Template/.vscode/tasks.json
foxnne 7975cccbe9 Ported bash files to powershell, now functions in Windows
Still need to fix up a few lingering things. Need to figure out how the original sln file was functioning with Release configuration without having a Release config set up. Would also be nice to have some way to install and run the powershell script from code, so it would be as simple as creating the folder for the new project > right click > open with Code > (run command from pallette for new Nez project from template)
2019-09-01 01:01:40 -05:00

158 lines
5.2 KiB
JSON

{
"version": "2.0.0",
"tasks": [
{
"label": "Restore Project",
"type": "shell",
"command": "msbuild /t:restore",
"group": "build",
"problemMatcher": "$msCompile"
},
{
// this does a bunch of stuff:
// - update submodules to lastest (fetch latest Nez version)
// - clean, restore and rebuild Nez.sln (nuget restore to get latest packages)
// - clean, restore and rebuild Nez.FNA.sln (nuget restore Nez.FNA)
"label": "Update, Restore and Rebuild Nez",
"type": "shell",
"command": "git submodule foreach --recursive git pull && msbuild Nez/Nez.sln /t:clean /t:restore && msbuild Nez/Nez.FNA.sln /t:clean /t:restore",
"group": "build",
"problemMatcher": "$msCompile",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
},
{
"label": "Clean Project",
"type": "shell",
"command": "msbuild project_name /t:clean /p:configuration=Debug && msbuild project_name /t:clean /p:configuration=Release",
"group": "build",
"problemMatcher": "$msCompile",
},
{
"label": "Build (Debug)",
"type": "shell",
"command": "msbuild",
"args": [
"project_name.sln",
"/p:configuration=Debug",
"/p:platform=Any CPU",
"/t:build"
],
"group": "build",
"problemMatcher": "$msCompile",
"dependsOn": "Build Content",
},
//Confused how release works with this template by default, no release config seems to be setup in the sln
{
"label": "Build (Release)",
"type": "shell",
"command": "msbuild",
"args": [
"project_name.sln",
"/p:configuration=Release",
"/p:platform=Any CPU",
"/t:build"
],
"group": "build",
"problemMatcher": "$msCompile",
},
{
"label": "Build and Run (Debug)",
"type": "shell",
"group": "build",
"osx":{
"command": "DYLD_LIBRARY_PATH=${workspaceFolder}/project_name/bin/Debug/osx/ mono ${workspaceFolder}/project_name/bin/Debug/project_name.exe"
},
"windows":{
"command": "cmd",
"args": [
"/k",
"${workspaceFolder}/project_name/bin/Debug/project_name.exe"
]
},
"dependsOn": "Build (Debug)",
"problemMatcher": "$msCompile"
},
{
"label": "Build and Run (Release)",
"type": "shell",
"group": "build",
"osx":{
"command": "DYLD_LIBRARY_PATH=${workspaceFolder}/project_name/bin/Release/osx/ mono ${workspaceFolder}/project_name/bin/Release/project_name.exe"
},
"windows":{
"command": "cmd",
"args": [
"/k",
"${workspaceFolder}/project_name/bin/Release/project_name.exe"
]
},
"dependsOn": "Build (Release)",
"problemMatcher": "$msCompile"
},
{
"label": "Build Effects",
"type": "shell",
"group": "build",
"osx":{
"command": "${workspaceFolder}/.vscode/buildEffects.ps1"
},
"windows":{
"command": "& ${workspaceFolder}/.vscode/buildEffects.ps1"
},
"problemMatcher": "$msCompile"
},
{
"label": "Build Content",
"type": "shell",
"group": "build",
"command": "msbuild /t:BuildContent",
"options": {
"cwd": "${workspaceFolder}/project_name"
},
"problemMatcher": "$msCompile"
},
//I dont fully understand this function or how to replicate on windows.
/* {
"label": "Force Build Content",
"type": "shell",
"group": "build",
"command": "mono /Applications/Pipeline.app/Contents/MonoBundle/MGCB.exe /@:Content.mgcb -r",
"options": {
"cwd": "${workspaceFolder}/project_name/CompiledContent"
},
"problemMatcher": "$msCompile"
}, */
{
"label": "Open Pipeline Tool",
"type": "shell",
"group": "build",
"command": "${workspaceFolder}/lucid/CompiledContent/Content.mgcb",
"problemMatcher": "$msCompile"
},
{
"label": "Process T4 Templates",
"type": "shell",
"command": "${workspaceFolder}/.vscode/processT4Templates.ps1",
"group": "build",
"problemMatcher": "$msCompile",
},
]
}