mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2025-10-31 21:50:44 +07:00
Added a Powershell script for building effects
This commit is contained in:
parent
3ac7b665fc
commit
ace44c9081
17
project_name/.vscode/buildEffects.ps1
vendored
Normal file
17
project_name/.vscode/buildEffects.ps1
vendored
Normal 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 ""
|
||||
}
|
||||
3
project_name/.vscode/tasks.json
vendored
3
project_name/.vscode/tasks.json
vendored
@ -95,8 +95,7 @@
|
||||
"command": "${workspaceFolder}/.vscode/buildEffects.sh"
|
||||
},
|
||||
"windows":{
|
||||
"command": "cmd",
|
||||
// TODO!
|
||||
"command": "& ${workspaceFolder}/.vscode/buildEffects.ps1"
|
||||
},
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user