Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Preview 1.80.5 Release #464

Merged
merged 45 commits into from
May 25, 2024
Merged

[WIP] Preview 1.80.5 Release #464

merged 45 commits into from
May 25, 2024

Conversation

bagusnl
Copy link
Member

@bagusnl bagusnl commented May 15, 2024

What's New? - 1.80.5

  • [New] Use Sophon chunk download system when available, by @neon-nyan

This library is also Available on NuGet in-case any third-party launcher developer need to use it.
- Adjustments on the API code to be compatible with the old launcher and HoYoPlay API responses.

  • [New] Move to HoYoPlay API where its available via metadata update, by @neon-nyan
    • Using the new ILauncherApi to unify the integration with other types of API (like: HoYoPlay)
    • Adding conversion from HoYoPlay API response to our own format.
  • [New] Prevent sleep on certain occasion, by @bagusnl and @neon-nyan
    • Prevent system from sleeping when doing some core task.
    • Currently implemented on downloading, extracting, patching, and while repair/cache update.
  • [New] Mobile layout mode for Genshin Impact and Honkai: Star Rail, by @bagusnl
    • Use mobile control layout for GI and HSR by enabling it in game settings page.
    • Useful for those using Windows tablet or using local streaming software like Steam Link or Sunshine/Moonlight.
  • [Imp] Use transparent sidebar, by @shatyuka
    • Sidebar now should blend nicely with the background until its hovered in which it will use the opaque sidebar.
  • [Imp] Backend improvements, by @neon-nyan and @bagusnl
    • Use async JSON serializer.
    • Use proper nullable for game package return list.
    • CodeQA on InnoSetup helper.
    • Update NuGet dependencies.
  • [Imp] Adjusted CDN selector radio button style, by @neon-nyan
  • [Imp] Add option to delay game launch when using pre-launch command, by @bagusnl
  • [Imp] Update Honkai: Star Rail 120 FPS warning message, by @Cryotechnic
  • [Imp] Revamped launcher main menu, by @neon-nyan
    • Moved play time counter to the right side.
    • Adjusted buttons size.
    • News panel now zooms when user hovers over it.
    • Revamped preload box UI.
2024-05-24_16-10-51_mini.mp4
  • [Fix] Background error after reloading main page, by @neon-nyan
  • [Fix] Region selector not responding after reloading main page, by @neon-nyan
  • [Fix] Certain values not represented correctly in Star Rail game settings page, by @shatyuka
  • [Fix] Region initializer is not localized, by @shatyuka
  • [Fix] Launcher crashing when launching game on RDP/Virtual monitor setup, by @shatyuka
  • [Fix] Throw error when repairing HI3 with broken metadata, by @bagusnl
    • This prevents user from nuking their installation when our metadata is invalid/broken.
    • If you see the message, please report the issue on our GitHub or Discord server.
  • [Fix] Avoid crashes when news API is empty, by @neon-nyan
  • [Fix] Incorrect package size preventing user to resume download, by @Cryotechnic
  • [Imp/Fix] Refactor API Loaders and Runtime stuffs
    • Fix some typo and avoid unnecessary buffer alloc on ServeV3Data
    • Fix crash while changing launcher release channel
    • Fix background throw due to null preload property
    • Move constant JSON class into inner extension class
    • Fix escaped JSON characters don't get parsed correctly
    • Use Enum.GetValues<T>() instead of Enum.GetValues(typeof(T))
    • Use the new TaskExtensions extension tasks for managing task retrying routine.

Templates

Changelog Prefixes
  **[New]**
  **[Imp]**
  **[Fix]**
  **[Loc]**
  **[Doc]**

transifex-integration bot and others added 25 commits May 9, 2024 13:53
100% reviewed source file: 'en_US.json'
on 'ja_JP'.
margin, alignment, size, glyph, etc
also for game region combobox placeholder
100% reviewed source file: 'en_US.json'
on 'zh_CN'.
100% reviewed source file: 'en_US.json'
on 'ja_JP'.
100% reviewed source file: 'en_US.json'
on 'es_419'.
100% reviewed source file: 'en_US.json'
on 'zh_CN'.
100% reviewed source file: 'en_US.json'
on 'id_ID'.
- Suppress warnings
- Reformat
- Adjust nullables
@@ -444,7 +448,7 @@
LauncherMetadataHelper.CurrentMetadataConfig.GameLauncherApi.GameBackgroundImgLocal = AppDefaultBG;
}

