Skip to content

Commit

Permalink
remove extra packages references.
Browse files Browse the repository at this point in the history
Rest of package cleanup is in the Packages PR
  • Loading branch information
tomlm committed Dec 7, 2024
1 parent 51dc2fb commit e965957
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 58 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -766,3 +766,4 @@ fabric.properties
.idea/
*.sln.iml

/src/Tools/Consolonia.PreviewHost/Properties/launchSettings.json
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>disable</Nullable>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>11.2</VersionPrefix>
<VersionPrefix>11.2.1</VersionPrefix>
<Authors>https://github.com/jinek/Consolonia/graphs/contributors</Authors>
<Description>Text User Interface implementation of Avalonia UI (GUI Framework)</Description>
<Copyright>Copyright © Evgeny Gorbovoy 2021 - 2022</Copyright>
Expand Down
1 change: 0 additions & 1 deletion src/Consolonia.Blazor/Consolonia.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageReference Include="BlazorBindingsAvalonia" Version="0.1.2" />
<PackageReference Include="Consolonia.Core" Version="11.2" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Consolonia.Core.Infrastructure
{
[Serializable]
public class ConsoloniaNotSupportedException : Exception
{
internal ConsoloniaNotSupportedException(NotSupportedRequest request)
Expand Down
11 changes: 0 additions & 11 deletions src/Consolonia.Designer/ConsolePreview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using Avalonia;
using Avalonia.Controls;
#if DEBUG
using Consolonia.PreviewHost;
using System;
using System.Diagnostics;
Expand All @@ -15,7 +14,6 @@
using Avalonia.Threading;
using Consolonia.Core.Drawing.PixelBufferImplementation;
using Newtonsoft.Json;
#endif

namespace Consolonia.Designer
{
Expand Down Expand Up @@ -45,7 +43,6 @@ public class ConsolePreview : UserControl

public ConsolePreview()
{
#if DEBUG
_process = null;
FontFamily = FontFamily.Parse("Cascadia Mono");
Initialized += (_, _) => LoadXaml();
Expand All @@ -54,7 +51,6 @@ public ConsolePreview()
{
if (e.Property == FileNameProperty) LoadXaml();
};
#endif
}


Expand Down Expand Up @@ -102,7 +98,6 @@ protected void Dispose(bool disposing)
if (disposing)
{
// TODO: dispose managed state (managed objects)
#if DEBUG
#pragma warning disable CA1416 // Validate platform compatibility
if (_process != null)
{
Expand All @@ -111,7 +106,6 @@ protected void Dispose(bool disposing)
_process = null;
}
#pragma warning restore CA1416 // Validate platform compatibility
#endif
}

_disposedValue = true;
Expand All @@ -125,14 +119,10 @@ public void Dispose()
Dispose(true);
}

#if DEBUG
private Process? _process;
private readonly Typeface _typeface = new("Cascadia Mono");
private double _charWidth;
private double _charHeight;
#endif

#if DEBUG

private void LoadXaml()
{
Expand Down Expand Up @@ -451,6 +441,5 @@ public void Flush()
_textRunCharWidth = 0;
}
}
#endif
}
}
8 changes: 3 additions & 5 deletions src/Consolonia.Designer/Consolonia.Designer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
<ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.FreeDesktop" Version="$(AvaloniaVersion)" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Consolonia.Core" Version="11.2" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Consolonia.PreviewHost" Version="11.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Consolonia.Core\Consolonia.Core.csproj" />
<ProjectReference Condition="'$(Configuration)' == 'Debug'" Include="..\Tools\Consolonia.PreviewHost\Consolonia.PreviewHost.csproj" />
<ProjectReference Include="..\Tools\Consolonia.PreviewHost\Consolonia.PreviewHost.csproj" />
</ItemGroup>

</Project>
4 changes: 1 addition & 3 deletions src/Consolonia.Designer/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ public static class Extensions
/// </remarks>
public static AppBuilder UseConsoloniaDesigner(this AppBuilder builder)
{
#if DEBUG
if (Design.IsDesignMode) //AppDomain.CurrentDomain.FriendlyName == "Avalonia.Designer.HostApp")
if (Design.IsDesignMode)
return builder
.UsePlatformDetect()
.WithInterFont()
.LogToTrace();
#endif

return builder.UseConsolonia();
}
Expand Down
1 change: 0 additions & 1 deletion src/Consolonia.Gallery/Consolonia.Gallery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<ProjectReference Include="..\Consolonia.Core\Consolonia.Core.csproj" />
<ProjectReference Include="..\Consolonia.PlatformSupport\Consolonia.PlatformSupport.csproj" />
<ProjectReference Include="..\Consolonia.Themes.TurboVision\Consolonia.Themes.TurboVision.csproj" />
<ProjectReference Include="..\Consolonia.Designer\Consolonia.Designer.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 0 additions & 5 deletions src/Consolonia.Gallery/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Avalonia;
using Consolonia.Core;
using Consolonia.Core.Infrastructure;
using Consolonia.Designer;
using Consolonia.PlatformSupport;

namespace Consolonia.Gallery
Expand All @@ -19,11 +18,7 @@ private static void Main(string[] args)

public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
#if DEBUG
.UseConsoloniaDesigner()
#else
.UseConsolonia()
#endif
.UseAutoDetectedConsole()
.LogToException();
}
Expand Down
1 change: 0 additions & 1 deletion src/Consolonia.NUnit/Consolonia.NUnit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Consolonia.Core" Version="11.2" />
<PackageReference Include="NUnit" Version="3.13.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Core.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<ItemGroup>
<PackageReference Include="Consolonia.Core" Version="11.2" />
<PackageReference Include="Consolonia.GuiCS" Version="11.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Consolonia.Core\Consolonia.Core.csproj" />
<ProjectReference Include="..\Consolonia.GuiCS\Consolonia.GuiCS.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Consolonia.Blazor" Version="11.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Consolonia.Blazor\Consolonia.Blazor.csproj" />
<ProjectReference Include="..\Consolonia.PlatformSupport\Consolonia.PlatformSupport.csproj" />
<ProjectReference Include="..\Consolonia.Themes.TurboVision\Consolonia.Themes.TurboVision.csproj" />
<ProjectReference Include="..\Consolonia.Blazor\Consolonia.Blazor.csproj" />
</ItemGroup>

Expand Down
6 changes: 0 additions & 6 deletions src/Example.Blazor/Example.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Consolonia.Blazor" Version="11.2" />
<PackageReference Include="Consolonia.Themes.TurboVision" Version="11.2" />
<PackageReference Include="Consolonia.PlatformSupport" Version="11.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Consolonia.Blazor\Consolonia.Blazor.csproj" />
<ProjectReference Include="..\Consolonia.PlatformSupport\Consolonia.PlatformSupport.csproj" />
Expand Down
7 changes: 6 additions & 1 deletion src/Tools/Consolonia.PreviewHost/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ public override void OnFrameworkInitializationCompleted()
{
string folder;
if (Path.IsPathFullyQualified(path))
folder = Path.GetDirectoryName(path)!;
{
if (Directory.Exists(path))
folder = path;
else
folder = Path.GetDirectoryName(path)!;
}
else
folder = Environment.CurrentDirectory;
ArgumentNullException.ThrowIfNull(folder);
Expand Down
13 changes: 0 additions & 13 deletions src/Tools/Consolonia.PreviewHost/Properties/launchSettings.json

This file was deleted.

0 comments on commit e965957

Please sign in to comment.