Skip to content

Commit

Permalink
Merge pull request #128 from Foxlider/feature/Update-1.9
Browse files Browse the repository at this point in the history
Feature/update 1.9
  • Loading branch information
Foxlider authored Jul 25, 2023
2 parents 9b447a6 + 37504c3 commit 1676714
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 13 deletions.
3 changes: 3 additions & 0 deletions FASTER/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
<setting name="usingWSDlc" serializeAs="String">
<value>False</value>
</setting>
<setting name="usingSPEDlc" serializeAs="String">
<value>False</value>
</setting>
</FASTER.Properties.Settings>
</userSettings>
</configuration>
2 changes: 1 addition & 1 deletion FASTER/FASTER.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<PublishReadyToRunComposite>false</PublishReadyToRunComposite>
<UseWPF>true</UseWPF>
<Version>1.9.3.3</Version>
<Version>1.9.4.1</Version>
<Authors>Keelah Fox</Authors>
<Company>FoxliCorp.</Company>
<Description>Fox's Arma Server Tool Extended Rewrite</Description>
Expand Down
15 changes: 15 additions & 0 deletions FASTER/Models/ServerProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public class ServerProfile : INotifyPropertyChanged
private bool _pfDlcChecked;
private bool _cslaDlcChecked;
private bool _wsDlcChecked;
private bool _speDlcChecked;
private bool _enableHT = true;
private bool _enableRanking;

Expand Down Expand Up @@ -191,6 +192,16 @@ public bool WSDLCChecked
}
}

public bool SPEDLCChecked
{
get => _speDlcChecked;
set
{
_speDlcChecked = value;
RaisePropertyChanged(nameof(SPEDLCChecked));
}
}

public bool EnableHyperThreading
{
get => _enableHT;
Expand Down Expand Up @@ -468,6 +479,10 @@ public string GetDlcAndPlayerMods(string playerMods)
{
_ = mods.Append("ws;");
}
if (SPEDLCChecked)
{
_ = mods.Append("spe;");
}
if (!string.IsNullOrWhiteSpace(playerMods))
{
_ = mods.Append($"{playerMods};");
Expand Down
11 changes: 11 additions & 0 deletions FASTER/Models/SteamUpdaterModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,17 @@ public bool UsingWSDlc
}
}

public bool UsingSPEDlc
{
get => Settings.Default.usingSPEDlc;
set
{
Settings.Default.usingSPEDlc = value;
Settings.Default.Save();
RaisePropertyChanged(nameof(UsingSPEDlc));
}
}


public string ApiKey
{
Expand Down
15 changes: 15 additions & 0 deletions FASTER/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions FASTER/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,7 @@
<Setting Name="usingWSDlc" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="usingSPEDlc" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Settings>
</SettingsFile>
2 changes: 1 addition & 1 deletion FASTER/ViewModel/ProfileViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ internal async Task CopyModKeys()

internal async Task ClearModKeys()
{
var ignoredKeys = new[] {"a3.bikey", "a3c.bikey", "gm.bikey", "ws.bikey", "csla.bikey", "vn.bikey" };
var ignoredKeys = new[] {"a3.bikey", "a3c.bikey", "gm.bikey", "ws.bikey", "csla.bikey", "vn.bikey", "spe.bikey" };
if (Directory.Exists(Path.Combine(Profile.ArmaPath, "keys")))
{
foreach (var keyFile in Directory.GetFiles(Path.Combine(Profile.ArmaPath, "keys")))
Expand Down
35 changes: 25 additions & 10 deletions FASTER/ViewModel/SteamUpdaterViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public async Task UpdateClick()
Analytics.TrackEvent("Updater - Clicked Update", new Dictionary<string, string>
{
{"Name", Properties.Settings.Default.steamUserName},
{"DLCs", $"{(Parameters.UsingGMDlc ? "GM " : "")}{(Parameters.UsingCSLADlc? "CSLA " : "")}{(Parameters.UsingPFDlc ? "SOG " : "")}{(Parameters.UsingWSDlc ? "WS " : "")}"},
{"DLCs", $"{(Parameters.UsingGMDlc ? "GM " : "")}{(Parameters.UsingCSLADlc? "CSLA " : "")}{(Parameters.UsingPFDlc ? "SOG " : "")}{(Parameters.UsingWSDlc ? "WS " : "")}{(Parameters.UsingSPEDlc ? "SPE " : "")}"},
{"Branch", $"{(Parameters.UsingPerfBinaries? "Profiling" : "Public")}"}
});

Expand All @@ -155,7 +155,7 @@ public async Task UpdateClick()
{233784, "Arma 3 Server Profiling - WINDOWS Depot"},
{233785, "Arma 3 Server - Profiler - LINUX Depot"},
{233787, "Arma 3 Server Creator DLC - GM"},
{233788, "Arma 3 Server Prague Project 2"},
{233788, "Arma 3 Server Creator DLC - SPE"},
{233789, "Arma 3 Server Creator DLC - CSLA"},
{233790, "Arma 3 Server Creator DLC - SOGPF"},
{233791, "Arma 3 Server Creator DLC - WS"},
Expand Down Expand Up @@ -188,17 +188,22 @@ public async Task UpdateClick()
null));

Parameters.Output += "\nChecking Executables...";
//Either downloading depot 233782 fow Windows from branch public or 233784 for windows in branch profiling


// Downloading depot 233782 fow Windows from branch public
depotsDownload.Add((
depotsIDs.FirstOrDefault(d => d.Value == "Arma 3 Alpha Dedicated Server binary Windows (internal)").Key,
"public",
null));


//Download depot 233784 for windows in branch profiling
if (Parameters.UsingPerfBinaries)
depotsDownload.Add((
depotsIDs.FirstOrDefault(d => d.Value == "Arma 3 Server Profiling - WINDOWS Depot").Key,
"profiling",
"CautionSpecialProfilingAndTestingBranchArma3"));
else
depotsDownload.Add((
depotsIDs.FirstOrDefault(d => d.Value == "Arma 3 Alpha Dedicated Server binary Windows (internal)").Key,
"public",
null));


//Downloading mods
if (Parameters.UsingGMDlc)
Expand Down Expand Up @@ -237,6 +242,15 @@ public async Task UpdateClick()
null));
}

