Skip to content

Commit

Permalink
Update NuGet packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed May 20, 2024
1 parent eb311ec commit 353df96
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="PolyShim" Version="1.9.0" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.28.2" PrivateAssets="all" />
<PackageReference Include="PolyShim" Version="1.10.0" PrivateAssets="all" />
<PackageReference Include="QuickJson" Version="1.1.0" PrivateAssets="all" />
</ItemGroup>

Expand Down
12 changes: 6 additions & 6 deletions DotnetRuntimeBootstrapper.AppHost.Core/BootstrapperBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ private void HandleException(Exception exception)
.Version.ToString(3);

var content = $"""
Description: Bootstrapper for a .NET application has failed.
Application: {applicationName}
Path: {applicationFilePath}
AppHost: .NET Runtime Bootstrapper v{bootstrapperVersion}
Description: Bootstrapper for a .NET application has failed.
Application: {applicationName}
Path: {applicationFilePath}
AppHost: .NET Runtime Bootstrapper v{bootstrapperVersion}

{exception}
""";
{exception}
""";

EventLog.WriteEntry(".NET Runtime", content, EventLogEntryType.Error, 1023);
}
Expand Down
12 changes: 6 additions & 6 deletions DotnetRuntimeBootstrapper.AppHost.Core/Dotnet/DotnetHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ private nint Initialize(string targetFilePath, string[] args)

throw new BootstrapperException(
$"""
Failed to initialize .NET host.
- Target: {targetFilePath}
- Arguments: [{string.Join(", ", args)}]
- Status: {status}
- Error: {error}
"""
Failed to initialize .NET host.
- Target: {targetFilePath}
- Arguments: [{string.Join(", ", args)}]
- Status: {status}
- Error: {error}
"""
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="PolyShim" Version="1.9.0" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.28.2" PrivateAssets="all" />
<PackageReference Include="PolyShim" Version="1.10.0" PrivateAssets="all" />
<PackageReference Include="QuickJson" Version="1.1.0" PrivateAssets="all" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ private string GetInstallerDownloadUrl()

// Find the installer download URL applicable for the current system
return Json
// Find the list of files for the latest release
.TryParse(manifest)
// Find the list of files for the latest release
.TryParse(manifest)
?.TryGetChild("releases")
?.TryGetChild(0)
?.TryGetChild(
Expand All @@ -59,22 +59,20 @@ runtime switch
?.TryGetChild("files")
?.EnumerateChildren()
// Filter by processor architecture
.Where(
f =>
string.Equals(
f.TryGetChild("rid")?.TryGetString(),
"win-" + OperatingSystemEx.ProcessorArchitecture.GetMoniker(),
StringComparison.OrdinalIgnoreCase
)
.Where(f =>
string.Equals(
f.TryGetChild("rid")?.TryGetString(),
"win-" + OperatingSystemEx.ProcessorArchitecture.GetMoniker(),
StringComparison.OrdinalIgnoreCase
)
)
// Filter by file type
.Where(
f =>
string.Equals(
f.TryGetChild("name")?.TryGetString()?.Pipe(Path.GetExtension),
".exe",
StringComparison.OrdinalIgnoreCase
)
.Where(f =>
string.Equals(
f.TryGetChild("name")?.TryGetString()?.Pipe(Path.GetExtension),
".exe",
StringComparison.OrdinalIgnoreCase
)
)
.Select(f => f.TryGetChild("url")?.TryGetString())
.FirstOrDefault()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ internal class WindowsUpdate3063858Prerequisite : IPrerequisite
OperatingSystemEx.Version >= OperatingSystemVersion.Windows8
|| OperatingSystemEx
.GetInstalledUpdates()
.Any(
u =>
string.Equals(u, Id, StringComparison.OrdinalIgnoreCase)
||
// Supersession (https://github.com/Tyrrrz/LightBulb/issues/209)
string.Equals(u, "KB3068708", StringComparison.OrdinalIgnoreCase)
.Any(u =>
string.Equals(u, Id, StringComparison.OrdinalIgnoreCase)
||
// Supersession (https://github.com/Tyrrrz/LightBulb/issues/209)
string.Equals(u, "KB3068708", StringComparison.OrdinalIgnoreCase)
);

private string GetInstallerDownloadUrl()
Expand Down
9 changes: 4 additions & 5 deletions DotnetRuntimeBootstrapper.AppHost.Core/TargetAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ private DotnetRuntime[] GetRuntimes()
// If the app targets .NET 5 desktop and .NET 6 base,
// we still need to keep the base.
// Very unlikely that such a situation will happen though.
runtimes.RemoveAll(
r =>
r.IsBase
&& r.Version.Major == desktopRuntime.Version.Major
&& r.Version <= desktopRuntime.Version
runtimes.RemoveAll(r =>
r.IsBase
&& r.Version.Major == desktopRuntime.Version.Major
&& r.Version <= desktopRuntime.Version
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="PolyShim" Version="1.9.0" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.28.2" PrivateAssets="all" />
<PackageReference Include="PolyShim" Version="1.10.0" PrivateAssets="all" />
<PackageReference Include="QuickJson" Version="1.1.0" PrivateAssets="all" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.28.2" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.28.2" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
26 changes: 10 additions & 16 deletions DotnetRuntimeBootstrapper/BootstrapperTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,8 @@ private void InjectConfiguration()
new ReaderParameters { ReadWrite = true }
);

assembly.MainModule.Resources.RemoveAll(
r =>
string.Equals(
r.Name,
"BootstrapperConfiguration",
StringComparison.OrdinalIgnoreCase
)
assembly.MainModule.Resources.RemoveAll(r =>
string.Equals(r.Name, "BootstrapperConfiguration", StringComparison.OrdinalIgnoreCase)
);

assembly.MainModule.Resources.Add(
Expand Down Expand Up @@ -121,15 +116,14 @@ private void InjectResources()
}

// Modify the version info resource
targetPortableExecutable.SetVersionInfo(
v =>
v.SetFileType(FileType.Application)
.SetAttribute(VersionAttributeName.InternalName, AppHostFileName)
.SetAttribute(VersionAttributeName.OriginalFilename, AppHostFileName)
.SetAttribute(
"AppHost",
$".NET Runtime Bootstrapper v{Version.ToString(3)} ({Variant})"
)
targetPortableExecutable.SetVersionInfo(v =>
v.SetFileType(FileType.Application)
.SetAttribute(VersionAttributeName.InternalName, AppHostFileName)
.SetAttribute(VersionAttributeName.OriginalFilename, AppHostFileName)
.SetAttribute(
"AppHost",
$".NET Runtime Bootstrapper v{Version.ToString(3)} ({Variant})"
)
);

Log.LogMessage("Injected resources into '{0}'.", AppHostFileName);
Expand Down
8 changes: 4 additions & 4 deletions DotnetRuntimeBootstrapper/DotnetRuntimeBootstrapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Framework" Version="17.8.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.8.3" PrivateAssets="all" ExcludeAssets="runtime" />
<PackageReference Include="CSharpier.MsBuild" Version="0.28.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Framework" Version="17.9.5" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.9.5" PrivateAssets="all" ExcludeAssets="runtime" />
<PackageReference Include="Mono.Cecil" Version="0.11.5" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Include="PolyShim" Version="1.9.0" PrivateAssets="all" />
<PackageReference Include="PolyShim" Version="1.10.0" PrivateAssets="all" />
<PackageReference Include="Ressy" Version="1.0.3" PrivateAssets="all" GeneratePathProperty="true" />
</ItemGroup>

Expand Down

0 comments on commit 353df96

Please sign in to comment.