diff --git a/project_name/.vscode/buildEffects.ps1 b/project_name/.vscode/buildEffects.ps1 new file mode 100644 index 0000000..842c2d0 --- /dev/null +++ b/project_name/.vscode/buildEffects.ps1 @@ -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 "" +} \ No newline at end of file diff --git a/project_name/.vscode/tasks.json b/project_name/.vscode/tasks.json index ff925db..97dd008 100644 --- a/project_name/.vscode/tasks.json +++ b/project_name/.vscode/tasks.json @@ -95,8 +95,7 @@ "command": "${workspaceFolder}/.vscode/buildEffects.sh" }, "windows":{ - "command": "cmd", - // TODO! + "command": "& ${workspaceFolder}/.vscode/buildEffects.ps1" }, "problemMatcher": "$msCompile" }