Skip to content

Commit

Permalink
Promote code for testing (#221)
Browse files Browse the repository at this point in the history
* module update

plsdontbreakplsdontbreakplsdontbreakplsdontbreakplsdontbreak

* Fix full package detection (#202)

* Fix full package detection

Attempt to fix full package detection that returned 0 even if the file was fully downloaded

* Fix typo

English shenanigans

* Pre-load check (#200)

* Pre-load check

Attempt to identify if either full zip or slices preload are available

* Pre-load fix pt2

Why in the world was I calling the whole start download function while I could just run the get package list?

* Implement Cloudflare CDN (#204)

Using my domain for now due to the emergency of the situation

* disabled Bitbucket

* Game repairing supports Genshin CN server (#201)

* Update submodules

* Fix broken HSR game repair and cache (Issue: #206)

* Initial Commit

- Reduced overhead while fetching launcher's sprites by using local ``FallbackCDNUtil``'s HTTP Client method.
- Using direct JSON deserialization from ``FallbackCDNUtil``'s ``DownloadAsJSONType<T>()`` for fetching launcher's API
- Improving Color Palette generation by using the latest ``ColorThief`` changes.
- Moving unrelated methods from ``BackgroundManagement`` to ``RegionManagement``
- Back to previous method while downloading game packages where merging the chunk is required before verification and extraction
- Removed overused ``GC.Collect()``
- Minor UI Changes, including:
    - Adding an ability to go back to the previous page
    - Making title icon clickable for "Back to Homepage" button (Issue: #131)
    - Adding an ability to disable acrylic effect (Issue: #190)
- Adding failsafe if the user choose invalid folders to be used as "App Folder" for the launcher on the first set-up.
- Fixed the rare state where the foreground image is shown outside of the home page.

* Update submodule :pepeSadge:

* Update submodule :pepeSadge:

* Use custom KeyValuePairing for Genshin graphics settings

* Simplify the way to compare properties in Game Settings classes

* Add HI3 Community Tools

Elysian Realm Build Guide

* GameSettings - Add SFX Quality for HSR

* GameSettings - Update JSON order for GI

Also fixes some warnings in the code

* GameSettings - Fix nullable on HSR PCResolution

* Implement Borderless Screen game mode

* Organize HomePage.xaml.cs

oh ma gawd

* GameSettings - Use unsafe relaxed Json escaping for GI

why...

Co-authored-by: Kemal Setya Adhi <[email protected]>
Co-authored-by: Iskandar Montano <[email protected]>

* Update README.md

* Add Code of Conduct

using email from @neon-nyan profile

* Fix typo on Game Playtime panel minutes string

* Remove unused code + Update submodule

* Make ``ApplyAccentColor()`` run asynchronously

* Ensure IsInstancePropertyEqual check if either one of the value is null

* App Settings Improvements

- Move around some parts to make settings page a little bit more compact
- Hide some settings that depends on other
- [New] Add toggle to include Game logs inside Collapse Logs
- [New] Add contributors list button

* Improve Discord RPC Output

- Localize `Region:` string
- [New] Add Collapse version and branch string to SmallText

* Update locales

* Add debug lines for RegistryMonitor

In search of incredi- I mean bug in which RegistryMonitor randomly forces updates on HomePage

* Change operator for Metadata update

Use `<` instead of `!=` so that metadata will not get updated if local stamp is higher than remote, useful to test metadata locally and in the events of some CDN gets out of sync.

* Make Game Conversion feature work again

I didn't notice that this feature isn't working anymore since the last InstallManagement rewrite. However, this changes hopefully bring the feature back again as it should be.
This commit contains changes including:
- Fixes for Game Conversion feature.
- Fixed the IsGameInstalled() got bypassed after executable size check.

* Average the generated color palette generation

* Makes null compare in ``IsInstancePropertyEqual()`` easier to read

* Move development guides entirely to Contribution Guidelines

* Fix Discord button margin

* Avoid any Direct X files getting deleted in Hi3 Game Repair

* Try adding 20 more color palette to generate if fails

* Update BackgroundManagement.cs

* Adding back ``IsInstancePropertyEqual()`` usage in Genshin ``GeneralData``

* Margin adjustment and adding back blur effect toggle

* Adding back Bitbucket for the CDN

* Adding fallback on FallbackCDNUtil

* Enable ReadyToRun compilation

* Bring back @bagusnl's changes in HomePage.xaml.cs

* Fix not compiling on Debug (#215)

Logger issue

* Fix background toggle not working while page changes

* Fix potential undisposed stream in ``IsPreloadCompleted()``

* Add setting to toggle merging after download

* Avoid conflict while going back through pages

* Ensure if the page loaded first before navigating

* Fix for PRI263 Warnings

Somehow "BG" folder name is treated as language resource, thus the "PRI263: 0xdef01051 - No default or neutral resource given for 'Files/Assets/*'. The application may throw an exception for certain user configurations when retrieving the resources." warnings.
This commit tries to fix it by renaming the "BG" assets folder to "Images" and adjusting everything necessary for it.

Reference: https://developercommunity.visualstudio.com/t/uwp-resource-handling-fails-when-baseintermediateo/82838#T-N91468

Related to #211

* Change Background Filename

Addition to 46befc9

* Enable certain Quick Settings menu when game is running

Enhancement #197

This commits enables Quick Settings button when game is running like opening folders.. well that's basically it

* Lock packages for more consistent nuget restore

* Use action/cache@v3 for dotnet and nuget

* Update Readme

- Update release version
- Add action build status badge

* Shorten action artifact output file name

* Remove unused HPatchZ.dll lib

* Merge JSON Contexts into several one

* Remove duplicate file

* Update build.yml

- Disable debug artifact upload
- Fix artifact not uploading when selecting other SDK version
- Add branch name to artifact file name

* [workflow] Only install dotnet when cache is missed

whoops

* Revert last change

* Adding preps for Background download

* Adding method to force close game

Button located in Quick Settings panel

* Rewrite property static +add basic back. activity handle

* Add ``DispatcherQueue``  in ``IBackgroundActivity``

* Always duplicate current game property in each page

* Change notif type based on activity status

* Why did I remove this? :bruh:

* Fix GetVersion logic and package preload detection (#216)

* Fix not compiling on Debug

Logger issue

* Fix GetVersion logic

* Try to fix size detection in preload check

* Actually fixes preload check

* Remove unused transition

* Only spawn the Preload box if the calls completed

* added rider to gitignore

* Attempt to fix main after neon-changes merge (#217)

* First attempt to fix main

Removed duplicate #GameState region

* Second attempt to fix main

* Third and hopefully final commit to fix main

Too many commits merged

* Fix preload slices being detected as unused assets

* WinAppSDK NuGet update to 1.3.230724000

* Adjust GameSettings Base nullable

* make StopGame method sync

* added missing game icons

* include files during build

* added logic to show logo based on GameType during download

* forgot to gitignore a directory

* Ignore non-JSON line in packageversion (Fix: #219)

* Fix delta-patch doesn't work in new ``HonkaiInstall``

---------

Co-authored-by: Iskandar Montano <[email protected]>
Co-authored-by: Bagus Nur Listiyono <[email protected]>
Co-authored-by: Scighost <[email protected]>
Co-authored-by: Kemal Setya Adhi <[email protected]>
Co-authored-by: Bagus Nur Listiyono <[email protected]>
  • Loading branch information
6 people authored Aug 4, 2023
1 parent b774aab commit 88bed73
Show file tree
Hide file tree
Showing 159 changed files with 6,491 additions and 2,797 deletions.
43 changes: 32 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Credits to @Scighost from Starward for his contributions!
name: Build-Canary
run-name: Canary Build for ${{ github.ref }}

on:
workflow_dispatch:
Expand All @@ -22,10 +23,7 @@ on:
- "net7.0-windows10.0.22000.0"
- "net7.0-windows10.0.19041.0"



jobs:

build:
runs-on: ${{ github.event.inputs.os }}
strategy:
Expand All @@ -36,13 +34,36 @@ jobs:
env:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
DOTNET_INSTALL_DIR: '.\.dotnet'

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Get short Git SHA
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Cache dotnet # cache dotnet install https://stackoverflow.com/questions/75180149/how-to-cache-dotnet-installation-in-github-actions
id: cache-dotnet
uses: actions/cache@v3
with:
path: ${{ env.DOTNET_INSTALL_DIR }}
key: ${{ runner.os }}-dotnet-7
restore-keys: ${{ runner.os }}-dotnet-7

- name: Cache nuget # cache nuget https://github.com/actions/cache/blob/main/examples.md#c---nuget
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
Expand All @@ -59,16 +80,16 @@ jobs:
msbuild CollapseLauncher "-property:Configuration=$env:Configuration;Platform=$env:Platform"
dotnet build CollapseLauncher -c $env:Configuration -p:Platform=$env:Platform -f ${{ github.event.inputs.framework }}
- name: Upload Artifact (Debug)
uses: actions/[email protected]
if: ${{ matrix.configuration == 'Debug' }}
with:
name: collapse_${{ github.sha }}.${{ matrix.platform }}-${{ matrix.configuration }}
path: ./CollapseLauncher/bin/x64/Debug/net7.0-windows10.0.22000.0/
# - name: Upload Artifact (Debug)
# uses: actions/[email protected]
# if: ${{ matrix.configuration == 'Debug' }}
# with:
# name: collapse_${{ github.ref }}_${{ steps.vars.outputs.sha_short }}.${{ matrix.platform }}-${{ matrix.configuration }}
# path: ./CollapseLauncher/bin/x64/Debug/${{ github.event.inputs.framework }}/

- name: Upload Artifact (Release)
uses: actions/[email protected]
if: ${{ matrix.configuration == 'Release' }}
with:
name: collapse_${{ github.sha }}.${{ matrix.platform }}-${{ matrix.configuration }}
path: ./CollapseLauncher/bin/x64/Release/net7.0-windows10.0.22000.0/
name: collapse_${{ matrix.platform }}-${{ matrix.configuration }}_${{ github.event.inputs.framework }}_${{ github.sha }}
path: ./CollapseLauncher/bin/x64/Release/${{ github.event.inputs.framework }}/
80 changes: 80 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,83 @@ CollapseLauncher/Invoker/*
*.psd
InstallerProp/Output/*
InstallerProp/temp/**

### Rider ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
.idea/*

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ If you wish to add new language that isn't yet listed in the Crowdin project, pl
## Tools Needed
Below is a list of tools needed to contribute to this project:
1. **Visual Studio 2022 (Any Edition - 17.4 or later)**
- Select .NET desktop development component
2. **Windows SDK (10.0.19043.0 or 10.0.22000.0 ONLY)** via Visual Studio Installer
3. .NET Core 7 SDK: [**(7.0.100 or later)**](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
4. WinUI 3: [**(WindowsAppSDK 1.3.0-230331000 Stable Runtime)**](https://aka.ms/windowsappsdk/1.3/1.3.230331000/windowsappruntimeinstall-x64.exe)

> **Note**:
>
> Starting from November 13<sup>rd</sup> 2022, you <b>must</b> have Visual Studio 2022 installed on your computer due to the updated minimum system requirement of `WinUI 3 1.3 Stable`.
>
> Using a lower Visual Studio version (like VS2019) is possible, but it is not recommended as you need to downgrade **WindowsAppSDK** via *NuGet* to **WindowsAppSDK 1.1.5** or **WindowsAppSDK 1.2-preview2** before building. This has an increased risk of breaking the application and as such, no support will be provided for this method. **This is not recommended for beginner users.**
## Restrictions for New Feature(s)
While this software is fully open source and not affiliated with HoYoverse, Cognosphere, or any of its related entities in any way, we are nonetheless bound to their Terms of Service and Code of Conduct when developing Collapse. This means that there are some features that we will **not** implement. We will close any issue or PRs that are made to add such functionality to Collapse. Such features include, but are not limited to:
- Anything that, in any way, interacts with the miHoYo SDK and/or API, including their Authentication and Payment Processing endpoints.
Expand Down
Loading

0 comments on commit 88bed73

Please sign in to comment.