mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2025-10-31 21:50:44 +07:00
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)
24 lines
647 B
PowerShell
24 lines
647 B
PowerShell
#!/bin/bash
|
|
# buildEffects
|
|
# 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..."
|
|
|
|
Set-Location ../project_name
|
|
|
|
$fxc = "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Utilities\bin\x86\fxc.exe"
|
|
|
|
$files = Get-ChildItem -Path "Content\*" -Include *fx
|
|
|
|
foreach ($file in $files)
|
|
{
|
|
$fileName = $file.BaseName
|
|
$filePath = $file.FullName
|
|
& $fxc /T fx_2_0 $filePath /Fo "${filePath}b"
|
|
|
|
Write-Output "Built ${fileName}.fx to ${filePath}b"
|
|
}
|
|
|