Skip to content

Commit

Permalink
Bump ext/SDL from a2c1984 to 49d58bc (#421)
Browse files Browse the repository at this point in the history
* Bump ext/SDL from `a2c1984` to `49d58bc`

Bumps [ext/SDL](https://github.com/libsdl-org/SDL) from `a2c1984` to `49d58bc`.
- [Release notes](https://github.com/libsdl-org/SDL/releases)
- [Commits](libsdl-org/SDL@a2c1984...49d58bc)

---
updated-dependencies:
- dependency-name: ext/SDL
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update

* Update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lucas Girouard-Stranks <[email protected]>
  • Loading branch information
dependabot[bot] and lithiumtoast authored Nov 20, 2023
1 parent c82927f commit d4cf38c
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 155 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,6 @@ jobs:
path: "./lib"
key: "libs-${{ matrix.platform.rid }}-${{ hashFiles('ext/SDL/**/*') }}-${{ hashFiles('src/c/**/*') }}"

- name: "Install Windows dependencies"
if: runner.os == 'Windows'
run: |
choco install ninja
- name: "Install macOS dependencies"
if: runner.os == 'macOS'
run: |
brew install ninja
- name: Setup Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install \
ninja-build
- name: "Install C2CS"
shell: bash
run: dotnet tool install --global bottlenoselabs.C2CS.Tool
Expand Down Expand Up @@ -102,6 +85,11 @@ jobs:
name: "bindgen-cs"
path: "./src/cs/production/SDL/Generated"

- name: ".NET Build"
- name: "Setup .NET"
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'

- name: "Build .NET solution"
run: dotnet build "./src/cs"

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# SDL-cs

Automatically updated C# bindings for `https://github.com/libsdl-org/SDL`, on the `main` branch for v3, with native dynamic link libraries. For v2 of SDL, please see `https://github.com/bottlenoselabs/SDL2-cs`.
Automatically updated C# bindings for `https://github.com/libsdl-org/SDL`, on the `main` branch for v3, with native dynamic link libraries.

## How to use

### From source

1. Download and install [.NET 7](https://dotnet.microsoft.com/download).
1. Download and install [.NET 8](https://dotnet.microsoft.com/download).
2. Fork the repository using GitHub or clone the repository manually with submodules: `git clone --recurse-submodules https://github.com/bottlenoselabs/SDL-cs`.
3. Build the native library by running `library.sh`. To execute `.sh` scripts on Windows, use Git Bash which can be installed with Git itself: https://git-scm.com/download/win. The `library.sh` script requires that CMake and Ninja is installed and in your path.
3. Build the native library by running `library.sh`. To execute `.sh` scripts on Windows, use Git Bash which can be installed with Git itself: https://git-scm.com/download/win. The `library.sh` script requires that CMake is installed and in your environment variable `PATH`.
4. Add the `src/cs/production/SDL/SDL.csproj` C# project to your solution as an existing project and then reference it within your own solution.

## Developers: Documentation
Expand Down
30 changes: 0 additions & 30 deletions SDL.props

This file was deleted.

97 changes: 0 additions & 97 deletions config.json

This file was deleted.

2 changes: 1 addition & 1 deletion ext/SDL
Submodule SDL updated 687 files
3 changes: 1 addition & 2 deletions src/cs/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
<Using Include="bottlenoselabs.C2CS" />
</ItemGroup>

<!-- .NET8: Use artifacts path for bin/obj output folders -->
<!-- Use artifacts path for bin/obj output folders -->
<PropertyGroup>
<UseArtifactsOutput>true</UseArtifactsOutput>
<ArtifactsPath>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), .gitignore))/artifacts</ArtifactsPath>
</PropertyGroup>

<!-- NuGet package references -->
Expand Down
2 changes: 1 addition & 1 deletion src/cs/production/SDL/SDL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- MSBuild settings -->
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion src/cs/samples/HelloWorld/HelloWorld.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>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
3 changes: 1 addition & 2 deletions src/cs/samples/HelloWorld/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private static int Main()
{
// Get the next event
SDL_Event e;
if (SDL_PollEvent(&e) != 0)
if (SDL_PollEvent(&e))

Check failure on line 29 in src/cs/samples/HelloWorld/Program.cs

View workflow job for this annotation

GitHub Actions / Build .NET solution

Cannot implicitly convert type 'int' to 'bool'

Check failure on line 29 in src/cs/samples/HelloWorld/Program.cs

View workflow job for this annotation

GitHub Actions / Build .NET solution

Cannot implicitly convert type 'int' to 'bool'
{
Frame();

Expand Down Expand Up @@ -84,7 +84,6 @@ private static void PrintWindowFlags(SDL_Window* window)
Console.WriteLine(@$"Window: ""Mouse grabbed"" = {(windowFlags & (ulong)SDL_WindowFlags.SDL_WINDOW_MOUSE_GRABBED) != 0}");
Console.WriteLine(@$"Window: ""Input focus"" = {(windowFlags & (ulong)SDL_WindowFlags.SDL_WINDOW_INPUT_FOCUS) != 0}");
Console.WriteLine(@$"Window: ""Mouse focus"" = {(windowFlags & (ulong)SDL_WindowFlags.SDL_WINDOW_MOUSE_FOCUS) != 0}");
Console.WriteLine(@$"Window: ""Foreign"" = {(windowFlags & (ulong)SDL_WindowFlags.SDL_WINDOW_FOREIGN) != 0}");
Console.WriteLine(@$"Window: ""Mouse capture"" = {(windowFlags & (ulong)SDL_WindowFlags.SDL_WINDOW_MOUSE_CAPTURE) != 0}");
Console.WriteLine(@$"Window: ""Always on top"" = {(windowFlags & (ulong)SDL_WindowFlags.SDL_WINDOW_ALWAYS_ON_TOP) != 0}");
Console.WriteLine(@$"Window: ""Utility"" = {(windowFlags & (ulong)SDL_WindowFlags.SDL_WINDOW_UTILITY) != 0}");
Expand Down

0 comments on commit d4cf38c

Please sign in to comment.