mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
C#: Make editor create NuGet fallback folder for Godot packages
Main benefits: - Projects can be built offline. Previously you needed internet access the first time building to download the packages. - Changes to packages like Godot.NET.Sdk can be easily tested before publishing. This was already possible but required too many manual steps. - First time builds are a bit faster, as the Sdk package doesn't need to be downloaded. In practice, the package is very small so it makes little difference. Bumped Godot.NET.Sdk to 4.0.0-dev3 in order to enable the recent changes regarding '.mono/' -> '.godot/mono/'.
This commit is contained in:
parent
d5073c6b4c
commit
64b5ee7010
13 changed files with 472 additions and 6 deletions
|
|
@ -7,7 +7,6 @@ using JetBrains.Annotations;
|
|||
using static GodotTools.Internals.Globals;
|
||||
using File = GodotTools.Utils.File;
|
||||
using OS = GodotTools.Utils.OS;
|
||||
using Path = System.IO.Path;
|
||||
|
||||
namespace GodotTools.Build
|
||||
{
|
||||
|
|
@ -209,6 +208,16 @@ namespace GodotTools.Build
|
|||
if (!File.Exists(GodotSharpDirs.ProjectSlnPath))
|
||||
return true; // No solution to build
|
||||
|
||||
try
|
||||
{
|
||||
// Make sure our packages are added to the fallback folder
|
||||
NuGetUtils.AddBundledPackagesToFallbackFolder(NuGetUtils.GodotFallbackFolderPath);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Godot.GD.PushError("Failed to setup Godot NuGet Offline Packages: " + e.Message);
|
||||
}
|
||||
|
||||
GenerateEditorScriptMetadata();
|
||||
|
||||
if (GodotSharpEditor.Instance.SkipBuildBeforePlaying)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue