Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .sdk-revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
134a524d7cea119a634e9f516b100f9619dce1cb
9dcc4b6d111b109860be294820d0b14b21b8eced
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<DndBuildNative Condition="'$(DndBuildNative)' == ''">false</DndBuildNative>
<IsPackable>false</IsPackable>
<DolphinDotNetPackageVersion>0.1.0-preview.374.1</DolphinDotNetPackageVersion>
<DolphinDotNetPackageVersion>0.1.0-preview.376.1</DolphinDotNetPackageVersion>
<HypercubeNativePasses Condition="'$(HypercubeNativePasses)' == ''">true</HypercubeNativePasses>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
Expand Down
43 changes: 21 additions & 22 deletions docs/nuget.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,30 @@ streaming adapters and depends on Core plus a specific published
DolphinDotNet.GameCube version. The DolphinDotNet MSBuild SDK/compiler is a
separate application requirement; it is not copied into an engine library nupkg.
`Directory.Build.props` pins the package dependency version to
`DolphinDotNet.GameCube` **0.1.0-preview.374.1**. The matching compiler/runtime
source is **134a524d7cea119a634e9f516b100f9619dce1cb**, also pinned in
`DolphinDotNet.GameCube` **0.1.0-preview.376.1**. The matching compiler/runtime
source is **9dcc4b6d111b109860be294820d0b14b21b8eced**, also pinned in
`.sdk-revision` for source validation. Ordered passes retain their native SDK
backend by default; the portable comparison remains available through
`HypercubeNativePasses=false`.

The current SDK adds `Dolphin.IO.LaunchContext` for bounded incoming GameCube
launcher arguments, used by AnimalTown's standalone Dolphin Depot app profile.
The external consumer also bundles this API and checks that the SDK includes
its launch capture before managed startup. Existing rendering and full-resolution
AA capabilities remain in the same exact SDK dependency closure.

