Skip to content

Commit

Permalink
v2.0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryddag committed Jan 31, 2018
1 parent 348cdca commit 4967e0e
Show file tree
Hide file tree
Showing 15 changed files with 332 additions and 2,000 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,18 @@
# Change Log

## [v2.0.2.0](https://github.com/ProjectCeleste/Celeste_Launcher/tree/v2.0.2.0) (2018-01-31)

[Full Changelog](https://github.com/ProjectCeleste/Celeste_Launcher/compare/v2.0.1.4...v2.0.2.0)

**Enhancements:**

- "GameScan" will now use as temporary folder an folder who will be create at the same location has the launcher instead of using windows temporary folder.
- "Quick GameScan" who was running before the game start has been improved its now a lot faster than before (and will no more display an UI).
- "GameScan" will no more close if an error occur in order to be able to read the "progress log".
- "Beta Update" in "GameScan" has been removed and replaced by two radio box in order to select the xLive version you want to use.

Note: "Sparta XLive" is now the default xLive version, if you have issue with it use "Legacy XLive" version.

## [v2.0.1.4](https://github.com/ProjectCeleste/Celeste_Launcher/tree/v2.0.1.4) (2018-01-08)

[Full Changelog](https://github.com/ProjectCeleste/Celeste_Launcher/compare/v2.0.1.3...v2.0.1.4)
Expand Down
9 changes: 0 additions & 9 deletions Celeste_Launcher_Gui/Celeste_Launcher_Gui.csproj
Expand Up @@ -100,12 +100,6 @@
<Compile Include="Forms\LanguageChooser.Designer.cs">
<DependentUpon>LanguageChooser.cs</DependentUpon>
</Compile>
<Compile Include="Forms\QuickGameScan.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\QuickGameScan.Designer.cs">
<DependentUpon>QuickGameScan.cs</DependentUpon>
</Compile>
<Compile Include="Forms\GameScan.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -182,9 +176,6 @@
<EmbeddedResource Include="Forms\LanguageChooser.resx">
<DependentUpon>LanguageChooser.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\QuickGameScan.resx">
<DependentUpon>QuickGameScan.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\GameScan.resx">
<DependentUpon>GameScan.cs</DependentUpon>
</EmbeddedResource>
Expand Down
4 changes: 2 additions & 2 deletions Celeste_Launcher_Gui/Config.cs
Expand Up @@ -30,8 +30,8 @@ public class UserConfig
[XmlElement(ElementName = "GameFilesPath")]
public string GameFilesPath { get; set; } = string.Empty;

[XmlElement(ElementName = "BetaUpdate")]
public bool BetaUpdate { get; set; }
[XmlElement(ElementName = "IsLegacyXLive")]
public bool IsLegacyXLive { get; set; }

[XmlIgnore]
public bool IsSteamVersion { get; set; } = false;
Expand Down
164 changes: 112 additions & 52 deletions Celeste_Launcher_Gui/Forms/GameScan.Designer.cs

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions Celeste_Launcher_Gui/Forms/GameScan.cs
Expand Up @@ -23,19 +23,21 @@ public GameScan()
else
tb_GamePath.Text = GameScannnerApi.GetGameFilesRootPath();

if (Program.UserConfig != null && Program.UserConfig.BetaUpdate)
checkBox1.Checked = true;
if (Program.UserConfig != null && Program.UserConfig.IsLegacyXLive)
rB_Legacy.Checked = true;
else
rB_Sparta.Checked = true;
}

private void BtnRunScan_Click(object sender, EventArgs e)
{
try
{
Program.UserConfig.GameFilesPath = tb_GamePath.Text;
Program.UserConfig.BetaUpdate = checkBox1.Checked;
Program.UserConfig.IsLegacyXLive = rB_Legacy.Checked;
Program.UserConfig.Save(Program.UserConfigFilePath);

using (var form = new GameScanProgressForm(Program.UserConfig.GameFilesPath, Program.UserConfig.IsSteamVersion, Program.UserConfig.BetaUpdate))
using (var form = new GameScanProgressForm(Program.UserConfig.GameFilesPath, Program.UserConfig.IsSteamVersion, Program.UserConfig.IsLegacyXLive))
{
var dr = form.ShowDialog();

Expand Down Expand Up @@ -80,5 +82,15 @@ private void GameScan_Load(object sender, EventArgs e)
//
}
}

private void RB_Sparta_CheckedChanged(object sender, EventArgs e)
{
Program.UserConfig.IsLegacyXLive = !rB_Sparta.Checked;
}

private void RB_Legacy_CheckedChanged(object sender, EventArgs e)
{
Program.UserConfig.IsLegacyXLive = rB_Legacy.Checked;
}
}
}
23 changes: 15 additions & 8 deletions Celeste_Launcher_Gui/Forms/GameScanProgressForm.cs
Expand Up @@ -3,6 +3,7 @@
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using Celeste_AOEO_Controls.Helpers;
using Celeste_AOEO_Controls.MsgBox;
Expand All @@ -16,7 +17,7 @@ namespace Celeste_Launcher_Gui.Forms
{
public partial class GameScanProgressForm : Form
{
public GameScanProgressForm(string gameFilesPath,bool isSteam, bool isBetaUpdate)
public GameScanProgressForm(string gameFilesPath,bool isSteam, bool isLegacyXLive)
{
InitializeComponent();

Expand All @@ -28,7 +29,7 @@ public GameScanProgressForm(string gameFilesPath,bool isSteam, bool isBetaUpdate
if (!Directory.Exists(gameFilesPath))
Directory.CreateDirectory(gameFilesPath);

GameScannner = new GameScannnerApi(gameFilesPath, isSteam, isBetaUpdate);
GameScannner = new GameScannnerApi(gameFilesPath, isSteam, isLegacyXLive);
lbl_ProgressTitle.Text = string.Empty;
lbl_ProgressDetail.Text = string.Empty;
lbl_GlobalProgress.Text = $@"0/{GameScannner.FilesInfo.Count()}";
Expand Down Expand Up @@ -152,17 +153,27 @@ private void GameScan_FormClosing(object sender, FormClosingEventArgs e)
if (!GameScannner.IsScanRunning)
return;

pictureBoxButtonCustom1.Enabled = false;
GameScannner.CancelScan();
while (GameScannner.IsScanRunning)
{
//
//
}
}

private void PictureBoxButtonCustom1_Click(object sender, EventArgs e)
{
pictureBoxButtonCustom1.Enabled = false;

if (GameScannner.IsScanRunning)
{
pictureBoxButtonCustom1.Enabled = false;
GameScannner.CancelScan();
while (GameScannner.IsScanRunning)
{
//
}
}

Close();
}

Expand All @@ -185,17 +196,13 @@ private async void GameScanProgressForm_Shown(object sender, EventArgs e)
MsgBox.ShowMessage(@"Game scan failed!",
@"Project Celeste -- Game Scan",
MessageBoxButtons.OK, MessageBoxIcon.Warning);

DialogResult = DialogResult.Abort;
}
}
catch (Exception ex)
{
MsgBox.ShowMessage($@"Error: {ex.Message}",
@"Project Celeste -- Game Scan",
MessageBoxButtons.OK, MessageBoxIcon.Error);

DialogResult = DialogResult.Abort;
}
}

