Added a Powershell script for building effects

This commit is contained in:
Caleb Cornett 2018-10-07 00:19:04 -04:00
parent 3ac7b665fc
commit ace44c9081
2 changed files with 18 additions and 2 deletions

17
project_name/.vscode/buildEffects.ps1 vendored Normal file
View File

@ -0,0 +1,17 @@
# Compiles all .fx files found in the project's Content directory.
# Intended for usage with VS Code Build Tasks tooling.
# You may need to change the path to fxc.exe depending on your installation.
Write-Output "Starting build process..."
Get-ChildItem ".\Content\" -R -Filter *.fx |
Foreach-Object {
$fileFullname = $_.FullName
$fileBasename = $_.BaseName
$fileDirectory = $_.Directory.FullName
& 'C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Utilities\bin\x86\fxc.exe' `
/T fx_2_0 $fileFullname /Fo "$fileDirectory\$fileBasename.fxb"
Write-Output ""
}

View File

@ -95,8 +95,7 @@
"command": "${workspaceFolder}/.vscode/buildEffects.sh"
},
"windows":{
"command": "cmd",
// TODO!
"command": "& ${workspaceFolder}/.vscode/buildEffects.ps1"
},
"problemMatcher": "$msCompile"
}