Skip to content

Commit

Permalink
Migrate to .NET 8 (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl authored Nov 22, 2023
2 parents e1c0e0c + 9080839 commit 8dcf45d
Show file tree
Hide file tree
Showing 95 changed files with 3,159 additions and 1,752 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ name: Build-Canary
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- 'main'
pull_request:
branches-ignore:
- 'translations_**'
Expand All @@ -20,12 +21,13 @@ jobs:
matrix:
configuration: [Release] # No need to distribute Debug builds
platform: [x64]
framework: [net7.0-windows10.0.22000.0]
framework: [net8.0-windows10.0.22621.0]

env:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
DOTNET_INSTALL_DIR: '.\.dotnet'
DOTNET_VERSION: '8.0'

steps:
- name: Checkout
Expand All @@ -38,8 +40,8 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.DOTNET_INSTALL_DIR }}
key: ${{ runner.os }}-dotnet-7
restore-keys: ${{ runner.os }}-dotnet-7
key: ${{ runner.os }}-dotnet-${{ env.DOTNET_VERSION }}-${{ matrix.platform }}
restore-keys: ${{ runner.os }}-dotnet-${{ env.DOTNET_VERSION }}-${{ matrix.platform }}

- name: Cache nuget # cache nuget https://github.com/actions/cache/blob/main/examples.md#c---nuget
uses: actions/cache@v3
Expand All @@ -52,10 +54,13 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Setup MSBuild
uses: microsoft/[email protected]
with:
vs-prerelease: false
msbuild-architecture: ${{ matrix.platform }}

- name: Restore
run: dotnet restore CollapseLauncher
Expand Down Expand Up @@ -84,7 +89,7 @@ jobs:
continue-on-error: true
with:
webhook: ${{ secrets.DISCORD_WEBHOOK_NIGHTLY }}
title: New canary build is ready!
title: Collapse Launcher CI build is complete!
status: ${{ job.status }}
description: |
Commit `${{ github.sha }}` by ${{ github.actor }}
Expand Down
15 changes: 7 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,22 @@
- We don't require a fully descriptive PR, but please be clear on what is added/removed and what the code does.

