net8.0: upgrade from netcoreapp3.1, fix Linux rendering
- TFM: netcoreapp3.1 → net8.0, netstandard2.1 → net8.0 - System.Drawing.Common 5.0.3 → 6.0.0 (last version with Unix support) - Remove stale packages (NETStandard.Library, System.Collections) - Set System.Drawing.EnableUnixSupport via runtimeconfig + AppContext - Pin System.Resources.Extensions 8.0.0, suppress NU1603 - Copy game_folder assets to build output (no run.sh required) - Sta.CurrentDirectory → AppContext.BaseDirectory for portable path resolution - Enable UnsafeBinaryFormatterSerialization + InvariantGlobalization - Add global.json pinning SDK to 8.x - Remove ambiguous `using System.Net.Mime.MediaTypeNames` in ParT.cs - Add `using System.Reflection` to Program.cs
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
"profiles": {
|
||||
"SlaveMatrix": {
|
||||
"commandName": "Project",
|
||||
"workingDirectory": "$(SolutionDir)\\game_folder"
|
||||
"workingDirectory": "../game_folder",
|
||||
"environmentVariables": {
|
||||
"DOTNET_SYSTEM_GLOBALIZATION_INVARIANT": "true"
|
||||
}
|
||||
},
|
||||
"WSL": {
|
||||
"commandName": "WSL2",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<AssemblyName>SlaveMatrix</AssemblyName>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
@@ -14,10 +14,17 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>app.ico</ApplicationIcon>
|
||||
<RootNamespace />
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
|
||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||
<NoWarn>CA1416</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\2DGAMELIB\2DGAMELIB.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\game_folder\**\*" CopyToOutputDirectory="PreserveNewest" LinkBase="" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using _2DGAMELIB;
|
||||
|
||||
namespace SlaveMatrix
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
static Program()
|
||||
{
|
||||
AppContext.SetSwitch("System.Drawing.EnableUnixSupport", true);
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
private static void Main(string[] A_0)
|
||||
{
|
||||
|
||||
Sta.LoadConfig();
|
||||
|
||||
double percent = 35.0;
|
||||
|
||||
@@ -1410,7 +1410,7 @@ namespace SlaveMatrix
|
||||
上着B_クロス初期化 = default(上着B_クロス情報);
|
||||
上着B_前掛け初期化 = default(上着B_前掛け情報);
|
||||
ブーツ初期化 = default(ブーツ情報);
|
||||
CurrentDirectory = Directory.GetCurrentDirectory();
|
||||
CurrentDirectory = AppContext.BaseDirectory;
|
||||
GameData = new GameState();
|
||||
SavePath = Path.Combine(CurrentDirectory, "save");
|
||||
ImiPath = Path.Combine(CurrentDirectory, "text", "Basement", "Training", "Imitation.txt");
|
||||
|
||||
5
SlaveMatrix/runtimeconfig.template.json
Normal file
5
SlaveMatrix/runtimeconfig.template.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"configProperties": {
|
||||
"System.Drawing.EnableUnixSupport": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user