Skip to content

Commit 122ef39

Browse files
committed
chore: 同步 AppleChu/ChuModLoader 子模块与配置
1 parent 5974cf6 commit 122ef39

7 files changed

Lines changed: 319 additions & 86 deletions

File tree

AppleChu

Submodule AppleChu updated 79 files

ChuChartManager/Controllers/ModController.cs

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace ChuChartManager.Controllers;
1111
public class ModController : ControllerBase
1212
{
1313
public record ModInfo(string Name, string Version);
14-
public record ModStatus(bool LoaderInstalled, bool ProxyInstalled, List<ModInfo> Mods);
14+
public record ModStatus(bool LoaderInstalled, List<ModInfo> Mods);
1515
public record ModSectionConfig(bool Enabled, Dictionary<string, object?> Entries);
1616
public record ModConfigRequest(Dictionary<string, ModSectionConfig> Sections);
1717

@@ -20,11 +20,10 @@ public ActionResult<ModStatus> GetStatus()
2020
{
2121
var gamePath = StaticSettings.GamePath;
2222
if (string.IsNullOrEmpty(gamePath))
23-
return Ok(new ModStatus(false, false, []));
23+
return Ok(new ModStatus(false, []));
2424

2525
var binPath = Path.Combine(gamePath, "bin");
26-
var loaderInstalled = System.IO.File.Exists(Path.Combine(binPath, "version.dll"));
27-
var proxyInstalled = System.IO.File.Exists(Path.Combine(binPath, "d3d9.dll"));
26+
var loaderInstalled = System.IO.File.Exists(Path.Combine(binPath, "winhttp.dll"));
2827
var modsPath = Path.Combine(binPath, "mods");
2928
var mods = Directory.Exists(modsPath)
3029
? Directory.GetFiles(modsPath, "*.dll", SearchOption.TopDirectoryOnly)
@@ -33,12 +32,11 @@ public ActionResult<ModStatus> GetStatus()
3332
.ToList()
3433
: [];
3534

36-
return Ok(new ModStatus(loaderInstalled, proxyInstalled, mods));
35+
return Ok(new ModStatus(loaderInstalled, mods));
3736
}
3837

3938
private const string LoaderRepo = "MuNET-OSS/ChuModLoader";
40-
private const string LoaderAsset = "version.dll";
41-
private const string ProxyAsset = "d3d9.dll";
39+
private const string LoaderAsset = "winhttp.dll";
4240
private const string AppleChuRepo = "MuNET-OSS/AppleChu";
4341
private const string AppleChuAsset = "AppleChu.dll";
4442

@@ -60,14 +58,12 @@ public async Task<ActionResult> GetLatestVersions()
6058
var applechu = await GetLatestRelease(AppleChuRepo, AppleChuAsset);
6159

6260
var binPath = string.IsNullOrEmpty(StaticSettings.GamePath) ? "" : Path.Combine(StaticSettings.GamePath, "bin");
63-
var loaderInstalled = !string.IsNullOrEmpty(binPath) && System.IO.File.Exists(Path.Combine(binPath, "version.dll"));
64-
var proxyInstalled = !string.IsNullOrEmpty(binPath) && System.IO.File.Exists(Path.Combine(binPath, "d3d9.dll"));
61+
var loaderInstalled = !string.IsNullOrEmpty(binPath) && System.IO.File.Exists(Path.Combine(binPath, "winhttp.dll"));
6562
var appleChuInstalled = !string.IsNullOrEmpty(binPath) && System.IO.File.Exists(Path.Combine(binPath, "mods", "AppleChu.dll"));
6663

6764
return Ok(new
6865
{
6966
loader = new VersionInfo(loader?.Tag_name ?? "", loaderInstalled ? "installed" : "", loader?.Assets.FirstOrDefault(a => a.Name == LoaderAsset)?.Browser_download_url ?? ""),
70-
proxy = new VersionInfo(loader?.Tag_name ?? "", proxyInstalled ? "installed" : "", loader?.Assets.FirstOrDefault(a => a.Name == ProxyAsset)?.Browser_download_url ?? ""),
7167
applechu = new VersionInfo(applechu?.Tag_name ?? "", appleChuInstalled ? "installed" : "", applechu?.Assets.FirstOrDefault(a => a.Name == AppleChuAsset)?.Browser_download_url ?? ""),
7268
});
7369
}
@@ -93,17 +89,8 @@ public async Task<ActionResult> InstallLoader([FromBody] InstallRequest? request
9389
var binPath = Path.Combine(gamePath, "bin");
9490
var loaderData = await Http.GetByteArrayAsync(loaderUrl);
9591
if (!VerifyDigest(loaderData, FindAssetDigest(release, loaderUrl)))
96-
return BadRequest("version.dll 校验失败,文件可能已损坏或被篡改");
97-
await System.IO.File.WriteAllBytesAsync(Path.Combine(binPath, "version.dll"), loaderData);
98-
99-
var proxyUrl = release?.Assets.FirstOrDefault(a => a.Name == ProxyAsset)?.Browser_download_url;
100-
if (!string.IsNullOrEmpty(proxyUrl))
101-
{
102-
var proxyData = await Http.GetByteArrayAsync(proxyUrl);
103-
if (!VerifyDigest(proxyData, FindAssetDigest(release, proxyUrl)))
104-
return BadRequest("d3d9.dll 校验失败,文件可能已损坏或被篡改");
105-
await System.IO.File.WriteAllBytesAsync(Path.Combine(binPath, "d3d9.dll"), proxyData);
106-
}
92+
return BadRequest("winhttp.dll 校验失败,文件可能已损坏或被篡改");
93+
await System.IO.File.WriteAllBytesAsync(Path.Combine(binPath, "winhttp.dll"), loaderData);
10794

10895
return Ok();
10996
}

