diff --git a/README.md b/README.md index 14a3845..7d90b19 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SPT-AKI Installer made for EFT. +# SPT Installer made for EFT. <img src="https://i.imgur.com/jtlwLsr.png" alt="spt installer 2.59" width="700"/> @@ -9,12 +9,12 @@ - Checks if there is enough space before install - Checks installer is not in a problematic path - Checks install folder does not have game files already in it -- Checks if gameversion matches aki version, if so skip patcher process +- Checks if gameversion matches SPT version, if so skip patcher process - Checks both zips are there, other than when the above match, patcher isnt checked for - downloads both Zips from the Repo's if needed ### Installer Processes: - Copies files from registry logged GamePath to new location - Extracts, runs and deletes patcher with no user input -- Extracts Aki -- Deletes both Patcher and AKI zips at the end \ No newline at end of file +- Extracts SPT +- Deletes both Patcher and SPT zips at the end \ No newline at end of file diff --git a/SPTInstaller/App.axaml b/SPTInstaller/App.axaml index fc2db57..3331a7d 100644 --- a/SPTInstaller/App.axaml +++ b/SPTInstaller/App.axaml @@ -16,21 +16,21 @@ <Application.Resources> <!-- Colors --> - <Color x:Key="AKI_DarkGray">#121212</Color> - <Color x:Key="AKI_Yellow">#FFC107</Color> - <Color x:Key="AKI_White">#FFFFFF</Color> - <Color x:Key="AKI_Gray">#282828</Color> - <Color x:Key="AKI_DarkGrayBlue">#323947</Color> - <Color x:Key="AKI_LightGrayBlue">#444259</Color> + <Color x:Key="SPT_DarkGray">#121212</Color> + <Color x:Key="SPT_Yellow">#FFC107</Color> + <Color x:Key="SPT_White">#FFFFFF</Color> + <Color x:Key="SPT_Gray">#282828</Color> + <Color x:Key="SPT_DarkGrayBlue">#323947</Color> + <Color x:Key="SPT_LightGrayBlue">#444259</Color> <!-- Brushes --> - <SolidColorBrush x:Key="AKI_Foreground_Light" Color="{StaticResource AKI_White}" /> - <SolidColorBrush x:Key="AKI_Background_Light" Color="{StaticResource AKI_Gray}" /> - <SolidColorBrush x:Key="AKI_Background_Dark" Color="{StaticResource AKI_DarkGray}" /> - <SolidColorBrush x:Key="AKI_Brush_Yellow" Color="{StaticResource AKI_Yellow}" /> - <SolidColorBrush x:Key="AKI_Brush_DarkGrayBlue" Color="{StaticResource AKI_DarkGrayBlue}" /> - <SolidColorBrush x:Key="AKI_Brush_LightGrayBlue" Color="{StaticResource AKI_LightGrayBlue}" /> - <SolidColorBrush x:Key="AKI_Brush_Lighter" Color="Gainsboro" /> + <SolidColorBrush x:Key="SPT_Foreground_Light" Color="{StaticResource SPT_White}" /> + <SolidColorBrush x:Key="SPT_Background_Light" Color="{StaticResource SPT_Gray}" /> + <SolidColorBrush x:Key="SPT_Background_Dark" Color="{StaticResource SPT_DarkGray}" /> + <SolidColorBrush x:Key="SPT_Brush_Yellow" Color="{StaticResource SPT_Yellow}" /> + <SolidColorBrush x:Key="SPT_Brush_DarkGrayBlue" Color="{StaticResource SPT_DarkGrayBlue}" /> + <SolidColorBrush x:Key="SPT_Brush_LightGrayBlue" Color="{StaticResource SPT_LightGrayBlue}" /> + <SolidColorBrush x:Key="SPT_Brush_Lighter" Color="Gainsboro" /> <!-- Path Geometry --> <PathGeometry x:Key="CircledCheck" diff --git a/SPTInstaller/App.axaml.cs b/SPTInstaller/App.axaml.cs index c1e97d9..038fcd6 100644 --- a/SPTInstaller/App.axaml.cs +++ b/SPTInstaller/App.axaml.cs @@ -12,7 +12,7 @@ namespace SPTInstaller; public partial class App : Application { - private readonly string _logPath = Path.Join(Environment.CurrentDirectory, "spt-aki-installer_.log"); + private readonly string _logPath = Path.Join(Environment.CurrentDirectory, "spt-installer_.log"); public override void Initialize() { diff --git a/SPTInstaller/Assets/Styles.axaml b/SPTInstaller/Assets/Styles.axaml index c1206e1..a20d4ad 100644 --- a/SPTInstaller/Assets/Styles.axaml +++ b/SPTInstaller/Assets/Styles.axaml @@ -2,7 +2,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cc="using:SPTInstaller.CustomControls"> <Design.PreviewWith> - <StackPanel Spacing="5" Background="{StaticResource AKI_Background_Dark}"> + <StackPanel Spacing="5" Background="{StaticResource SPT_Background_Dark}"> <Button Classes="icon" x:Name="testBtn"> <Path Data="{StaticResource Bug}" Fill="{Binding ElementName=testBtn, Path=Foreground}" /> @@ -16,30 +16,30 @@ <!-- TitleBar Styles --> <Style Selector="cc|TitleBar"> - <Setter Property="Background" Value="{StaticResource AKI_Background_Dark}" /> - <Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}" /> - <Setter Property="ButtonForeground" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="Background" Value="{StaticResource SPT_Background_Dark}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Foreground_Light}" /> + <Setter Property="ButtonForeground" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> </Style> <Style Selector="cc|TitleBar.versiontag"> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_Yellow}" /> <Setter Property="BorderThickness" Value="0 0 0 2" /> </Style> <!-- TextBox Styles --> <!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml --> <Style Selector="TextBox"> - <Setter Property="Background" Value="{StaticResource AKI_Background_Light}" /> + <Setter Property="Background" Value="{StaticResource SPT_Background_Light}" /> <Setter Property="FontWeight" Value="SemiBold" /> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Lighter}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Lighter}" /> </Style> <Style Selector="TextBox:focus"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Lighter}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Lighter}" /> </Style> <Style Selector="TextBox:pointerover"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Lighter}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Lighter}" /> </Style> <Style Selector="TextBox:pointerover /template/ Border#PART_BorderElement"> @@ -64,23 +64,23 @@ <Style Selector="TextBox:focus /template/ Border#PART_BorderElement"> <Setter Property="Background" Value="Transparent" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_Yellow}" /> <Setter Property="BorderThickness" Value="1" /> </Style> <!-- TextBlock Styles --> <Style Selector="TextBlock"> - <Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Foreground_Light}" /> </Style> <!-- Label Styles --> <!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Label.xaml --> <Style Selector="Label"> - <Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Foreground_Light}" /> </Style> <Style Selector="Label.yellow"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" /> </Style> <Style Selector="Label.dark"> @@ -94,8 +94,8 @@ <!-- ProgressBar Styles --> <!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml --> <Style Selector="ProgressBar"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" /> - <Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" /> + <Setter Property="Background" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> </Style> <Style Selector="ProgressBar.error"> @@ -103,7 +103,7 @@ <Style.Animations> <Animation Duration="0:0:0.5" FillMode="Forward"> <KeyFrame Cue="0%"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" /> <Setter Property="Value" Value="0" /> </KeyFrame> <KeyFrame Cue="100%"> @@ -117,36 +117,36 @@ <!-- Seperator Styles --> <!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Separator.xaml --> <Style Selector="Separator"> - <Setter Property="Background" Value="{StaticResource AKI_Background_Dark}" /> + <Setter Property="Background" Value="{StaticResource SPT_Background_Dark}" /> </Style> <!-- Button Styles --> <!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Button.xaml --> <Style Selector="Button"> - <Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> - <Setter Property="Foreground" Value="{StaticResource AKI_White}" /> + <Setter Property="Background" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_White}" /> </Style> <Style Selector="Button:pointerover /template/ ContentPresenter"> - <Setter Property="Background" Value="{StaticResource AKI_LightGrayBlue}" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_LightGrayBlue}" /> - <Setter Property="Foreground" Value="{StaticResource AKI_White}" /> + <Setter Property="Background" Value="{StaticResource SPT_LightGrayBlue}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_LightGrayBlue}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_White}" /> <Setter Property="BorderThickness" Value="1" /> </Style> <Style Selector="Button:pressed /template/ ContentPresenter"> - <Setter Property="Background" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="Background" Value="{StaticResource SPT_Brush_Yellow}" /> </Style> <Style Selector="Button:disabled /template/ ContentPresenter"> <Setter Property="Background" Value="Transparent" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> </Style> <!-- Button yellow --> <Style Selector="Button.yellow"> - <Setter Property="Background" Value="{StaticResource AKI_Brush_Yellow}" /> - <Setter Property="Foreground" Value="{StaticResource AKI_Background_Dark}" /> + <Setter Property="Background" Value="{StaticResource SPT_Brush_Yellow}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Background_Dark}" /> <Setter Property="FontWeight" Value="SemiBold" /> </Style> @@ -156,37 +156,37 @@ <Style Selector="Button.yellow:pointerover /template/ ContentPresenter"> <Setter Property="Background" Value="Gold" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> - <Setter Property="Foreground" Value="{StaticResource AKI_Background_Dark}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Background_Dark}" /> <Setter Property="BorderThickness" Value="1" /> </Style> <Style Selector="Button.yellow:pressed /template/ ContentPresenter"> - <Setter Property="Background" Value="{StaticResource AKI_Brush_Lighter}" /> + <Setter Property="Background" Value="{StaticResource SPT_Brush_Lighter}" /> </Style> <Style Selector="Button.yellow:disabled /template/ ContentPresenter"> <Setter Property="Background" Value="Transparent" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> </Style> <!-- Button outlined Style --> <Style Selector="Button.outlined"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Lighter}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Lighter}" /> <Setter Property="Background" Value="Transparent" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> <Setter Property="BorderThickness" Value="2" /> </Style> <Style Selector="Button.outlined:pointerover /template/ ContentPresenter"> - <Setter Property="TextBlock.Foreground" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="TextBlock.Foreground" Value="{StaticResource SPT_Brush_Yellow}" /> <Setter Property="Background" Value="Transparent" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_Yellow}" /> <Setter Property="BorderThickness" Value="2" /> </Style> <Style Selector="Button.outlined:pressed /template/ ContentPresenter"> - <Setter Property="TextBlock.Foreground" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="TextBlock.Foreground" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderThickness" Value="0" /> @@ -194,7 +194,7 @@ <!-- Button Link Style --> <Style Selector="Button.link"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Lighter}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Lighter}" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderThickness" Value="0 0 0 1" /> @@ -208,22 +208,22 @@ </Style> <Style Selector="Button.link:pointerover TextBlock"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" /> </Style> <Style Selector="Button.link:pressed TextBlock"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> </Style> <Style Selector="Button.link:pointerover /template/ ContentPresenter"> - <Setter Property="TextBlock.Foreground" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="TextBlock.Foreground" Value="{StaticResource SPT_Brush_Yellow}" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderThickness" Value="0 0 0 1" /> </Style> <Style Selector="Button.link:pressed /template/ ContentPresenter"> - <Setter Property="TextBlock.Foreground" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="TextBlock.Foreground" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderThickness" Value="0 0 0 1" /> @@ -231,21 +231,21 @@ <!-- Button outlinedTLCorner Style --> <Style Selector="Button.outlinedTLCorner"> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Lighter}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Lighter}" /> <Setter Property="Background" Value="Transparent" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> <Setter Property="BorderThickness" Value="2 2 0 0" /> </Style> <Style Selector="Button.outlinedTLCorner:pointerover /template/ ContentPresenter"> - <Setter Property="TextBlock.Foreground" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="TextBlock.Foreground" Value="{StaticResource SPT_Brush_Yellow}" /> <Setter Property="Background" Value="Transparent" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_Yellow}" /> <Setter Property="BorderThickness" Value="2 2 0 0" /> </Style> <Style Selector="Button.outlinedTLCorner:pressed /template/ ContentPresenter"> - <Setter Property="TextBlock.Foreground" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="TextBlock.Foreground" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderThickness" Value="0" /> @@ -258,13 +258,13 @@ </Style> <Style Selector="Button.icon:pointerover"> <Setter Property="Background" Value="Transparent" /> - <Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" /> </Style> <Style Selector="Button.icon:pointerover /template/ ContentPresenter"> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> </Style> <Style Selector="Button.icon:pressed"> - <Setter Property="Foreground" Value="{StaticResource AKI_DarkGrayBlue}"></Setter> + <Setter Property="Foreground" Value="{StaticResource SPT_DarkGrayBlue}"></Setter> </Style> </Styles> \ No newline at end of file diff --git a/SPTInstaller/CustomControls/Dialogs/ChangeLogDialog.axaml b/SPTInstaller/CustomControls/Dialogs/ChangeLogDialog.axaml index 4f4f738..99cbbbd 100644 --- a/SPTInstaller/CustomControls/Dialogs/ChangeLogDialog.axaml +++ b/SPTInstaller/CustomControls/Dialogs/ChangeLogDialog.axaml @@ -9,7 +9,7 @@ <StackPanel> <Label Content="{Binding Version, RelativeSource={RelativeSource AncestorType=UserControl}, StringFormat='{}Installer Change Log for {0}'}" FontSize="18" FontWeight="SemiBold" /> - <Separator Margin="0 10" Padding="0" Background="{StaticResource AKI_Yellow}"/> + <Separator Margin="0 10" Padding="0" Background="{StaticResource SPT_Yellow}"/> <ScrollViewer MaxHeight="250"> <TextBlock Text="{Binding Message, RelativeSource={RelativeSource AncestorType=UserControl}}" TextWrapping="Wrap" MinHeight="100" diff --git a/SPTInstaller/CustomControls/Dialogs/ConfirmationDialog.axaml b/SPTInstaller/CustomControls/Dialogs/ConfirmationDialog.axaml index 4ca75d6..d13e4df 100644 --- a/SPTInstaller/CustomControls/Dialogs/ConfirmationDialog.axaml +++ b/SPTInstaller/CustomControls/Dialogs/ConfirmationDialog.axaml @@ -8,7 +8,7 @@ MinWidth="300" MinHeight="100" MaxWidth="600" MaxHeight="300"> <Grid RowDefinitions="10,AUTO,*,AUTO,10" ColumnDefinitions="10,*,AUTO,10,AUTO,10" - Background="{StaticResource AKI_Background_Light}"> + Background="{StaticResource SPT_Background_Light}"> <TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="4" Text="{Binding Message, RelativeSource={RelativeSource AncestorType=UserControl}}" TextWrapping="Wrap" /> diff --git a/SPTInstaller/CustomControls/Dialogs/WhyCacheThoughDialog.axaml b/SPTInstaller/CustomControls/Dialogs/WhyCacheThoughDialog.axaml index bf70a76..7abda5f 100644 --- a/SPTInstaller/CustomControls/Dialogs/WhyCacheThoughDialog.axaml +++ b/SPTInstaller/CustomControls/Dialogs/WhyCacheThoughDialog.axaml @@ -7,9 +7,9 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="SPTInstaller.CustomControls.Dialogs.WhyCacheThoughDialog"> <Grid RowDefinitions="AUTO,AUTO,AUTO,*,AUTO" ColumnDefinitions="*,AUTO" - Background="{StaticResource AKI_Background_Light}"> + Background="{StaticResource SPT_Background_Light}"> <Label Content="What is the installer cache for?" FontSize="20" - Foreground="{StaticResource AKI_Brush_Yellow}" /> + Foreground="{StaticResource SPT_Brush_Yellow}" /> <TextBlock Grid.Row="1" Grid.ColumnSpan="2" TextWrapping="Wrap" xml:space="preserve"> The installer cache is used to ensure you don't re-download large files that you've already downloaded before. <Span Foreground="red">You should only delete the cache folder if</Span> diff --git a/SPTInstaller/CustomControls/PreCheckItem.axaml b/SPTInstaller/CustomControls/PreCheckItem.axaml index 32e3a32..cd5d29e 100644 --- a/SPTInstaller/CustomControls/PreCheckItem.axaml +++ b/SPTInstaller/CustomControls/PreCheckItem.axaml @@ -17,7 +17,7 @@ <Style Selector="Button.selectable"> <Setter Property="Background" Value="Transparent" /> - <Setter Property="Foreground" Value="{StaticResource AKI_Background_Dark}" /> + <Setter Property="Foreground" Value="{StaticResource SPT_Background_Dark}" /> <Setter Property="FontWeight" Value="SemiBold" /> </Style> @@ -26,18 +26,18 @@ </Style> <Style Selector="Button.selectable:pointerover /template/ ContentPresenter"> - <Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="Background" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> <Setter Property="BorderThickness" Value="1" /> </Style> <Style Selector="Button.selectable:disabled /template/ ContentPresenter"> <Setter Property="Background" Value="Transparent" /> - <Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> </Style> <Style Selector="Button.selected"> - <Setter Property="Background" Value="{StaticResource AKI_Brush_LightGrayBlue}" /> + <Setter Property="Background" Value="{StaticResource SPT_Brush_LightGrayBlue}" /> <Setter Property="BorderThickness" Value="1" /> </Style> </UserControl.Styles> diff --git a/SPTInstaller/CustomControls/ProgressableTaskItem.axaml b/SPTInstaller/CustomControls/ProgressableTaskItem.axaml index 9b18c05..99bc24a 100644 --- a/SPTInstaller/CustomControls/ProgressableTaskItem.axaml +++ b/SPTInstaller/CustomControls/ProgressableTaskItem.axaml @@ -62,7 +62,7 @@ <Ellipse Height="30" Width="30" StrokeThickness="4" - Fill="{StaticResource AKI_Background_Dark}" + Fill="{StaticResource SPT_Background_Dark}" HorizontalAlignment="Left" Classes.running="{Binding IsRunning, RelativeSource={RelativeSource AncestorType=UserControl}}" Classes.completed="{Binding IsCompleted, RelativeSource={RelativeSource AncestorType=UserControl}}" /> diff --git a/SPTInstaller/CustomControls/TitleBar.axaml b/SPTInstaller/CustomControls/TitleBar.axaml index be6e3f4..27e6dce 100644 --- a/SPTInstaller/CustomControls/TitleBar.axaml +++ b/SPTInstaller/CustomControls/TitleBar.axaml @@ -34,11 +34,11 @@ Width="35"> <Button.Styles> <Style Selector="Button:pointerover /template/ ContentPresenter"> - <Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}" /> + <Setter Property="Background" Value="{StaticResource SPT_Brush_DarkGrayBlue}" /> <Setter Property="BorderThickness" Value="0" /> </Style> <Style Selector="Button:pressed /template/ ContentPresenter"> - <Setter Property="Background" Value="{StaticResource AKI_Background_Light}" /> + <Setter Property="Background" Value="{StaticResource SPT_Background_Light}" /> </Style> </Button.Styles> </Button> diff --git a/SPTInstaller/Helpers/FileHelper.cs b/SPTInstaller/Helpers/FileHelper.cs index bcb962b..61681c9 100644 --- a/SPTInstaller/Helpers/FileHelper.cs +++ b/SPTInstaller/Helpers/FileHelper.cs @@ -96,29 +96,35 @@ public static class FileHelper { try { + Log.Debug($"Starting StreamAssemblyResourceOut, resourcename: {resourceName}, outputFilePath: {outputFilePath}"); var assembly = Assembly.GetExecutingAssembly(); + Log.Debug($"1"); FileInfo outputFile = new FileInfo(outputFilePath); - + Log.Debug($"2"); if (outputFile.Exists) { + Log.Debug($"3"); outputFile.Delete(); } - + Log.Debug($"4"); if (!outputFile.Directory.Exists) { + Log.Debug($"5"); Directory.CreateDirectory(outputFile.Directory.FullName); } - + Log.Debug($"6"); var resName = assembly.GetManifestResourceNames().First(x => x.EndsWith(resourceName)); - + Log.Debug($"7"); using (FileStream fs = File.Create(outputFilePath)) using (Stream s = assembly.GetManifestResourceStream(resName)) { + Log.Debug($"8"); s.CopyTo(fs); } - + Log.Debug($"9"); outputFile.Refresh(); + Log.Debug(outputFile.Exists.ToString()); return outputFile.Exists; } catch (Exception ex) diff --git a/SPTInstaller/Helpers/ProcessHelper.cs b/SPTInstaller/Helpers/ProcessHelper.cs index dd925bb..12e004b 100644 --- a/SPTInstaller/Helpers/ProcessHelper.cs +++ b/SPTInstaller/Helpers/ProcessHelper.cs @@ -38,7 +38,7 @@ public static class ProcessHelper switch ((PatcherExitCode)process.ExitCode) { case PatcherExitCode.Success: - return Result.FromSuccess("Patcher Finished Successfully, extracting Aki"); + return Result.FromSuccess("Patcher Finished Successfully, extracting SPT"); case PatcherExitCode.ProgramClosed: return Result.FromError("Patcher was closed before completing!"); @@ -47,7 +47,7 @@ public static class ProcessHelper return Result.FromError("EscapeFromTarkov.exe is missing from the install Path"); case PatcherExitCode.NoPatchFolder: - return Result.FromError("Patchers Folder called 'Aki_Patches' is missing"); + return Result.FromError("Patchers Folder called 'SPT_Patches' is missing"); case PatcherExitCode.MissingFile: return Result.FromError("EFT files was missing a Vital file to continue"); diff --git a/SPTInstaller/Installer Tasks/DownloadTask.cs b/SPTInstaller/Installer Tasks/DownloadTask.cs index 75875cc..3776944 100644 --- a/SPTInstaller/Installer Tasks/DownloadTask.cs +++ b/SPTInstaller/Installer Tasks/DownloadTask.cs @@ -68,23 +68,23 @@ public class DownloadTask : InstallerTaskBase return Result.FromError("Failed to download Patcher"); } - private async Task<IResult> DownloadSptAkiFromMirrors(IProgress<double> progress) + private async Task<IResult> DownloadSPTFromMirrors(IProgress<double> progress) { // Note that GetOrDownloadFileAsync handles the cached file hash check, so we don't need to check it first foreach (var mirror in _data.ReleaseInfo.Mirrors) { - SetStatus("Downloading SPT-AKI", mirror.DownloadUrl, progressStyle: ProgressStyle.Indeterminate); + SetStatus("Downloading SPT", mirror.DownloadUrl, progressStyle: ProgressStyle.Indeterminate); - _data.AkiZipInfo = - await DownloadCacheHelper.GetOrDownloadFileAsync("sptaki", mirror.DownloadUrl, progress, mirror.Hash); + _data.SPTZipInfo = + await DownloadCacheHelper.GetOrDownloadFileAsync("SPT", mirror.DownloadUrl, progress, mirror.Hash); - if (_data.AkiZipInfo != null) + if (_data.SPTZipInfo != null) { return Result.FromSuccess(); } } - return Result.FromError("Failed to download spt-aki"); + return Result.FromError("Failed to download SPT"); } public override async Task<IResult> TaskOperation() @@ -110,6 +110,6 @@ public class DownloadTask : InstallerTaskBase } } - return await DownloadSptAkiFromMirrors(progress); + return await DownloadSPTFromMirrors(progress); } } \ No newline at end of file diff --git a/SPTInstaller/Installer Tasks/ReleaseCheckTask.cs b/SPTInstaller/Installer Tasks/ReleaseCheckTask.cs index 8857c55..ca8b018 100644 --- a/SPTInstaller/Installer Tasks/ReleaseCheckTask.cs +++ b/SPTInstaller/Installer Tasks/ReleaseCheckTask.cs @@ -24,58 +24,58 @@ public class ReleaseCheckTask : InstallerTaskBase SetStatus("Checking SPT Releases", "", null, ProgressStyle.Indeterminate); var progress = new Progress<double>((d) => { SetStatus(null, null, (int)Math.Floor(d)); }); - var akiReleaseInfoFile = + var SPTReleaseInfoFile = await DownloadCacheHelper.GetOrDownloadFileAsync("release.json", DownloadCacheHelper.ReleaseMirrorUrl, progress, DownloadCacheHelper.SuggestedTtl); - if (akiReleaseInfoFile == null) + if (SPTReleaseInfoFile == null) { return Result.FromError("Failed to download release metadata"); } - var akiReleaseInfo = - JsonConvert.DeserializeObject<ReleaseInfo>(File.ReadAllText(akiReleaseInfoFile.FullName)); + var SPTReleaseInfo = + JsonConvert.DeserializeObject<ReleaseInfo>(File.ReadAllText(SPTReleaseInfoFile.FullName)); SetStatus("Checking for Patches", "", null, ProgressStyle.Indeterminate); - var akiPatchMirrorsFile = + var SPTPatchMirrorsFile = await DownloadCacheHelper.GetOrDownloadFileAsync("mirrors.json", DownloadCacheHelper.PatchMirrorUrl, progress, DownloadCacheHelper.SuggestedTtl); - if (akiPatchMirrorsFile == null) + if (SPTPatchMirrorsFile == null) { return Result.FromError("Failed to download patch mirror data"); } var patchMirrorInfo = - JsonConvert.DeserializeObject<PatchInfo>(File.ReadAllText(akiPatchMirrorsFile.FullName)); + JsonConvert.DeserializeObject<PatchInfo>(File.ReadAllText(SPTPatchMirrorsFile.FullName)); - if (akiReleaseInfo == null || patchMirrorInfo == null) + if (SPTReleaseInfo == null || patchMirrorInfo == null) { - return Result.FromError("An error occurred while deserializing aki or patch data"); + return Result.FromError("An error occurred while deserializing SPT or patch data"); } - _data.ReleaseInfo = akiReleaseInfo; + _data.ReleaseInfo = SPTReleaseInfo; _data.PatchInfo = patchMirrorInfo; - int intAkiVersion = int.Parse(akiReleaseInfo.ClientVersion); + int intSPTVersion = int.Parse(SPTReleaseInfo.ClientVersion); int intGameVersion = int.Parse(_data.OriginalGameVersion); - // note: it's possible the game version could be lower than the aki version and still need a patch if the major version numbers change + // note: it's possible the game version could be lower than the SPT version and still need a patch if the major version numbers change // : it's probably a low chance though - bool patchNeedCheck = intGameVersion > intAkiVersion; + bool patchNeedCheck = intGameVersion > intSPTVersion; - if (intGameVersion < intAkiVersion) + if (intGameVersion < intSPTVersion) { return Result.FromError("Your client is outdated. Please update EFT"); } - if (intGameVersion == intAkiVersion) + if (intGameVersion == intSPTVersion) { patchNeedCheck = false; } if ((intGameVersion != patchMirrorInfo.SourceClientVersion || - intAkiVersion != patchMirrorInfo.TargetClientVersion) && patchNeedCheck) + intSPTVersion != patchMirrorInfo.TargetClientVersion) && patchNeedCheck) { return Result.FromError( "No patcher available for your version.\nA patcher is usually created within 24 hours of an EFT update."); @@ -84,7 +84,7 @@ public class ReleaseCheckTask : InstallerTaskBase _data.PatchNeeded = patchNeedCheck; string status = - $"Current Release: {akiReleaseInfo.ClientVersion} - {(_data.PatchNeeded ? "Patch Available" : "No Patch Needed")}"; + $"Current Release: {SPTReleaseInfo.ClientVersion} - {(_data.PatchNeeded ? "Patch Available" : "No Patch Needed")}"; SetStatus(null, status); diff --git a/SPTInstaller/Installer Tasks/SetupClientTask.cs b/SPTInstaller/Installer Tasks/SetupClientTask.cs index a2f2607..2a85cbc 100644 --- a/SPTInstaller/Installer Tasks/SetupClientTask.cs +++ b/SPTInstaller/Installer Tasks/SetupClientTask.cs @@ -71,7 +71,7 @@ public class SetupClientTask : InstallerTaskBase // extract release files SetStatus("Extracting Release", "", 0); - var extractReleaseResult = ZipHelper.Decompress(_data.AkiZipInfo, targetInstallDirInfo, progress); + var extractReleaseResult = ZipHelper.Decompress(_data.SPTZipInfo, targetInstallDirInfo, progress); if (!extractReleaseResult.Succeeded) { diff --git a/SPTInstaller/Models/InternalData.cs b/SPTInstaller/Models/InternalData.cs index 94bbc78..7f47166 100644 --- a/SPTInstaller/Models/InternalData.cs +++ b/SPTInstaller/Models/InternalData.cs @@ -26,9 +26,9 @@ public class InternalData public FileInfo PatcherZipInfo { get; set; } /// <summary> - /// SPT-AKI zip file info + /// SPT zip file info /// </summary> - public FileInfo AkiZipInfo { get; set; } + public FileInfo SPTZipInfo { get; set; } /// <summary> /// The release information from release.json diff --git a/SPTInstaller/Models/ReleaseInfo/ReleaseInfo.cs b/SPTInstaller/Models/ReleaseInfo/ReleaseInfo.cs index 44b5df4..f252882 100644 --- a/SPTInstaller/Models/ReleaseInfo/ReleaseInfo.cs +++ b/SPTInstaller/Models/ReleaseInfo/ReleaseInfo.cs @@ -4,7 +4,7 @@ namespace SPTInstaller.Models.ReleaseInfo; public class ReleaseInfo { - public string AkiVersion { get; set; } + public string AkiVersion { get; set; } // TODO: Change this and what gets uploaded to SPTVersion public string ClientVersion { get; set; } public List<ReleaseInfoMirror> Mirrors { get; set; } } \ No newline at end of file diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj index ca0fba1..4b97e46 100644 --- a/SPTInstaller/SPTInstaller.csproj +++ b/SPTInstaller/SPTInstaller.csproj @@ -6,12 +6,13 @@ <Nullable>enable</Nullable> <BuiltInComInteropSupport>true</BuiltInComInteropSupport> <ApplicationManifest>app.manifest</ApplicationManifest> + <!-- TODO: To change --> <PackageIcon>icon.ico</PackageIcon> <ApplicationIcon>Assets\icon.ico</ApplicationIcon> <Configurations>Debug;Release;TEST</Configurations> <AssemblyVersion>2.66</AssemblyVersion> <FileVersion>2.66</FileVersion> - <Company>SPT-AKI</Company> + <Company>SPT</Company> </PropertyGroup> <ItemGroup> diff --git a/SPTInstaller/ViewModels/PreChecksViewModel.cs b/SPTInstaller/ViewModels/PreChecksViewModel.cs index 7b111c6..38d31bc 100644 --- a/SPTInstaller/ViewModels/PreChecksViewModel.cs +++ b/SPTInstaller/ViewModels/PreChecksViewModel.cs @@ -156,7 +156,7 @@ public class PreChecksViewModel : ViewModelBase { Log.CloseAndFlush(); - var logFiles = Directory.GetFiles(InstallPath, "spt-aki-installer_*.log"); + var logFiles = Directory.GetFiles(InstallPath, "spt-installer_*.log"); // remove log file from original game path if they exist foreach (var file in logFiles) @@ -287,27 +287,27 @@ public class PreChecksViewModel : ViewModelBase var progress = new Progress<double>((d) => { }); - var akiReleaseInfoFile = + var SPTReleaseInfoFile = await DownloadCacheHelper.GetOrDownloadFileAsync("release.json", DownloadCacheHelper.ReleaseMirrorUrl, progress, DownloadCacheHelper.SuggestedTtl); - if (akiReleaseInfoFile == null) + if (SPTReleaseInfoFile == null) { InstallButtonText = "Could not get SPT release metadata"; InstallButtonCheckState = StatusSpinner.SpinnerState.Error; return; } - var akiReleaseInfo = - JsonConvert.DeserializeObject<ReleaseInfo>(File.ReadAllText(akiReleaseInfoFile.FullName)); - if (akiReleaseInfo == null) + var SPTReleaseInfo = + JsonConvert.DeserializeObject<ReleaseInfo>(File.ReadAllText(SPTReleaseInfoFile.FullName)); + if (SPTReleaseInfo == null) { InstallButtonText = "Could not parse latest SPT release"; InstallButtonCheckState = StatusSpinner.SpinnerState.Error; return; } - InstallButtonText = $"Start Install: SPT v{akiReleaseInfo.AkiVersion}"; + InstallButtonText = $"Start Install: SPT v{SPTReleaseInfo.SPTVersion}"; InstallButtonCheckState = StatusSpinner.SpinnerState.OK; AllowDetailsButton = true; diff --git a/SPTInstaller/Views/InstallView.axaml b/SPTInstaller/Views/InstallView.axaml index 272e96e..d6a4979 100644 --- a/SPTInstaller/Views/InstallView.axaml +++ b/SPTInstaller/Views/InstallView.axaml @@ -9,10 +9,10 @@ <Grid ColumnDefinitions="*, 2*"> <cc:ProgressableTaskList Tasks="{Binding MyTasks}" Padding="20" - Background="{StaticResource AKI_Background_Dark}" + Background="{StaticResource SPT_Background_Dark}" PendingColor="Gray" RunningColor="DodgerBlue" - CompletedColor="{StaticResource AKI_Brush_Yellow}" /> + CompletedColor="{StaticResource SPT_Brush_Yellow}" /> <cc:TaskDetails Grid.Column="1" Message="{Binding CurrentTask.StatusMessage}" Details="{Binding CurrentTask.StatusDetails}" diff --git a/SPTInstaller/Views/MainWindow.axaml b/SPTInstaller/Views/MainWindow.axaml index ad120f2..922e1af 100644 --- a/SPTInstaller/Views/MainWindow.axaml +++ b/SPTInstaller/Views/MainWindow.axaml @@ -15,7 +15,7 @@ ExtendClientAreaToDecorationsHint="True" ExtendClientAreaChromeHints="NoChrome" ExtendClientAreaTitleBarHeightHint="-1" - Background="{StaticResource AKI_Background_Light}" + Background="{StaticResource SPT_Background_Light}" MinWidth="800" MinHeight="400"> <Window.Styles> @@ -32,7 +32,7 @@ XButtonCommand="{Binding CloseCommand}" MinButtonCommand="{Binding MinimizeCommand}" /> - <dialogHost:DialogHost Grid.Row="1" Background="{StaticResource AKI_Background_Light}"> + <dialogHost:DialogHost Grid.Row="1" Background="{StaticResource SPT_Background_Light}"> <rxui:RoutedViewHost Router="{Binding Router}" /> </dialogHost:DialogHost> </Grid>