Skip to content

Commit d76bca9

Browse files
authored
Merge pull request #27 from Sewer56/fix-build-stuff
Fixed: Build Stuff & Other Regressions from PR 24
2 parents b526438 + 1ba2085 commit d76bca9

File tree

14 files changed

+23
-19
lines changed

14 files changed

+23
-19
lines changed

.github/workflows/reloaded.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ env:
6565
PUBLISH_PATH: ./Publish
6666

6767
# Default value is official Reloaded package server.
68-
NUGET_URL: http://packages.sewer56.moe:5000/v3/index.json
68+
NUGET_URL: https://packages.sewer56.moe/v3/index.json
6969

7070
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') }}
7171
RELEASE_TAG: ${{ github.ref_name }}
@@ -88,10 +88,10 @@ jobs:
8888
with:
8989
dotnet-version: 5.0.x
9090

91-
- name: Setup .NET Core SDK (7.0)
91+
- name: Setup .NET Core SDK (9.0)
9292
uses: actions/setup-dotnet@v3
9393
with:
94-
dotnet-version: 7.0.x
94+
dotnet-version: 9.0.x
9595

9696
- name: Setup Node.js
9797
uses: actions/setup-node@v2

Emulator/AFS.Stream.Emulator/AFS.Stream.Emulator.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0-windows</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
66
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
7-
<LangVersion>preview</LangVersion>
7+
<LangVersion>10.0</LangVersion>
88
<Nullable>enable</Nullable>
99
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
1010
<OutputPath>$(RELOADEDIIMODS)/reloaded.universal.fileemulationframework.afs</OutputPath>
@@ -48,6 +48,7 @@
4848

4949
<ItemGroup>
5050
<PackageReference Include="AFSLib" Version="1.1.1" />
51+
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.3" />
5152
<PackageReference Include="Reloaded.Memory" Version="9.3.2" />
5253
<PackageReference Include="Reloaded.Mod.Interfaces" Version="2.3.0" ExcludeAssets="runtime" />
5354
</ItemGroup>

Emulator/AFS.Stream.Emulator/Afs/AfsBuilder.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using FileEmulationFramework.Lib.Utilities;
77
using Microsoft.Win32.SafeHandles;
88
using Reloaded.Memory.Extensions;
9-
using Reloaded.Memory.Streams;
9+
using StreamExtensions = FileEmulationFramework.Lib.Utilities.StreamExtensions;
1010

1111
// Aliasing for readability, since our assembly name has priority over 'stream'
1212
using Strim = System.IO.Stream;
@@ -151,7 +151,8 @@ private AfsFileEntry[] GetEntriesFromFile(IntPtr handle)
151151
ThrowHelpers.IO("Failed to read original AFS header start.");
152152

153153
var entries = GC.AllocateUninitializedArray<AfsFileEntry>(header.NumberOfFiles);
154-
if (!stream.TryRead(MemoryMarshal.Cast<AfsFileEntry, byte>(entries), out _))
154+
var byteSpan = MemoryMarshal.Cast<AfsFileEntry, byte>(entries);
155+
if (!StreamExtensions.TryRead(stream, byteSpan, out _))
155156
ThrowHelpers.IO("Failed to read original AFS header pos+offset.");
156157

157158
return entries;

Emulator/ARC.Stream.Emulator/ARC.Stream.Emulator.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
66
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
7-
<LangVersion>preview</LangVersion>
7+
<LangVersion>10.0</LangVersion>
88
<Nullable>enable</Nullable>
99
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
1010
<OutputPath>$(RELOADEDIIMODS)/reloaded.universal.fileemulationframework.arc</OutputPath>
@@ -45,6 +45,7 @@
4545
</ItemGroup>
4646

4747
<ItemGroup>
48+
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.3" />
4849
<PackageReference Include="Reloaded.Memory" Version="9.3.2" />
4950
<PackageReference Include="Reloaded.Mod.Interfaces" Version="2.3.0" ExcludeAssets="runtime" />
5051
</ItemGroup>

Emulator/ARC.Stream.Emulator/Arc/ArcBuilder.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using FileEmulationFramework.Lib.Utilities;
77
using Microsoft.Win32.SafeHandles;
88
using Reloaded.Memory.Extensions;
9-
using Reloaded.Memory.Streams;
9+
using StreamExtensions = FileEmulationFramework.Lib.Utilities.StreamExtensions;
1010

1111
// Aliasing for readability, since our assembly name has priority over 'stream'
1212
using Strim = System.IO.Stream;
@@ -112,7 +112,8 @@ private ArcFileEntry[] GetEntriesFromFile(IntPtr handle)
112112

113113
var entries = GC.AllocateUninitializedArray<ArcFileEntry>(header.GetNumberOfFiles());
114114
RandXoringStream input = new RandXoringStream(stream, header.GetNumberOfFiles());
115-
if (!input.TryRead(MemoryMarshal.Cast<ArcFileEntry, byte>(entries), out _))
115+
var byteSpan = MemoryMarshal.Cast<ArcFileEntry, byte>(entries);
116+
if (!StreamExtensions.TryRead(input, result: byteSpan, numBytesRead: out _))
116117
ThrowHelpers.IO("Failed to read original ARC header pos+offset.");
117118

118119
input.Dispose();

Emulator/AWB.Stream.Emulator/AWB.Stream.Emulator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
</ItemGroup>
4545

4646
<ItemGroup>
47+
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.3" />
4748
<PackageReference Include="Reloaded.Memory" Version="9.3.2" />
4849
<PackageReference Include="Reloaded.Mod.Interfaces" Version="2.3.0" ExcludeAssets="runtime" />
4950
<PackageReference Include="Reloaded.Memory.SigScan.ReloadedII.Interfaces" Version="1.2.0" />

Emulator/BF.File.Emulator/BF.File.Emulator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
</ItemGroup>
4747

4848
<ItemGroup>
49+
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.3" />
4950
<PackageReference Include="Reloaded.Mod.Interfaces" Version="2.3.0" ExcludeAssets="runtime" />
5051
<PackageReference Include="Reloaded.SharedLib.Hooks" Version="1.9.0" />
5152
</ItemGroup>

Emulator/BMD.File.Emulator/BMD.File.Emulator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
</ItemGroup>
4747

4848
<ItemGroup>
49+
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.3" />
4950
<PackageReference Include="Reloaded.Mod.Interfaces" Version="2.3.0" ExcludeAssets="runtime" />
5051
<PackageReference Include="Reloaded.SharedLib.Hooks" Version="1.9.0" />
5152
</ItemGroup>

Emulator/ONE.Heroes.Stream.Emulator/ONE.Heroes.Stream.Emulator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
</ItemGroup>
4949

5050
<ItemGroup>
51+
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.3" />
5152
<PackageReference Include="Reloaded.Memory" Version="9.3.2" />
5253
<PackageReference Include="Reloaded.Mod.Interfaces" Version="2.3.0" ExcludeAssets="runtime" />
5354
<PackageReference Include="Reloaded.SharedLib.CSharp.Prs.Interfaces" Version="1.0.2" />

Emulator/PAK.Stream.Emulator/PAK.Stream.Emulator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
</ItemGroup>
4747

4848
<ItemGroup>
49+
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.3" />
4950
<PackageReference Include="Reloaded.Memory" Version="9.3.2" />
5051
<PackageReference Include="Reloaded.Mod.Interfaces" Version="2.3.0" ExcludeAssets="runtime" />
5152
<PackageReference Include="Reloaded.Memory.SigScan.ReloadedII.Interfaces" Version="1.2.0" />

0 commit comments

Comments
 (0)