Skip to content

Commit

Permalink
Update various comments from net6=>9
Browse files Browse the repository at this point in the history
  • Loading branch information
SignatureBeef committed Dec 28, 2024
1 parent 613d783 commit 7ba00f8
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
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 net6 currently. until there is a reason to implement it...
var platforms = new[] { "net9.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
2 changes: 1 addition & 1 deletion OTAPI.Patcher/Targets/IPatchTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static void CreateRuntimeHooks(this ModFwModder modder, string output)

GACPaths = new string[] { } // avoid MonoMod looking up the GAC, which causes an exception on .netcore
};
mm.Log($"[OTAPI] Processing corelibs to be net6: {fileName}");
mm.Log($"[OTAPI] Processing corelibs to be net9: {fileName}");

mm.Read();

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The [upcoming branch](https://github.com/SignatureBeef/Open-Terraria-API/tree/up
Significant changes this redesign brings are...
* Modular script system, allowing single file patches using [csharp](https://www.nuget.org/packages/ModFramework.Modules.CSharp/), [javascript](https://www.nuget.org/packages/ModFramework.Modules.ClearScript/) and [lua](https://www.nuget.org/packages/ModFramework.Modules.Lua/)
* A strong set of libraries with methods and extensions for use in extending or contributing back
* .NET6 projects for all without Terraria's dependency to net4.
* .NET9 projects for all without Terraria's dependency to net4.

The stack consists upon:
* [OTAPI Scripts](https://github.com/SignatureBeef/Open-Terraria-API/tree/upcoming/OTAPI.Scripts), a directory containing all the scripts used to patch the pc, mobile & client assemblies.
Expand Down
6 changes: 3 additions & 3 deletions docs/OTAPI.Mobile.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

OTAPI is primarily a server modification and is available as a cross platform package via NuGet.

Version 3.0 is now a .NET6 library thanks to ModFramework being able to retarget the .NET4 vanilla assembly up to .NET6.
This means that any mod you create can be written as a .NET6 module and later merged into the patched assembly thanks to MonoMod.
Version 3.0 is now a .NET9 library thanks to ModFramework being able to retarget the .NET4 vanilla assembly up to .NET9.
This means that any mod you create can be written as a .NET9 module and later merged into the patched assembly thanks to MonoMod.

Here is what is now possible:
- Native Runtime hooks, just reference OTAPI.Runtime.dll and register to MonoMod events generated from the Terraria assembly.
- Full .NET6 ecosystem and its performance improvements. No need for two targets such as Windows & Mono anymore either.
- Full .9 ecosystem and its performance improvements. No need for two targets such as Windows & Mono anymore either.
- A new optional internal module system via ModFramework to load precompiled dll's, .cs files or even top level classes.
- A strong set of libraries with methods and extensions to help you build more mods.
- Create 1 file MonoMod patches to rewrite or inject new meta data to the assembly.
Expand Down
6 changes: 3 additions & 3 deletions docs/OTAPI.PC.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

OTAPI is primarily a server modification and is available as a cross platform package via NuGet.

Version 3.0 is now a .NET6 library thanks to ModFramework being able to retarget the .NET4 vanilla assembly up to .NET6.
This means that any mod you create can be written as a .NET6 module and later merged into the patched assembly thanks to MonoMod.
Version 3.0 is now a .NET9 library thanks to ModFramework being able to retarget the .NET4 vanilla assembly up to .NET9.
This means that any mod you create can be written as a .NET9 module and later merged into the patched assembly thanks to MonoMod.

Here is what is now possible:
- Native Runtime hooks, just reference OTAPI.Runtime.dll and register to MonoMod events generated from the Terraria assembly.
- Full .NET6 ecosystem and its performance improvements. No need for two targets such as Windows & Mono anymore either.
- Full .NET9 ecosystem and its performance improvements. No need for two targets such as Windows & Mono anymore either.
- A new optional internal module system via ModFramework to load precompiled dll's, .cs files or even top level classes.
- A strong set of libraries with methods and extensions to help you build more mods.
- Create 1 file MonoMod patches to rewrite or inject new meta data to the assembly.
Expand Down
6 changes: 3 additions & 3 deletions docs/OTAPI.TML.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

OTAPI is primarily a server modification and is available as a cross platform package via NuGet.

Version 3.0 is now a .NET6 library thanks to ModFramework being able to retarget the .NET4 vanilla assembly up to .NET6.
This means that any mod you create can be written as a .NET6 module and later merged into the patched assembly thanks to MonoMod.
Version 3.0 is now a .9 library thanks to ModFramework being able to retarget the .NET4 vanilla assembly up to .NET9.
This means that any mod you create can be written as a .NET9 module and later merged into the patched assembly thanks to MonoMod.

Here is what is now possible:
- Native Runtime hooks, just reference OTAPI.Runtime.dll and register to MonoMod events generated from the Terraria assembly.
- Full .NET6 ecosystem and its performance improvements. No need for two targets such as Windows & Mono anymore either.
- Full .NET9 ecosystem and its performance improvements. No need for two targets such as Windows & Mono anymore either.
- A new optional internal module system via ModFramework to load precompiled dll's, .cs files or even top level classes.
- A strong set of libraries with methods and extensions to help you build more mods.
- Create 1 file MonoMod patches to rewrite or inject new meta data to the assembly.
Expand Down
4 changes: 2 additions & 2 deletions examples/RuntimeExample.Client/RuntimeExample.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<HintPath>..\..\OTAPI.Client.Installer\bin\Debug\net472\OTAPI.Runtime.dll</HintPath>
</Reference>
<Reference Include="OTAPI">
<HintPath>..\..\OTAPI.Patcher\bin\Debug\net6.0\OTAPI.exe</HintPath>
<HintPath>..\..\OTAPI.Patcher\bin\Debug\net9.0\OTAPI.exe</HintPath>
</Reference>
<Reference Include="FNA">
<HintPath>..\..\OTAPI.Patcher\bin\Debug\net6.0\FNA.dll</HintPath>
<HintPath>..\..\OTAPI.Patcher\bin\Debug\net9.0\FNA.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
20 changes: 10 additions & 10 deletions start-server.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Write-RuntimeConfig {

$runtimejson = @{
"runtimeOptions"= @{
"tfm"= "net6.0"
"tfm"= "net9.0"
"framework"= @{
"name"= "Microsoft.NETCore.App"
"version"= "6.0.0"
Expand All @@ -31,8 +31,8 @@ function PC-Server {
Find-Package -Name Mono.Cecil -ProviderName NuGet | Install-Package -Destination ./server/packages -SkipDependencies
Find-Package -Name Newtonsoft.Json -ProviderName NuGet | Install-Package -Destination ./server/packages -SkipDependencies

Copy-Item "./server/packages/OTAPI.Upcoming.3*/lib/net6.0/OTAPI.dll" -Destination "./server/pc/"
Copy-Item "./server/packages/ModFramework*/lib/net6.0/ModFramework.dll" -Destination "./server/pc/"
Copy-Item "./server/packages/OTAPI.Upcoming.3*/lib/net9.0/OTAPI.dll" -Destination "./server/pc/"
Copy-Item "./server/packages/ModFramework*/lib/net9.0/ModFramework.dll" -Destination "./server/pc/"
Copy-Item "./server/packages/MonoMod*/lib/net5.0/MonoMod.dll" -Destination "./server/pc/"
Copy-Item "./server/packages/MonoMod.Utils*/lib/net5.0/MonoMod.Utils.dll" -Destination "./server/pc/"
Copy-Item "./server/packages/MonoMod.RuntimeDetour*/lib/net5.0/MonoMod.RuntimeDetour.dll" -Destination "./server/pc/"
Expand Down Expand Up @@ -60,8 +60,8 @@ function Mobile-Server {
Find-Package -Name Newtonsoft.Json -ProviderName NuGet | Install-Package -Destination ./server/packages -SkipDependencies
Find-Package -Name System.IO.Packaging -ProviderName NuGet | Install-Package -Destination ./server/packages -SkipDependencies

Copy-Item "./server/packages/OTAPI.Upcoming.Mobile*/lib/net6.0/OTAPI.dll" -Destination "./server/mobile/"
Copy-Item "./server/packages/ModFramework*/lib/net6.0/ModFramework.dll" -Destination "./server/mobile/"
Copy-Item "./server/packages/OTAPI.Upcoming.Mobile*/lib/net9.0/OTAPI.dll" -Destination "./server/mobile/"
Copy-Item "./server/packages/ModFramework*/lib/net9.0/ModFramework.dll" -Destination "./server/mobile/"
Copy-Item "./server/packages/MonoMod*/lib/net5.0/MonoMod.dll" -Destination "./server/mobile/"
Copy-Item "./server/packages/MonoMod.Utils*/lib/net5.0/MonoMod.Utils.dll" -Destination "./server/mobile/"
Copy-Item "./server/packages/MonoMod.RuntimeDetour*/lib/net5.0/MonoMod.RuntimeDetour.dll" -Destination "./server/mobile/"
Expand Down Expand Up @@ -98,11 +98,11 @@ function TML-Server {

Expand-Archive -Force ./server/tModLoader.zip -DestinationPath ./server/tModLoader

Copy-Item "./server/packages/OTAPI.Upcoming.tModLoader*/lib/net6.0/OTAPI.dll" -Destination "./server/tModLoader/"
Copy-Item "./server/packages/OTAPI.Upcoming.tModLoader*/lib/net6.0/OTAPI.Runtime.dll" -Destination "./server/tModLoader/"
Copy-Item "./server/packages/OTAPI.Upcoming.tModLoader*/lib/net9.0/OTAPI.dll" -Destination "./server/tModLoader/"
Copy-Item "./server/packages/OTAPI.Upcoming.tModLoader*/lib/net9.0/OTAPI.Runtime.dll" -Destination "./server/tModLoader/"

New-Item -ItemType Directory -Force -Path ./server/tModLoader/Libraries/ModFramework/1.0.46-alpha/lib/net6.0
Copy-Item "./server/packages/ModFramework*/lib/net6.0/ModFramework.dll" -Destination "./server/tModLoader/Libraries/ModFramework/1.0.46-alpha/lib/net6.0"
New-Item -ItemType Directory -Force -Path ./server/tModLoader/Libraries/ModFramework/1.0.46-alpha/lib/net9.0
Copy-Item "./server/packages/ModFramework*/lib/net().0/ModFramework.dll" -Destination "./server/tModLoader/Libraries/ModFramework/1.0.46-alpha/lib/net9.0"

New-Item -ItemType Directory -Force -Path ./server/tModLoader/Libraries/monomod/22.5.1.1/lib/net5.0
Copy-Item "./server/packages/MonoMod*/lib/net5.0/MonoMod.dll" -Destination "./server/tModLoader/Libraries/monomod/22.5.1.1/lib/net5.0"
Expand Down Expand Up @@ -154,7 +154,7 @@ function TML-Server {
}
}

Add-Deps-Package -AssemblyName "ModFramework" -AssemblyVersion "1.0.46-alpha" -FrameworkVersion "net6.0"
Add-Deps-Package -AssemblyName "ModFramework" -AssemblyVersion "1.0.46-alpha" -FrameworkVersion "net9.0"
Add-Deps-Package -AssemblyName "MonoMod" -AssemblyVersion "22.5.1.1" -FrameworkVersion "net5.0"

$json = $deps | ConvertTo-Json -Depth 100
Expand Down

0 comments on commit 7ba00f8

Please sign in to comment.