Skip to content

Commit

Permalink
Update buildscripts. Add windows ARM64 support (#4)
Browse files Browse the repository at this point in the history
* Update buildscriopts. Add windows ARM64 support

* Bump NuGet Packages

* Create the directories

* Bump buildscripts tp e1aac69

* Bump SDL to release-2.30.7

* Bump buildscripts to 48247d7

* Bump buildscripts to 388432d

* Update Build.csproj

* Update Build.csproj

* bump buildscripts

* Bump framework version

* Bump framework version
  • Loading branch information
dellis1972 authored Nov 28, 2024
1 parent 2eefe1b commit 2bb6739
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -25,8 +25,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cake.FileHelpers" Version="6.1.3" />
<PackageReference Include="Cake.Frosting" Version="3.1.0" />
<PackageReference Include="Cake.FileHelpers" Version="7.0.0" />
<PackageReference Include="Cake.Frosting" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 13 additions & 2 deletions build/BuildWindowsTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@ public sealed class BuildWindowsTask : FrostingTask<BuildContext>
public override void Run(BuildContext context)
{
// Build
var buildDir = "sdl/build";
var buildDir = "sdl/build_x64";
context.CreateDirectory(buildDir);
context.CreateDirectory($"{context.ArtifactsDir}/win-x64");
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "-A x64 -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ../" });
context.StartProcess("msbuild", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "SDL2.sln /p:Configuration=Release" });

// Copy artifact
context.CreateDirectory(context.ArtifactsDir);
context.CopyFile("sdl/build/Release/SDL2.dll", $"{context.ArtifactsDir}/SDL2.dll");
context.CopyFile("sdl/build_x64/Release/SDL2.dll", $"{context.ArtifactsDir}/win-x64/SDL2.dll");

buildDir = "sdl/build_arm64";
context.CreateDirectory(buildDir);
context.CreateDirectory($"{context.ArtifactsDir}/win-arm64");
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "-A ARM64 -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ../" });
context.StartProcess("msbuild", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "SDL2.sln /p:Configuration=Release" });

// Copy artifact
context.CreateDirectory(context.ArtifactsDir);
context.CopyFile("sdl/build_arm64/Release/SDL2.dll", $"{context.ArtifactsDir}/win-arm64/SDL2.dll");
}
}
2 changes: 1 addition & 1 deletion sdl
Submodule sdl updated 1228 files

0 comments on commit 2bb6739

Please sign in to comment.