if (Parameters.UsingSPEDlc)
{
Parameters.Output += "\nChecking Arma 3 Server Creator DLC - SPE...";
depotsDownload.Add((
depotsIDs.FirstOrDefault(d => d.Value == "Arma 3 Server Creator DLC - SPE").Key,
"creatordlc",
null));
}

await RunServerUpdater(Parameters.InstallDirectory, appId, depotsDownload);

Parameters.Output += "\n\nAll Done ! ";
Expand Down Expand Up @@ -590,10 +604,11 @@ private async Task Download(IDownloadHandler downloadHandler, string targetDir)
Parameters.Output += "\nOK.";

DownloadTasks.Add(downloadTask);


Parameters.Progress = 0;
Parameters.Output += $"\nDownloading {downloadHandler.TotalFileCount} files with total size of {Functions.ParseFileSize(downloadHandler.TotalFileSize)}...";
Parameters.Output += $"\nVerifying Install...";
Parameters.Progress = 0;

while (!downloadTask.IsCompleted && !downloadTask.IsCanceled && !tokenSource.Token.IsCancellationRequested && !skipDownload)
{

Expand Down
1 change: 1 addition & 0 deletions FASTER/Views/Profile.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<CheckBox IsChecked="{Binding Profile.PFDLCChecked}" Content="Prairie Fire DLC" Margin="10,3" Width="105" HorizontalAlignment="Left"/>
<CheckBox IsChecked="{Binding Profile.CSLADLCChecked}" Content="CSLA DLC" Margin="10,3" HorizontalAlignment="Left"/>
<CheckBox IsChecked="{Binding Profile.WSDLCChecked}" Content="Western Sahara DLC" Margin="10,3" HorizontalAlignment="Left"/>
<CheckBox IsChecked="{Binding Profile.SPEDLCChecked}" Content="Spearhead 1944 DLC" Margin="10,3" HorizontalAlignment="Left"/>
</StackPanel>
</Expander>
</Canvas>
Expand Down
2 changes: 2 additions & 0 deletions FASTER/Views/Updater.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@
HorizontalAlignment="Left" />
<CheckBox IsChecked="{Binding Parameters.UsingWSDlc}" Content="Western Sahara DLC"
Margin="10,3" HorizontalAlignment="Left" />
<CheckBox IsChecked="{Binding Parameters.UsingSPEDlc}" Content="Spearhead 1944 DLC"
Margin="10,3" HorizontalAlignment="Left"/>
</StackPanel>
<Button Style="{StaticResource MahApps.Styles.Button.MetroSquare.Accent}" BorderThickness="0" Grid.Row="4" Content="Update" Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Click="Update_Click"/>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion FASTER_Version.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.9.3.3</version>
<version>1.9.4.1</version>
<url>https://github.com/Foxlider/FASTER/releases/latest/download/Release_x64.zip</url>
<changelog>https://github.com/Foxlider/FASTER/releases</changelog>
<mandatory>true</mandatory>
Expand Down

0 comments on commit 1676714

Please sign in to comment.