From d8443a17f7141d735141fd662857116328f1ec96 Mon Sep 17 00:00:00 2001 From: Richard Moss Date: Sun, 3 Oct 2021 15:00:31 +0100 Subject: [PATCH 1/5] FIX: Now builds .NET 3.5 target without needing to use older .NET SDK --- global.json | 5 ----- src/Cyotek.Drawing.BitmapFont.csproj | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 global.json diff --git a/global.json b/global.json deleted file mode 100644 index 0730b55..0000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "sdk": { - "version": "3.1.404" - } -} \ No newline at end of file diff --git a/src/Cyotek.Drawing.BitmapFont.csproj b/src/Cyotek.Drawing.BitmapFont.csproj index b747667..f6c2753 100644 --- a/src/Cyotek.Drawing.BitmapFont.csproj +++ b/src/Cyotek.Drawing.BitmapFont.csproj @@ -30,6 +30,8 @@ $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client + + false From 96207bad67d2dfea1103bec4a32a4809a50709fe Mon Sep 17 00:00:00 2001 From: Richard Moss Date: Sun, 3 Oct 2021 15:01:53 +0100 Subject: [PATCH 2/5] REF: Moved strong name to be consistent with other layouts --- .../Cyotek.Drawing.BitmapFont.snk | Bin src/Cyotek.Drawing.BitmapFont.csproj | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/cyopublic.snk => res/Cyotek.Drawing.BitmapFont.snk (100%) diff --git a/src/cyopublic.snk b/res/Cyotek.Drawing.BitmapFont.snk similarity index 100% rename from src/cyopublic.snk rename to res/Cyotek.Drawing.BitmapFont.snk diff --git a/src/Cyotek.Drawing.BitmapFont.csproj b/src/Cyotek.Drawing.BitmapFont.csproj index f6c2753..505673b 100644 --- a/src/Cyotek.Drawing.BitmapFont.csproj +++ b/src/Cyotek.Drawing.BitmapFont.csproj @@ -16,11 +16,11 @@ Cyotek Ltd true - cyopublic.snk + ..\res\Cyotek.Drawing.BitmapFont.snk - + From 7c6109218647bd8e94c6a3f9ed641b9944aab270 Mon Sep 17 00:00:00 2001 From: Richard Moss Date: Sun, 3 Oct 2021 15:02:58 +0100 Subject: [PATCH 3/5] NEW: Added .NET 5.0 target, converted test project to SDK format --- .gitignore | 1 + build.cmd | 12 +- runtests.cmd | 56 +++++++++ src/Cyotek.Drawing.BitmapFont.csproj | 6 +- tests/Cyotek.Drawing.BitmapFont.Tests.csproj | 113 +++++++------------ 5 files changed, 108 insertions(+), 80 deletions(-) create mode 100644 runtests.cmd diff --git a/.gitignore b/.gitignore index dd5eae3..1677094 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ obj/ NDependOut/ _NCrunch_*/ nuget/ +testresults/ push.cmd diff --git a/build.cmd b/build.cmd index 83ab996..c574e09 100644 --- a/build.cmd +++ b/build.cmd @@ -2,15 +2,16 @@ SETLOCAL -CALL ..\..\..\build\set35vars.bat +CALL %CTKBLDROOT%setupEnv.cmd +SET BASENAME=Cyotek.Drawing.BitmapFont SET RELDIR=src\bin\Release\ -SET PRJFILE=src\Cyotek.Drawing.BitmapFont.csproj -SET DLLNAME=Cyotek.Drawing.BitmapFont.dll +SET PRJFILE=src\%BASENAME%.csproj +SET DLLNAME=%BASENAME%.dll -IF EXIST %RELDIR%*.nupkg DEL /F %RELDIR%*.nupkg +IF EXIST %RELDIR%*.nupkg DEL /F %RELDIR%*.nupkg IF EXIST %RELDIR%*.snupkg DEL /F %RELDIR%*.snupkg -IF EXIST %RELDIR%*.zip DEL /F %RELDIR%*.zip +IF EXIST %RELDIR%*.zip DEL /F %RELDIR%*.zip dotnet build %PRJFILE% --configuration Release @@ -22,6 +23,7 @@ CALL signcmd net452\%DLLNAME% CALL signcmd net462\%DLLNAME% CALL signcmd net472\%DLLNAME% CALL signcmd net48\%DLLNAME% +CALL signcmd net5.0\%DLLNAME% CALL signcmd netcoreapp2.1\%DLLNAME% CALL signcmd netcoreapp2.2\%DLLNAME% CALL signcmd netcoreapp3.1\%DLLNAME% diff --git a/runtests.cmd b/runtests.cmd new file mode 100644 index 0000000..f14df3a --- /dev/null +++ b/runtests.cmd @@ -0,0 +1,56 @@ +@ECHO OFF + +SETLOCAL + +CALL %CTKBLDROOT%setupEnv.cmd + +SET BASENAME=Cyotek.Drawing.BitmapFont +SET RELDIR=tests\bin\Release\ +SET PRJFILE=tests\%BASENAME%.Tests.csproj +SET DLLNAME=%BASENAME%.Tests.dll +SET NUNITVER=3.12.0 +SET NUNITEXE=%USERPROFILE%\.nuget\packages\nunit.consolerunner\%NUNITVER%\tools\nunit3-console.exe + +IF EXIST testresults RMDIR testresults /Q /S +MKDIR testresults + +dotnet build %PRJFILE% --configuration Release +IF %ERRORLEVEL% NEQ 0 GOTO :failed + +CALL :runtests net35 +IF %ERRORLEVEL% NEQ 0 GOTO :failed +CALL :runtests net40 +IF %ERRORLEVEL% NEQ 0 GOTO :failed +CALL :runtests net452 +IF %ERRORLEVEL% NEQ 0 GOTO :failed +CALL :runtests net462 +IF %ERRORLEVEL% NEQ 0 GOTO :failed +CALL :runtests net472 +IF %ERRORLEVEL% NEQ 0 GOTO :failed +CALL :runtests net48 +IF %ERRORLEVEL% NEQ 0 GOTO :failed +REM CALL :runtests net5.0 +REM IF %ERRORLEVEL% NEQ 0 GOTO :failed +REM CALL :runtests netcoreapp2.1 +REM IF %ERRORLEVEL% NEQ 0 GOTO :failed +REM CALL :runtests netcoreapp2.2 +REM IF %ERRORLEVEL% NEQ 0 GOTO :failed + +ENDLOCAL + +GOTO :eof + +:failed +CECHO {0c}ERROR : Test run failed{#}{\n} +EXIT /b 1 + +:runtests +SET PLATFORM=%1 + +"%NUNITEXE%" "%RELDIR%%PLATFORM%\%DLLNAME%" -result="./testresults/%BASENAME%-%PLATFORM%.xml" +IF %ERRORLEVEL% NEQ 0 EXIT /b 1 + +"%NUNITEXE%" "%RELDIR%%PLATFORM%\%DLLNAME%" -result="./testresults/%BASENAME%-%PLATFORM%-x86.xml" -x86 +IF %ERRORLEVEL% NEQ 0 EXIT /b 1 + +EXIT /b 0 \ No newline at end of file diff --git a/src/Cyotek.Drawing.BitmapFont.csproj b/src/Cyotek.Drawing.BitmapFont.csproj index 505673b..88a1a8a 100644 --- a/src/Cyotek.Drawing.BitmapFont.csproj +++ b/src/Cyotek.Drawing.BitmapFont.csproj @@ -2,11 +2,7 @@ - net48 - - - - net48;net35;net40;net452;net462;net472;netcoreapp2.1;netcoreapp2.2;netcoreapp3.1;netstandard1.3;netstandard2.0;netstandard2.1 + net48;net35;net40;net452;net462;net472;net5.0;netcoreapp2.1;netcoreapp2.2;netcoreapp3.1;netstandard1.3;netstandard2.0;netstandard2.1 diff --git a/tests/Cyotek.Drawing.BitmapFont.Tests.csproj b/tests/Cyotek.Drawing.BitmapFont.Tests.csproj index 41442e5..e0c95e1 100644 --- a/tests/Cyotek.Drawing.BitmapFont.Tests.csproj +++ b/tests/Cyotek.Drawing.BitmapFont.Tests.csproj @@ -1,102 +1,75 @@ - - - + + - Debug - AnyCPU - {73515AF8-FA45-495F-91BA-AD5DAE58944C} - Library - Properties - Cyotek.Drawing.BitmapFont.Tests - Cyotek.Drawing.BitmapFont.Tests - v4.8 - 512 + net48;net35;net40;net452;net462;net472;net5.0;netcoreapp2.1;netcoreapp3.1 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 + + + false + Cyotek.Drawing.BitmapFont.Tests + false - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + + true + ..\res\Cyotek.Drawing.BitmapFont.snk + + + + + - - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - - - - - - + + + + - - - - - - + + - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - - - - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - - - {A8E42972-0BC3-4F26-99DF-87B6379E875F} - Cyotek.Drawing.BitmapFont - - - - - \ No newline at end of file + + + + $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client + + false + + + From e7d31a0299ea1d0913fdf93319e8656f93bf9165 Mon Sep 17 00:00:00 2001 From: Richard Moss Date: Sun, 3 Oct 2021 15:03:29 +0100 Subject: [PATCH 4/5] REF: Supplementary changes for next release --- CHANGELOG.md | 14 ++++++++++++++ CONTRIBUTORS.md | 5 +++++ src/Directory.Build.props | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edbaeb3..c463040 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Change Log +## 2.0.3 + +### Added + +* Added deployment target for .NET 5.0 + +### Fixed + +* Fixed a crash which occurred when trying to load a plain text + font and texture file names contained spaces. Thanks to + abenedik for the fix +* No longer requires a custom `global.json` to force an older + SDK version in order to build the 3.5 target + ## 2.0.2 ### Fixed diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index b88e923..acf2644 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,5 +1,10 @@ # Contributors +## Version 2.0.3 + +* @abenedik for fixing a crash when loading a plain text font + and texture filenames contained spaces + ## Version 2.0 * @Tom94 for the initial conversion to SDK project format diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 99b4f9d..60b7313 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,7 +3,7 @@ Cyotek BitmapFont Cyotek Cyotek - 2.0.2 + 2.0.3 Copyright © 2012-2021 Cyotek Ltd. All Rights Reserved. MIT From 53c9f1dbdc03d20de6f062db6c93ee739f8c0864 Mon Sep 17 00:00:00 2001 From: Richard Moss Date: Sun, 3 Oct 2021 15:09:04 +0100 Subject: [PATCH 5/5] FIX: Package build error due to missing icon --- src/Cyotek.Drawing.BitmapFont.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Cyotek.Drawing.BitmapFont.csproj b/src/Cyotek.Drawing.BitmapFont.csproj index 88a1a8a..0784ba3 100644 --- a/src/Cyotek.Drawing.BitmapFont.csproj +++ b/src/Cyotek.Drawing.BitmapFont.csproj @@ -17,6 +17,7 @@ +