This upgrade accompanies [AnimalTown #47](https://github.com/capz/AnimalTown/pull/47).
SDK 318 exposes independent TEV alpha stages, two-reference GX comparisons and
`TevMaterialPresets.DualTextureGlints` for its two scrolling water samples.
Hypercube's scrolling helpers use these materials through the existing SDK API;
no separate effect format, shader wrapper or texture allocation is introduced.
The relocated package consumer builds/AOT-bundles this combination with a single
engine reference and no runtime override or NU1608 suppression.

Once this engine preview has been verified and published, AnimalTown can pin
that published version in place of engine 28 and remove its temporary explicit
runtime-318 compatibility override. Engine previews are published only by the
existing release workflow after its publication trigger; this PR does not
reserve a future package number or publish an unverified package.
The current SDK adds `Dolphin.IO.LaunchContent` to resolve and mount content from
the incoming GameCube launch device and directory, with explicit fallback
locations and an application identity validator. AnimalTown can use this SDK
API for its standalone Dolphin Depot app profile. The relocated package consumer
builds and AOT-bundles a content resolver with a validator and generation-bound
file access, and checks that the SDK captures launcher arguments before managed
startup. See the [SDK launch-content contract](https://github.com/capz/DolphinDotNet/blob/9dcc4b6d111b109860be294820d0b14b21b8eced/docs/launch-context.md)
for source selection, ownership and emulator limitations.

Existing native ordered passes, rendering, full-resolution AA and scrolling
water material capabilities remain in the same exact SDK dependency closure.
The relocated consumer builds these APIs with a single engine reference and no
runtime override or NU1608 suppression.

AnimalTown must pin a verified, published engine preview containing this SDK
dependency before consuming the combination. Engine previews are published only
by the existing release workflow after its publication trigger; this update
does not reserve a future package number or publish an unverified package.

## Build and test without publishing

Expand All @@ -50,7 +49,7 @@ The consumer relocates the nupkgs, uses an isolated NuGet cache outside the
repository, executes Core, then builds the Rendering sample and water-material consumer through PackageReference
and the published DolphinDotNet SDK. It verifies transitive dependencies, confirms the SDK packages match the reviewed
source revision in `.sdk-revision`, and checks AOT bundling and, with --native,
actual Rendering and water DOL/ELF output. No SDK source checkout is
actual Rendering, launch-content and water DOL/ELF output. No SDK source checkout is
needed to consume the packages.

## Publish
Expand Down
2 changes: 1 addition & 1 deletion eng/package-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dotnet add package Capz.Hypercube.GameCube --prerelease
```

GameCube depends on Core and DolphinDotNet.GameCube. Use a GameCube application
with `DolphinDotNet.Sdk/0.1.0-preview.318.1` and a matching
with `DolphinDotNet.Sdk/0.1.0-preview.376.1` and a matching
`DolphinDotNet.GameCube` package. These engine packages contain managed libraries
and PDBs, not the native compiler or a replacement SDK. Build the application with
the DolphinDotNet SDK to produce a GameCube DOL. Do not execute graphics adapters
Expand Down
25 changes: 21 additions & 4 deletions tests/nuget_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,32 @@ class Program {static void Main(){var q=new OpaqueDrawQueue(2);q.TryAdd(1,2,0xff
if not (work/'native-consumer/source/generated_program.c').is_file():raise AssertionError('No consumer AOT bundle')
launch=work/'Launch';launch.mkdir()
(launch/'Launch.csproj').write_text((app/'GameCube.csproj').read_text())
(launch/'Program.cs').write_text('''using Dolphin.IO;
internal static class Program {static int Main(){return LaunchContext.ArgumentCount==0?0:LaunchContext.ExecutablePath.Length;}}
(launch/'Program.cs').write_text('''using Dolphin.IO;using Dolphin.Storage;
internal static class Program {
private static bool Validate(LaunchContent content) {
using var stream=content.OpenRead("content.id");
return stream.Length>0;
}
static int Main() {
var result=LaunchContent.Mount(new LaunchContentOptions {
Fallbacks=new[]{new LaunchContentLocation(MountConfiguration.Disc())},
Validate=Validate
});
if(!result.Succeeded)return -(int)result.Failure;
using var content=result.Content!;
return content.IsValid?content.RootPath.Length:1;
}
}
''')
run('dotnet','build',str(launch),'-c','Release','-p:DndBuildNative=false','-warnaserror:NU1608')
run('dotnet',str(compiler),'--bundle',str(launch/'bin/Release/net8.0/Launch.dll'),str(work/'native-launch'))
if '-DDND_CAPTURE_LAUNCH_ARGUMENTS' not in (work/'native-launch/Makefile').read_text():
raise AssertionError('Published SDK did not enable incoming launch-context capture')
if 'dnd_launch_count(' not in (work/'native-launch/source/generated_program.c').read_text():
launch_source=(work/'native-launch/source/generated_program.c').read_text()
if 'dnd_launch_count(' not in launch_source:
raise AssertionError('Published launch-context call missing from AOT consumer')
if 'dnd_storage_open_mounted(' not in launch_source:
raise AssertionError('Published launch-content consumer omitted generation-bound file access')
# Exercise the distributed default backend, rather than only compiling
# the stubbed contract test or the source-checkout adapter.
ordered=work/'Ordered';ordered.mkdir()
Expand All @@ -91,7 +108,7 @@ class Program {static void Main(){var q=new OpaqueDrawQueue(2);q.TryAdd(1,2,0xff
run('dotnet',str(compiler),'--bundle',str(water/'bin/Release/net8.0/Water.dll'),str(work/'native-water'))
if not (work/'native-water/source/generated_program.c').is_file():raise AssertionError('No water alpha AOT bundle')
if args.native:
for project in (app,water):
for project in (app,launch,water):
run('dotnet','build',str(project),'-c','Release','-p:DndBuildBackend=Docker')
if not list(project.rglob('*.dol')) or not list(project.rglob('*.elf')):raise AssertionError('No external native executable: '+project.name)
print('External NuGet restore, dependency closure and consumer checks passed')
Expand Down
Loading