Skip to content

Commit

Permalink
Merge pull request #125 from SkEditorTeam/dev/dev
Browse files Browse the repository at this point in the history
v2.8.2
  • Loading branch information
NotroDev authored Dec 7, 2024
2 parents 656da60 + e2e59c4 commit 2f2fdaa
Show file tree
Hide file tree
Showing 21 changed files with 402 additions and 156 deletions.
14 changes: 6 additions & 8 deletions Installer/Folders.wxs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<StandardDirectory Id="ProgramFiles6432Folder">
<Directory Id="INSTALLFOLDER" Name="!(bind.Property.ProductName)">
<Directory Id="LanguagesFolder" Name="Languages"/>
</Directory>
</StandardDirectory>
</Fragment>
</Wix>
<Fragment>
<StandardDirectory Id="ProgramFiles6432Folder">
<Directory Id="INSTALLFOLDER" Name="!(bind.Property.ProductName)" />
</StandardDirectory>
</Fragment>
</Wix>
34 changes: 0 additions & 34 deletions Installer/LanguagesComponents.wxs

This file was deleted.

45 changes: 21 additions & 24 deletions Installer/Package.wxs
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package Name="SkEditor" Manufacturer="Notro" Version="2.8.1" UpgradeCode="14564974-da58-4917-8a0d-590043f589c2">
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package Name="SkEditor"
Manufacturer="Notro"
Version="2.8.2"
UpgradeCode="14564974-da58-4917-8a0d-590043f589c2">
<MediaTemplate EmbedCab="yes" />

<Feature Id="Main">
<ComponentGroupRef Id="SkEditorComponents" />
<ComponentGroupRef Id="LanguagesComponents" />
</Feature>

<ui:WixUI
Id="SkEditorInstaller_InstallDir"
InstallDirectory="INSTALLFOLDER"/>
Id="SkEditorInstaller_InstallDir"
InstallDirectory="INSTALLFOLDER" />

<UIRef Id="WixUI_ErrorProgressText" />

<WixVariable
Id="WixUIDialogBmp"
Value="Assets/background.png"/>

<WixVariable
Id="WixUIBannerBmp"
Value="Assets/top.png"/>

<WixVariable
Id="WixUIExclamationIco"
Value="Assets/Warning.ico"/>

<WixVariable
Id="WixUIInfoIco"
Value="Assets/Info.ico"/>
<WixVariable Id="WixUIDialogBmp"
Value="Assets/background.png" />

<WixVariable Id="WixUIBannerBmp"
Value="Assets/top.png" />

<WixVariable Id="WixUIExclamationIco"
Value="Assets/Warning.ico" />

<WixVariable Id="WixUIInfoIco"
Value="Assets/Info.ico" />
</Package>
</Wix>
</Wix>
15 changes: 5 additions & 10 deletions Installer/SkEditorComponents.wxs
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<ComponentGroup Id="SkEditorComponents" Directory="INSTALLFOLDER">
<Files Include="..\SkEditor\bin\Release\publish\win\**">
<Exclude Files="..\SkEditor\bin\Release\publish\win\SkEditor.exe" />
</Files>

<Component>
<File Source="..\SkEditor\bin\Release\publish\win\SkEditor.exe"/>
<Shortcut Name="SkEditor" Directory="DesktopFolder" Advertise="yes" Icon="SkEditorIcon.exe" />
<Shortcut Name="SkEditor" Directory="ProgramMenuFolder" Advertise="yes" Icon="SkEditorIcon.exe" />
</Component>
<Component>
<File Source="..\SkEditor\bin\Release\publish\win\av_libglesv2.dll" />
</Component>
<Component>
<File Source="..\SkEditor\bin\Release\publish\win\libHarfBuzzSharp.dll" />
</Component>
<Component>
<File Source="..\SkEditor\bin\Release\publish\win\libSkiaSharp.dll" />
</Component>
</ComponentGroup>

