Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Version to 2.5.2 and NuGet Tooling #185

Merged
merged 2 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@

# Build folders
build/
cmake-build-*/

# Cache/IDE folders
.cache/
.vscode/
.idea/
.vs/

# System files
.DS_Store
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ endmacro()
csfml_set_option(CMAKE_BUILD_TYPE Release STRING "Choose the type of build (Debug or Release)")

# project name
project(CSFML VERSION 2.5.1)
project(CSFML VERSION 2.5.2)

# include the configuration file
include(${PROJECT_SOURCE_DIR}/cmake/Config.cmake)
Expand Down
2 changes: 1 addition & 1 deletion include/SFML/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
////////////////////////////////////////////////////////////
#define CSFML_VERSION_MAJOR 2
#define CSFML_VERSION_MINOR 5
#define CSFML_VERSION_PATCH 1
#define CSFML_VERSION_PATCH 2


////////////////////////////////////////////////////////////
Expand Down
14 changes: 4 additions & 10 deletions tools/nuget/CSFML/CSFML.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="16.0">

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

<!-- Workaround to remove the NETStandard.Library NuGet reference without breaking everything -->
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>

<Version>2.5.1</Version>
<Version>2.5.2</Version>
<Authors>Laurent Gomila</Authors>
<PackageTags>sfml csfml</PackageTags>
<Copyright>Copyright © Laurent Gomila</Copyright>
Expand All @@ -22,10 +19,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />

<!-- Workaround to remove the NETStandard.Library NuGet reference without breaking everything -->
<PackageReference Include="NETStandard.Library" Version="1.6.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
</ItemGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tools/nuget/CSFML/build/netframework/CSFML.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CSFMLIgnoreAnyCPU>false</CSFMLIgnoreAnyCPU>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tools/nuget/CSFML/build/netframework/CSFML.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Target Name="CSFMLAnyCPUError" Condition="$(CSFMLIgnoreAnyCPU) != true and $(Platform) == 'AnyCPU'" BeforeTargets="Build">
<Error Text="CSFML doesn't support 'Any CPU' on the .NET Framework. Consider switching to .NET Core. If this is not possible, change your platform to x64 or x86, or set the MSBuild property 'CSFMLIgnoreAnyCPU' to true and manually load the appropriate native library at runtime." />
Expand Down
17 changes: 11 additions & 6 deletions tools/nuget/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,22 @@ All build scripts follow the same routine:
This generic script doesn't install any of its dependencies. As such, you must have cmake and make installed, as well as all [SFML Dependencies](https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php#installing-dependencies) available to cmake.

* `build.macos.sh`
* A [Bash](https://www.gnu.org/software/bash/) script to build libraries for macOS. The [Runtime Identifier](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#macos-rids) of the macOS distribution must be specified as parameter to the script.
* A [Bash](https://www.gnu.org/software/bash/) script to build libraries for macOS. The [Runtime Identifier](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#macos-rids) of the macOS distribution must be specified as parameter to the script. Latest macOS SDKs can be downloaded [here](https://github.com/phracker/MacOSX-SDKs/releases).
Currently supported RIDs are:
* osx.10.15-x64
* osx.11.0-x64
* osx.11.0-arm64 (requires SFML 2.6)
* `osx-x64` (uses macOS SDK 10.12)
* `osx.11.0-x64`
* `osx.11.0-arm64` (requires SFML 2.6)

* `build.docker.sh`, `build.docker.ps1`
* A script to build the native libraries for a Linux distribution in a Docker container. If no RID is specified as a parameter, all supported RIDs will be built. Currently, the supported RIDs are:
* `alpine-x64`
* `linux-x64` (uses Ubuntu)
* `linux-musl-x64` (uses Apline)
* `linux-arm` (uses Arm32v7 Ubuntu)
* `linux-arm64` (uses Arm64v8 Ubuntu )
* `alpine-x64`
* `debian-x64` (compatible with derivatives such as Ubuntu and Linux Mint)
* `fedora-x64`
* `ubuntu-x64`
* `fedora-x64`

* `pushnuget.ps1`, `pushnuget.sh`
* A script to automatically build and push the NuGet package to nuget.org. Make sure that all the native libraries are in `CSFML/runtimes/` before running this.
Expand Down
35 changes: 28 additions & 7 deletions tools/nuget/build.docker.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Param(
$ErrorActionPreference = "Stop"

if (-not $RID ) {
Write-Output "No RID specified, building all known RIDs"
./build.docker.ps1 "alpine-x64"
./build.docker.ps1 "debian-x64"
./build.docker.ps1 "fedora-x64"
Write-Output "No RID specified, building all common RIDs"
./build.docker.ps1 "linux-x64"
./build.docker.ps1 "linux-musl-x64"
./build.docker.ps1 "linux-arm"
./build.docker.ps1 "linux-arm64"
exit
}

Expand All @@ -18,15 +19,35 @@ $Shell = $null

switch ($RID) {
'alpine-x64' {
$Image = 'alpine'
$Image = 'alpine:3.7'
$Shell = '/bin/sh'
}
'debian-x64' {
$Image = 'debian'
$Image = 'debian:bullseye'
$Shell = '/bin/bash'
}
'ubuntu-x64' {
$Image = 'ubuntu:22.04'
$Shell = '/bin/bash'
}
'fedora-x64' {
$Image = 'fedora'
$Image = 'fedora:37'
$Shell = '/bin/bash'
}
'linux-x64' {
$Image = 'ubuntu:22.04'
$Shell = '/bin/bash'
}
'linux-musl-x64' {
$Image = 'alpine:3.15'
$Shell = '/bin/sh'
}
'linux-arm' {
$Image = 'arm32v7/ubuntu:22.04'
$Shell = '/bin/bash'
}
'linux-arm64' {
$Image = 'arm64v8/ubuntu:22.04'
$Shell = '/bin/bash'
}
Default {
Expand Down
Loading