Expand Down
40 changes: 28 additions & 12 deletions Celeste_Launcher_Gui/Forms/MainForm.cs
Expand Up @@ -57,12 +57,33 @@ private async void Btn_Play_Click(object sender, EventArgs e)
//QuickGameScan
try
{
using (var form = new QuickGameScan())
{
retry:
var dr = form.ShowDialog();
var gameFilePath = !string.IsNullOrWhiteSpace(Program.UserConfig.GameFilesPath)
? Program.UserConfig.GameFilesPath
: GameScannnerApi.GetGameFilesRootPath();

if (dr == DialogResult.Retry)
var gameScannner = new GameScannnerApi(gameFilePath, Program.UserConfig.IsSteamVersion,
Program.UserConfig.IsLegacyXLive);

retry:
if (!await gameScannner.QuickScan())
{
bool success;
using (var form =
new MsgBoxYesNo(
@"Error: Your game files are corrupted or outdated. Click ""Yes"" to run a ""Game Scan"" to fix your game files, or ""No"" to ignore the error (not recommended).")
)
{
var dr = form.ShowDialog();
if (dr == DialogResult.OK)
using (var form2 = new GameScan())
{
form2.ShowDialog();
success = false;
}
else
success = true;
}
if (!success)
goto retry;
}
}
Expand All @@ -79,9 +100,7 @@ private async void Btn_Play_Click(object sender, EventArgs e)
{
var steamApiDll = $"{Program.UserConfig.GameFilesPath}\\steam_api.dll";
if (File.Exists(steamApiDll))
{
File.Delete(steamApiDll);
}
}

//MpSettings
Expand Down Expand Up @@ -438,21 +457,18 @@ private async void MainForm_Load(object sender, EventArgs e)
try
{
if (await UpdaterForm.GetGitHubVersion() > Assembly.GetExecutingAssembly().GetName().Version)
{
using (var form =
new MsgBoxYesNo(
@"An update is avalaible. Click ""Yes"" to install it, or ""No"" to ignore it (not recommended)."))
@"An update is avalaible. Click ""Yes"" to install it, or ""No"" to ignore it (not recommended).")
)
{
var dr = form.ShowDialog();
if (dr == DialogResult.OK)
{
using (var form2 = new UpdaterForm())
{
form2.ShowDialog();
}
}
}
}
}
catch (Exception ex)
{
Expand Down

0 comments on commit 4967e0e

Please sign in to comment.