[.NET] Avoid exporting to duplicate architectures

Use a `HashSet` to avoid adding duplicate architectures on exporting. It seems we were adding `x86_64` and `arm64` twice to macOS exports because they are also included in the features.
This commit is contained in:
Raul Santos 2025-06-25 21:41:29 +02:00
parent 30456ba095
commit 70d0ecbb16
No known key found for this signature in database
GPG key ID: B532473AE3A803E4

View file

@ -191,7 +191,7 @@ namespace GodotTools.Export
BuildConfig = isDebug ? "ExportDebug" : "ExportRelease", BuildConfig = isDebug ? "ExportDebug" : "ExportRelease",
IncludeDebugSymbols = (bool)GetOption("dotnet/include_debug_symbols"), IncludeDebugSymbols = (bool)GetOption("dotnet/include_debug_symbols"),
RidOS = DetermineRuntimeIdentifierOS(platform, useAndroidLinuxBionic), RidOS = DetermineRuntimeIdentifierOS(platform, useAndroidLinuxBionic),
Archs = new List<string>(), Archs = [],
UseTempDir = platform != OS.Platforms.iOS, // xcode project links directly to files in the publish dir, so use one that sticks around. UseTempDir = platform != OS.Platforms.iOS, // xcode project links directly to files in the publish dir, so use one that sticks around.
BundleOutputs = true, BundleOutputs = true,
}; };
@ -232,7 +232,7 @@ namespace GodotTools.Export
targets.Add(new PublishConfig targets.Add(new PublishConfig
{ {
BuildConfig = publishConfig.BuildConfig, BuildConfig = publishConfig.BuildConfig,
Archs = new List<string> { "arm64", "x86_64" }, Archs = ["arm64", "x86_64"],
BundleOutputs = false, BundleOutputs = false,
IncludeDebugSymbols = publishConfig.IncludeDebugSymbols, IncludeDebugSymbols = publishConfig.IncludeDebugSymbols,
RidOS = OS.DotNetOS.iOSSimulator, RidOS = OS.DotNetOS.iOSSimulator,
@ -555,7 +555,7 @@ namespace GodotTools.Export
public bool UseTempDir; public bool UseTempDir;
public bool BundleOutputs; public bool BundleOutputs;
public string RidOS; public string RidOS;
public List<string> Archs; public HashSet<string> Archs;
public string BuildConfig; public string BuildConfig;
public bool IncludeDebugSymbols; public bool IncludeDebugSymbols;
} }