## Localization Contribution(s)
You can help us add or proofread localization changes for [Collapse on Crowdin!](https://crowdin.com/project/collapse-launcher)
You can help us add or proofread localization changes for [Collapse on Transifex!](https://explore.transifex.com/collapse-launcher/collapse-mainapp/)
If you wish to add new language that isn't yet listed in the Crowdin project, please create an issue either in GitHub or create a discussion through Crowdin itself. We'll do our best to get back to you in a timely manner.

## Tools Needed
Below is a list of tools needed to contribute to this project:
1. **Visual Studio 2022 (Any Edition - 17.4 or later)**
1. **Visual Studio 2022 (Any Edition - 17.8 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)
2. **Windows SDK (10.0.22621.0 ONLY)** via Visual Studio Installer
3. .NET 8 SDK: [**(8.0.0 or later)**](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
4. WinUI 3: [**(WindowsAppSDK 1.4.0 Stable Runtime)**](https://aka.ms/windowsappsdk/1.4/latest/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`.
> Starting from November 21<sup>st</sup> 2023, you <b>must</b> have Visual Studio 2022 version 17.8+ installed on your computer due to the updated minimum system requirement of `WindowsAppSDK` and `.NET 8`.
>
> 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.**
> Using a lower Visual Studio version (like VS2019) is not possible due to requirement from WindowsAppSDK used in this project.
## 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
15 changes: 14 additions & 1 deletion ClearCache.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
@echo off
echo Clearing Collapse cache
rmdir /S /Q CollapseLauncher\bin && rmdir /S /Q CollapseLauncher\obj
echo Clearing ColorThief cache
rmdir /S /Q ColorThief\ColorThief\bin && rmdir /S /Q ColorThief\ColorThief\obj
echo Clearing Core cache
rmdir /S /Q Hi3Helper.Core\bin && rmdir /S /Q Hi3Helper.Core\obj
echo Clearing EncTool cache
rmdir /S /Q Hi3Helper.EncTool\bin && rmdir /S /Q Hi3Helper.EncTool\obj
echo Clearing EncTool tester cache
rmdir /S /Q Hi3Helper.EncTool.Test\bin && rmdir /S /Q Hi3Helper.EncTool.Test\obj
echo Clearing Http cache
rmdir /S /Q Hi3Helper.Http\bin && rmdir /S /Q Hi3Helper.Http\obj
rmdir /S /Q Hi3Helper.SharpHDiffPatch\bin && rmdir /S /Q Hi3Helper.SharpHDiffPatch\obj
echo Clearing Http tester cache
rmdir /S /Q Hi3Helper.Http\Test\bin && rmdir /S /Q Hi3Helper.Http\Test\obj
echo Clearing HDiff cache
rmdir /S /Q Hi3Helper.SharpHDiffPatch\Hi3Helper.SharpHDiffPatch\bin && rmdir /S /Q Hi3Helper.SharpHDiffPatch\Hi3Helper.SharpHDiffPatch\obj
echo Clearing 2nd HDiff cache
rmdir /S /Q Hi3Helper.SharpHDiffPatch\SharpHDiffPatch\bin && rmdir /S /Q Hi3Helper.SharpHDiffPatch\SharpHDiffPatch\obj
echo Clearing 7z cache
rmdir /S /Q Hi3Helper.Core\Classes\Data\Tools\SevenZipTool\SevenZipExtractor\SevenZipExtractor\bin && rmdir /S /Q Hi3Helper.Core\Classes\Data\Tools\SevenZipTool\SevenZipExtractor\SevenZipExtractor\obj
23 changes: 2 additions & 21 deletions CollapseLauncher.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32317.152
Expand All @@ -22,71 +21,53 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug-Trimmed|x64 = Debug-Trimmed|x64
Publish|x64 = Publish|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Debug|x64.ActiveCfg = Debug|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Debug|x64.Build.0 = Debug|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Debug|x64.Deploy.0 = Debug|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Debug-Trimmed|x64.ActiveCfg = Debug-Trimmed|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Debug-Trimmed|x64.Build.0 = Debug-Trimmed|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Publish|x64.ActiveCfg = Publish|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Publish|x64.Build.0 = Publish|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Release|x64.ActiveCfg = Release|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Release|x64.Build.0 = Release|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Release|x64.Deploy.0 = Release|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Debug|x64.ActiveCfg = Debug|x64
{CA73E886-6AE2-4700-B8BB-5D11D91CA45F}.Debug|x64.Build.0 = Debug|x64
{102DC1D2-B1A9-46AF-B56C-A124013747B6}.Debug|x64.ActiveCfg = Debug|x64
{102DC1D2-B1A9-46AF-B56C-A124013747B6}.Debug|x64.Build.0 = Debug|x64
{102DC1D2-B1A9-46AF-B56C-A124013747B6}.Debug-Trimmed|x64.ActiveCfg = Debug-Trimmed|x64
{102DC1D2-B1A9-46AF-B56C-A124013747B6}.Debug-Trimmed|x64.Build.0 = Debug-Trimmed|x64
{102DC1D2-B1A9-46AF-B56C-A124013747B6}.Publish|x64.ActiveCfg = Publish|x64
{102DC1D2-B1A9-46AF-B56C-A124013747B6}.Publish|x64.Build.0 = Publish|x64
{102DC1D2-B1A9-46AF-B56C-A124013747B6}.Release|x64.ActiveCfg = Release|x64
{102DC1D2-B1A9-46AF-B56C-A124013747B6}.Release|x64.Build.0 = Release|x64
{32413993-E384-46CA-84A4-F7975D78543C}.Debug|x64.ActiveCfg = Debug|x64
{32413993-E384-46CA-84A4-F7975D78543C}.Debug|x64.Build.0 = Debug|x64
{32413993-E384-46CA-84A4-F7975D78543C}.Debug-Trimmed|x64.ActiveCfg = Debug|x64
{32413993-E384-46CA-84A4-F7975D78543C}.Debug-Trimmed|x64.Build.0 = Debug|x64
{32413993-E384-46CA-84A4-F7975D78543C}.Publish|x64.ActiveCfg = Publish|x64
{32413993-E384-46CA-84A4-F7975D78543C}.Publish|x64.Build.0 = Publish|x64
{32413993-E384-46CA-84A4-F7975D78543C}.Release|x64.ActiveCfg = Release|x64
{32413993-E384-46CA-84A4-F7975D78543C}.Release|x64.Build.0 = Release|x64
{0B70C677-C309-46B5-B58E-437728042B65}.Debug|x64.ActiveCfg = Debug|x64
{0B70C677-C309-46B5-B58E-437728042B65}.Debug|x64.Build.0 = Debug|x64
{0B70C677-C309-46B5-B58E-437728042B65}.Debug-Trimmed|x64.ActiveCfg = Debug|x64
{0B70C677-C309-46B5-B58E-437728042B65}.Debug-Trimmed|x64.Build.0 = Debug|x64
{0B70C677-C309-46B5-B58E-437728042B65}.Publish|x64.ActiveCfg = Publish|x64
{0B70C677-C309-46B5-B58E-437728042B65}.Publish|x64.Build.0 = Publish|x64
{0B70C677-C309-46B5-B58E-437728042B65}.Release|x64.ActiveCfg = Release|x64
{0B70C677-C309-46B5-B58E-437728042B65}.Release|x64.Build.0 = Release|x64
{C13639A5-693B-414A-BDFB-8509C3C3A350}.Debug|x64.ActiveCfg = Debug|x64
{C13639A5-693B-414A-BDFB-8509C3C3A350}.Debug|x64.Build.0 = Debug|x64
{C13639A5-693B-414A-BDFB-8509C3C3A350}.Debug-Trimmed|x64.ActiveCfg = Debug|x64
{C13639A5-693B-414A-BDFB-8509C3C3A350}.Debug-Trimmed|x64.Build.0 = Debug|x64
{C13639A5-693B-414A-BDFB-8509C3C3A350}.Publish|x64.ActiveCfg = Publish|x64
{C13639A5-693B-414A-BDFB-8509C3C3A350}.Publish|x64.Build.0 = Publish|x64
{C13639A5-693B-414A-BDFB-8509C3C3A350}.Release|x64.ActiveCfg = Release|x64
{C13639A5-693B-414A-BDFB-8509C3C3A350}.Release|x64.Build.0 = Release|x64
{1BAB5CE4-640E-41A7-B529-4842D378BD4C}.Debug|x64.ActiveCfg = Debug|x64
{1BAB5CE4-640E-41A7-B529-4842D378BD4C}.Debug|x64.Build.0 = Debug|x64
{1BAB5CE4-640E-41A7-B529-4842D378BD4C}.Debug-Trimmed|x64.ActiveCfg = Debug|x64
{1BAB5CE4-640E-41A7-B529-4842D378BD4C}.Debug-Trimmed|x64.Build.0 = Debug|x64
{1BAB5CE4-640E-41A7-B529-4842D378BD4C}.Publish|x64.ActiveCfg = Release|x64
{1BAB5CE4-640E-41A7-B529-4842D378BD4C}.Release|x64.ActiveCfg = Release|x64
{D145686A-C0AA-4164-9854-A8942CB1DFDE}.Debug|x64.ActiveCfg = Debug|x64
{D145686A-C0AA-4164-9854-A8942CB1DFDE}.Debug|x64.Build.0 = Debug|x64
{D145686A-C0AA-4164-9854-A8942CB1DFDE}.Debug-Trimmed|x64.ActiveCfg = Debug|x64
{D145686A-C0AA-4164-9854-A8942CB1DFDE}.Debug-Trimmed|x64.Build.0 = Debug|x64
{D145686A-C0AA-4164-9854-A8942CB1DFDE}.Publish|x64.ActiveCfg = Release|x64
{D145686A-C0AA-4164-9854-A8942CB1DFDE}.Publish|x64.Build.0 = Release|x64
{D145686A-C0AA-4164-9854-A8942CB1DFDE}.Release|x64.ActiveCfg = Release|x64
{D145686A-C0AA-4164-9854-A8942CB1DFDE}.Release|x64.Build.0 = Release|x64
{3AD82793-E1E0-46C6-B239-703373CD11CF}.Debug|x64.ActiveCfg = Debug|x64
{3AD82793-E1E0-46C6-B239-703373CD11CF}.Debug|x64.Build.0 = Debug|x64
{3AD82793-E1E0-46C6-B239-703373CD11CF}.Debug-Trimmed|x64.ActiveCfg = Debug|x64
{3AD82793-E1E0-46C6-B239-703373CD11CF}.Debug-Trimmed|x64.Build.0 = Debug|x64
{3AD82793-E1E0-46C6-B239-703373CD11CF}.Publish|x64.ActiveCfg = Release|x64
{3AD82793-E1E0-46C6-B239-703373CD11CF}.Publish|x64.Build.0 = Release|x64
{3AD82793-E1E0-46C6-B239-703373CD11CF}.Release|x64.ActiveCfg = Release|x64
Expand Down
Loading

0 comments on commit 8dcf45d

Please sign in to comment.