Skip to content

Commit

Permalink
Release 1.5.20240227.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BuIlDaLiBlE committed Feb 27, 2024
1 parent e7feb0c commit 165ec42
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 22 deletions.
2 changes: 1 addition & 1 deletion App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace BetterHI3Launcher
{
public partial class App : Application
{
public static readonly LauncherVersion LocalLauncherVersion = new LauncherVersion("1.5.20231219.0");
public static readonly LauncherVersion LocalLauncherVersion = new LauncherVersion("1.5.20240227.0");
public static readonly string LauncherRootPath = AppDomain.CurrentDomain.BaseDirectory;
public static readonly string LocalLowPath = $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}Low";
public static readonly string LauncherDataPath = Path.Combine(LocalLowPath, @"Bp\Better HI3 Launcher");
Expand Down
11 changes: 6 additions & 5 deletions BetterHI3Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,19 @@
<Compile Include="Modules\LegacyBox.cs" />
<Compile Include="Modules\Shared.cs" />
<Compile Include="Utility\DownloadProgressEvents.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Event\DownloadLogEvent.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Event\Enums.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Exception.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\IO.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Attributes\Attributes.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Attributes\AttributesSize.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Event\DownloadEvent.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Event\DownloadLogEvent.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Event\Enums.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Event\Event.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Exception.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\IO.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Session\Session.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Session\SessionManager.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Session\SessionMerge.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\Session\SessionTask.cs" />
<Compile Include="Utility\Hi3Helper.Http\Class\TaskExtensions.cs" />
<Compile Include="Utility\Hi3Helper.Http\Http.cs" />
<Compile Include="Utility\Hi3Helper.Http\HttpMulti.cs" />
<Compile Include="Utility\Hi3Helper.EncTool\mhyEncTool.cs" />
Expand Down Expand Up @@ -316,7 +317,7 @@
<Version>1.1.1</Version>
</PackageReference>
<PackageReference Include="XamlAnimatedGif">
<Version>2.2.0</Version>
<Version>2.2.3</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
12 changes: 10 additions & 2 deletions DialogWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,17 @@ public DialogWindow(string title, string message, DialogType type = DialogType.C
CustomBackgroundDeleteLabel.Text = App.TextStrings["msgbox_custom_background_delete"];
break;
}
if(App.LauncherLanguage != "en" && App.LauncherLanguage != "zh-CN" && App.LauncherLanguage != "ja")
switch(App.LauncherLanguage)
{
Resources["Font"] = new FontFamily("Segoe UI Bold");
case "en":
case "zh-CN":
break;
case "ja":
Resources["Font"] = new FontFamily("Meiryo UI Bold");
break;
default:
Resources["Font"] = new FontFamily("Segoe UI Bold");
break;
}
Application.Current.MainWindow.WindowState = WindowState.Normal;
BpUtility.PlaySound(Properties.Resources.Window_Open);
Expand Down
10 changes: 4 additions & 6 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ void ToggleUI(bool val)
}
void ToggleProgressBar(bool val)
{
ProgressText.Visibility = val ? Visibility.Visible : Visibility.Collapsed;
ProgressBar.Visibility = val ? Visibility.Visible : Visibility.Collapsed;
ProgressBar.IsIndeterminate = true;
TaskbarItemInfo.ProgressState = val ? TaskbarItemProgressState.Indeterminate : TaskbarItemInfo.ProgressState = TaskbarItemProgressState.None;
Expand Down Expand Up @@ -1130,7 +1131,6 @@ private async void LaunchButton_Click(object sender, RoutedEventArgs e)
if(new DialogWindow(App.TextStrings["msgbox_abort_title"], $"{App.TextStrings["msgbox_abort_2_msg"]}\n{App.TextStrings["msgbox_abort_3_msg"]}", DialogWindow.DialogType.Question).ShowDialog() == true)
{
token.Cancel();
await httpclient.WaitUntilInstanceDisposed();
httpclient.DeleteMultisessionFiles(httpprop.Out, httpprop.Thread);
try{Directory.Delete(Path.GetDirectoryName(GameArchiveTempPath));}catch{}
DownloadPaused = false;
Expand Down Expand Up @@ -1169,7 +1169,6 @@ private async void DownloadPauseButton_Click(object sender, RoutedEventArgs e)
if(!DownloadPaused)
{
token.Cancel();
await httpclient.WaitUntilInstanceDisposed();
Status = LauncherStatus.DownloadPaused;
DownloadProgressBarStackPanel.Visibility = Visibility.Visible;
DownloadETAText.Visibility = Visibility.Hidden;
Expand Down Expand Up @@ -1201,7 +1200,7 @@ private async void DownloadPauseButton_Click(object sender, RoutedEventArgs e)
token = new CancellationTokenSource();
httpclient.DownloadProgress += DownloadStatusChanged;
await httpclient.Download(httpprop.URL, httpprop.Out, httpprop.Thread, false, token.Token);
await httpclient.Merge();
await httpclient.Merge(token.Token);
httpclient.DownloadProgress -= DownloadStatusChanged;
await DownloadGameFile();
}
Expand Down Expand Up @@ -1284,7 +1283,7 @@ private async void PreloadButton_Click(object sender, RoutedEventArgs e)
httpclient.DownloadProgress += PreloadDownloadStatusChanged;
PreloadPauseButton.IsEnabled = true;
await httpclient.Download(httpprop.URL, httpprop.Out, httpprop.Thread, false, token.Token);
await httpclient.Merge();
await httpclient.Merge(token.Token);
httpclient.DownloadProgress -= PreloadDownloadStatusChanged;
Log("Downloaded pre-download archive");
}
Expand Down Expand Up @@ -1357,7 +1356,7 @@ await Task.Run(() =>
WindowState = WindowState.Normal;
}

private async void PreloadPauseButton_Click(object sender, RoutedEventArgs e)
private void PreloadPauseButton_Click(object sender, RoutedEventArgs e)
{
if(LegacyBoxActive)
{
Expand All @@ -1368,7 +1367,6 @@ private async void PreloadPauseButton_Click(object sender, RoutedEventArgs e)
{
PreloadPauseButton.IsEnabled = false;
token.Cancel();
await httpclient.WaitUntilInstanceDisposed();
Log("Pre-download paused");
PreloadDownload = false;
PreloadPauseButton.IsEnabled = true;
Expand Down
12 changes: 10 additions & 2 deletions Modules/ContextMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,9 +1015,17 @@ public void SetLanguage(string lang)
BpUtility.RestartApp();
}
}
if(App.LauncherLanguage != "en" && App.LauncherLanguage != "zh-CN" && App.LauncherLanguage != "ja")
switch(App.LauncherLanguage)
{
Resources["Font"] = new FontFamily("Segoe UI Bold");
case "en":
case "zh-CN":
break;
case "ja":
Resources["Font"] = new FontFamily("Meiryo UI Bold");
break;
default:
Resources["Font"] = new FontFamily("Segoe UI Bold");
break;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Modules/GameUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ private async Task DownloadGameFile()
LaunchButton.Content = App.TextStrings["button_cancel"];
});
await httpclient.Download(httpprop.URL, httpprop.Out, httpprop.Thread, false, token.Token);
await httpclient.Merge();
await httpclient.Merge(token.Token);
httpclient.DownloadProgress -= DownloadStatusChanged;
Log("Successfully downloaded game archive");
}
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ You can save and use it wherever you want, it's that simple!
## Compatibility
Of course, a 64-bit version of Windows is required, since the game also requires it.

