some fixes and default resources
This commit is contained in:
parent
89ddbc19d9
commit
e31df8e029
@ -18,7 +18,13 @@
|
||||
|
||||
<Style Selector="TextBox.MyTextBoxStyle" />
|
||||
<Style Selector="Label.MyLabelStyle" />
|
||||
<Style Selector="Button.MyButtonStyle" />
|
||||
<Style Selector="Button.MyButtonStyle" >
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
MinWidth="800"
|
||||
MinHeight="500"
|
||||
Background="{DynamicResource MyBackgroundColor}">
|
||||
<Grid ColumnDefinitions="5,*,5" RowDefinitions="5,40,5,*,5">
|
||||
<Grid ColumnDefinitions="5,*,5" RowDefinitions="5,35,5,*,5">
|
||||
<Image x:Name="BackgroundImage"
|
||||
Grid.RowSpan="5"
|
||||
Grid.ColumnSpan="3"
|
||||
|
||||
@ -5,9 +5,6 @@ public partial class MessageBox : Window
|
||||
public MessageBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
#if DEBUG
|
||||
this.AttachDevTools();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void Show(string title, string text)
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
namespace Launcher.Client.Avalonia.GUI;
|
||||
using Avalonia.Styling;
|
||||
|
||||
public class TabButton : Button
|
||||
namespace Launcher.Client.Avalonia.GUI;
|
||||
|
||||
public partial class TabButton : Button, IStyleable
|
||||
{
|
||||
Type IStyleable.StyleKey => typeof(Button);
|
||||
|
||||
public static readonly StyledProperty<Grid> TabGridProp = AvaloniaProperty.Register<TabButton, Grid>("TabGrid");
|
||||
public Grid TabGrid
|
||||
{
|
||||
get => GetValue(TabGridProp);
|
||||
set => SetValue(TabGridProp, value);
|
||||
}
|
||||
|
||||
public TabButton() :base() {}
|
||||
}
|
||||
@ -16,18 +16,18 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia" Version="0.10.18" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.15" Condition="'$(Configuration)' == 'Debug'" />
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.18" Condition="'$(Configuration)' == 'Debug'" />
|
||||
<PackageReference Include="XamlNameReferenceGenerator" Version="1.3.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Dtsod.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Network.dll" />
|
||||
<ProjectReference Include="..\Launcher.Client\Launcher.Client.csproj"/>
|
||||
<ProjectReference Include="..\..\DTLib\DTLib.Network\DTLib.Network.csproj" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib.Dtsod\DTLib.Dtsod.csproj" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib\DTLib.csproj" />
|
||||
<ProjectReference Include="..\Launcher.Client\Launcher.Client.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -46,7 +46,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Target Name="PostBuild-Release" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Release'">
|
||||
<!--Target Name="PostBuild-Release" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Release'">
|
||||
<Exec Command="cp -f bin/Release/runtimes/linux-x64/native/* bin/Release/" />
|
||||
<Exec Command="cp -f bin/Release/runtimes/win-x64/native/* bin/Release/" />
|
||||
<Exec Command="rm -rf bin/Release/runtimes" />
|
||||
@ -55,6 +55,6 @@
|
||||
<Exec Command="cp -f bin/Debug/runtimes/linux-x64/native/* bin/Debug/" />
|
||||
<Exec Command="cp -f bin/Debug/runtimes/win-x64/native/* bin/Debug/" />
|
||||
<Exec Command="rm -rf bin/Debug/runtimes" />
|
||||
</Target>
|
||||
</Target!-->
|
||||
|
||||
</Project>
|
||||
|
||||
@ -19,6 +19,7 @@ public static class LauncherMain
|
||||
{
|
||||
public static LauncherWindow CurrentLauncherWindow;
|
||||
|
||||
//it's being used by Avalonia xml preview
|
||||
public static AppBuilder BuildAvaloniaApp() =>
|
||||
AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
@ -29,7 +30,6 @@ public static class LauncherMain
|
||||
try
|
||||
{
|
||||
LauncherClient.Init();
|
||||
|
||||
var traceHandler = new ConsoleTraceListener();
|
||||
Trace.AutoFlush = true;
|
||||
Trace.Listeners.Add(traceHandler);
|
||||
|
||||
@ -22,9 +22,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Dtsod.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Network.dll" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib.Network\DTLib.Network.csproj" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib.Dtsod\DTLib.Dtsod.csproj" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib\DTLib.csproj" />
|
||||
<ProjectReference Include="..\Launcher.Client\Launcher.Client.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
@ -9,16 +9,19 @@
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<Platforms>AnyCPU</Platforms>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Dtsod.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Network.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\default.descriptor.template" />
|
||||
<EmbeddedResource Include="Resources\launcher.dtsod" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\DTLib\DTLib.Network\DTLib.Network.csproj" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib.Dtsod\DTLib.Dtsod.csproj" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib\DTLib.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Resources\**\*" />
|
||||
<Compile Remove="debug_assets\**\*" />
|
||||
<EmbeddedResource Include="Resources\launcher.dtsod" />
|
||||
<EmbeddedResource Include="Resources\default.descriptor.template" />
|
||||
<None Update="debug_assets\**\*" CopyToOutputDirectory="Always" Condition="'$(Configuration)' == 'Debug'" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -20,6 +20,14 @@ public static class LauncherClient
|
||||
{
|
||||
Logger.Log("launcher starting...");
|
||||
Config = new LauncherConfig();
|
||||
#if DEBUG
|
||||
const string debug_assets = "debug_assets";
|
||||
foreach (string file in Directory.GetFiles(debug_assets))
|
||||
File.Copy(file, file.Remove(0, file.LastIndexOf(Путь.Разд) + 1), true);
|
||||
foreach (string subdir in Directory.GetDirectories(debug_assets))
|
||||
Directory.Copy(subdir, subdir.Remove(0, subdir.LastIndexOf(Путь.Разд) + 1), true);
|
||||
Directory.Delete(debug_assets);
|
||||
#endif
|
||||
Directory.Create("descriptors");
|
||||
Directory.Create("icons");
|
||||
Directory.Create("backgrounds");
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Launcher.Client;
|
||||
|
||||
public class LauncherLogger : ConsoleLogger
|
||||
public class LauncherLogger : FileLogger
|
||||
{
|
||||
public const string LogfileDir = "launcher-logs";
|
||||
public LauncherLogger() : base(LogfileDir,"launcher-client") {}
|
||||
@ -19,6 +19,7 @@ public class LauncherLogger : ConsoleLogger
|
||||
{
|
||||
base.Log(msg);
|
||||
StringBuilder strb = new();
|
||||
strb.Append('[').Append(LastLogMessageTime).Append("]: ");
|
||||
if (msg.Length == 1) strb.Append(msg[0]);
|
||||
else for (int i = 1; i < msg.Length; i += 2)
|
||||
strb.Append(msg[i]);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
name: ""; #label, which displays in launcher
|
||||
directory: ""; #name of program' directory on server and client
|
||||
#descriptor_version: 3;
|
||||
name: ""; #label, which displays in launcher
|
||||
description: ""; #desctiption, which displays in launcher
|
||||
directory: ""; #name of program directory on server and client
|
||||
icon: ""; #name of the icon file
|
||||
background: ""; #name of the background file
|
||||
launchcommand: ""; #command, which starts the program
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 437 KiB |
@ -0,0 +1,7 @@
|
||||
#descriptor_version: 3;
|
||||
name: "Conan Exiles";
|
||||
description: "Сурвайвл на анриале в сеттинге Конана Варвара.";
|
||||
directory: "conan_exiles";
|
||||
icon: "conan_exiles.png";
|
||||
background: "conan_exiles_background.png";
|
||||
launchcommand: "cmd /c echo hello && pause";
|
||||
@ -0,0 +1,7 @@
|
||||
#descriptor_version: 3;
|
||||
name: "Divinity 2 Developer's Cut";
|
||||
description: "РПГ от Larian. Вид от третьего лица, проработанный мир, интересная боёвка.";
|
||||
directory: "divinity2_devcut";
|
||||
icon: "divinity2devcut.png";
|
||||
background: "divinity2devcut_background.jpg";
|
||||
launchcommand: "";
|
||||
BIN
Launcher.Client/debug_assets/fonts/fontinst.exe
Normal file
BIN
Launcher.Client/debug_assets/fonts/fontinst.exe
Normal file
Binary file not shown.
5
Launcher.Client/debug_assets/fonts/fontinst.inf
Normal file
5
Launcher.Client/debug_assets/fonts/fontinst.inf
Normal file
@ -0,0 +1,5 @@
|
||||
[fonts]
|
||||
unispace.ttf
|
||||
unispace_bd.ttf
|
||||
unispace_it.ttf
|
||||
unispace_bd_it.ttf
|
||||
BIN
Launcher.Client/debug_assets/fonts/unispace.ttf
Normal file
BIN
Launcher.Client/debug_assets/fonts/unispace.ttf
Normal file
Binary file not shown.
BIN
Launcher.Client/debug_assets/fonts/unispace_bd.ttf
Normal file
BIN
Launcher.Client/debug_assets/fonts/unispace_bd.ttf
Normal file
Binary file not shown.
BIN
Launcher.Client/debug_assets/fonts/unispace_bd_it.ttf
Normal file
BIN
Launcher.Client/debug_assets/fonts/unispace_bd_it.ttf
Normal file
Binary file not shown.
BIN
Launcher.Client/debug_assets/fonts/unispace_it.ttf
Normal file
BIN
Launcher.Client/debug_assets/fonts/unispace_it.ttf
Normal file
Binary file not shown.
BIN
Launcher.Client/debug_assets/icons/conan_exiles.png
Normal file
BIN
Launcher.Client/debug_assets/icons/conan_exiles.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
Launcher.Client/debug_assets/icons/divinity2devcut.png
Normal file
BIN
Launcher.Client/debug_assets/icons/divinity2devcut.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@ -12,9 +12,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Dtsod.dll" />
|
||||
<Reference Include="..\..\DTLib\bin\Release\net6.0\DTLib.Network.dll" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib.Network\DTLib.Network.csproj" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib.Dtsod\DTLib.Dtsod.csproj" />
|
||||
<ProjectReference Include="..\..\DTLib\DTLib\DTLib.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -17,6 +17,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher.Client.Avalonia",
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher.Client", "Launcher.Client\Launcher.Client.csproj", "{87427137-840D-4D09-A101-9481110682BD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTLib", "..\DTLib\DTLib\DTLib.csproj", "{E27F82A6-B58F-4C07-8DAB-F1556F24F5E0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTLib.Dtsod", "..\DTLib\DTLib.Dtsod\DTLib.Dtsod.csproj", "{507C97A8-47ED-4271-952F-49883E508EA7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTLib.Network", "..\DTLib\DTLib.Network\DTLib.Network.csproj", "{5F53F49F-FFEA-4C2E-B21D-8E11363EA969}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -39,6 +45,18 @@ Global
|
||||
{87427137-840D-4D09-A101-9481110682BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{87427137-840D-4D09-A101-9481110682BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{87427137-840D-4D09-A101-9481110682BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E27F82A6-B58F-4C07-8DAB-F1556F24F5E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E27F82A6-B58F-4C07-8DAB-F1556F24F5E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E27F82A6-B58F-4C07-8DAB-F1556F24F5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E27F82A6-B58F-4C07-8DAB-F1556F24F5E0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{507C97A8-47ED-4271-952F-49883E508EA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{507C97A8-47ED-4271-952F-49883E508EA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{507C97A8-47ED-4271-952F-49883E508EA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{507C97A8-47ED-4271-952F-49883E508EA7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5F53F49F-FFEA-4C2E-B21D-8E11363EA969}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5F53F49F-FFEA-4C2E-B21D-8E11363EA969}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5F53F49F-FFEA-4C2E-B21D-8E11363EA969}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5F53F49F-FFEA-4C2E-B21D-8E11363EA969}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Loading…
Reference in New Issue
Block a user