Skip to content
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/ci-launcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ jobs:
- name: Build
run: |
cd OTAPI.Client.Launcher
dotnet publish -r ${{ matrix.profile.runtime_identifier }} --framework net9.0 -p:PublishReadyToRun=true --self-contained false -c Release
dotnet publish -r ${{ matrix.profile.runtime_identifier }} --framework net10.0 -p:PublishReadyToRun=true --self-contained false -c Release
if ${{ matrix.profile.runs_on != 'macos-latest' }} ; then
7z a ../${{ matrix.profile.archive_name }} './bin/Release/net9.0/${{ matrix.profile.runtime_identifier }}/publish/*'
7z a ../${{ matrix.profile.archive_name }} './bin/Release/net10.0/${{ matrix.profile.runtime_identifier }}/publish/*'
else
mkdir -p OTAPI.app/Contents/Resources
mv bin/Release/net9.0/osx-x64/publish OTAPI.app/Contents/MacOS
mv bin/Release/net10.0/osx-x64/publish OTAPI.app/Contents/MacOS
cp ../docs/MacOS.Info.plist OTAPI.app/Contents/Info.plist
cp OTAPI.osx.sh OTAPI.app/Contents/MacOS/OTAPI
chmod +x OTAPI.app/Contents/MacOS/OTAPI
Expand All @@ -85,7 +85,7 @@ jobs:
# - uses: actions/upload-artifact@v2
# with:
# name: ${{ matrix.profile.name }} Launcher
# path: OTAPI.Client.Launcher/bin/Release/net9.0/${{ matrix.profile.runtime_identifier }}/publish
# path: OTAPI.Client.Launcher/bin/Release/net10.0/${{ matrix.profile.runtime_identifier }}/publish

- uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,27 @@ jobs:
- name: Build the project
run: |
dotnet build OTAPI.Mods.slnf
(cd OTAPI.Patcher/bin/Debug/net9.0 && exec dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=${{ matrix.profile.patch_target }} -latest=n --framework net9.0)
(cd OTAPI.Patcher/bin/Debug/net10.0 && exec dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=${{ matrix.profile.patch_target }} -latest=n --framework net10.0)
dotnet build OTAPI.Server.Launcher.slnf
(cd OTAPI.Server.Launcher/bin/Debug/net9.0 && exec dotnet OTAPI.Server.Launcher.dll -test-init)
(cd OTAPI.Server.Launcher/bin/Debug/net10.0 && exec dotnet OTAPI.Server.Launcher.dll -test-init)

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.profile.name }} NuGet Package
path: OTAPI.Patcher/bin/Debug/net9.0/${{ matrix.profile.package_path }}
path: OTAPI.Patcher/bin/Debug/net10.0/${{ matrix.profile.package_path }}

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.profile.name }} Binaries
path: |
OTAPI.Patcher/bin/Debug/net9.0/artifact-*/*
OTAPI.Patcher/bin/Debug/net10.0/artifact-*/*

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.profile.name }} Wiki MD files
path: OTAPI.Patcher/bin/Debug/net9.0/*.mfw.md
path: OTAPI.Patcher/bin/Debug/net10.0/*.mfw.md

- name: "Releasing to NuGet: ${{ matrix.profile.name }}"
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push OTAPI.Patcher/bin/Debug/net9.0/${{ matrix.profile.package_path }} --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY"
run: dotnet nuget push OTAPI.Patcher/bin/Debug/net10.0/${{ matrix.profile.package_path }} --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY"
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,27 +66,27 @@ jobs:
- name: Server patch
run: |
dotnet build OTAPI.Mods.slnf
cd OTAPI.Patcher/bin/Debug/net9.0
dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=${{ matrix.profile.patch_target }} -latest=n --framework net9.0
cd OTAPI.Patcher/bin/Debug/net10.0
dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=${{ matrix.profile.patch_target }} -latest=n --framework net10.0

- name: Server boot
run: |
dotnet build OTAPI.Server.Launcher.slnf
cd OTAPI.Server.Launcher/bin/Debug/net9.0
cd OTAPI.Server.Launcher/bin/Debug/net10.0
dotnet OTAPI.Server.Launcher.dll -test-init

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os.name }} ${{ matrix.profile.name }} NuGet Package
path: OTAPI.Patcher/bin/Debug/net9.0/${{ matrix.profile.package_path }}
path: OTAPI.Patcher/bin/Debug/net10.0/${{ matrix.profile.package_path }}

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os.name }} ${{ matrix.profile.name }} Binaries
path: |
OTAPI.Patcher/bin/Debug/net9.0/artifact-*/*
OTAPI.Patcher/bin/Debug/net10.0/artifact-*/*

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os.name }} ${{ matrix.profile.name }} Wiki MD files
path: OTAPI.Patcher/bin/Debug/net9.0/*.mfw.md
path: OTAPI.Patcher/bin/Debug/net10.0/*.mfw.md
4 changes: 2 additions & 2 deletions OTAPI.Client.Launcher/OTAPI.Client.Launcher.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<DebugType>embedded</DebugType>
<RunPostBuildEvent>Always</RunPostBuildEvent>
Expand Down Expand Up @@ -62,7 +62,7 @@
<PackageReference Include="MonoMod" Version="22.7.31.1">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</PackageReference>
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.2.3">
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.3.3">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</PackageReference>
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions OTAPI.Client.Launcher/Targets/InstallTarget.Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void CopyOTAPI(this IPlatformTarget target, string otapiFolder, IR

File.WriteAllText(Path.Combine(otapiFolder, "Terraria.runtimeconfig.json"), @"{
""runtimeOptions"": {
""tfm"": ""net9.0"",
""tfm"": ""net10.0"",
""framework"": {
""name"": ""Microsoft.NETCore.App"",
""version"": ""9.0.0""
Expand Down Expand Up @@ -419,8 +419,8 @@ public static void GenerateTypings(this IPlatformTarget target, string rootFolde
if (File.Exists(dll))
return Assembly.LoadFile(dll);

exe = Path.Combine(patcherDir, "bin", "Debug", "net9.0", "EmbeddedResources", $"{asr.Name}.exe");
dll = Path.Combine(patcherDir, "bin", "Debug", "net9.0", "EmbeddedResources", $"{asr.Name}.dll");
exe = Path.Combine(patcherDir, "bin", "Debug", "net10.0", "EmbeddedResources", $"{asr.Name}.exe");
dll = Path.Combine(patcherDir, "bin", "Debug", "net10.0", "EmbeddedResources", $"{asr.Name}.dll");

if (File.Exists(exe))
return Assembly.LoadFile(exe);
Expand Down
2 changes: 1 addition & 1 deletion OTAPI.Common/OTAPI.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion OTAPI.Patcher/NugetPackageBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void Build(ModFwModder modder)
var commitSha = Common.GetGitCommitSha();
nuspec_xml = nuspec_xml.Replace("[INJECT_GIT_HASH]", String.IsNullOrWhiteSpace(commitSha) ? "" : $" git#{commitSha}");

var platforms = new[] { "net9.0" }; // relinker only does net9 currently. until there is a reason to implement it...
var platforms = new[] { "net10.0" }; // relinker only does net9 currently. until there is a reason to implement it...
var steamworks = modder.Module.AssemblyReferences.First(x => x.Name == "Steamworks.NET");
var newtonsoft = modder.Module.AssemblyReferences.First(x => x.Name == "Newtonsoft.Json");
var dependencies = new[]
Expand Down
4 changes: 2 additions & 2 deletions OTAPI.Patcher/OTAPI.Patcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Version>3.3.3</Version>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RuntimeIdentifiers>win;osx;linux;</RuntimeIdentifiers>
Expand All @@ -15,7 +15,7 @@
<PackageReference Include="ModFramework.Modules.Lua" Version="1.1.15" />
<PackageReference Include="Steamworks.NET" Version="2024.8.0" />
<PackageReference Include="MonoMod.RuntimeDetour.HookGen" Version="22.7.31.1" />
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.2.3" />
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.3.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="System.Security.Permissions" Version="9.0.2" />
Expand Down
30 changes: 15 additions & 15 deletions OTAPI.Scripts/OTAPI.Scripts.csproj
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
</PropertyGroup>
<Import Condition="Exists('..\OTAPI.Patcher\bin\Debug\net9.0\AutoGenerated.target')" Project="..\OTAPI.Patcher\bin\Debug\net9.0\AutoGenerated.target" />
<Import Condition="Exists('..\OTAPI.Client.Launcher\bin\Debug\net9.0\AutoGenerated.target')" Project="..\OTAPI.Client.Launcher\bin\Debug\net9.0\AutoGenerated.target" />
<Import Condition="Exists('..\OTAPI.Patcher\bin\Debug\net10.0\AutoGenerated.target')" Project="..\OTAPI.Patcher\bin\Debug\net10.0\AutoGenerated.target" />
<Import Condition="Exists('..\OTAPI.Client.Launcher\bin\Debug\net10.0\AutoGenerated.target')" Project="..\OTAPI.Client.Launcher\bin\Debug\net10.0\AutoGenerated.target" />
<ItemGroup>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Patcher\bin\Debug\net9.0\OTAPI.exe')">
<HintPath>..\OTAPI.Patcher\bin\Debug\net9.0\OTAPI.exe</HintPath>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Patcher\bin\Debug\net10.0\OTAPI.exe')">
<HintPath>..\OTAPI.Patcher\bin\Debug\net10.0\OTAPI.exe</HintPath>
</Reference>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Patcher\bin\Debug\net9.0\OTAPI.dll')">
<HintPath>..\OTAPI.Patcher\bin\Debug\net9.0\OTAPI.dll</HintPath>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Patcher\bin\Debug\net10.0\OTAPI.dll')">
<HintPath>..\OTAPI.Patcher\bin\Debug\net10.0\OTAPI.dll</HintPath>
</Reference>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Patcher\bin\Debug\net9.0\OTAPI.Runtime.dll')">
<HintPath>..\OTAPI.Patcher\bin\Debug\net9.0\OTAPI.Runtime.dll</HintPath>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Patcher\bin\Debug\net10.0\OTAPI.Runtime.dll')">
<HintPath>..\OTAPI.Patcher\bin\Debug\net10.0\OTAPI.Runtime.dll</HintPath>
</Reference>
<Reference Include="Steamworks.NET" Condition="Exists('..\OTAPI.Patcher\bin\Debug\net9.0\EmbeddedResources\Steamworks.NET.dll')">
<HintPath>..\OTAPI.Patcher\bin\Debug\net9.0\EmbeddedResources\Steamworks.NET.dll</HintPath>
<Reference Include="Steamworks.NET" Condition="Exists('..\OTAPI.Patcher\bin\Debug\net10.0\EmbeddedResources\Steamworks.NET.dll')">
<HintPath>..\OTAPI.Patcher\bin\Debug\net10.0\EmbeddedResources\Steamworks.NET.dll</HintPath>
</Reference>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Client.Launcher\bin\x64\Debug\net9.0\client\OTAPI.exe')">
<HintPath>..\OTAPI.Client.Launcher\bin\x64\Debug\net9.0\client\OTAPI.exe</HintPath>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Client.Launcher\bin\x64\Debug\net10.0\client\OTAPI.exe')">
<HintPath>..\OTAPI.Client.Launcher\bin\x64\Debug\net10.0\client\OTAPI.exe</HintPath>
</Reference>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Client.Launcher\bin\x64\Debug\net9.0\client\OTAPI.Runtime.dll')">
<HintPath>..\OTAPI.Client.Launcher\bin\x64\Debug\net9.0\client\OTAPI.Runtime.dll</HintPath>
<Reference Include="OTAPI" Condition="Exists('..\OTAPI.Client.Launcher\bin\x64\Debug\net10.0\client\OTAPI.Runtime.dll')">
<HintPath>..\OTAPI.Client.Launcher\bin\x64\Debug\net10.0\client\OTAPI.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions OTAPI.Server.Launcher/OTAPI.Server.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
Expand All @@ -28,7 +28,7 @@
<PackageReference Include="MonoMod" Version="22.7.31.1">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</PackageReference>
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.2.3">
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.3.3">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</PackageReference>
</ItemGroup>
Expand Down
21 changes: 12 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
dotnet restore OTAPI.Mods.slnf
dotnet restore OTAPI.Server.Launcher.slnf
dotnet build OTAPI.Mods.slnf
cd OTAPI.Patcher/bin/Debug/net9.0
dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=p -latest=n --framework net9.0

cd OTAPI.Patcher/bin/Debug/net10.0
dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=p -latest=n --framework net10.0
cd ../../../../
dotnet build OTAPI.Server.Launcher.slnf
cd OTAPI.Server.Launcher/bin/Debug/net9.0
cd OTAPI.Server.Launcher/bin/Debug/net10.0
dotnet OTAPI.Server.Launcher.dll -test-init
cd ../../../../
cd OTAPI.Patcher/bin/Debug/net9.0
dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=m -latest=n --framework net9.0

cd OTAPI.Patcher/bin/Debug/net10.0
dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=m -latest=n --framework net10.0
cd ../../../../
dotnet build OTAPI.Server.Launcher.slnf
cd OTAPI.Server.Launcher/bin/Debug/net9.0
cd OTAPI.Server.Launcher/bin/Debug/net10.0
dotnet OTAPI.Server.Launcher.dll -test-init
cd ../../../../
cd OTAPI.Patcher/bin/Debug/net9.0
dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=t -latest=n --framework net9.0

cd OTAPI.Patcher/bin/Debug/net10.0
dotnet run --project ../../../OTAPI.Patcher.csproj -patchTarget=t -latest=n --framework net10.0
cd ../../../../
dotnet build OTAPI.Server.Launcher.slnf
cd OTAPI.Server.Launcher/bin/Debug/net9.0
cd OTAPI.Server.Launcher/bin/Debug/net10.0
dotnet OTAPI.Server.Launcher.dll -test-init
cd ../../../../
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

Expand Down