From d9d04f1f3886b20c0fdb6e184cba56ed8165c953 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Wed, 26 Jul 2023 20:43:42 -0700 Subject: [PATCH] fix: Adds better arm64 support (#1409) --- Directory.Build.props | 3 +- ModernUO.sln | 38 ++++++------------- Projects/Server.Tests/Server.Tests.csproj | 9 +++-- Projects/Server/Server.csproj | 5 ++- .../Security/PasswordProtectionTest.cs | 4 +- .../UOContent.Tests/UOContent.Tests.csproj | 9 +++-- Projects/UOContent/UOContent.csproj | 9 +++-- README.md | 2 +- publish.cmd | 8 +++- 9 files changed, 40 insertions(+), 47 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 8255af188..bf798a0a5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,7 +5,6 @@ ModernUO 2019-2022 net7.0 - x64;arm64 preview true true @@ -68,7 +67,7 @@ - 3.5.119 + 3.6.133 all diff --git a/ModernUO.sln b/ModernUO.sln index 92647cca4..1fc1bcb87 100644 --- a/ModernUO.sln +++ b/ModernUO.sln @@ -12,35 +12,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UOContent.Tests", "Projects EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Analyze|x64 = Analyze|x64 - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Analyze|Any CPU = Analyze|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5E93BB35-3661-4822-9A8A-859726BAD87F}.Analyze|x64.ActiveCfg = Analyze|x64 - {5E93BB35-3661-4822-9A8A-859726BAD87F}.Analyze|x64.Build.0 = Analyze|x64 - {5E93BB35-3661-4822-9A8A-859726BAD87F}.Debug|x64.ActiveCfg = Debug|x64 - {5E93BB35-3661-4822-9A8A-859726BAD87F}.Debug|x64.Build.0 = Debug|x64 - {5E93BB35-3661-4822-9A8A-859726BAD87F}.Release|x64.ActiveCfg = Release|x64 - {5E93BB35-3661-4822-9A8A-859726BAD87F}.Release|x64.Build.0 = Release|x64 - {83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Analyze|x64.ActiveCfg = Analyze|x64 - {83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Analyze|x64.Build.0 = Analyze|x64 - {83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Debug|x64.ActiveCfg = Debug|x64 - {83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Debug|x64.Build.0 = Debug|x64 - {83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Release|x64.ActiveCfg = Release|x64 - {83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Release|x64.Build.0 = Release|x64 - {D7A5D3AF-D607-46EF-BAAD-0D424190311F}.Analyze|x64.ActiveCfg = Analyze|x64 - {D7A5D3AF-D607-46EF-BAAD-0D424190311F}.Analyze|x64.Build.0 = Analyze|x64 - {D7A5D3AF-D607-46EF-BAAD-0D424190311F}.Debug|x64.ActiveCfg = Debug|x64 - {D7A5D3AF-D607-46EF-BAAD-0D424190311F}.Debug|x64.Build.0 = Debug|x64 - {D7A5D3AF-D607-46EF-BAAD-0D424190311F}.Release|x64.ActiveCfg = Release|x64 - {D7A5D3AF-D607-46EF-BAAD-0D424190311F}.Release|x64.Build.0 = Release|x64 - {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Analyze|x64.ActiveCfg = Analyze|x64 - {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Analyze|x64.Build.0 = Analyze|x64 - {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Debug|x64.ActiveCfg = Debug|x64 - {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Debug|x64.Build.0 = Debug|x64 - {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Release|x64.ActiveCfg = Release|x64 - {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Release|x64.Build.0 = Release|x64 + {5E93BB35-3661-4822-9A8A-859726BAD87F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E93BB35-3661-4822-9A8A-859726BAD87F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7A5D3AF-D607-46EF-BAAD-0D424190311F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7A5D3AF-D607-46EF-BAAD-0D424190311F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83CF2484-BCCB-4B7C-9C5F-7AB43AEA5E8F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Debug|Any CPU.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Projects/Server.Tests/Server.Tests.csproj b/Projects/Server.Tests/Server.Tests.csproj index 44fcfbfd8..06e81f456 100644 --- a/Projects/Server.Tests/Server.Tests.csproj +++ b/Projects/Server.Tests/Server.Tests.csproj @@ -1,12 +1,13 @@ false + Debug;Release;Analyze - - - - + + + + diff --git a/Projects/Server/Server.csproj b/Projects/Server/Server.csproj index 723038fb9..ee06c9fec 100755 --- a/Projects/Server/Server.csproj +++ b/Projects/Server/Server.csproj @@ -9,6 +9,7 @@ ModernUO Server ..\..\Distribution 0.0.0 + Debug;Release;Analyze @@ -32,9 +33,9 @@ - + - + diff --git a/Projects/UOContent.Tests/Tests/Accounting/Security/PasswordProtectionTest.cs b/Projects/UOContent.Tests/Tests/Accounting/Security/PasswordProtectionTest.cs index 1719f5295..10e747cb0 100644 --- a/Projects/UOContent.Tests/Tests/Accounting/Security/PasswordProtectionTest.cs +++ b/Projects/UOContent.Tests/Tests/Accounting/Security/PasswordProtectionTest.cs @@ -34,7 +34,7 @@ namespace Server.Tests.Accounting.Security if (passwordProtection == null) { - Assert.False(true, $"{protectionType.Name} is not an IPasswordProtection."); + Assert.Fail($"{protectionType.Name} is not an IPasswordProtection."); } var encryptedPassword = passwordProtection.EncryptPassword(plainPassword); @@ -67,7 +67,7 @@ namespace Server.Tests.Accounting.Security if (passwordProtection == null) { - Assert.False(true, $"{protectionType.Name} is not an IPasswordProtection."); + Assert.Fail($"{protectionType.Name} is not an IPasswordProtection."); } var encryptedPassword = passwordProtection.EncryptPassword(plainPassword); diff --git a/Projects/UOContent.Tests/UOContent.Tests.csproj b/Projects/UOContent.Tests/UOContent.Tests.csproj index b21a8c0df..4c7f59576 100644 --- a/Projects/UOContent.Tests/UOContent.Tests.csproj +++ b/Projects/UOContent.Tests/UOContent.Tests.csproj @@ -1,12 +1,13 @@ false + Debug;Release;Analyze - - - - + + + + diff --git a/Projects/UOContent/UOContent.csproj b/Projects/UOContent/UOContent.csproj index 30b0b3fcf..2d570e7de 100755 --- a/Projects/UOContent/UOContent.csproj +++ b/Projects/UOContent/UOContent.csproj @@ -5,6 +5,7 @@ UOContent ModernUO Content ..\..\Distribution\Assemblies + Debug;Release;Analyze @@ -30,12 +31,12 @@ false - + - - - + + + diff --git a/README.md b/README.md index 4ad0d3451..c7a3cda87 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ ModernUO [![Discord](https://img.shields.io/discord/751317910504603701?logo=disc - `linux` - Linux - `arch` - `x64` - Intel 64-bit - - `arm64` - ARM 64-bit + - `arm64` - ARM 64-bit (Windows Arm64 not supported) ## Linux Prerequisites ### Fedora, CentOS, RHEL, etc diff --git a/publish.cmd b/publish.cmd index e2acbdcdb..fc2ca9632 100755 --- a/publish.cmd +++ b/publish.cmd @@ -5,7 +5,7 @@ GOTO :CMDSCRIPT ::SHELLSCRIPT config=$1 os=$2 -arch=${3:-x64} +arch=${3:-$(uname -m)} if [[ -n $os ]]; then os="-r $os" @@ -22,6 +22,12 @@ else config="-c Release" fi +if [[ $arch =~ ^[aarch|arm]* ]]; then + arch="arm64" +else + arch="x64" +fi + if [[ $os == *'centos'* || $os == *'rhel'* ]]; then export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 fi