Skip to content

Commit db1de41

Browse files
Beyleysilkdotnet
andauthored
Add SDL/GLFW native libs for win-arm64 (#1175)
* Attempt to add GLFW build for win-arm64 * When Build.Native changes, run GLFW * Add SDL2 ARM64 dll * Update GLFW binaries (#1177) * Roll back vulkan loader * Update swiftshader Co-authored-by: silkdotnet <[email protected]>
1 parent 685324c commit db1de41

File tree

9 files changed

+46
-35
lines changed

9 files changed

+46
-35
lines changed

.github/workflows/glfw.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- "main"
88
paths:
99
- "build/submodules/GLFW"
10+
- "build/nuke/Build.Native.cs"
1011
jobs:
1112
Build:
1213
strategy:

build/nuke/Build.Native.cs

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ string AndroidHome
298298
.AssertZeroExitCode();
299299
InheritedShell(build, GLFWPath)
300300
.AssertZeroExitCode();
301+
301302
CopyAll(@out.GlobFiles("src/Release/glfw3.dll"), runtimes / "win-x64" / "native");
302303

303304
EnsureCleanDirectory(@out);
@@ -308,6 +309,15 @@ string AndroidHome
308309
.AssertZeroExitCode();
309310

310311
CopyAll(@out.GlobFiles("src/Release/glfw3.dll"), runtimes / "win-x86" / "native");
312+
313+
EnsureCleanDirectory(@out);
314+
315+
InheritedShell($"{prepare} -A arm64", GLFWPath)
316+
.AssertZeroExitCode();
317+
InheritedShell(build, GLFWPath)
318+
.AssertZeroExitCode();
319+
320+
CopyAll(@out.GlobFiles("src/Release/glfw3.dll"), runtimes / "win-arm64" / "native");
311321
}
312322
else if (OperatingSystem.IsLinux())
313323
{
@@ -345,40 +355,40 @@ string AndroidHome
345355
Target VulkanLoader => CommonTarget
346356
(
347357
x => x.Before(Compile)
348-
.After(Clean)
349-
.Executes
350-
(
351-
() =>
352-
{
353-
var @out = VulkanLoaderPath / "build";
354-
EnsureCleanDirectory(@out);
355-
var abi = OperatingSystem.IsWindows() ? " -DCMAKE_GENERATOR_PLATFORM=Win32" : string.Empty;
356-
InheritedShell
357-
(
358-
$"cmake -S. -Bbuild -DUPDATE_DEPS=On -DCMAKE_BUILD_TYPE=Release{abi}",
359-
VulkanLoaderPath
360-
)
361-
.AssertZeroExitCode();
362-
InheritedShell($"cmake --build build --config Release{JobsArg}", VulkanLoaderPath)
363-
.AssertZeroExitCode();
364-
var runtimes = RootDirectory / "src" / "Native" / "Silk.NET.Vulkan.Loader.Native" / "runtimes";
365-
if (OperatingSystem.IsWindows())
366-
{
367-
CopyAll(@out.GlobFiles("loader/Release/vulkan-1.dll"), runtimes / "win-x64" / "native");
368-
CopyAll(@out.GlobFiles("loader/Release/vulkan-1.dll"), runtimes / "win-x86" / "native");
369-
}
370-
else
371-
{
372-
CopyAll
373-
(
374-
@out.GlobFiles("loader/libvulkan.so", "loader/libvulkan.dylib"),
375-
runtimes / (OperatingSystem.IsMacOS() ? "osx-x64" : "linux-x64") / "native"
376-
);
377-
}
378-
379-
PrUpdatedNativeBinary("Vulkan Loader");
380-
}
381-
)
358+
.After(Clean)
359+
.Executes
360+
(
361+
() =>
362+
{
363+
var @out = VulkanLoaderPath / "build";
364+
EnsureCleanDirectory(@out);
365+
var abi = OperatingSystem.IsWindows() ? " -DCMAKE_GENERATOR_PLATFORM=Win32" : string.Empty;
366+
InheritedShell
367+
(
368+
$"cmake -S. -Bbuild -DUPDATE_DEPS=On -DCMAKE_BUILD_TYPE=Release{abi}",
369+
VulkanLoaderPath
370+
)
371+
.AssertZeroExitCode();
372+
InheritedShell($"cmake --build build --config Release{JobsArg}", VulkanLoaderPath)
373+
.AssertZeroExitCode();
374+
var runtimes = RootDirectory / "src" / "Native" / "Silk.NET.Vulkan.Loader.Native" / "runtimes";
375+
if (OperatingSystem.IsWindows())
376+
{
377+
CopyAll(@out.GlobFiles("loader/Release/vulkan-1.dll"), runtimes / "win-x64" / "native");
378+
CopyAll(@out.GlobFiles("loader/Release/vulkan-1.dll"), runtimes / "win-x86" / "native");
379+
}
380+
else
381+
{
382+
CopyAll
383+
(
384+
@out.GlobFiles("loader/libvulkan.so", "loader/libvulkan.dylib"),
385+
runtimes / (OperatingSystem.IsMacOS() ? "osx-x64" : "linux-x64") / "native"
386+
);
387+
}
388+
389+
PrUpdatedNativeBinary("Vulkan Loader");
390+
}
391+
)
382392
);
383393

384394
AbsolutePath AssimpPath => RootDirectory / "build" / "submodules" / "Assimp";

build/submodules/SwiftShader

Submodule SwiftShader updated 726 files
1.67 KB
Binary file not shown.
0 Bytes
Binary file not shown.
207 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
1.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)