rebrand - ico and release Field to change
This commit is contained in:
parent
1e7a6fd8c5
commit
9748461024
@ -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"/>
|
<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 if there is enough space before install
|
||||||
- Checks installer is not in a problematic path
|
- Checks installer is not in a problematic path
|
||||||
- Checks install folder does not have game files already in it
|
- 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
|
- Checks both zips are there, other than when the above match, patcher isnt checked for
|
||||||
- downloads both Zips from the Repo's if needed
|
- downloads both Zips from the Repo's if needed
|
||||||
|
|
||||||
### Installer Processes:
|
### Installer Processes:
|
||||||
- Copies files from registry logged GamePath to new location
|
- Copies files from registry logged GamePath to new location
|
||||||
- Extracts, runs and deletes patcher with no user input
|
- Extracts, runs and deletes patcher with no user input
|
||||||
- Extracts Aki
|
- Extracts SPT
|
||||||
- Deletes both Patcher and AKI zips at the end
|
- Deletes both Patcher and SPT zips at the end
|
@ -16,21 +16,21 @@
|
|||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
|
||||||
<!-- Colors -->
|
<!-- Colors -->
|
||||||
<Color x:Key="AKI_DarkGray">#121212</Color>
|
<Color x:Key="SPT_DarkGray">#121212</Color>
|
||||||
<Color x:Key="AKI_Yellow">#FFC107</Color>
|
<Color x:Key="SPT_Yellow">#FFC107</Color>
|
||||||
<Color x:Key="AKI_White">#FFFFFF</Color>
|
<Color x:Key="SPT_White">#FFFFFF</Color>
|
||||||
<Color x:Key="AKI_Gray">#282828</Color>
|
<Color x:Key="SPT_Gray">#282828</Color>
|
||||||
<Color x:Key="AKI_DarkGrayBlue">#323947</Color>
|
<Color x:Key="SPT_DarkGrayBlue">#323947</Color>
|
||||||
<Color x:Key="AKI_LightGrayBlue">#444259</Color>
|
<Color x:Key="SPT_LightGrayBlue">#444259</Color>
|
||||||
|
|
||||||
<!-- Brushes -->
|
<!-- Brushes -->
|
||||||
<SolidColorBrush x:Key="AKI_Foreground_Light" Color="{StaticResource AKI_White}" />
|
<SolidColorBrush x:Key="SPT_Foreground_Light" Color="{StaticResource SPT_White}" />
|
||||||
<SolidColorBrush x:Key="AKI_Background_Light" Color="{StaticResource AKI_Gray}" />
|
<SolidColorBrush x:Key="SPT_Background_Light" Color="{StaticResource SPT_Gray}" />
|
||||||
<SolidColorBrush x:Key="AKI_Background_Dark" Color="{StaticResource AKI_DarkGray}" />
|
<SolidColorBrush x:Key="SPT_Background_Dark" Color="{StaticResource SPT_DarkGray}" />
|
||||||
<SolidColorBrush x:Key="AKI_Brush_Yellow" Color="{StaticResource AKI_Yellow}" />
|
<SolidColorBrush x:Key="SPT_Brush_Yellow" Color="{StaticResource SPT_Yellow}" />
|
||||||
<SolidColorBrush x:Key="AKI_Brush_DarkGrayBlue" Color="{StaticResource AKI_DarkGrayBlue}" />
|
<SolidColorBrush x:Key="SPT_Brush_DarkGrayBlue" Color="{StaticResource SPT_DarkGrayBlue}" />
|
||||||
<SolidColorBrush x:Key="AKI_Brush_LightGrayBlue" Color="{StaticResource AKI_LightGrayBlue}" />
|
<SolidColorBrush x:Key="SPT_Brush_LightGrayBlue" Color="{StaticResource SPT_LightGrayBlue}" />
|
||||||
<SolidColorBrush x:Key="AKI_Brush_Lighter" Color="Gainsboro" />
|
<SolidColorBrush x:Key="SPT_Brush_Lighter" Color="Gainsboro" />
|
||||||
|
|
||||||
<!-- Path Geometry -->
|
<!-- Path Geometry -->
|
||||||
<PathGeometry x:Key="CircledCheck"
|
<PathGeometry x:Key="CircledCheck"
|
||||||
|
@ -12,7 +12,7 @@ namespace SPTInstaller;
|
|||||||
|
|
||||||
public partial class App : Application
|
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()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:cc="using:SPTInstaller.CustomControls">
|
xmlns:cc="using:SPTInstaller.CustomControls">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<StackPanel Spacing="5" Background="{StaticResource AKI_Background_Dark}">
|
<StackPanel Spacing="5" Background="{StaticResource SPT_Background_Dark}">
|
||||||
<Button Classes="icon" x:Name="testBtn">
|
<Button Classes="icon" x:Name="testBtn">
|
||||||
<Path Data="{StaticResource Bug}"
|
<Path Data="{StaticResource Bug}"
|
||||||
Fill="{Binding ElementName=testBtn, Path=Foreground}" />
|
Fill="{Binding ElementName=testBtn, Path=Foreground}" />
|
||||||
@ -16,30 +16,30 @@
|
|||||||
|
|
||||||
<!-- TitleBar Styles -->
|
<!-- TitleBar Styles -->
|
||||||
<Style Selector="cc|TitleBar">
|
<Style Selector="cc|TitleBar">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Background_Dark}" />
|
<Setter Property="Background" Value="{StaticResource SPT_Background_Dark}" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Foreground_Light}" />
|
||||||
<Setter Property="ButtonForeground" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="ButtonForeground" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="cc|TitleBar.versiontag">
|
<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" />
|
<Setter Property="BorderThickness" Value="0 0 0 2" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- TextBox Styles -->
|
<!-- TextBox Styles -->
|
||||||
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml -->
|
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/TextBox.xaml -->
|
||||||
<Style Selector="TextBox">
|
<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="FontWeight" Value="SemiBold" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Lighter}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Brush_Lighter}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="TextBox:focus">
|
<Style Selector="TextBox:focus">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Lighter}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Brush_Lighter}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="TextBox:pointerover">
|
<Style Selector="TextBox:pointerover">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Lighter}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Brush_Lighter}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="TextBox:pointerover /template/ Border#PART_BorderElement">
|
<Style Selector="TextBox:pointerover /template/ Border#PART_BorderElement">
|
||||||
@ -64,23 +64,23 @@
|
|||||||
|
|
||||||
<Style Selector="TextBox:focus /template/ Border#PART_BorderElement">
|
<Style Selector="TextBox:focus /template/ Border#PART_BorderElement">
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<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" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- TextBlock Styles -->
|
<!-- TextBlock Styles -->
|
||||||
<Style Selector="TextBlock">
|
<Style Selector="TextBlock">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Foreground_Light}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Label Styles -->
|
<!-- Label Styles -->
|
||||||
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Label.xaml -->
|
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Label.xaml -->
|
||||||
<Style Selector="Label">
|
<Style Selector="Label">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Foreground_Light}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Foreground_Light}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Label.yellow">
|
<Style Selector="Label.yellow">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Label.dark">
|
<Style Selector="Label.dark">
|
||||||
@ -94,8 +94,8 @@
|
|||||||
<!-- ProgressBar Styles -->
|
<!-- ProgressBar Styles -->
|
||||||
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml -->
|
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/ProgressBar.xaml -->
|
||||||
<Style Selector="ProgressBar">
|
<Style Selector="ProgressBar">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" />
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="Background" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="ProgressBar.error">
|
<Style Selector="ProgressBar.error">
|
||||||
@ -103,7 +103,7 @@
|
|||||||
<Style.Animations>
|
<Style.Animations>
|
||||||
<Animation Duration="0:0:0.5" FillMode="Forward">
|
<Animation Duration="0:0:0.5" FillMode="Forward">
|
||||||
<KeyFrame Cue="0%">
|
<KeyFrame Cue="0%">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" />
|
||||||
<Setter Property="Value" Value="0" />
|
<Setter Property="Value" Value="0" />
|
||||||
</KeyFrame>
|
</KeyFrame>
|
||||||
<KeyFrame Cue="100%">
|
<KeyFrame Cue="100%">
|
||||||
@ -117,36 +117,36 @@
|
|||||||
<!-- Seperator Styles -->
|
<!-- Seperator Styles -->
|
||||||
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Separator.xaml -->
|
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Separator.xaml -->
|
||||||
<Style Selector="Separator">
|
<Style Selector="Separator">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Background_Dark}" />
|
<Setter Property="Background" Value="{StaticResource SPT_Background_Dark}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Button Styles -->
|
<!-- Button Styles -->
|
||||||
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Button.xaml -->
|
<!-- SourceRef: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/Button.xaml -->
|
||||||
<Style Selector="Button">
|
<Style Selector="Button">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="Background" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_White}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_White}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_LightGrayBlue}" />
|
<Setter Property="Background" Value="{StaticResource SPT_LightGrayBlue}" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_LightGrayBlue}" />
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_LightGrayBlue}" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_White}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_White}" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button:pressed /template/ ContentPresenter">
|
<Style Selector="Button:pressed /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Brush_Yellow}" />
|
<Setter Property="Background" Value="{StaticResource SPT_Brush_Yellow}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button:disabled /template/ ContentPresenter">
|
<Style Selector="Button:disabled /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Button yellow -->
|
<!-- Button yellow -->
|
||||||
<Style Selector="Button.yellow">
|
<Style Selector="Button.yellow">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Brush_Yellow}" />
|
<Setter Property="Background" Value="{StaticResource SPT_Brush_Yellow}" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Background_Dark}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Background_Dark}" />
|
||||||
<Setter Property="FontWeight" Value="SemiBold" />
|
<Setter Property="FontWeight" Value="SemiBold" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@ -156,37 +156,37 @@
|
|||||||
|
|
||||||
<Style Selector="Button.yellow:pointerover /template/ ContentPresenter">
|
<Style Selector="Button.yellow:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="Gold" />
|
<Setter Property="Background" Value="Gold" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Background_Dark}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Background_Dark}" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.yellow:pressed /template/ ContentPresenter">
|
<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>
|
||||||
|
|
||||||
<Style Selector="Button.yellow:disabled /template/ ContentPresenter">
|
<Style Selector="Button.yellow:disabled /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Button outlined Style -->
|
<!-- Button outlined Style -->
|
||||||
<Style Selector="Button.outlined">
|
<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="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
<Setter Property="BorderThickness" Value="2" />
|
<Setter Property="BorderThickness" Value="2" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.outlined:pointerover /template/ ContentPresenter">
|
<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="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_Yellow}" />
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_Yellow}" />
|
||||||
<Setter Property="BorderThickness" Value="2" />
|
<Setter Property="BorderThickness" Value="2" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.outlined:pressed /template/ ContentPresenter">
|
<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="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
@ -194,7 +194,7 @@
|
|||||||
|
|
||||||
<!-- Button Link Style -->
|
<!-- Button Link Style -->
|
||||||
<Style Selector="Button.link">
|
<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="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="BorderThickness" Value="0 0 0 1" />
|
<Setter Property="BorderThickness" Value="0 0 0 1" />
|
||||||
@ -208,22 +208,22 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.link:pointerover TextBlock">
|
<Style Selector="Button.link:pointerover TextBlock">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.link:pressed TextBlock">
|
<Style Selector="Button.link:pressed TextBlock">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.link:pointerover /template/ ContentPresenter">
|
<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="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="BorderThickness" Value="0 0 0 1" />
|
<Setter Property="BorderThickness" Value="0 0 0 1" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.link:pressed /template/ ContentPresenter">
|
<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="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="BorderThickness" Value="0 0 0 1" />
|
<Setter Property="BorderThickness" Value="0 0 0 1" />
|
||||||
@ -231,21 +231,21 @@
|
|||||||
|
|
||||||
<!-- Button outlinedTLCorner Style -->
|
<!-- Button outlinedTLCorner Style -->
|
||||||
<Style Selector="Button.outlinedTLCorner">
|
<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="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" />
|
<Setter Property="BorderThickness" Value="2 2 0 0" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.outlinedTLCorner:pointerover /template/ ContentPresenter">
|
<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="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" />
|
<Setter Property="BorderThickness" Value="2 2 0 0" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.outlinedTLCorner:pressed /template/ ContentPresenter">
|
<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="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
@ -258,13 +258,13 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="Button.icon:pointerover">
|
<Style Selector="Button.icon:pointerover">
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_Brush_Yellow}" />
|
<Setter Property="Foreground" Value="{StaticResource SPT_Brush_Yellow}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="Button.icon:pointerover /template/ ContentPresenter">
|
<Style Selector="Button.icon:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="Button.icon:pressed">
|
<Style Selector="Button.icon:pressed">
|
||||||
<Setter Property="Foreground" Value="{StaticResource AKI_DarkGrayBlue}"></Setter>
|
<Setter Property="Foreground" Value="{StaticResource SPT_DarkGrayBlue}"></Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</Styles>
|
</Styles>
|
@ -9,7 +9,7 @@
|
|||||||
<StackPanel>
|
<StackPanel>
|
||||||
<Label Content="{Binding Version, RelativeSource={RelativeSource AncestorType=UserControl}, StringFormat='{}Installer Change Log for {0}'}" FontSize="18" FontWeight="SemiBold"
|
<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">
|
<ScrollViewer MaxHeight="250">
|
||||||
<TextBlock Text="{Binding Message, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
<TextBlock Text="{Binding Message, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||||
TextWrapping="Wrap" MinHeight="100"
|
TextWrapping="Wrap" MinHeight="100"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
MinWidth="300" MinHeight="100"
|
MinWidth="300" MinHeight="100"
|
||||||
MaxWidth="600" MaxHeight="300">
|
MaxWidth="600" MaxHeight="300">
|
||||||
<Grid RowDefinitions="10,AUTO,*,AUTO,10" ColumnDefinitions="10,*,AUTO,10,AUTO,10"
|
<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"
|
<TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="4"
|
||||||
Text="{Binding Message, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
Text="{Binding Message, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="SPTInstaller.CustomControls.Dialogs.WhyCacheThoughDialog">
|
x:Class="SPTInstaller.CustomControls.Dialogs.WhyCacheThoughDialog">
|
||||||
<Grid RowDefinitions="AUTO,AUTO,AUTO,*,AUTO" ColumnDefinitions="*,AUTO"
|
<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"
|
<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">
|
<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.
|
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>
|
<Span Foreground="red">You should only delete the cache folder if</Span>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<Style Selector="Button.selectable">
|
<Style Selector="Button.selectable">
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<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" />
|
<Setter Property="FontWeight" Value="SemiBold" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@ -26,18 +26,18 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.selectable:pointerover /template/ ContentPresenter">
|
<Style Selector="Button.selectable:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="Background" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.selectable:disabled /template/ ContentPresenter">
|
<Style Selector="Button.selectable:disabled /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
|
<Setter Property="BorderBrush" Value="{StaticResource SPT_Brush_DarkGrayBlue}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.selected">
|
<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" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
</UserControl.Styles>
|
</UserControl.Styles>
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
<Ellipse Height="30" Width="30"
|
<Ellipse Height="30" Width="30"
|
||||||
StrokeThickness="4"
|
StrokeThickness="4"
|
||||||
Fill="{StaticResource AKI_Background_Dark}"
|
Fill="{StaticResource SPT_Background_Dark}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Classes.running="{Binding IsRunning, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
Classes.running="{Binding IsRunning, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||||
Classes.completed="{Binding IsCompleted, RelativeSource={RelativeSource AncestorType=UserControl}}" />
|
Classes.completed="{Binding IsCompleted, RelativeSource={RelativeSource AncestorType=UserControl}}" />
|
||||||
|
@ -34,11 +34,11 @@
|
|||||||
Width="35">
|
Width="35">
|
||||||
<Button.Styles>
|
<Button.Styles>
|
||||||
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
<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" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="Button:pressed /template/ ContentPresenter">
|
<Style Selector="Button:pressed /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{StaticResource AKI_Background_Light}" />
|
<Setter Property="Background" Value="{StaticResource SPT_Background_Light}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Button.Styles>
|
</Button.Styles>
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -96,29 +96,35 @@ public static class FileHelper
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Log.Debug($"Starting StreamAssemblyResourceOut, resourcename: {resourceName}, outputFilePath: {outputFilePath}");
|
||||||
var assembly = Assembly.GetExecutingAssembly();
|
var assembly = Assembly.GetExecutingAssembly();
|
||||||
|
Log.Debug($"1");
|
||||||
|
|
||||||
FileInfo outputFile = new FileInfo(outputFilePath);
|
FileInfo outputFile = new FileInfo(outputFilePath);
|
||||||
|
Log.Debug($"2");
|
||||||
if (outputFile.Exists)
|
if (outputFile.Exists)
|
||||||
{
|
{
|
||||||
|
Log.Debug($"3");
|
||||||
outputFile.Delete();
|
outputFile.Delete();
|
||||||
}
|
}
|
||||||
|
Log.Debug($"4");
|
||||||
if (!outputFile.Directory.Exists)
|
if (!outputFile.Directory.Exists)
|
||||||
{
|
{
|
||||||
|
Log.Debug($"5");
|
||||||
Directory.CreateDirectory(outputFile.Directory.FullName);
|
Directory.CreateDirectory(outputFile.Directory.FullName);
|
||||||
}
|
}
|
||||||
|
Log.Debug($"6");
|
||||||
var resName = assembly.GetManifestResourceNames().First(x => x.EndsWith(resourceName));
|
var resName = assembly.GetManifestResourceNames().First(x => x.EndsWith(resourceName));
|
||||||
|
Log.Debug($"7");
|
||||||
using (FileStream fs = File.Create(outputFilePath))
|
using (FileStream fs = File.Create(outputFilePath))
|
||||||
using (Stream s = assembly.GetManifestResourceStream(resName))
|
using (Stream s = assembly.GetManifestResourceStream(resName))
|
||||||
{
|
{
|
||||||
|
Log.Debug($"8");
|
||||||
s.CopyTo(fs);
|
s.CopyTo(fs);
|
||||||
}
|
}
|
||||||
|
Log.Debug($"9");
|
||||||
outputFile.Refresh();
|
outputFile.Refresh();
|
||||||
|
Log.Debug(outputFile.Exists.ToString());
|
||||||
return outputFile.Exists;
|
return outputFile.Exists;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -38,7 +38,7 @@ public static class ProcessHelper
|
|||||||
switch ((PatcherExitCode)process.ExitCode)
|
switch ((PatcherExitCode)process.ExitCode)
|
||||||
{
|
{
|
||||||
case PatcherExitCode.Success:
|
case PatcherExitCode.Success:
|
||||||
return Result.FromSuccess("Patcher Finished Successfully, extracting Aki");
|
return Result.FromSuccess("Patcher Finished Successfully, extracting SPT");
|
||||||
|
|
||||||
case PatcherExitCode.ProgramClosed:
|
case PatcherExitCode.ProgramClosed:
|
||||||
return Result.FromError("Patcher was closed before completing!");
|
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");
|
return Result.FromError("EscapeFromTarkov.exe is missing from the install Path");
|
||||||
|
|
||||||
case PatcherExitCode.NoPatchFolder:
|
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:
|
case PatcherExitCode.MissingFile:
|
||||||
return Result.FromError("EFT files was missing a Vital file to continue");
|
return Result.FromError("EFT files was missing a Vital file to continue");
|
||||||
|
@ -68,23 +68,23 @@ public class DownloadTask : InstallerTaskBase
|
|||||||
return Result.FromError("Failed to download Patcher");
|
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
|
// 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)
|
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 =
|
_data.SPTZipInfo =
|
||||||
await DownloadCacheHelper.GetOrDownloadFileAsync("sptaki", mirror.DownloadUrl, progress, mirror.Hash);
|
await DownloadCacheHelper.GetOrDownloadFileAsync("SPT", mirror.DownloadUrl, progress, mirror.Hash);
|
||||||
|
|
||||||
if (_data.AkiZipInfo != null)
|
if (_data.SPTZipInfo != null)
|
||||||
{
|
{
|
||||||
return Result.FromSuccess();
|
return Result.FromSuccess();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Result.FromError("Failed to download spt-aki");
|
return Result.FromError("Failed to download SPT");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task<IResult> TaskOperation()
|
public override async Task<IResult> TaskOperation()
|
||||||
@ -110,6 +110,6 @@ public class DownloadTask : InstallerTaskBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return await DownloadSptAkiFromMirrors(progress);
|
return await DownloadSPTFromMirrors(progress);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -24,58 +24,58 @@ public class ReleaseCheckTask : InstallerTaskBase
|
|||||||
SetStatus("Checking SPT Releases", "", null, ProgressStyle.Indeterminate);
|
SetStatus("Checking SPT Releases", "", null, ProgressStyle.Indeterminate);
|
||||||
|
|
||||||
var progress = new Progress<double>((d) => { SetStatus(null, null, (int)Math.Floor(d)); });
|
var progress = new Progress<double>((d) => { SetStatus(null, null, (int)Math.Floor(d)); });
|
||||||
var akiReleaseInfoFile =
|
var SPTReleaseInfoFile =
|
||||||
await DownloadCacheHelper.GetOrDownloadFileAsync("release.json", DownloadCacheHelper.ReleaseMirrorUrl,
|
await DownloadCacheHelper.GetOrDownloadFileAsync("release.json", DownloadCacheHelper.ReleaseMirrorUrl,
|
||||||
progress, DownloadCacheHelper.SuggestedTtl);
|
progress, DownloadCacheHelper.SuggestedTtl);
|
||||||
|
|
||||||
if (akiReleaseInfoFile == null)
|
if (SPTReleaseInfoFile == null)
|
||||||
{
|
{
|
||||||
return Result.FromError("Failed to download release metadata");
|
return Result.FromError("Failed to download release metadata");
|
||||||
}
|
}
|
||||||
|
|
||||||
var akiReleaseInfo =
|
var SPTReleaseInfo =
|
||||||
JsonConvert.DeserializeObject<ReleaseInfo>(File.ReadAllText(akiReleaseInfoFile.FullName));
|
JsonConvert.DeserializeObject<ReleaseInfo>(File.ReadAllText(SPTReleaseInfoFile.FullName));
|
||||||
|
|
||||||
SetStatus("Checking for Patches", "", null, ProgressStyle.Indeterminate);
|
SetStatus("Checking for Patches", "", null, ProgressStyle.Indeterminate);
|
||||||
|
|
||||||
var akiPatchMirrorsFile =
|
var SPTPatchMirrorsFile =
|
||||||
await DownloadCacheHelper.GetOrDownloadFileAsync("mirrors.json", DownloadCacheHelper.PatchMirrorUrl,
|
await DownloadCacheHelper.GetOrDownloadFileAsync("mirrors.json", DownloadCacheHelper.PatchMirrorUrl,
|
||||||
progress, DownloadCacheHelper.SuggestedTtl);
|
progress, DownloadCacheHelper.SuggestedTtl);
|
||||||
|
|
||||||
if (akiPatchMirrorsFile == null)
|
if (SPTPatchMirrorsFile == null)
|
||||||
{
|
{
|
||||||
return Result.FromError("Failed to download patch mirror data");
|
return Result.FromError("Failed to download patch mirror data");
|
||||||
}
|
}
|
||||||
|
|
||||||
var patchMirrorInfo =
|
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;
|
_data.PatchInfo = patchMirrorInfo;
|
||||||
int intAkiVersion = int.Parse(akiReleaseInfo.ClientVersion);
|
int intSPTVersion = int.Parse(SPTReleaseInfo.ClientVersion);
|
||||||
int intGameVersion = int.Parse(_data.OriginalGameVersion);
|
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
|
// : 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");
|
return Result.FromError("Your client is outdated. Please update EFT");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intGameVersion == intAkiVersion)
|
if (intGameVersion == intSPTVersion)
|
||||||
{
|
{
|
||||||
patchNeedCheck = false;
|
patchNeedCheck = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((intGameVersion != patchMirrorInfo.SourceClientVersion ||
|
if ((intGameVersion != patchMirrorInfo.SourceClientVersion ||
|
||||||
intAkiVersion != patchMirrorInfo.TargetClientVersion) && patchNeedCheck)
|
intSPTVersion != patchMirrorInfo.TargetClientVersion) && patchNeedCheck)
|
||||||
{
|
{
|
||||||
return Result.FromError(
|
return Result.FromError(
|
||||||
"No patcher available for your version.\nA patcher is usually created within 24 hours of an EFT update.");
|
"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;
|
_data.PatchNeeded = patchNeedCheck;
|
||||||
|
|
||||||
string status =
|
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);
|
SetStatus(null, status);
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ public class SetupClientTask : InstallerTaskBase
|
|||||||
// extract release files
|
// extract release files
|
||||||
SetStatus("Extracting Release", "", 0);
|
SetStatus("Extracting Release", "", 0);
|
||||||
|
|
||||||
var extractReleaseResult = ZipHelper.Decompress(_data.AkiZipInfo, targetInstallDirInfo, progress);
|
var extractReleaseResult = ZipHelper.Decompress(_data.SPTZipInfo, targetInstallDirInfo, progress);
|
||||||
|
|
||||||
if (!extractReleaseResult.Succeeded)
|
if (!extractReleaseResult.Succeeded)
|
||||||
{
|
{
|
||||||
|
@ -26,9 +26,9 @@ public class InternalData
|
|||||||
public FileInfo PatcherZipInfo { get; set; }
|
public FileInfo PatcherZipInfo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SPT-AKI zip file info
|
/// SPT zip file info
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public FileInfo AkiZipInfo { get; set; }
|
public FileInfo SPTZipInfo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The release information from release.json
|
/// The release information from release.json
|
||||||
|
@ -4,7 +4,7 @@ namespace SPTInstaller.Models.ReleaseInfo;
|
|||||||
|
|
||||||
public class 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 string ClientVersion { get; set; }
|
||||||
public List<ReleaseInfoMirror> Mirrors { get; set; }
|
public List<ReleaseInfoMirror> Mirrors { get; set; }
|
||||||
}
|
}
|
@ -6,12 +6,13 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
<!-- TODO: To change -->
|
||||||
<PackageIcon>icon.ico</PackageIcon>
|
<PackageIcon>icon.ico</PackageIcon>
|
||||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||||
<Configurations>Debug;Release;TEST</Configurations>
|
<Configurations>Debug;Release;TEST</Configurations>
|
||||||
<AssemblyVersion>2.66</AssemblyVersion>
|
<AssemblyVersion>2.66</AssemblyVersion>
|
||||||
<FileVersion>2.66</FileVersion>
|
<FileVersion>2.66</FileVersion>
|
||||||
<Company>SPT-AKI</Company>
|
<Company>SPT</Company>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -156,7 +156,7 @@ public class PreChecksViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
Log.CloseAndFlush();
|
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
|
// remove log file from original game path if they exist
|
||||||
foreach (var file in logFiles)
|
foreach (var file in logFiles)
|
||||||
@ -287,27 +287,27 @@ public class PreChecksViewModel : ViewModelBase
|
|||||||
|
|
||||||
var progress = new Progress<double>((d) => { });
|
var progress = new Progress<double>((d) => { });
|
||||||
|
|
||||||
var akiReleaseInfoFile =
|
var SPTReleaseInfoFile =
|
||||||
await DownloadCacheHelper.GetOrDownloadFileAsync("release.json", DownloadCacheHelper.ReleaseMirrorUrl,
|
await DownloadCacheHelper.GetOrDownloadFileAsync("release.json", DownloadCacheHelper.ReleaseMirrorUrl,
|
||||||
progress, DownloadCacheHelper.SuggestedTtl);
|
progress, DownloadCacheHelper.SuggestedTtl);
|
||||||
|
|
||||||
if (akiReleaseInfoFile == null)
|
if (SPTReleaseInfoFile == null)
|
||||||
{
|
{
|
||||||
InstallButtonText = "Could not get SPT release metadata";
|
InstallButtonText = "Could not get SPT release metadata";
|
||||||
InstallButtonCheckState = StatusSpinner.SpinnerState.Error;
|
InstallButtonCheckState = StatusSpinner.SpinnerState.Error;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var akiReleaseInfo =
|
var SPTReleaseInfo =
|
||||||
JsonConvert.DeserializeObject<ReleaseInfo>(File.ReadAllText(akiReleaseInfoFile.FullName));
|
JsonConvert.DeserializeObject<ReleaseInfo>(File.ReadAllText(SPTReleaseInfoFile.FullName));
|
||||||
if (akiReleaseInfo == null)
|
if (SPTReleaseInfo == null)
|
||||||
{
|
{
|
||||||
InstallButtonText = "Could not parse latest SPT release";
|
InstallButtonText = "Could not parse latest SPT release";
|
||||||
InstallButtonCheckState = StatusSpinner.SpinnerState.Error;
|
InstallButtonCheckState = StatusSpinner.SpinnerState.Error;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
InstallButtonText = $"Start Install: SPT v{akiReleaseInfo.AkiVersion}";
|
InstallButtonText = $"Start Install: SPT v{SPTReleaseInfo.SPTVersion}";
|
||||||
InstallButtonCheckState = StatusSpinner.SpinnerState.OK;
|
InstallButtonCheckState = StatusSpinner.SpinnerState.OK;
|
||||||
|
|
||||||
AllowDetailsButton = true;
|
AllowDetailsButton = true;
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
<Grid ColumnDefinitions="*, 2*">
|
<Grid ColumnDefinitions="*, 2*">
|
||||||
<cc:ProgressableTaskList Tasks="{Binding MyTasks}"
|
<cc:ProgressableTaskList Tasks="{Binding MyTasks}"
|
||||||
Padding="20"
|
Padding="20"
|
||||||
Background="{StaticResource AKI_Background_Dark}"
|
Background="{StaticResource SPT_Background_Dark}"
|
||||||
PendingColor="Gray"
|
PendingColor="Gray"
|
||||||
RunningColor="DodgerBlue"
|
RunningColor="DodgerBlue"
|
||||||
CompletedColor="{StaticResource AKI_Brush_Yellow}" />
|
CompletedColor="{StaticResource SPT_Brush_Yellow}" />
|
||||||
<cc:TaskDetails Grid.Column="1"
|
<cc:TaskDetails Grid.Column="1"
|
||||||
Message="{Binding CurrentTask.StatusMessage}"
|
Message="{Binding CurrentTask.StatusMessage}"
|
||||||
Details="{Binding CurrentTask.StatusDetails}"
|
Details="{Binding CurrentTask.StatusDetails}"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
ExtendClientAreaToDecorationsHint="True"
|
ExtendClientAreaToDecorationsHint="True"
|
||||||
ExtendClientAreaChromeHints="NoChrome"
|
ExtendClientAreaChromeHints="NoChrome"
|
||||||
ExtendClientAreaTitleBarHeightHint="-1"
|
ExtendClientAreaTitleBarHeightHint="-1"
|
||||||
Background="{StaticResource AKI_Background_Light}"
|
Background="{StaticResource SPT_Background_Light}"
|
||||||
MinWidth="800" MinHeight="400">
|
MinWidth="800" MinHeight="400">
|
||||||
|
|
||||||
<Window.Styles>
|
<Window.Styles>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
XButtonCommand="{Binding CloseCommand}"
|
XButtonCommand="{Binding CloseCommand}"
|
||||||
MinButtonCommand="{Binding MinimizeCommand}" />
|
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}" />
|
<rxui:RoutedViewHost Router="{Binding Router}" />
|
||||||
</dialogHost:DialogHost>
|
</dialogHost:DialogHost>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user