Skip to content

Commit

Permalink
Release 1.5.20231203.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BuIlDaLiBlE committed Dec 3, 2023
1 parent 7d7147b commit 69f168e
Show file tree
Hide file tree
Showing 12 changed files with 326 additions and 317 deletions.
2 changes: 1 addition & 1 deletion App.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
</configuration>
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.20230926.0");
public static readonly LauncherVersion LocalLauncherVersion = new LauncherVersion("1.5.20231203.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
3 changes: 1 addition & 2 deletions BetterHI3Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>
</DefineConstants>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DebugSymbols>false</DebugSymbols>
Expand Down
2 changes: 1 addition & 1 deletion MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@
</Button>
</StackPanel>
</StackPanel>
<Grid Name="PreloadGrid" Visibility="Collapsed">
<Grid Name="PreloadGrid" Visibility="Collapsed" ZIndex="1">
<Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,364,50" Width="240" Height="50">
<StackPanel Orientation="Horizontal">
<Grid HorizontalAlignment="Left">
Expand Down
561 changes: 277 additions & 284 deletions MainWindow.xaml.cs

Large diffs are not rendered by default.

32 changes: 25 additions & 7 deletions Modules/ContextMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,40 @@ private async Task CM_Repair_Click(object sender, RoutedEventArgs e)
{
return;
}
if(Server != HI3Server.GLB && Server != HI3Server.SEA)
{
new DialogWindow(App.TextStrings["contextmenu_repair"], App.TextStrings["msgbox_feature_not_available_msg"]).ShowDialog();
return;
}

Status = LauncherStatus.CheckingUpdates;
Dispatcher.Invoke(() => {ProgressText.Text = App.TextStrings["progresstext_fetching_hashes"];});
Log("Fetching repair data...");
try
{
string server = (int)Server == 0 ? "global" : "os";
string server;
switch((int)Server)
{
case 0:
server = "global";
break;
case 1:
server = "os";
break;
case 2:
server = "cn";
break;
case 3:
server = "tw";
break;
case 4:
server = "kr";
break;
case 5:
server = "jp";
break;
default:
throw new NotSupportedException("This server is not supported.");
}
var web_client = new BpWebClient();
await Task.Run(() =>
{
OnlineRepairInfo = JsonConvert.DeserializeObject<dynamic>(web_client.DownloadString($"{OnlineVersionInfo.launcher_info.repair_url.ToString()}={server}"));
OnlineRepairInfo = JsonConvert.DeserializeObject<dynamic>(web_client.DownloadString($"{OnlineVersionInfo.launcher_info.links.repair.ToString()}={server}"));
});
if(OnlineRepairInfo.status == "success")
{
Expand Down
3 changes: 2 additions & 1 deletion Modules/GameUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,11 @@ await Task.Run(() =>
Status = LauncherStatus.Ready;
Dispatcher.Invoke(() => {LaunchButton.Content = App.TextStrings["button_launch"];});
}
Log("The game version is the latest");
}
if(Status == LauncherStatus.UpdateAvailable)
{
if(File.Exists(GameArchiveTempPath))
if(!(bool)LocalVersionInfo.game_info.installed)
{
DownloadPaused = true;
Dispatcher.Invoke(() =>
Expand Down
13 changes: 3 additions & 10 deletions Modules/LauncherOnlineInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ void Get(int timeout)
{
Log($"Bp Network connection error, attempt №{i + 2}...", true, 2);
timeout_add += 2500;
#if !DEBUG
if(i == 3)
{
// fallback server with basic information needed to start the launcher
version_info_url = "https://serioussam.ucoz.ru/bbh3l_prod.json";
}
#endif
}
}
}
Expand Down Expand Up @@ -77,7 +70,7 @@ await Task.Run(() =>
{
var web_client = new BpWebClient();
dynamic announcements;
announcements = JsonConvert.DeserializeObject<dynamic>(web_client.DownloadString($"{OnlineVersionInfo.launcher_info.announcements_url.ToString()}&lang={App.LauncherLanguage}"));
announcements = JsonConvert.DeserializeObject<dynamic>(web_client.DownloadString($"{OnlineVersionInfo.launcher_info.links.announcements.ToString()}&lang={App.LauncherLanguage}"));
if(announcements.status == "success")
{
announcements = announcements.announcements;
Expand Down Expand Up @@ -135,11 +128,11 @@ void Get(int timeout)
var web_client = new BpWebClient {Timeout = timeout};
if(App.LauncherLanguage == "ru")
{
changelog = web_client.DownloadString(OnlineVersionInfo.launcher_info.changelog_url.ru.ToString());
changelog = web_client.DownloadString(OnlineVersionInfo.launcher_info.links.changelog.ru.ToString());
}
else
{
changelog = web_client.DownloadString(OnlineVersionInfo.launcher_info.changelog_url.en.ToString());
changelog = web_client.DownloadString(OnlineVersionInfo.launcher_info.links.changelog.en.ToString());
}
}
try
Expand Down
7 changes: 5 additions & 2 deletions Modules/LegacyBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,13 @@ async Task Generate()
x.Extension != ".dmp" &&
x.Extension != ".log" &&
x.Extension != ".zip" &&
x.Extension != ".7z" &&
!x.Extension.Contains("_tmp") &&
x.Name != "ACE-BASE.sys" &&
x.Name != "blockVerifiedVersion.txt" &&
x.Name != "config.ini" &&
x.Name != "manifest.m" &&
x.Name != "pkg_version" &&
x.Name != "sdk_pkg_version" &&
x.Name != "UniFairy.sys" &&
x.Name != "Version.txt" &&
!x.Name.Contains("AUDIO_Avatar") &&
Expand Down Expand Up @@ -555,8 +557,9 @@ private void ChangelogBoxCloseButton_Click(object sender, RoutedEventArgs e)

private void AboutBoxGitHubButton_Click(object sender, RoutedEventArgs e)
{
LegacyBoxActive = false;
AboutBox.Visibility = Visibility.Collapsed;
BpUtility.StartProcess("https://github.com/BuIlDaLiBlE/BetterHI3Launcher", null, App.LauncherRootPath, true);
BpUtility.StartProcess(OnlineVersionInfo.launcher_info.links.github.ToString(), null, App.LauncherRootPath, true);
}

private void AboutBoxCloseButton_Click(object sender, RoutedEventArgs e)
Expand Down
8 changes: 6 additions & 2 deletions Modules/Shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,13 @@ private void OnGameExit()
Dispatcher.Invoke(() =>
{
LaunchButton.Content = App.TextStrings["button_launch"];
if(!PreloadDownload)
if(PreloadDownload)
{
Status = LauncherStatus.Ready;
LaunchButton.IsEnabled = true;
}
else
{
GameUpdateCheck();
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions TextStrings_en.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static void TextStrings_English()
TextStrings.Add("changelogbox_1_msg", "Better HI3 Launcher has just become even better. Here's what happened:");
TextStrings.Add("changelogbox_2_msg", "Loading changelog...");
TextStrings.Add("changelogbox_3_msg", "Failed to load the changelog.");
TextStrings.Add("aboutbox_msg", "Well it is much more advanced, isn't it? :^)\nThis project was made with hope for many captains to have a better experience with the game.\nIt is not affiliated with HoYoverse and is completely open source.\nAny feedback is greatly appreciated.\nSpecial thanks to these GitHub contributors:\nSinsOfSeven - Custom resolution contribution\nProxy-E23 - Spanish language translation\nSpookyKisuy - Portuguese (Brazil) language translation\nbulawin1, Vrontis - German language translation\nKorewaLidesu - Vietnamese language translation\nSm1leAway - Serbian language translation\nVoRTeXStarz - Thai language translation\nTrilip - French language translation\nfabio-silva-pt - Portuguese (Portugal) language translation\nneon-nyan - Indonesian language translation, parallel download feature\nRinnosuke93 - Italian language translation\nMartinial - Czech language translation\nKLXLjun - Chinese (Simplified) translation");
TextStrings.Add("aboutbox_msg", "Well it is much more advanced, isn't it? :^)\nThis project was made with hope for many captains to have a better experience with the game.\nIt is not affiliated with HoYoverse and is completely open source.\nAny feedback is greatly appreciated.\n\nSpecial thanks goes to these GitHub contributors:\nSinsOfSeven - Custom resolution contribution\nProxy-E23 - Spanish language translation\nSpookyKisuy - Portuguese (Brazil) language translation\nbulawin1, Vrontis - German language translation\nKorewaLidesu - Vietnamese language translation\nSm1leAway - Serbian language translation\nVoRTeXStarz - Thai language translation\nTrilip - French language translation\nfabio-silva-pt - Portuguese (Portugal) language translation\nneon-nyan - Indonesian language translation, parallel download feature\nRinnosuke93 - Italian language translation\nMartinial - Czech language translation\nKLXLjun - Chinese (Simplified) translation");
TextStrings.Add("announcementbox_do_not_show", "Do not show me this next time");
TextStrings.Add("contextmenu_open_screenshots_dir", "Open screenshots directory");
TextStrings.Add("contextmenu_download_cache", "Download cache");
Expand All @@ -67,7 +67,7 @@ public static void TextStrings_English()
TextStrings.Add("contextmenu_custom_resolution", "Set custom resolution");
TextStrings.Add("contextmenu_custom_launch_options", "Set custom launch options");
TextStrings.Add("contextmenu_reset_download_type", "Reset download type");
TextStrings.Add("contextmenu_web_profile", "Go to web profile");
TextStrings.Add("contextmenu_web_profile", "Manage game account");
TextStrings.Add("contextmenu_feedback", "Send feedback");
TextStrings.Add("contextmenu_changelog", "Show changelog");
TextStrings.Add("contextmenu_custom_background", "Set custom background");
Expand Down
6 changes: 2 additions & 4 deletions app.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="BetterHI3Launcher"/>
<assemblyIdentity version="1.5.0.0" name="BetterHI3Launcher"/>

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
Expand Down Expand Up @@ -30,9 +31,6 @@
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />

<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />

</application>
</compatibility>

Expand Down

0 comments on commit 69f168e

Please sign in to comment.