From 6b4c6f35dcb8614c27fad5ec1e3df0b86413145f Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 12 Jun 2024 23:16:25 +0100 Subject: [PATCH] Fix Linux and Windows builds --- build/BuildLinuxTask.cs | 3 ++- build/BuildWindowsTask.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/BuildLinuxTask.cs b/build/BuildLinuxTask.cs index 8e3ba1a..4433349 100644 --- a/build/BuildLinuxTask.cs +++ b/build/BuildLinuxTask.cs @@ -12,6 +12,7 @@ public override void Run(BuildContext context) var buildWorkingDir = "basis_universal/"; context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildWorkingDir, Arguments = "CMakeLists.txt" }); context.StartProcess("make", new ProcessSettings { WorkingDirectory = buildWorkingDir, Arguments = "" }); - context.CopyFile($"{buildWorkingDir}basisu", $"{context.ArtifactsDir}/basisu"); + var files = Directory.GetFiles(System.IO.Path.Combine (buildWorkingDir, "bin"), "basisu", SearchOption.TopDirectoryOnly); + context.CopyFile(files[0], $"{context.ArtifactsDir}/basisu"); } } \ No newline at end of file diff --git a/build/BuildWindowsTask.cs b/build/BuildWindowsTask.cs index fdacced..2b3e9cc 100644 --- a/build/BuildWindowsTask.cs +++ b/build/BuildWindowsTask.cs @@ -11,8 +11,8 @@ public override void Run(BuildContext context) { var buildWorkingDir = "basis_universal/"; context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildWorkingDir, Arguments = "CMakeLists.txt" }); - context.StartProcess("make", new ProcessSettings { WorkingDirectory = buildWorkingDir, Arguments = "" }); - var files = Directory.GetFiles(System.IO.Path.Combine (buildWorkingDir, "bin_windows"), "basisu.exe", SearchOption.TopDirectoryOnly); + context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildWorkingDir, Arguments = "--build . --config release" }); + var files = Directory.GetFiles(System.IO.Path.Combine (buildWorkingDir, "bin"), "basisu.exe", SearchOption.TopDirectoryOnly); context.CopyFile(files[0], $"{context.ArtifactsDir}/basisu.exe"); } } \ No newline at end of file