The launcher is confirmed to work on Windows 10 and Windows 11, but I personally develop and test on Windows 10.
The launcher is tested to work on modern versions of Windows (10 and 11).

Windows 8.1 and 7 should technically work if .NET Framework 4.6.2 or newer is installed, however they are no longer supported by Microsoft so I will not be accepting bug reports from those Windows versions.
Windows 8.1 and 7 should technically work if .NET Framework 4.6.2 or newer is installed, however they are no longer supported by Microsoft so I will not be accepting reports from those Windows versions.

## Is this safe?
I started this project to help fellow Captains have a better experience with the game. Since the release in January of 2021 there have been no cases of banned accounts.
Expand All @@ -40,8 +40,6 @@ Great question! This project is mainly supported by me alone, so I'd love to hea

> [!NOTE]
> * Set the merge branch to `dev` when creating a PR
> * The project is made with Visual Studio 2019, so there could be problems on a different version of Visual Studio
> * That said, if you do use a different version then you should not include any project changes in your PR
You can also contribute by translating the launcher into a language you speak. **Please only contribute languages the launcher doesn't yet have! Check the issues for existing contributions.**

Expand Down
2 changes: 1 addition & 1 deletion Utility/Hi3Helper.Http

0 comments on commit 165ec42

Please sign in to comment.