15 Commits

Author SHA1 Message Date
wangdage12
068eb65fef Add Discord server link to README
Added Discord server link for community engagement.
2026-01-01 12:57:42 +08:00
fanbook-wangdage
09a8cded2f Merge branch 'main' of https://github.com/wangdage12/Snap.Hutao 2025-12-26 18:36:50 +08:00
fanbook-wangdage
c38fdf30d0 修复以管理员权限重启问题 2025-12-26 18:33:20 +08:00
wangdage12
bc1ff03d0a Update README with metadata progress and synchronization
Removed outdated metadata progress details and added synchronization note.
2025-12-22 21:05:40 +08:00
wangdage12
b288860c3b Update README.md 2025-12-19 23:13:19 +08:00
wangdage12
1e40a6e576 Revise status indicators and update links
Updated status indicators and URLs in the README.
2025-12-19 22:59:02 +08:00
wangdage12
d342b37dc0 Update HarvestDirectory path in wixproj file 2025-12-19 21:28:55 +08:00
fanbook-wangdage
179177a77c Merge branch 'main' of https://github.com/wangdage12/Snap.Hutao 2025-12-19 21:20:14 +08:00
fanbook-wangdage
6c68a55d81 解决元数据导致的问题 2025-12-19 21:19:47 +08:00
wangdage12
7bd61c8035 Merge pull request #14 from wangdage12/dependabot/github_actions/dot-github/workflows/actions/upload-artifact-6
Bump actions/upload-artifact from 5 to 6 in /.github/workflows
2025-12-17 20:20:52 +08:00
wangdage12
c19b71e2c4 Merge pull request #15 from wangdage12/dependabot/github_actions/dot-github/workflows/actions/cache-5
Bump actions/cache from 4 to 5 in /.github/workflows
2025-12-17 20:20:38 +08:00
wangdage12
45b7383fc1 Merge pull request #16 from wangdage12/dependabot/github_actions/dot-github/workflows/dessant/lock-threads-6
Bump dessant/lock-threads from 5 to 6 in /.github/workflows
2025-12-17 20:20:23 +08:00
dependabot[bot]
c83a2f3e9d Bump dessant/lock-threads from 5 to 6 in /.github/workflows
Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 5 to 6.
- [Release notes](https://github.com/dessant/lock-threads/releases)
- [Changelog](https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dessant/lock-threads/compare/v5...v6)

---
updated-dependencies:
- dependency-name: dessant/lock-threads
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 02:30:01 +00:00
dependabot[bot]
2bab0baf69 Bump actions/cache from 4 to 5 in /.github/workflows
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 02:29:57 +00:00
dependabot[bot]
2726e74731 Bump actions/upload-artifact from 5 to 6 in /.github/workflows
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 02:29:52 +00:00
11 changed files with 73 additions and 86 deletions

View File

@@ -95,7 +95,7 @@ jobs:
- name: Cache NuGet packages
if: ${{ needs.select-runner.outputs.runner == 'windows-latest' }}
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Snap.Hutao.csproj') }}
@@ -113,7 +113,7 @@ jobs:
- name: Upload signed msix
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: Snap.Hutao.Alpha-${{ steps.cake.outputs.version }}
path: ${{ github.workspace }}/src/output/Snap.Hutao.Alpha-${{ steps.cake.outputs.version }}.msix

View File

@@ -59,7 +59,7 @@ jobs:
- name: Cache NuGet packages
if: ${{ steps.merge.outputs.continue == 'true' }}
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Snap.Hutao.csproj') }}
@@ -77,7 +77,7 @@ jobs:
- name: Upload signed msix
if: ${{ success() && steps.merge.outputs.continue == 'true' }}
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: Snap.Hutao.Canary-${{ steps.cake.outputs.version }}
path: ${{ github.workspace }}/src/output/Snap.Hutao.Canary-${{ steps.cake.outputs.version }}.msix

View File

@@ -17,7 +17,7 @@ jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
- uses: dessant/lock-threads@v6
with:
issue-inactive-days: '30'
issue-comment: 'This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topic.'

View File

@@ -31,7 +31,7 @@ jobs:
run: dotnet build src/Snap.Hutao/Snap.Hutao.Installer/Snap.Hutao.Installer.wixproj -c Release
- name: Upload MSI Artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: Snap.Hutao-MSI
path: |

View File

@@ -6,6 +6,8 @@
该版本注入功能暂不可用,并且由于缺失资源和开发能力,不建议长期使用
有条件的话可以加入discord服务器https://discord.gg/ucH3mgeWpQ
**English**
Snap Hutao is an open-source Genshin Impact toolkit under MIT license, designed for modern Windows platform to improve the gaming experience for desktop players.
@@ -25,28 +27,16 @@ Snap Hutao is an open-source Genshin Impact toolkit under MIT license, designed
项目启动位置已升级为 VS2026 的 slnx 格式 Snap.Hutao\src\Snap.Hutao\Snap.Hutao.slnx
> [!WARNING]
> 要使该项目可以长期运行,我们需要以下资源
> 1. `src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/DataSigning/SaltConstants.cs`中的新签名值
> 2. 元数据的编写
> 3. 图片资源
> 1. 元数据的编写
> 2. 图片资源
已同步原作者的元数据
V6.2的元数据已在编写中
测试仓库位置http://server.wdg.cloudns.ch:3000/wdg1122/Snap.Metadata.Test
**目前元数据的编写进度:**
| 项目V6.2 | 是否完成 |
| ----------- | ----------- |
| 新角色的基本数据 | ✔️ |
| 新版本角色/怪物基础数值 | ❔ |
| 新角色的详细资料、名片等 | ❌ |
| 新武器 | ✔️ |
| 新材料 | ❇️ |
| 新怪物 | ❇️ |
| 新圣遗物 | / |
| 新卡池 | ❇️ |
| 新成就 | ✔️ |
| 深境螺旋 | 💠 |
| 幻想真境剧诗 | 💠 |
| 幽境危战 | ✔️ |
| 总体数据 | ✔️ |
✔️:已完成
❌:未编写
@@ -81,30 +71,21 @@ https://deepwiki.com/DGP-Studio/Snap.Hutao.Server
https://github.com/wangdage12/Snap.Metadata
镜像:
![http://serverjp.wdg.cloudns.ch:3001/api/badge/6/status?style=flat-square](http://serverjp.wdg.cloudns.ch:3001/api/badge/6/status?style=flat-square)
![http://serverjp.wdg.cloudns.ch:3001/api/badge/11/status?style=flat-square](http://serverjp.wdg.cloudns.ch:3001/api/badge/11/status?style=flat-square)
http://server.wdg.cloudns.ch:3000/wdg1122/Snap.Metadata
![http://serverjp.wdg.cloudns.ch:3001/api/badge/7/status?style=flat-square](http://serverjp.wdg.cloudns.ch:3001/api/badge/7/status?style=flat-square)
http://serverjp.wdg.cloudns.ch:3000/wdg1122/Snap.Metadata
http://htgit.wdg.cloudns.ch/wdg1122/Snap.Metadata
---
**临时API**
![http://serverjp.wdg.cloudns.ch:3001/api/badge/8/status?style=flat-square](http://serverjp.wdg.cloudns.ch:3001/api/badge/8/status?style=flat-square)
![http://serverjp.wdg.cloudns.ch:3001/api/badge/10/status?style=flat-square](http://serverjp.wdg.cloudns.ch:3001/api/badge/10/status?style=flat-square)
http://server.wdg.cloudns.ch:5222/
https://htserver.wdg.cloudns.ch/api/
![http://serverjp.wdg.cloudns.ch:3001/api/badge/9/status?style=flat-square](http://serverjp.wdg.cloudns.ch:3001/api/badge/9/status?style=flat-square)
http://serverjp.wdg.cloudns.ch:5222/
---
**临时资源站:**
http://server.wdg.cloudns.ch:8007/
http://serverjp.wdg.cloudns.ch:8001/
https://htserver.wdg.cloudns.ch/

View File

@@ -2,7 +2,7 @@
<Package
Name="Snap.Hutao"
Manufacturer="Millennium Science Technology R-D Inst"
Version="1.0.0.0"
Version="1.17.4.0"
UpgradeCode="121203be-60cb-408f-92cc-7080f6598e68"
Scope="perMachine">

View File

@@ -193,6 +193,32 @@ internal sealed class ProcessFactory
public static void StartUsingShellExecuteRunAs(string fileName)
{
// 尝试从app包中启动
try
{
global::System.Diagnostics.Process.Start(new global::System.Diagnostics.ProcessStartInfo
{
FileName = fileName,
UseShellExecute = true,
Verb = "runas",
});
}catch
{
// 如果失败且filename含有Snap.Hutao.Unpackaged就直接用Snap.Hutao.exe重启
if (fileName.Contains("Snap.Hutao.Unpackaged"))
{
string currentDirectory = Directory.GetCurrentDirectory();
string unpackagedPath = Path.Combine(currentDirectory, "Snap.Hutao.exe");
if (File.Exists(unpackagedPath))
{
fileName = unpackagedPath;
}
// 否则抛出异常
else
{
throw;
}
// 重新尝试启动
global::System.Diagnostics.Process.Start(new global::System.Diagnostics.ProcessStartInfo
{
FileName = fileName,
@@ -201,3 +227,5 @@ internal sealed class ProcessFactory
});
}
}
}
}

View File

@@ -13,7 +13,7 @@
<Identity
Name="60568DGPStudio.SnapHutao"
Publisher="CN=35C8E923-85DF-49A7-9172-B39DC6312C52"
Version="1.17.1.0" />
Version="1.17.4.0" />
<Properties>
<DisplayName>Snap Hutao</DisplayName>

View File

@@ -24,8 +24,10 @@ internal static class AvatarViewBuilderExtension
{
if (detailedCharacter.Costumes is [{ Id: { } id }, ..])
{
MetadataCostume costume = avatar.Costumes.Single(c => c.Id == id);
MetadataCostume? costume = avatar.Costumes.SingleOrDefault(c => c.Id == id);
if (costume != null)
{
ArgumentNullException.ThrowIfNull(costume.FrontIcon);
ArgumentNullException.ThrowIfNull(costume.SideIcon);
@@ -34,6 +36,13 @@ internal static class AvatarViewBuilderExtension
builder.View.SideIcon = AvatarIconConverter.IconNameToUri(costume.SideIcon);
}
else
{
// Costume not found in metadata, fallback to default avatar icon
builder.View.Icon = AvatarIconConverter.IconNameToUri(avatar.Icon);
builder.View.SideIcon = AvatarIconConverter.IconNameToUri(avatar.SideIcon);
}
}
else
{
builder.View.Icon = AvatarIconConverter.IconNameToUri(avatar.Icon);
builder.View.SideIcon = AvatarIconConverter.IconNameToUri(avatar.SideIcon);

View File

@@ -10,6 +10,9 @@
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<UseWinUI>true</UseWinUI>
<UseWPF>False</UseWPF>
<!-- 配置版本号 -->
<Version>1.17.4.0</Version>
<UseWindowsForms>False</UseWindowsForms>
<ImplicitUsings>False</ImplicitUsings>
<Nullable>enable</Nullable>
@@ -288,7 +291,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Snap.Hutao.SourceGeneration" Version="1.3.14">
<PackageReference Include="Snap.Hutao.SourceGeneration" Version="1.3.15">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

View File

@@ -1,34 +0,0 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
namespace Snap.Hutao.Web.Hoyolab.DataSigning;
/// <summary>
/// Salt constants for data signing
/// Values are obtained from https://github.com/UIGF-org/Hoyolab.Salt
/// This file should normally be generated by Snap.Hutao.SourceGeneration.Automation.SaltConstantGenerator
/// But is provided manually when the generator fails to fetch values from the network.
///
/// IMPORTANT: For local builds, you must manually obtain salt values from:
/// https://github.com/UIGF-org/Hoyolab.Salt
/// </summary>
internal static class SaltConstants
{
// Version numbers - Update these according to the current miHoYo app versions
public const string CNVersion = "2.95.1";
public const string OSVersion = "2.54.0";
// Salt keys for Chinese (CN) server
// These are placeholder values - MUST be replaced with actual values from UIGF-org/Hoyolab.Salt
public const string CNK2 = "sfYPEgpxkOe1I3XVMLdwp1Lyt9ORgZsq";
public const string CNLK2 = "sidQFEglajEz7FA0Aj7HQPV88zpf17SO";
// Salt keys for Overseas (OS) server
public const string OSK2 = "599uqkwc0dlqu3h6epzjzfhgyyrd44ae";
public const string OSLK2 = "rk4xg2hakoi26nljpr099fv9fck1ah10";
// Note: The actual salt values are security-sensitive and should not be committed
// to public repositories. For local builds, obtain them from the UIGF organization
// and replace the placeholders above.
}