BackgroundMediaUtility.Current?.LoadBackground(LauncherMetadataHelper.CurrentMetadataConfig.GameLauncherApi.GameBackgroundImgLocal, e.IsRequestInit, e.IsForceRecreateCache, (Exception ex) =>
CurrentBackgroundHandler?.LoadBackground(LauncherMetadataHelper.CurrentMetadataConfig.GameLauncherApi.GameBackgroundImgLocal, e.IsRequestInit, e.IsForceRecreateCache, (Exception ex) =>

Check warning

Code scanning / QDNET

Redundant lambda expression parameter type specification Warning

Redundant lambda parameter explicit type specification
IncludeFields = false,
GenerationMode = JsonSourceGenerationMode.Metadata,
IgnoreReadOnlyFields = true,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault | JsonIgnoreCondition.WhenWritingNull,

Check warning

Code scanning / QDNET

Bitwise operation on enum is not marked by [Flags] attribute Warning

Bitwise operation on enum is not marked by [Flags] attribute
{
// Deserialize and do sanitize if the old stamp list is empty
oldStampList = await stampStream.DeserializeAsync<List<Stamp>>(InternalAppJSONContext.Default);
if (oldStampList == null || oldStampList?.Count == 0)

Check warning

Code scanning / QDNET

Conditional access qualifier expression is known to be null or not null Warning

Conditional access qualifier expression is known to be not null
throw new FileNotFoundException($"Unable to update the stamp file because it is not exist! It should have been located here: {stampPath}");

// Read the old stamp list stream
List<Stamp>? oldStampList = null;

Check warning

Code scanning / QDNET

Assignment is not used Warning

Value assigned is not used in any execution path
x.MetadataType);
// Check if the old stamp ref is null or index of old stamp reference returns < 0, then
// add it as a new entry.
int indexOfOldStamp = 0;

Check warning

Code scanning / QDNET

Assignment is not used Warning

Value assigned is not used in any execution path

await JsonSerializer.SerializeAsync(targetStream, value, typeInfo, token);
}
#nullable restore

Check warning

Code scanning / QDNET

Unused nullable directive Warning

Unused nullable directive
@bagusnl bagusnl marked this pull request as draft May 15, 2024 13:48
@bagusnl bagusnl self-assigned this May 20, 2024
@bagusnl bagusnl marked this pull request as ready for review May 20, 2024 21:10
@bagusnl
Copy link
Member Author

bagusnl commented May 20, 2024

Testing phase for 24 hours since this message is posted. Please report any bug either in this PR or on a new issue ticket.

transifex-integration bot and others added 8 commits May 21, 2024 02:05
100% reviewed source file: 'en_US.json'
on 'ja_JP'.
100% reviewed source file: 'en_US.json'
on 'zh_CN'.
100% reviewed source file: 'en_US.json'
on 'ja_JP'.
100% reviewed source file: 'en_US.json'
on 'es_419'.
100% reviewed source file: 'en_US.json'
on 'id_ID'.
100% reviewed source file: 'en_US.json'
on 'id_ID'.
* Change EncTool path

* Use async stream for loading background files

* Fix escaped JSON characters don't get parsed correctly

* Move constant JSON class into inner extension class

* Refactor API Loaders

Using the new ILauncherApi to unify the integration with other types of API (like: HoYoPlay)

* Adding basic HYP to Sophon pkg resource conversion

+ Borrowing HSR version check and game settings for now.

* Adding background image support for HoYoPlay API

* Adding news and carousel panel support for HoYoPlay API

* Fix false Base64 detection on ``GetServeV3String()``

This was causing some installation detection issues where some region/version check related string is falsely detected as Base64 and make the string rendered incorrectly

* Fix some typo and avoid unnecessary buffer alloc on ``ServeV3Data``

+ Also fixes throw while checking for non-existence pre-load property

* Fix crash while changing launcher release channel

* Fix background throw due to null preload property

* Adding new decompressor for .zip package files

Adding USENEWZIPDECOMPRESS to use SharpCompress decompressor with multi-thread zip decompress support.

* Avoid null packages to be proceeded

* Check availability for cache type: "Event" with DLM = 2

* Fix Hi3 Game Repair for version: ``Thelema``

* Re-adding checks if the normal metadata file exists (Hi3)

* FIx "Check Update" button status's center position

* Adjust windows title-bar button style

* Extend maximum threads for download to 16

* Fix TextFillColorBrush on update status button

* Use GetURLStatusCode to check URL status on repair/cache

* Use ``Enum.GetValues<T>()`` instead of ``Enum.GetValues(typeof(T))``

* Fix last exception in ``RetryTimeoutAfter()`` not getting thrown

* Fix threading issues on Install, Repair and Cache mechanism

* Fix Infinity and NaN numbers in ``TotalPerfileProgress``

* Use ``UnNaNInfinity()`` in ``UpdateProgress()``

* Fix data corruption while performing game data migration

* Fix max session exception on Hi3Helper.Http

* Fix float/double to TimeSpan number conversion

This due to the number being a negative infinity

* Bump version

* Add Sophon submodule

* FIx background handler getting disposed on MainPage reload

* Fix region combobox cannot receive input while reloading MainPage

* Adding Sophon testing/usage sample

* Adding Async JSONSerializer helper for Stream

* Use nullable assignment for game package return list

* Update stamp file instead of redownloading if certain config has changed

* Update SharpDiscordRPC submodule

* Adding Sophon submodule and its testing project

* Add new Sophon Chunk download mechanism

* (GSP-SR) Clamp ShadowQuality value

#399

* [i18n] Localize metadata initialization messages

also for game region combobox placeholder

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* (GSP-SR) Clamp all quality values

* (GSP-SR) GraphicsQuality presets

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* Localize Discord RPC Game/Region strings

* Add a way to skip audio patch

Currently only for Star Rail

* (CDN) Add Coding mirror

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Update NuGet Dependencies

H.NotifyIcon
https://www.nuget.org/packages/H.NotifyIcon.WinUI#releasenotes-body-tab

HtmlAgilityPack
https://github.com/zzzprojects/html-agility-pack/releases/tag/v1.11.61

WASDK
https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/stable-channel#version-153-15240428000

TaskScheduler
https://github.com/dahall/TaskScheduler/releases/tag/v2.11.0

* Update NuGet

* Fix build configuration

* Adjustment on CDN RadioButtons style

* Adjustment on CDN RadioButtons style (pt. 2)

* (GSP-SR) Fix fullscreen inconsistency

* Update sophon submodule

* Update sophon submodule

* Add ``PreventSleep()`` to prevent Windows' sleep routine

Co-Authored-By: Bagus Nur Listiyono <[email protected]>

* [TaskExtensions] Throw inner exception if completed task is faulty

* [HYP] Add parser for social media icons

* [Sophon] Fix crash caused by empty URL conditions in news API

* [UI] Adjust the social media flyout style

* Implement PreventSleep() on needed methods

* Update GitInfo NuGet and package lock file

* [TaskExtensions] Use the new ``WaitForRetryAsync`` for retrying task

* [UI] Fix inconsistent foreground color for socmed's QR title

* (GSP) Implement mobile layout mode

Only for GI for now

* (GSP) Add delay game launch function on pre launch command

* Update submodules and NuGet

* Use custom style for ``ImageEx``

* Remove unnecessary ``Console.WriteLine()`` under ``CurrentMetadataConfig``

* Use custom style for ``ImageEx`` pt. 2

* Use async WriteLine for logger (also uses .Error and .Out to write)

* Hi3Helper.Sophon adjustment

* Dont catch cancellation exception on PreventSleep

* Show nav sidebar only on hover

* Add drop shadow to nav button

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* Update Hi3Helper.Http submodule

* Fix fallback translation for MobileLayout text

* [skip ci] Sync translation Translate en_US.json in id_ID

100% reviewed source file: 'en_US.json'
on 'id_ID'.

* Remove deprecated CDN (Bitbucket)

* UI Adjustments

+ Adding FontSize property to the CompressedTextBlock
+ Unify ApplyShadow to be used by other elements, moving the code to UIElementExtensions with some changes.
+ Adding StartAnimationDetached to AnimationHelper extension
+ Adjust element sizes on both Normal and Small Size window
+ Minor adjustment on brushes
+ Move the playtme button beside the Quick Settings and Community Tools button
+ Adding shadows to navigation menu icons (by: @shatyuka) and social media icons
+ New layout and adjustments for Carousel and News panel
+ Adjustment on Install, Update and Start game button
+ Adding loading animation while loading ImageEx element

Co-Authored-By: Shatyuka <[email protected]>

* [skip ci] Sync translation Translate en_US.json in id_ID

100% reviewed source file: 'en_US.json'
on 'id_ID'.

* Remove unnecessary Lottie package

* Adjust Preload box dialog UI

* Use current thread for animation compositor

* Adjust preload button style to ``AcrylicButtonStyle``

* Use current thread for animation compositor (pt. 2)

* Add 500 ms delay before side panel animation is triggered

* Fix crash on starting animation with no access to thread

* Minor adjustment on loading frame

* Fix task not retrying due to cancellation from linked source

* Fix retry mechanism on API loading not working

* Adjust DisconnectedPage style

* Add HoYoPlay featured event icon and styles

* Fix installation progress bar style

* Update sophon and HYP install mechanism

* fix typo

* change insufficient drive space dialog required type

* fix incorrect package size indicators to the user

THANKS MICROSOFT VERY COOL

This hopefully fixes #445

* update submodule

* update submodule

wrong commit hash 😓

---------

Co-authored-by: Kemal Setya Adhi <[email protected]>
Co-authored-by: Shatyuka <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Ron Friedman <[email protected]>
@bagusnl bagusnl merged commit 1649355 into preview May 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants