Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
блять что это
Browse files Browse the repository at this point in the history
  • Loading branch information
misandrie committed May 19, 2024
1 parent 6c95a7f commit 9eb78c7
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 60 deletions.
46 changes: 24 additions & 22 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,33 @@
</PropertyGroup>
<ItemGroup>
<!-- Launcher-loader shared stuff -->
<PackageVersion Include="Microsoft.Data.Sqlite" Version="7.0.4"/>
<PackageVersion Include="NSec.Cryptography" Version="22.4.0"/>
<PackageVersion Include="SharpZstd.Interop" Version="1.5.2-beta2"/>
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.0-preview.3.24172.4" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NP.Ava.Visuals" Version="1.0.5" />
<PackageVersion Include="NSec.Cryptography" Version="24.5.0-preview.1" />
<PackageVersion Include="SharpZstd.Interop" Version="1.5.5-beta1" />
<!-- Loader -->
<PackageVersion Include="Robust.Natives" Version="0.1.1" />
<!-- Launcher -->
<PackageVersion Include="Avalonia" Version="0.10.19"/>
<PackageVersion Include="Avalonia.Desktop" Version="0.10.19"/>
<PackageVersion Include="Avalonia.ReactiveUI" Version="0.10.19"/>
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.19"/>
<PackageVersion Include="CodeHollow.FeedReader" Version="1.2.6"/>
<PackageVersion Include="Dapper" Version="2.0.123"/>
<PackageVersion Include="DynamicData" Version="7.13.1"/>
<PackageVersion Include="Microsoft.Toolkit.Mvvm" Version="7.1.2"/>
<PackageVersion Include="ReactiveUI" Version="18.4.26"/>
<PackageVersion Include="ReactiveUI.Fody" Version="18.4.26"/>
<PackageVersion Include="Robust.Shared.AuthLib" Version="0.1.2"/>
<PackageVersion Include="Serilog" Version="2.12.0"/>
<PackageVersion Include="Serilog.Sinks.Console" Version="4.1.0"/>
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0"/>
<PackageVersion Include="XamlNameReferenceGenerator" Version="1.6.1"/>
<PackageVersion Include="YamlDotNet" Version="13.0.2"/>
<PackageVersion Include="TerraFX.Interop.Windows" Version="10.0.22621.1"/>
<PackageVersion Include="Mono.Posix.NETStandard" Version="1.0.0"/>
<PackageVersion Include="SpaceWizards.Sodium" Version="0.2.1"/>
<PackageVersion Include="Avalonia" Version="11.1.0-beta2" />
<PackageVersion Include="Avalonia.Desktop" Version="11.1.0-beta2" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.1.0-beta2" />
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.19" />
<PackageVersion Include="CodeHollow.FeedReader" Version="1.2.6" />
<PackageVersion Include="Dapper" Version="2.1.35" />
<PackageVersion Include="DynamicData" Version="8.4.1" />
<PackageVersion Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" />
<PackageVersion Include="ReactiveUI" Version="20.1.1" />
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
<PackageVersion Include="Robust.Shared.AuthLib" Version="0.1.2" />
<PackageVersion Include="Serilog" Version="4.0.0-dev-02174" />
<PackageVersion Include="Serilog.Sinks.Console" Version="5.1.0-dev-00943" />
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.1-dev-00972" />
<PackageVersion Include="XamlNameReferenceGenerator" Version="1.6.1" />
<PackageVersion Include="YamlDotNet" Version="15.1.4" />
<PackageVersion Include="TerraFX.Interop.Windows" Version="10.0.22621.6" />
<PackageVersion Include="Mono.Posix.NETStandard" Version="5.20.1-preview" />
<PackageVersion Include="SpaceWizards.Sodium" Version="0.2.1" />
<!-- Test stuff -->
<PackageVersion Include="nunit" Version="3.13.3" />
<PackageVersion Include="NUnit.Analyzers" Version="3.6.1" />
Expand Down
4 changes: 2 additions & 2 deletions Marsey.Tests/Marsey.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Lib.Harmony" />
<PackageReference Include="Lib.Harmony" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
<PackageReference Include="NUnit"/>
<PackageReference Include="NUnit3TestAdapter"/>
Expand All @@ -33,5 +33,5 @@
<ItemGroup>
<ProjectReference Include="..\Marsey\Marsey.csproj" />
</ItemGroup>

</Project>
9 changes: 3 additions & 6 deletions Marsey/Marsey.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" />
<PackageReference Include="Lib.Harmony" />
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0-eap1" />
<PackageReference Include="Lib.Harmony" Version="2.3.3" />
<PackageReference Include="Newtonsoft.Json" />
</ItemGroup>

<ItemGroup>
<PackageVersion Update="Lib.Harmony" Version="2.3.3" />
</ItemGroup>

</Project>
5 changes: 3 additions & 2 deletions SS14.Launcher/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static unsafe void MarkDirectoryCompress(string path)
fixed (char* pPath = path)
{
var handle = Windows.CreateFileW(
(ushort*)pPath,
pPath, // Cast char* to ushort*
Windows.GENERIC_ALL,
FILE.FILE_SHARE_READ,
null,
Expand All @@ -164,6 +164,7 @@ public static unsafe void MarkDirectoryCompress(string path)
}
}


public static void ChmodPlusX(string path)
{
var f = new UnixFileInfo(path);
Expand All @@ -176,7 +177,7 @@ public static unsafe int MessageBoxHelper(string text, string caption, uint type
fixed (char* pText = text)
fixed (char* pCaption = caption)
{
return Windows.MessageBoxW(HWND.NULL, (ushort*)pText, (ushort*)pCaption, type);
return Windows.MessageBoxW(HWND.NULL, pText, pCaption, type);
}
}
}
19 changes: 12 additions & 7 deletions SS14.Launcher/SS14.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType Condition="'$(Configuration)' == 'Release'">WinExe</OutputType>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<Nullable>enable</Nullable>
<!--<PublishTrimmed>true</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>-->
Expand Down Expand Up @@ -30,17 +31,18 @@
</Compile>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" />
<PackageReference Include="Avalonia.Desktop" />
<PackageReference Include="Avalonia.ReactiveUI" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" />
<PackageReference Include="Avalonia.Themes.Simple" />
<PackageReference Include="Avalonia" Version="11.0.6" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.6" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.6" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.6" />
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.6" />
<PackageReference Include="CodeHollow.FeedReader" />
<PackageReference Include="Dapper" />
<PackageReference Include="DynamicData" />
<PackageReference Include="Microsoft.Data.Sqlite" />
<PackageReference Include="Microsoft.Toolkit.Mvvm" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NP.Ava.Visuals" />
<PackageReference Include="ReactiveUI" />
<PackageReference Include="ReactiveUI.Fody" />
<PackageReference Include="Robust.Shared.AuthLib" />
Expand All @@ -54,7 +56,7 @@
<PackageReference Include="SharpZstd.Interop" />
<PackageReference Include="SpaceWizards.Sodium" />
<PackageReference Include="Microsoft.NET.ILLink.Tasks" />
<PackageReference Include="JetBrains.Annotations" />
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0-eap1"/>
</ItemGroup>
<ItemGroup>
<None Remove="Utility\runtime.json" />
Expand Down Expand Up @@ -88,5 +90,8 @@
<ItemGroup>
<ProjectReference Include="..\Marsey\Marsey.csproj" />
</ItemGroup>
<ItemGroup>
<PackageVersion Update="Avalonia.Themes.Simple" Version="11.1.0-beta2" />
</ItemGroup>
<Import Project="..\MSBuild\Robust.Trimming.targets" />
</Project>
12 changes: 5 additions & 7 deletions SS14.Launcher/VcRedistCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ public static unsafe void Check()

// We could show this dialog all fancy with Avalonia but I'm lazy so.
int ret;
fixed (char* title =
"The game needs the VC++ 2015 redistributable installed, which you do not have.\nWould you like to download the installer for it?")

var text = "The game needs the VC++ 2015 redistributable installed, which you do not have.\nWould you like to download the installer for it?";
var caption = "VC++ 2015 redistributable not installed";
uint type = MB.MB_ICONERROR | MB.MB_YESNO;
{
fixed (char* caption = "VC++ 2015 redistributable not installed")
{
ret = Windows.MessageBoxW(HWND.NULL,
(ushort*)title,
(ushort*)caption,
MB.MB_ICONERROR | MB.MB_YESNO);
ret = Helpers.MessageBoxHelper(text, caption, type);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class PatchesTabViewModel : MainWindowTabViewModel
public ObservableCollection<SubverterPatch> SubverterPatches { get; } = new ObservableCollection<SubverterPatch>();
public ObservableCollection<ResourcePack> ResourcePacks { get; } = new ObservableCollection<ResourcePack>();
public ICommand OpenPatchDirectoryCommand { get; }
public ICommand ReloadModsCommand { get; }

#if DEBUG
public bool ShowRPacks => true;
Expand All @@ -34,6 +35,7 @@ public class PatchesTabViewModel : MainWindowTabViewModel
public PatchesTabViewModel()
{
OpenPatchDirectoryCommand = new RelayCommand(() => OpenPatchDirectory(MarseyVars.MarseyFolder));
ReloadModsCommand = new RelayCommand(ReloadMods);
ReloadMods();
}

Expand Down
2 changes: 1 addition & 1 deletion SS14.Launcher/Views/MainWindowTabs/OptionsTabView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<TextBlock Margin="4, 0" Text="Hide Level" Classes="NanoHeadingMedium" />
<Grid RowDefinitions="Auto, Auto" ColumnDefinitions="*, Auto">
<TextBlock Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" TextWrapping="Wrap" Margin="8">Sets degree to which Marsey hides itself.</TextBlock>
<ComboBox Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Margin="4" Items="{Binding HideLevels}" SelectedItem="{Binding HideLevel}">
<ComboBox Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Margin="4" ItemsSource="{Binding HideLevels}" SelectedItem="{Binding HideLevel}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" />
Expand Down
26 changes: 13 additions & 13 deletions SS14.Launcher/Views/MainWindowTabs/PatchesTabView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<global:PathToFileNameConverter x:Key="PathToFileNameConverter"/>
<global:BooleanToPreloadConverter x:Key="BooleanToPreloadConverter"/>
</UserControl.Resources>

<Design.DataContext>
<mainWindowTabs:PatchesTabViewModel />
</Design.DataContext>
Expand All @@ -24,8 +24,8 @@
<StackPanel>
<TextBlock Margin="4, 0" Text="Patches" Classes="NanoHeadingMedium" />
<Separator/>
<ItemsControl Items="{Binding MarseyPatches}" Name="MarseyPatchList">

<ItemsControl ItemsSource="{Binding MarseyPatches}" Name="MarseyPatchList">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
Expand All @@ -35,7 +35,7 @@
Margin="8" />
<TextBlock VerticalAlignment="Center" Margin="4" Foreground="Gray" Opacity="0.5"
Text="{Binding Preload, Converter={StaticResource BooleanToPreloadConverter}}"></TextBlock>
<TextBlock VerticalAlignment="Center" Margin="4" Foreground="DimGray" Opacity="0.5"
<TextBlock VerticalAlignment="Center" Margin="4" Foreground="DimGray" Opacity="0.5"
Text="{Binding Asm.Location, Converter={StaticResource PathToFileNameConverter}}"></TextBlock>
</StackPanel>
</DataTemplate>
Expand All @@ -44,22 +44,22 @@
</StackPanel>
</ScrollViewer>
</TabItem>

<TabItem Header="Subverter">
<ScrollViewer HorizontalScrollBarVisibility="Disabled">
<StackPanel>
<TextBlock Margin="4, 0" Text="Sideloading" Classes="NanoHeadingMedium" />
<Separator/>
<ItemsControl Items="{Binding SubverterPatches}" Name="SubverterPatchList">

<ItemsControl ItemsSource="{Binding SubverterPatches}" Name="SubverterPatchList">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox VerticalAlignment="Center" Margin="4" IsChecked="{Binding Enabled}" Content="{Binding Name}"></CheckBox>
<TextBlock VerticalAlignment="Center" TextWrapping="Wrap"
Text="{Binding Desc}"
Margin="8" />
<TextBlock VerticalAlignment="Center" Margin="4" Foreground="Gray" Opacity="0.5"
<TextBlock VerticalAlignment="Center" Margin="4" Foreground="Gray" Opacity="0.5"
Text="{Binding Asm.Location, Converter={StaticResource PathToFileNameConverter}}"></TextBlock>
</StackPanel>
</DataTemplate>
Expand All @@ -68,22 +68,22 @@
</StackPanel>
</ScrollViewer>
</TabItem>

<TabItem Header="ResourcePacks" IsVisible="{Binding ShowRPacks}">
<ScrollViewer HorizontalScrollBarVisibility="Disabled">
<StackPanel>
<TextBlock Margin="4, 0" Text="Patches" Classes="NanoHeadingMedium" />
<Separator/>
<ItemsControl Items="{Binding ResourcePacks}" Name="ResourcePackList">

<ItemsControl ItemsSource="{Binding ResourcePacks}" Name="ResourcePackList">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox VerticalAlignment="Center" Margin="4" IsChecked="{Binding Enabled}" Content="{Binding Name}"></CheckBox>
<TextBlock VerticalAlignment="Center" TextWrapping="Wrap"
Text="{Binding Desc}"
Margin="8" />
<TextBlock VerticalAlignment="Center" Margin="4" Foreground="DimGray" Opacity="0.5"
<TextBlock VerticalAlignment="Center" Margin="4" Foreground="DimGray" Opacity="0.5"
Text="{Binding Dir, Converter={StaticResource PathToFileNameConverter}}"></TextBlock>
</StackPanel>
</DataTemplate>
Expand All @@ -97,7 +97,7 @@
<Button Content="Open mod directory" Margin="4, 0" HorizontalAlignment="Right"
Command="{Binding OpenPatchDirectoryCommand}" Height="30"/>
<Button Content="Recheck mods" Margin="4, 0" HorizontalAlignment="Right"
Command="{Binding ReloadMods}" Height="30"/>
Command="{Binding ReloadModsCommand}" Height="30"/>
</StackPanel>
</Grid>
</ScrollViewer>
Expand Down

0 comments on commit 9eb78c7

Please sign in to comment.