ChuChartManager/Front/src/client/mod.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import axios from 'axios'
33

44
export interface ModStatus {
55
loaderInstalled: boolean
6-
proxyInstalled: boolean
76
mods: { name: string; version: string }[]
87
}
98

@@ -58,7 +57,6 @@ export interface VersionInfo {
5857

5958
export interface LatestVersions {
6059
loader: VersionInfo
61-
proxy: VersionInfo
6260
applechu: VersionInfo
6361
}
6462

ChuChartManager/Front/src/views/ModManager.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const hasLoadedConfig = ref(false)
2323
2424
const appleChu = computed(() => status.value?.mods.find(mod => mod.name.toLowerCase() === MOD_ID.toLowerCase()))
2525
const loaderOk = computed(() => status.value?.loaderInstalled ?? false)
26-
const proxyOk = computed(() => status.value?.proxyInstalled ?? false)
2726
const modOk = computed(() => !!appleChu.value)
2827
const configOk = computed(() => !!manifest.value && !!config.value)
2928
@@ -106,11 +105,6 @@ watch(config, () => {
106105

107106
<div class="w-4" />
108107

109-
<span>d3d9 proxy:</span>
110-
<span :class="proxyOk ? 'c-green-6' : 'c-red-6'">{{ proxyOk ? t('mods.installed') : t('mods.notInstalled') }}</span>
111-
112-
<div class="w-4" />
113-
114108
<span>AppleChu:</span>
115109
<template v-if="modOk">
116110
<span class="c-green-6">{{ t('mods.installed') }}</span>
Lines changed: 146 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,70 @@
1-
## AppleChu v1.0.0
1+
## 这是 AppleChu 的 TOML 配置文件
22
##
33
## - 井号 # 开头的行为注释,被注释掉的内容不会生效
4-
## - 以方括号包裹的行,如 [SkipStartup],为一个功能
5-
## - 将默认被注释的功能取消注释即可启用
6-
## - 若要禁用一个默认启用的功能,请在其下添加 Disabled = true
7-
## - 形如 key = value 为一个配置项
8-
## - 配置项应用到其上方最近的功能
9-
## - 当对应功能启用时,配置项生效
10-
## - 注释掉的配置项保留其默认值
11-
## - 该文件会在启动时被重写,无法解析的内容将被删除
4+
## - 为方便使用 VSCode 等编辑器进行编辑,被注释掉的配置内容使用一个井号 #,而注释文本使用两个井号 ##
5+
## - 以方括号包裹的行,如 [System],为一个栏目
6+
## - 将默认被注释(即默认禁用)的栏目取消注释即可启用
7+
## - 若要禁用一个默认启用的栏目,请在栏目下添加「key = value」配置项,删除它/注释它不会有效
8+
## - 形如「键 = 值」为一个配置项
9+
## - 配置项应用到其上方最近的栏目,请不要在一个栏目被注释掉的情况下开启其配置项(会加到上一个栏目,无效)
10+
## - 当对应栏目启用时,配置项生效,无论是否将其取消注释
11+
## - 注释掉的配置项保留其注释中的默认值,默认值可能会随版本更新而变化
12+
## - 该文件的格式和文字注释是固定的,配置文件将在启动时被重写,无法解析的内容将被删除
1213
##
13-
## 使用 ChuChartManager 可图形化编辑
14+
## 试试使用 ChuChartManager 图形化配置 AppleChu 吧!
1415
## https://github.com/MuNET-OSS/ChuChartManager
1516

1617
Version = "1"
1718

18-
## 通用设置
19-
[General]
20-
## 自定义版本号文本(留空不修改)
21-
#version_text = ""
19+
## =============================================================================
20+
## 系统设置
21+
## =============================================================================
22+
23+
[System]
24+
## 店内联机基准机/从机
25+
## false = 基准机(单机,或局域网中的标准机,默认)
26+
## true = 从机(局域网中有 2-4 台主机时,非标准机的那些设为 true)
27+
LanSlave = false
28+
29+
## 显示器刷新率(60 或 120)
30+
## 仅当显示器刷新率 ≥120Hz 时填 120,否则保持 60
31+
RefreshRate = 60
32+
33+
## =============================================================================
34+
## 显示设置
35+
## =============================================================================
36+
37+
[Window]
38+
## 1 = 窗口运行;0 = 全屏运行
39+
windowed = 1
40+
## 1 = 有边框窗口;0 = 无边框窗口
41+
framed = 1
42+
43+
## =============================================================================
44+
## 外部 IO(不填则使用内置键盘/虚拟卡仿真)
45+
## =============================================================================
46+
47+
## 控制器 IO DLL(TASOLLER / Yubideck 等第三方控制器)
48+
[ChuniIo]
49+
#path = "*.dll"
50+
#path32 = "*.dll"
51+
#path64 = "*.dll"
52+
53+
## 读卡器 IO DLL(第三方读卡器)
54+
[AimeIo]
55+
#path = "*.dll"
56+
#path32 = "*.dll"
57+
#path64 = "*.dll"
58+
59+
## =============================================================================
60+
## 补丁功能
61+
## =============================================================================
2262

2363
## 跳过启动画面
2464
[SkipStartup]
2565

2666
## 免费游玩
2767
[FreePlay]
28-
## 自定义显示文本(留空使用默认 FREE PLAY)
2968
#custom_text = ""
3069

3170
## 禁用选歌计时器
@@ -34,62 +73,114 @@ Version = "1"
3473
## 跳过地图动画
3574
[SkipMapAnimation]
3675

37-
## 解锁游玩曲数上限
38-
#[UnlockTracks]
39-
#max = 3
40-
41-
## 自定义各场景计时器
42-
#[CustomTimers]
43-
#map_select = 60
44-
#ticket_select = 60
45-
#course_select = 60
46-
47-
## 设置所有计时器为 999
48-
#[AllTimers999]
49-
50-
## 自动游玩
51-
## 只屏蔽成绩数据,角色/设置/地图进度正常保存
52-
[Autoplay]
53-
5476
## 解锁 120fps
5577
[Unlock120fps]
5678
#force = true
5779

58-
## 绕过 1080P 检测
59-
#[Bypass1080p]
80+
## 关闭网络加密(私服需要)
81+
[DisableEncryption]
6082

61-
## 绕过 120Hz 检测
62-
#[Bypass120hz]
83+
## 关闭 TLS(私服需要)
84+
[DisableTLS]
6385

6486
## DPI 感知
6587
[DpiAware]
6688

67-
## 强制共享音频,系统采样率必须为 48000Hz
68-
## 此项可能会增加延迟
69-
#[ForceSharedAudio]
89+
## 切换窗口闪退修复
90+
[DeviceLostFix]
7091

71-
## 强制双声道输出
72-
#[Force2chAudio]
92+
## D3D9Ex 透明升级与快速重启
93+
[D3D9Ex]
94+
enable = true
95+
device_lost_recover = true
96+
fast_restart = true
7397

74-
## 关闭网络加密
75-
## 私服联网需要开启此项
76-
[DisableEncryption]
98+
## 网络请求日志(诊断用:输出游戏的 WinHTTP 请求到日志)
99+
#[NetLog]
77100

78-
## 关闭 TLS
79-
[DisableTLS]
101+
## 自动游玩
102+
#[Autoplay]
103+
#hotkey = "Home"
104+
105+
## FPS 显示
106+
#[FpsDisplay]
107+
108+
## 帧率锁定
109+
#[FrameLock]
110+
#fps = 60
111+
112+
## 解锁曲数上限
113+
#[UnlockTracks]
114+
#max = 3
115+
116+
## 绕过 1080P 检测
117+
#[Bypass1080p]
118+
119+
## 绕过 120Hz 检测
120+
#[Bypass120hz]
80121

81122
## 绕过 AppUser 检测
82123
#[BypassAppUser]
83124

84-
## 退出确认对话框
85-
[ExitConfirm]
125+
## 强制共享音频(采样率必须 48000Hz)
126+
#[ForceSharedAudio]
86127

87-
## 切换窗口闪退修复
88-
[DeviceLostFix]
128+
## 强制双声道
129+
#[Force2chAudio]
89130

90-
## FPS 显示(需要 d3d9 proxy)
91-
#[FpsDisplay]
131+
## 自定义版本号
132+
#[General]
133+
#version_text = ""
92134

93-
## 帧率锁定(需要 d3d9 proxy)
94-
#[FrameLock]
95-
#fps = 60
135+
## =============================================================================
136+
## 高级配置(正常情况下无需修改,以下设备仿真默认启用)
137+
## =============================================================================
138+
139+
## IO4 USB HID(JVS 按键/投币/红外)
140+
#[Io4]
141+
#enable = true
142+
143+
## 键盘输入(兼容 segatools 的 [io3] / [ir] / [slider] 键名)
144+
#[Buttons]
145+
#test = 0x70
146+
#service = 0x71
147+
#coin = 0x72
148+
#ir = 0x20
149+
150+
#[Air]
151+
#air1 = 0x34
152+
#air2 = 0x35
153+
#air3 = 0x36
154+
#air4 = 0x37
155+
#air5 = 0x38
156+
#air6 = 0x39
157+
158+
#[Slider]
159+
#cell1 = 0x4C
160+
#cell2 = 0x4C
161+
#cell3 = 0x4C
162+
#cell4 = 0x4C
163+
164+
## 触摸条仿真(使用真实 AC 触摸条时设为 false,端口 COM1)
165+
#[SliderDevice]
166+
#enable = true
167+
168+
## Aime 读卡器(使用真实读卡器时设为 false)
169+
#[Aime]
170+
#enable = true
171+
#aime_path = "aime.txt"
172+
#felica_path = "felica.txt"
173+
#authdata_path = "DEVICE\\authdata.bin"
174+
#aime_gen = true
175+
#felica_gen = false
176+
#scan = 0x0D
177+
#gen = 3
178+
#proxy_flag = 2
179+
180+
## LED15093 灯板
181+
#[Led15093]
182+
#enable = true
183+
184+
## VFD 显示板(仅 SP 模式)
185+
#[Vfd]
186+
#enable = true

0 commit comments

Comments
 (0)