<Icon Id="SkEditorIcon.exe" SourceFile="Assets/SkEditor.ico"/>
<Property Id="ARPPRODUCTICON" Value="SkEditorIcon.exe" />
</Fragment>
</Wix>
</Wix>
6 changes: 3 additions & 3 deletions Installer/SkEditorInstaller.wixproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="WixToolset.Sdk/4.0.3">
<Project Sdk="WixToolset.Sdk/5.0.2">
<ItemGroup>
<Content Include="Assets\Info.ico" />
<Content Include="Assets\Warning.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.6" />
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.3" />
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.2.0.1" />
<PackageReference Include="WixToolset.UI.wixext" Version="5.0.2" />
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions SkEditor/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public override async void OnFrameworkInitializationCompleted()
{
base.OnFrameworkInitializationCompleted();

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.File(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
Expand Down
5 changes: 5 additions & 0 deletions SkEditor/Controls/SideBarControl.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
using CommunityToolkit.Mvvm.Input;
Expand Down Expand Up @@ -76,6 +77,8 @@ private Button CreatePanelButton(SidebarPanel panel)
SkEditorAPI.Windows.GetMainWindow().CoreGrid.ColumnDefinitions[1].MaxWidth = 0;
SkEditorAPI.Windows.GetMainWindow().CoreGrid.ColumnDefinitions[1].MinWidth = 0;

SkEditorAPI.Windows.GetMainWindow().SideBar.Margin = new Thickness(0, 0, 0, 0);

return;
}

Expand All @@ -97,6 +100,8 @@ private Button CreatePanelButton(SidebarPanel panel)

SkEditorAPI.Windows.GetMainWindow().CoreGrid.ColumnDefinitions[1].MinWidth = _currentPanel.DesiredWidth;
SkEditorAPI.Windows.GetMainWindow().CoreGrid.ColumnDefinitions[1].MaxWidth = int.MaxValue;

SkEditorAPI.Windows.GetMainWindow().SideBar.Margin = new Thickness(0, 0, 10, 0);
})
};

Expand Down
5 changes: 2 additions & 3 deletions SkEditor/Controls/Sidebar/ExplorerSidebarPanel.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
xmlns:ui="using:FluentAvalonia.UI.Controls"
xmlns:ar="clr-namespace:SkEditor.Utilities.Projects"
xmlns:elements="clr-namespace:SkEditor.Utilities.Projects.Elements"
x:Class="SkEditor.Controls.Sidebar.ExplorerSidebarPanel"
Margin="10,0,0,0">
x:Class="SkEditor.Controls.Sidebar.ExplorerSidebarPanel">

<UserControl.Styles>
<Style Selector="Button.barButton">
Expand Down Expand Up @@ -81,7 +80,7 @@
<MenuItem Header="{DynamicResource MenuHeaderRename}" Command="{Binding RenameCommand}">
<MenuItem.Icon><ui:SymbolIcon Symbol="Rename" FontSize="20"></ui:SymbolIcon></MenuItem.Icon>
</MenuItem>
<MenuItem Header="{DynamicResource MenuHeaderDelete}" Command="{Binding DeleteCommand}">
<MenuItem Header="{DynamicResource MenuHeaderDeleteFromDisk}" Command="{Binding DeleteCommand}">
<MenuItem.Icon><ui:SymbolIcon Symbol="Delete" FontSize="20"></ui:SymbolIcon></MenuItem.Icon>
</MenuItem>
</MenuFlyout>
Expand Down
3 changes: 1 addition & 2 deletions SkEditor/Controls/Sidebar/ParserSidebarPanel.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
xmlns:ui="using:FluentAvalonia.UI.Controls"
xmlns:parser="clr-namespace:SkEditor.Utilities.Parser"
xmlns:viewModels="clr-namespace:SkEditor.Utilities.Parser.ViewModels"
x:Class="SkEditor.Controls.Sidebar.ParserSidebarPanel"
Margin="10,0,0,0">
x:Class="SkEditor.Controls.Sidebar.ParserSidebarPanel">

<UserControl.Styles>
<Style Selector="Button.barButton">
Expand Down
1 change: 1 addition & 0 deletions SkEditor/Languages/English.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<system:String x:Key="MenuHeaderRefreshSyntax">Refresh syntax</system:String>

<!-- Project Menu -->
<system:String x:Key="MenuHeaderDeleteFromDisk">Delete from Disk</system:String>
<system:String x:Key="MenuHeaderOpenInExplorer">Open in explorer</system:String>
<system:String x:Key="MenuHeaderCopyPath">Copy relative path</system:String>
<system:String x:Key="MenuHeaderCopyAbsolutePath">Copy absolute path</system:String>
Expand Down
1 change: 1 addition & 0 deletions SkEditor/Languages/Polish.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<system:String x:Key="MenuHeaderRefreshSyntax">Odśwież składnię</system:String>

<!-- Project Menu -->
<system:String x:Key="MenuHeaderDeleteFromDisk">Usuń z dysku</system:String>
<system:String x:Key="MenuHeaderOpenInExplorer">Otwórz w eksploratorze</system:String>
<system:String x:Key="MenuHeaderCopyPath">Skopiuj ścieżkę względną</system:String>
<system:String x:Key="MenuHeaderCopyAbsolutePath">Skopiuj ścieżkę bezwzględną</system:String>
Expand Down
63 changes: 31 additions & 32 deletions SkEditor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,44 @@
using Avalonia.Data;
using System;

namespace SkEditor.Desktop
namespace SkEditor;

