Skip to content

Commit

Permalink
v1.6.1.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
amakvana committed May 24, 2023
1 parent 91afbc4 commit 948326a
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 30 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file.

<br>

## [1.6.1.0] - 2023-05-24

### Added

- Added ability to automatically close EzYuzu once update has completed - thanks [@OsoaGH](https://github.com/amakvana/EzYuzu/issues/27)
- Toggle can be found under `Options` > `General` > `Update Yuzu`
- Added ability to automatically begin updating Yuzu when EzYuzu has loaded - thanks [@OsoaGH](https://github.com/amakvana/EzYuzu/issues/27)
- Toggle can be found under `Options` > `General` > `Update Yuzu`

### Changed

- `Launch Yuzu after Update` within the GUI now launches Yuzu instantly if the currently installed version is the latest, no need to pull another copy - thanks [@Xarishark](https://github.com/amakvana/EzYuzu/issues/25)
- Added additional logic to `-p` command line switch to detect if full `yuzu.exe` path has been passed in, if so, to get directory file name instead

### Fixed

- [Issue #26](https://github.com/amakvana/EzYuzu/issues/26) - fixed scaling issues when Main form resizes certain controls - thanks [@buthig666, @Spyke8x, @YoLolo69, @mjd180](https://github.com/amakvana/EzYuzu/issues/26)
- Rare GUI bug where `BtnProcess` would enable even if no directory was set
- Rare bug which may cause SocketException - thanks [@Xarishark](https://github.com/amakvana/EzYuzu/issues/25)

<br>

## [1.6.0.0] - 2023-05-24

### Added
Expand Down
24 changes: 24 additions & 0 deletions source/EzYuzu/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="EzYuzu.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<EzYuzu.Properties.Settings>
<setting name="YuzuLocation" serializeAs="String">
<value />
</setting>
<setting name="LaunchYuzuAfterUpdate" serializeAs="String">
<value>False</value>
</setting>
<setting name="ExitAfterUpdate" serializeAs="String">
<value>False</value>
</setting>
<setting name="AutoUpdateOnEzYuzuStart" serializeAs="String">
<value>False</value>
</setting>
</EzYuzu.Properties.Settings>
</userSettings>
</configuration>
31 changes: 24 additions & 7 deletions source/EzYuzu/Classes/CLOptions/YuzuCommandLineUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@ public async Task ProcessYuzuDirectory(string? yuzuLocationPath, YuzuBranch bran
if (yuzuLocationPath is null)
return;

// if yuzuLocationPath passed in is something like D:\path\to\yuzu\yuzu.exe
// modify the path so it strips the file from the path and return the absolute directory only
if (yuzuLocationPath.EndsWith("yuzu.exe", StringComparison.OrdinalIgnoreCase))
yuzuLocationPath = Path.GetDirectoryName(yuzuLocationPath);

// if no branch passed in, auto detect branch
var branchDetector = new YuzuBranchDetector(clientFactory!)
{
YuzuDirectoryPath = yuzuLocationPath
YuzuDirectoryPath = yuzuLocationPath!
};
if (branch == YuzuBranch.None)
{
branch = await branchDetector.GetCurrentlyInstalledBranchAsync();
}

// get available update versions based on branch passed in
var availableBranchVersions = await branchDetector.GetDetectedBranchAvailableUpdateVersionsAsync(branch);
Expand Down Expand Up @@ -61,18 +64,32 @@ public async Task ProcessYuzuDirectory(string? yuzuLocationPath, YuzuBranch bran

// detect whether current install is up-to-date
// if not, process update or new install
var stateDetector = new YuzuInstallationStateDetector(yuzuLocationPath, branch);
var stateDetector = new YuzuInstallationStateDetector(yuzuLocationPath!, branch);
var installationState = await stateDetector.GetYuzuInstallationStateAsync(latestVersionAvailableFromBranch);

// if we have the latest version of Yuzu installed and Launch Yuzu is selected
// no point parsing the info, just launch Yuzu
// speeds up processing
if (installationState == YuzuInstallationState.LatestVersionInstalled && launchYuzu)
{
Process.Start(new ProcessStartInfo(Path.Combine(yuzuLocationPath!, "yuzu.exe"))
{
UseShellExecute = true
})?.Dispose();
return;
}

// if Yuzu detected is not the latest version, process new install / update

// prepare YuzuManager
YuzuManager yuzuManager = branch switch
{
YuzuBranch.EarlyAccess => new EarlyAccessYuzuManager(clientFactory!, latestVersionTagNameAndDownloadUrl.Key, latestVersionTagNameAndDownloadUrl.Value),
_ => new MainlineYuzuManager(clientFactory!, latestVersionTagNameAndDownloadUrl.Key, latestVersionTagNameAndDownloadUrl.Value)
};

yuzuManager.YuzuDirectoryPath = yuzuLocationPath;
yuzuManager.TempUpdateDirectoryPath = Path.Combine(yuzuLocationPath, "TempUpdate");
yuzuManager.YuzuDirectoryPath = yuzuLocationPath!;
yuzuManager.TempUpdateDirectoryPath = Path.Combine(yuzuLocationPath!, "TempUpdate");
yuzuManager.UpdateVisualCppRedistributables = AppIsRunningAsAdministrator();
await yuzuManager.DownloadPrerequisitesAsync();

Expand All @@ -99,7 +116,7 @@ public async Task ProcessYuzuDirectory(string? yuzuLocationPath, YuzuBranch bran
// launch Yuzu if option passed in
if (launchYuzu)
{
Process.Start(new ProcessStartInfo(Path.Combine(yuzuLocationPath, "yuzu.exe"))
Process.Start(new ProcessStartInfo(Path.Combine(yuzuLocationPath!, "yuzu.exe"))
{
UseShellExecute = true
})?.Dispose();
Expand Down
4 changes: 2 additions & 2 deletions source/EzYuzu/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: AssemblyVersion("1.6.1.0")]
[assembly: AssemblyFileVersion("1.6.1.0")]
[assembly: SupportedOSPlatform("windows")]
24 changes: 24 additions & 0 deletions source/EzYuzu/Properties/Settings.Designer.cs

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

6 changes: 6 additions & 0 deletions source/EzYuzu/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
<Setting Name="LaunchYuzuAfterUpdate" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ExitAfterUpdate" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="AutoUpdateOnEzYuzuStart" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
32 changes: 26 additions & 6 deletions source/EzYuzu/frmMain.Designer.cs

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

Loading

0 comments on commit 948326a

Please sign in to comment.