Set Sandbox.Engine as default project (#3579)

* Also get rid of unused method in Project.Solution.cs
This commit is contained in:
Tony Ferguson
2025-12-10 10:45:46 +00:00
committed by GitHub
parent c227181ca2
commit 0d5eccf4e2
2 changed files with 1 additions and 64 deletions

View File

@@ -50,7 +50,7 @@
<Project Path="Mounting/Sandbox.Mounting/Sandbox.Mounting.csproj" />
</Folder>
<Folder Name="/Engine/Tier1/">
<Project Path="Sandbox.Engine/Sandbox.Engine.csproj" />
<Project Path="Sandbox.Engine/Sandbox.Engine.csproj" DefaultStartup="true" />
</Folder>
<Folder Name="/Engine/Tier2/">
<Project Path="Sandbox.AppSystem/Sandbox.AppSystem.csproj" />

View File

@@ -299,67 +299,4 @@ public sealed partial class Project
return project;
}
async Task<string[]> FindReferences( string packageIdent )
{
//
// If we have this package locally installed, then use that one
//
var localAddon = Project.FindByIdent( packageIdent );
if ( localAddon != null && localAddon.Active )
{
return new[] { $"{packageIdent}" };
}
//
// Is this a valid package name etc?
//
if ( !Package.TryParseIdent( packageIdent, out var parts ) )
return null;
//
// Find the package with the dll and download it
//
var package = await Package.Fetch( packageIdent, false );
if ( package == null || package.Revision == null ) return null;
// download the manifest
await package.Revision.DownloadManifestAsync( default );
EngineFileSystem.Root.CreateDirectory( "/.source2/references" );
// PAINDAY: Remove legacy check
var dlls = package.Revision.Manifest.Files.Where( x => x.Path == ".assembly" || (x.Path.EndsWith( ".dll" ) && x.Path != ".assembly/dynamic.base.dll") ).ToArray();
// This is fine/normal - this package has no assemblies
if ( !dlls.Any() ) return null;
List<string> assemblies = new List<string>();
foreach ( var dll in dlls )
{
var filename = $"{package.Org.Ident}.{package.Ident}.{package.Revision.VersionId}.{dll.Crc}.dll";
string dllPath = $"/.source2/references/{filename}";
dllPath = EngineFileSystem.Root.GetFullPath( dllPath );
//
// Have we already got this dll? Just use it then dummy
//
if ( System.IO.File.Exists( dllPath ) )
{
assemblies.Add( dllPath );
continue;
}
// WTF WTF WHAT THE FUCK
var gameDll = await Sandbox.Utility.Web.GrabFile( $"{dll.Url}", default );
Log.Trace( $"Caching Referenced assembly for {packageIdent}.." );
System.IO.File.WriteAllBytes( dllPath, gameDll );
assemblies.Add( dllPath );
}
return assemblies.ToArray();
}
}