class Program
{
class Program
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args)
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args)
{
GC.KeepAlive(typeof(RelativeSource));
CheckTest(args);
GC.KeepAlive(typeof(RelativeSource));
CheckTest(args);

BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
}
BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
}

private static void CheckTest(string[] args)
private static void CheckTest(string[] args)
{
if (args.Length > 0 && args[0] == "--test")
{
if (args.Length > 0 && args[0] == "--test")
try
{
try
{
Console.WriteLine("Test passed");
}
catch (Exception e)
{
Console.Error.WriteLine($"Test failed: {e.Message}");
Environment.Exit(1);
}
return;
Console.WriteLine("Test passed");
}
catch (Exception e)
{
Console.Error.WriteLine($"Test failed: {e.Message}");
Environment.Exit(1);
}
return;
}

// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace()
.WithInterFont();
}

// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace()
.WithInterFont();
}
49 changes: 28 additions & 21 deletions SkEditor/SkEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>SkEditor.ico</ApplicationIcon>
<PublishSingleFile>true</PublishSingleFile>
<AssemblyVersion>2.8.1</AssemblyVersion>
<FileVersion>2.8.1</FileVersion>
<Version>2.8.1</Version>
<InformationalVersion>2.8.1</InformationalVersion>
<AssemblyVersion>2.8.2</AssemblyVersion>
<FileVersion>2.8.2</FileVersion>
<Version>2.8.2</Version>
<InformationalVersion>2.8.2</InformationalVersion>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down Expand Up @@ -44,31 +44,31 @@

<ItemGroup>
<PackageReference Include="AsyncImageLoader.Avalonia" Version="3.3.0" />
<PackageReference Include="Avalonia" Version="11.1.3" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.1.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.3" />
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.1.3" />
<PackageReference Include="Avalonia.Svg.Skia" Version="11.1.0" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.3" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.3" />
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.1.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Avalonia" Version="11.2.2" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.1.5" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.2" />
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.2.2" />
<PackageReference Include="Avalonia.Svg.Skia" Version="11.2.0.2" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.2" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.2" />
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.2.0.1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />

<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.3" />
<PackageReference Condition="'$(Configuration)' == 'Release'" Include="Avalonia.Controls.DataGrid" Version="11.1.1" />
<PackageReference Condition="'$(Configuration)' == 'Release'" Include="Avalonia.Controls.ColorPicker" Version="11.1.1" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.0" />
<PackageReference Condition="'$(Configuration)' == 'Release'" Include="Avalonia.Controls.DataGrid" Version="11.2.2" />
<PackageReference Condition="'$(Configuration)' == 'Release'" Include="Avalonia.Controls.ColorPicker" Version="11.2.2" />
<PackageReference Include="DiscordRichPresence" Version="1.2.1.24" />
<PackageReference Include="FluentIcons.Avalonia.Fluent" Version="1.1.253" />
<PackageReference Include="FluentIcons.Avalonia.Fluent" Version="1.1.266" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NuGet.Protocol" Version="6.11.0" />
<PackageReference Include="NuGet.Protocol" Version="6.12.1" />
<PackageReference Include="Octokit" Version="13.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="SkAvaloniaEdit" Version="11.0.7" />
<PackageReference Include="SkAvaloniaEdit" Version="11.1.0" />
<PackageReference Include="SkFluentAvalonia" Version="2.0.5.3" />
<PackageReference Include="SpacedGrid-Avalonia" Version="11.0.0" />
<PackageReference Include="Svg.Skia" Version="2.0.0" />
<PackageReference Include="System.Threading.AccessControl" Version="9.0.0-preview.5.24306.7" />
<PackageReference Include="Svg.Skia" Version="2.0.0.4" />
<PackageReference Include="System.Threading.AccessControl" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -105,6 +105,10 @@
<Compile Update="Controls\EnchantSelector.axaml.cs">
<DependentUpon>EnchantSelector.axaml</DependentUpon>
</Compile>
<Compile Update="Views\TerminalWindow.axaml.cs">
<SubType>Code</SubType>
<DependentUpon>TerminalWindow.axaml</DependentUpon>
</Compile>
<Compile Update="Views\GoToLineWindow.axaml.cs">
<DependentUpon>GoToLineWindow.axaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -173,6 +177,9 @@
</ItemGroup>

<ItemGroup>
<AvaloniaXaml Update="Views\TerminalWindow.axaml">
<SubType>Designer</SubType>
</AvaloniaXaml>
<AvaloniaXaml Update="Views\ColorSelectionWindow.axaml">
<SubType>Designer</SubType>
</AvaloniaXaml>
Expand Down
Loading

0 comments on commit 2f2fdaa

Please sign in to comment.