Update Files

This commit is contained in:
2025-01-22 16:18:30 +01:00
parent ed4603cf95
commit a36294b518
16718 changed files with 2960346 additions and 0 deletions

View File

@ -0,0 +1,42 @@
import haxe.io.Path;
import sys.FileSystem;
class HLSL
{
var file:String;
var profile:String;
var target:String;
var variable:String;
public function new(inFile:String, inProfile:String, inVariable:String, inTarget:String)
{
file = inFile;
profile = inProfile;
variable = inVariable;
target = inTarget;
}
public function build()
{
if (!FileSystem.exists(Path.directory (target)))
{
PathManager.mkdir(Path.directory (target));
}
//DirManager.makeFileDir(target);
var srcStamp = FileSystem.stat(file).mtime.getTime();
if (!FileSystem.exists(target) || FileSystem.stat(target).mtime.getTime() < srcStamp)
{
var exe = "fxc.exe";
var args = [ "/nologo", "/T", profile, file, "/Vn", variable, "/Fh", target ];
var result = ProcessManager.runCommand("", exe, args);
if (result!=0)
{
Log.error("Could not compile shader \"" + file + "\"");
//throw "Error : Could not compile shader " + file + " - build cancelled";
}
}
}
}