dsh-boot-suite 2.16.0 → 2.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/lib/client.js +3 -3
- package/lib/splash.js +45 -1
- package/package.json +1 -1
- package/templates/whale-girl-scan-4k/template.json +2 -2
- package/templates/whale-girl-scan-4k-h264/assets/whale-girl-scan-4k-h264.mp4 +0 -0
- package/templates/whale-girl-scan-4k-h264/template.json +104 -0
- package/test/smoke-package.mjs +21 -0
- package/test/smoke-wallpaper-client.mjs +1 -1
- package/tools/install.ps1 +41 -0
- package/tools/make-upgrade-helper.mjs +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [2.16.2] — 2026-11-03
|
|
2
|
+
|
|
3
|
+
- **安装器代理加固**:开着代理安装时,pnpm 访问 npm registry 可能长时间卡在 [2/3](用户实测等很久无响应,关代理马上恢复)。现在会先检测并提示(5 秒后自动继续),同时把 pnpm 的 fetch 超时收紧到 30 秒、失败后自动用国内镜像重试一次。
|
|
4
|
+
- **桌面升级助手**增加提示:卡在第二步时关掉代理再双击一次。
|
|
5
|
+
- **修复「鲸鱼娘扫描睁眼(4K H.264)」没有出现在第二幕下拉**:新增的 4K H.264 模板没加进「正式模板」白名单,会被当成测试类模板藏起来;现已补进白名单。
|
|
6
|
+
- 版本号 2.16.2,构建号 cw-68。
|
|
7
|
+
|
|
8
|
+
## [2.16.1] — 2026-11-03
|
|
9
|
+
|
|
10
|
+
- **新增第二幕模板「鲸鱼娘扫描睁眼(4K H.264)」**:把原 4K 视频转码为 H.264 High 8bit(3840×2160 / 24fps / 约 9.6 Mbps,8.4MB),兼容性最好;部分机器没有 AV1 硬解、4K AV1 会走 CPU 软解导致掉帧,可改用本版。
|
|
11
|
+
- **原 4K 模板改名**为「鲸鱼娘扫描睁眼(4K AV1)」,描述里注明 AV1 编码与掉帧时的替代方案。
|
|
12
|
+
- **第二幕视频诊断**:诊断日志新增 `video meta`(分辨率/时长)与 `video stats`(实测帧率、丢帧数/总帧数、是否被暂停),4K 掉帧问题可以直接看日志定位。
|
|
13
|
+
- **省电暂停自动恢复**:Chromium 会把不可见的静音视频暂停省电(video-only background media paused to save power),现在检测到暂停会自动恢复,不再表现为卡住/掉帧。
|
|
14
|
+
- **消除 play() 噪音**:第二幕被跳过/收尾时 `play()` 的未捕获 promise 报错不再写进诊断日志。
|
|
15
|
+
- 版本号 2.16.1,构建号 cw-67。
|
|
16
|
+
|
|
1
17
|
## [2.16.0] — 2026-11-02
|
|
2
18
|
|
|
3
19
|
- **全景大肥鱼新增第二节登录 ID 动画**:第一节(登录 ID 段)延长到约 5.8s、只保留「检测到新的特工登录」;第二节 5s 登录动画,「WELCOME TO DEEPSEEK HARNESS」乱码→逐字、橙色扫描线从上往下、「正在登录:自定义用户名」按贝塞尔曲线平滑居中、用户名破解式逐字出现(最多 20 字符,过滤系统冲突符号)。
|
package/lib/client.js
CHANGED
|
@@ -269,7 +269,7 @@ window.__ModuleLoader__.load({
|
|
|
269
269
|
—— 桌面端走浏览器半侧自举时没有 1,就靠这一条
|
|
270
270
|
3) 下面这个常量:两份都没拿到时的兜底,别让面板显示 undefined
|
|
271
271
|
版本号本身只在 lib/index.js 里读一次,这里不重复维护。 */
|
|
272
|
-
var FALLBACK_VERSION = '2.16.
|
|
272
|
+
var FALLBACK_VERSION = '2.16.2'
|
|
273
273
|
/* 手动选包成功后置 true:让还在后台跑的“浏览器下载监听”不要再弹第二次更新器 */
|
|
274
274
|
var __manualUpdateApplied = false
|
|
275
275
|
function readInjectedVersion() {
|
|
@@ -903,7 +903,7 @@ window.__ModuleLoader__.load({
|
|
|
903
903
|
/* v2.14.0:模板分类。正式下拉只放「正式模板」;其余归到「测试类模板」。
|
|
904
904
|
默认:内置模板里只有 archive-warm(第一幕)与 whale-girl-scan / -4k(第二幕)算正式;
|
|
905
905
|
用户本地导入的算正式;被手动「归类」或「移出」的以配置为准。 */
|
|
906
|
-
var PROD_TEMPLATES = { template: { 'archive-warm': 1 }, act2: { 'whale-girl-scan': 1, 'whale-girl-scan-4k': 1 } }
|
|
906
|
+
var PROD_TEMPLATES = { template: { 'archive-warm': 1 }, act2: { 'whale-girl-scan': 1, 'whale-girl-scan-4k': 1, 'whale-girl-scan-4k-h264': 1 } }
|
|
907
907
|
function findTemplate(id) {
|
|
908
908
|
for (var fi = 0; fi < (templates || []).length; fi++) if (templates[fi] && templates[fi].id === id) return templates[fi]
|
|
909
909
|
return null
|
|
@@ -2022,7 +2022,7 @@ window.__ModuleLoader__.load({
|
|
|
2022
2022
|
/* 每次改客户端就把这个号 +1。
|
|
2023
2023
|
有了它在控制台一眼就能判断"浏览器里跑的是不是最新那份" ——
|
|
2024
2024
|
排查问题时,分不清是代码问题还是旧包,会白猜一轮。 */
|
|
2025
|
-
var BUILD = 'cw-
|
|
2025
|
+
var BUILD = 'cw-68'
|
|
2026
2026
|
|
|
2027
2027
|
function log() {
|
|
2028
2028
|
try {
|
package/lib/splash.js
CHANGED
|
@@ -2476,10 +2476,54 @@
|
|
|
2476
2476
|
vnode.addEventListener('play', function () { diagRun('video play ' + vfile + ' vids=' + videoCount()) })
|
|
2477
2477
|
vnode.addEventListener('ended', function () { diagRun('video ended ' + vfile) })
|
|
2478
2478
|
vnode.addEventListener('error', function () { diagRun('video error ' + vfile) })
|
|
2479
|
+
/* v2.16.1:第二幕视频诊断(分辨率/时长/实测帧率/丢帧)+ 省电暂停自动恢复 + play() 失败静默 */
|
|
2480
|
+
vnode.addEventListener('loadedmetadata', function () {
|
|
2481
|
+
diagRun('video meta ' + vfile + ' ' + vnode.videoWidth + 'x' + vnode.videoHeight + ' dur=' + (isFinite(vnode.duration) ? vnode.duration.toFixed(2) : '?'))
|
|
2482
|
+
})
|
|
2483
|
+
var vResumeTimer = null
|
|
2484
|
+
vnode.addEventListener('pause', function () {
|
|
2485
|
+
/* Chromium 会把不可见的静音视频暂停省电;只要还在第二幕里就拉回来,避免“卡住/掉帧” */
|
|
2486
|
+
if (vnode.ended || !vnode.isConnected || vResumeTimer) return
|
|
2487
|
+
vResumeTimer = setTimeout(function () {
|
|
2488
|
+
vResumeTimer = null
|
|
2489
|
+
if (!vnode.isConnected || vnode.ended || !vnode.paused) return
|
|
2490
|
+
try { var vpR = vnode.play(); if (vpR && vpR.catch) vpR.catch(function () {}) } catch (eR) { /* noop */ }
|
|
2491
|
+
}, 260)
|
|
2492
|
+
})
|
|
2479
2493
|
placeLayer(vnode, tlNumber(L.pos && L.pos[0], 640), tlNumber(L.pos && L.pos[1], 360), vw, vh)
|
|
2480
2494
|
stage.appendChild(vnode)
|
|
2481
2495
|
diagRun('video append ' + vfile + ' vids=' + videoCount())
|
|
2482
|
-
try {
|
|
2496
|
+
try {
|
|
2497
|
+
var vp0 = vnode.play()
|
|
2498
|
+
if (vp0 && vp0.catch) vp0.catch(function () {})
|
|
2499
|
+
} catch (ePlay) { /* autoplay blocked */ }
|
|
2500
|
+
if (vnode.requestVideoFrameCallback) {
|
|
2501
|
+
var vFrames = 0, vT0 = 0
|
|
2502
|
+
var onVFrame = function (now) {
|
|
2503
|
+
if (!vnode.isConnected) return
|
|
2504
|
+
if (!vT0) { vT0 = now; vFrames = 0 }
|
|
2505
|
+
vFrames += 1
|
|
2506
|
+
if (now - vT0 < 1200) {
|
|
2507
|
+
try { vnode.requestVideoFrameCallback(onVFrame) } catch (eF) { /* noop */ }
|
|
2508
|
+
return
|
|
2509
|
+
}
|
|
2510
|
+
var vq = null
|
|
2511
|
+
try { vq = vnode.getVideoPlaybackQuality() } catch (eQ) { /* noop */ }
|
|
2512
|
+
var vFps = vT0 ? Math.round(vFrames * 1000 / (now - vT0)) : 0
|
|
2513
|
+
diagRun('video stats ' + vfile + ' ' + vnode.videoWidth + 'x' + vnode.videoHeight + ' fps=' + vFps +
|
|
2514
|
+
' dropped=' + (vq ? vq.droppedVideoFrames : '?') + '/' + (vq ? vq.totalVideoFrames : '?') +
|
|
2515
|
+
' paused=' + vnode.paused)
|
|
2516
|
+
}
|
|
2517
|
+
try { vnode.requestVideoFrameCallback(onVFrame) } catch (eF0) { /* noop */ }
|
|
2518
|
+
} else {
|
|
2519
|
+
setTimeout(function () {
|
|
2520
|
+
if (!vnode.isConnected) return
|
|
2521
|
+
var vq2 = null
|
|
2522
|
+
try { if (vnode.getVideoPlaybackQuality) vq2 = vnode.getVideoPlaybackQuality() } catch (eQ2) { /* noop */ }
|
|
2523
|
+
diagRun('video stats ' + vfile + ' ' + vnode.videoWidth + 'x' + vnode.videoHeight +
|
|
2524
|
+
' dropped=' + (vq2 ? vq2.droppedVideoFrames : '?') + '/' + (vq2 ? vq2.totalVideoFrames : '?'))
|
|
2525
|
+
}, 1500)
|
|
2526
|
+
}
|
|
2483
2527
|
nodes.push({ def: L, node: vnode, video: vnode })
|
|
2484
2528
|
continue
|
|
2485
2529
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"id": "whale-girl-scan-4k",
|
|
4
|
-
"name": "鲸鱼娘扫描睁眼(4K)",
|
|
4
|
+
"name": "鲸鱼娘扫描睁眼(4K AV1)",
|
|
5
5
|
"author": "素材:NativeDog1/dsh-boot-animation(BSD-3-Clause);8K 超分:1catmint1/dsh-boot-animation-8k;模板维护:LeeRolling",
|
|
6
6
|
"homepage": "https://github.com/LeeRolling/dsh-boot-suite",
|
|
7
7
|
"license": "BSD-3-Clause",
|
|
8
8
|
"version": "1.0.0",
|
|
9
|
-
"description": "鲸鱼娘「DeepSeek娘扫描睁眼」4K 版(3840×2160,7
|
|
9
|
+
"description": "鲸鱼娘「DeepSeek娘扫描睁眼」4K 版(3840×2160,7 秒,AV1 编码),全屏播放 + 淡入淡出。AV1 在部分机器上没有硬解、会走 CPU 软解导致掉帧;遇到掉帧请改用「鲸鱼娘扫描睁眼(4K H.264)」或 2K 版。由社区作者 1catmint1 的 8K 超分版下采样而来(8K 源:https://github.com/1catmint1/dsh-boot-animation-8k ,BSD-3-Clause);原片:NativeDog1/dsh-boot-animation(BSD-3-Clause)。桌面版建议用本 4K 版或 2K 版,8K 版在桌面端有内存崩溃风险,仅建议网页端/收藏使用。",
|
|
10
10
|
"tags": [
|
|
11
11
|
"anime",
|
|
12
12
|
"whale",
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "whale-girl-scan-4k-h264",
|
|
4
|
+
"name": "鲸鱼娘扫描睁眼(4K H.264)",
|
|
5
|
+
"author": "素材:NativeDog1/dsh-boot-animation(BSD-3-Clause);8K 超分:1catmint1/dsh-boot-animation-8k;模板维护:LeeRolling",
|
|
6
|
+
"homepage": "https://github.com/LeeRolling/dsh-boot-suite",
|
|
7
|
+
"license": "BSD-3-Clause",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"description": "鲸鱼娘「DeepSeek娘扫描睁眼」4K H.264 版(3840×2160,24fps,7 秒,H.264 High 8bit 约 9.6Mbps),全屏播放 + 淡入淡出。由社区作者 1catmint1 的 8K 超分版下采样后转码为 H.264,兼容性最好:AV1 无硬解的机器(如部分 4K 掉帧环境)可改用本版。8K 源:https://github.com/1catmint1/dsh-boot-animation-8k (BSD-3-Clause);原片:NativeDog1/dsh-boot-animation(BSD-3-Clause)。",
|
|
10
|
+
"tags": [
|
|
11
|
+
"anime",
|
|
12
|
+
"whale",
|
|
13
|
+
"video",
|
|
14
|
+
"cinematic"
|
|
15
|
+
],
|
|
16
|
+
"duration": 7200,
|
|
17
|
+
"theme": {
|
|
18
|
+
"accent": "#4d6bfe",
|
|
19
|
+
"glitchA": "#ff3b30",
|
|
20
|
+
"glitchB": "#2971b8"
|
|
21
|
+
},
|
|
22
|
+
"segments": [
|
|
23
|
+
{
|
|
24
|
+
"name": "扫描 · 睁眼",
|
|
25
|
+
"from": 0,
|
|
26
|
+
"to": 7200
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"layers": [
|
|
30
|
+
{
|
|
31
|
+
"id": "bg",
|
|
32
|
+
"type": "panel",
|
|
33
|
+
"pos": [
|
|
34
|
+
640,
|
|
35
|
+
360
|
|
36
|
+
],
|
|
37
|
+
"panelW": 1280,
|
|
38
|
+
"panelH": 720,
|
|
39
|
+
"fill": "#000000",
|
|
40
|
+
"radius": 0,
|
|
41
|
+
"keyframes": [
|
|
42
|
+
{
|
|
43
|
+
"t": 0,
|
|
44
|
+
"opacity": 1
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "whale",
|
|
50
|
+
"type": "video",
|
|
51
|
+
"pos": [
|
|
52
|
+
640,
|
|
53
|
+
360
|
|
54
|
+
],
|
|
55
|
+
"videoW": 1280,
|
|
56
|
+
"videoH": 720,
|
|
57
|
+
"src": "whale-girl-scan-4k-h264.mp4",
|
|
58
|
+
"keyframes": [
|
|
59
|
+
{
|
|
60
|
+
"t": 0,
|
|
61
|
+
"opacity": 1
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"t": 7200,
|
|
65
|
+
"opacity": 1
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "credit",
|
|
71
|
+
"type": "text",
|
|
72
|
+
"text": "WHALE GIRL · NATIVEDOG1/DSH-BOOT-ANIMATION · 8K SOURCE: 1CATMINT1 · BSD-3-CLAUSE",
|
|
73
|
+
"pos": [
|
|
74
|
+
640,
|
|
75
|
+
360
|
|
76
|
+
],
|
|
77
|
+
"align": "center",
|
|
78
|
+
"font": {
|
|
79
|
+
"size": 9,
|
|
80
|
+
"weight": 400,
|
|
81
|
+
"tracking": 0.18
|
|
82
|
+
},
|
|
83
|
+
"color": "rgba(139,232,255,.55)",
|
|
84
|
+
"keyframes": [
|
|
85
|
+
{
|
|
86
|
+
"t": 0,
|
|
87
|
+
"opacity": 0,
|
|
88
|
+
"offsetY": 318
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"t": 600,
|
|
92
|
+
"opacity": 1,
|
|
93
|
+
"offsetY": 318
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"t": 7200,
|
|
97
|
+
"opacity": 1,
|
|
98
|
+
"offsetY": 318
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"effects": []
|
|
104
|
+
}
|
package/test/smoke-package.mjs
CHANGED
|
@@ -149,4 +149,25 @@ if (!bigfishApp.includes("track.style.transform='translateX('")) throw new Error
|
|
|
149
149
|
if (!bigfishApp.includes("renderVoiceRow($('login-voice')")) throw new Error('app.js 登录段未使用配音行 renderVoiceRow')
|
|
150
150
|
if (!skipCss.includes('width:min(500px,92vw)')) throw new Error('style.css 登录框未缩到 1/3 尺寸')
|
|
151
151
|
|
|
152
|
+
/* v2.16.1:4K AV1 改名 + 新增 4K H.264 模板 + 第二幕视频诊断/暂停恢复 */
|
|
153
|
+
const tpl4k = JSON.parse(fs.readFileSync(path.join(root, 'templates/whale-girl-scan-4k/template.json'), 'utf8'))
|
|
154
|
+
if (tpl4k.name !== '鲸鱼娘扫描睁眼(4K AV1)') throw new Error('4K AV1 模板名称未更新')
|
|
155
|
+
const tpl4kh = JSON.parse(fs.readFileSync(path.join(root, 'templates/whale-girl-scan-4k-h264/template.json'), 'utf8'))
|
|
156
|
+
if (tpl4kh.name !== '鲸鱼娘扫描睁眼(4K H.264)') throw new Error('缺少 4K H.264 模板名称')
|
|
157
|
+
if (!fs.existsSync(path.join(root, 'templates/whale-girl-scan-4k-h264/assets/whale-girl-scan-4k-h264.mp4'))) throw new Error('缺少 4K H.264 视频文件')
|
|
158
|
+
const splashSrc = fs.readFileSync(path.join(root, 'lib/splash.js'), 'utf8')
|
|
159
|
+
if (!splashSrc.includes('video stats ')) throw new Error('splash.js 缺少第二幕视频丢帧统计')
|
|
160
|
+
if (!splashSrc.includes('video meta ')) throw new Error('splash.js 缺少第二幕视频分辨率日志')
|
|
161
|
+
if (!splashSrc.includes('vResumeTimer')) throw new Error('splash.js 缺少省电暂停自动恢复')
|
|
162
|
+
if (!splashSrc.includes('vp0.catch')) throw new Error('splash.js 未静默 play() 失败')
|
|
163
|
+
/* v2.16.2:新增 4K H.264 必须算「正式模板」,否则第二幕下拉里看不到 */
|
|
164
|
+
const clientSrc = fs.readFileSync(path.join(root, 'lib/client.js'), 'utf8')
|
|
165
|
+
if (!clientSrc.includes("'whale-girl-scan-4k-h264': 1")) throw new Error('client.js 的正式模板白名单缺少 4K H.264')
|
|
166
|
+
/* v2.16.2:安装器代理加固 */
|
|
167
|
+
const installPs1V2162 = fs.readFileSync(path.join(root, 'tools/install.ps1'), 'utf8')
|
|
168
|
+
if (!installPs1V2162.includes('Get-ProxyInfo')) throw new Error('install.ps1 缺少代理探测')
|
|
169
|
+
if (!installPs1V2162.includes('npm_config_fetch_timeout')) throw new Error('install.ps1 缺少 pnpm 网络超时设置')
|
|
170
|
+
if (!installPs1V2162.includes('registry.npmmirror.com')) throw new Error('install.ps1 缺少国内镜像重试')
|
|
171
|
+
const helperGen = fs.readFileSync(path.join(root, 'tools/make-upgrade-helper.mjs'), 'utf8')
|
|
172
|
+
if (!helperGen.includes('turn off any proxy')) throw new Error('升级助手缺少代理提示')
|
|
152
173
|
console.log('ok package.json version=' + pkg.version + ',无 BOM,关键文件齐全(含更新前回滚 checkpoint)');
|
|
@@ -463,7 +463,7 @@ ok(intervals.every((t) => t.cleared) || intervals.length === 0, '旧的 interval
|
|
|
463
463
|
intervals.map((t) => (t.cleared ? 'cleared' : 'live')).join(','))
|
|
464
464
|
|
|
465
465
|
console.log('\n=== ⑦ v2.13.0 测试钩子 / BUILD ===')
|
|
466
|
-
ok(mod.__BUILD === 'cw-
|
|
466
|
+
ok(mod.__BUILD === 'cw-68', '__BUILD = cw-68(排查浏览器跑的是不是新包)', String(mod.__BUILD))
|
|
467
467
|
ok(mod.__VIDEO_ID === 'dsh-cw-video', '__VIDEO_ID = dsh-cw-video', String(mod.__VIDEO_ID))
|
|
468
468
|
ok(typeof mod.__startShuffle === 'function', '__startShuffle 导出')
|
|
469
469
|
ok(typeof mod.__stopShuffle === 'function', '__stopShuffle 导出')
|
package/tools/install.ps1
CHANGED
|
@@ -22,6 +22,20 @@ $ErrorActionPreference = 'Stop'
|
|
|
22
22
|
function Say($m) { Write-Host $m }
|
|
23
23
|
function Die($m) { Write-Host ('[x] ' + $m) -ForegroundColor Red; exit 1 }
|
|
24
24
|
|
|
25
|
+
# v2.16.2:代理探测。开着代理时 pnpm 访问 npm registry 可能长时间卡住(用户实测第二步无响应)。
|
|
26
|
+
function Get-ProxyInfo {
|
|
27
|
+
$marks = @()
|
|
28
|
+
foreach ($n in @('HTTP_PROXY','HTTPS_PROXY','ALL_PROXY','http_proxy','https_proxy','all_proxy')) {
|
|
29
|
+
$v = [Environment]::GetEnvironmentVariable($n)
|
|
30
|
+
if ($v) { $marks += ($n + '=' + $v) }
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
$reg = Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -ErrorAction Stop
|
|
34
|
+
if ($reg.ProxyEnable -eq 1 -and $reg.ProxyServer) { $marks += ('系统代理=' + $reg.ProxyServer) }
|
|
35
|
+
} catch {}
|
|
36
|
+
return ($marks -join ';')
|
|
37
|
+
}
|
|
38
|
+
|
|
25
39
|
$RepoRoot = Split-Path -Parent $PSScriptRoot
|
|
26
40
|
if (-not (Test-Path (Join-Path $RepoRoot 'package.json'))) { Die ('这不像插件目录:' + $RepoRoot) }
|
|
27
41
|
if (-not (Test-Path (Join-Path $RepoRoot 'lib\index.js'))) { Die '源码不完整(缺 lib\index.js),你下载的可能是残缺的压缩包' }
|
|
@@ -319,6 +333,22 @@ foreach ($profile in $targets) {
|
|
|
319
333
|
}
|
|
320
334
|
|
|
321
335
|
Say ' [2/3] 安装本插件(link 方式,改代码即生效)…'
|
|
336
|
+
$proxyInfo = Get-ProxyInfo
|
|
337
|
+
if ($proxyInfo -and -not $ManualMode) {
|
|
338
|
+
Say ''
|
|
339
|
+
Say ' [提示] 检测到代理:' + $proxyInfo
|
|
340
|
+
Say ' 已知问题:开着代理时,安装这一步(pnpm 访问 npm registry)可能长时间卡住。'
|
|
341
|
+
Say ' 如果卡住超过 2 分钟:按 Ctrl+C 关窗口 → 暂时关闭代理 → 重新双击本助手。'
|
|
342
|
+
Say ' 也可以把 registry.npmjs.org 设为直连/绕过代理。'
|
|
343
|
+
Say ''
|
|
344
|
+
for ($pi = 5; $pi -ge 1; $pi--) { Write-Host (' 5 秒后继续…(' + $pi + ')'); Start-Sleep -Seconds 1 }
|
|
345
|
+
}
|
|
346
|
+
$prevFetchTimeout = [Environment]::GetEnvironmentVariable('npm_config_fetch_timeout')
|
|
347
|
+
$prevFetchRetries = [Environment]::GetEnvironmentVariable('npm_config_fetch_retries')
|
|
348
|
+
if (-not $ManualMode) {
|
|
349
|
+
$env:npm_config_fetch_timeout = '30000'
|
|
350
|
+
$env:npm_config_fetch_retries = '2'
|
|
351
|
+
}
|
|
322
352
|
if ($ManualMode) {
|
|
323
353
|
Install-Manual $profileDir
|
|
324
354
|
} else {
|
|
@@ -328,6 +358,15 @@ foreach ($profile in $targets) {
|
|
|
328
358
|
try { $outAdd = (& $dsh plugin --profile $profile add $spec 2>&1 | Out-String) } catch { $outAdd = $_.Exception.Message }
|
|
329
359
|
if ($outAdd.Trim()) { $outAdd.Trim().Split([char]10) | ForEach-Object { ' ' + $_ } }
|
|
330
360
|
$addExit = $LASTEXITCODE
|
|
361
|
+
if ($addExit -ne 0) {
|
|
362
|
+
Say ' 第一次安装没成功,改用 npm 国内镜像重试一次…'
|
|
363
|
+
$prevRegistry = [Environment]::GetEnvironmentVariable('npm_config_registry')
|
|
364
|
+
$env:npm_config_registry = 'https://registry.npmmirror.com'
|
|
365
|
+
try { $outAdd = (& $dsh plugin --profile $profile add $spec 2>&1 | Out-String) } catch { $outAdd = $_.Exception.Message }
|
|
366
|
+
$addExit = $LASTEXITCODE
|
|
367
|
+
if ($outAdd.Trim()) { $outAdd.Trim().Split([char]10) | ForEach-Object { ' ' + $_ } }
|
|
368
|
+
if ($prevRegistry) { $env:npm_config_registry = $prevRegistry } else { Remove-Item Env:npm_config_registry -ErrorAction SilentlyContinue }
|
|
369
|
+
}
|
|
331
370
|
$ErrorActionPreference = $eapAdd
|
|
332
371
|
$installedOk = Test-InstalledOk $profileDir
|
|
333
372
|
if ($addExit -ne 0 -or $outAdd -match 'managed exclusively' -or -not $installedOk) {
|
|
@@ -342,6 +381,8 @@ foreach ($profile in $targets) {
|
|
|
342
381
|
if (Test-InstalledOk $profileDir) { $addExit = 0 } else { $addExit = 1 }
|
|
343
382
|
}
|
|
344
383
|
}
|
|
384
|
+
if ($prevFetchTimeout) { $env:npm_config_fetch_timeout = $prevFetchTimeout } else { Remove-Item Env:npm_config_fetch_timeout -ErrorAction SilentlyContinue }
|
|
385
|
+
if ($prevFetchRetries) { $env:npm_config_fetch_retries = $prevFetchRetries } else { Remove-Item Env:npm_config_fetch_retries -ErrorAction SilentlyContinue }
|
|
345
386
|
if (-not (Test-InstalledOk $profileDir)) {
|
|
346
387
|
Say ' [x] 安装后校验失败:profile 里没有可用的 dsh-boot-suite'
|
|
347
388
|
Say ' (bundles 里不会添加它,避免 DSH 启动时加载一个不存在的插件)'
|
|
@@ -61,6 +61,7 @@ const lines = [
|
|
|
61
61
|
'echo ============================================================',
|
|
62
62
|
`echo Install dsh-boot-suite v${version} from this staged package.`,
|
|
63
63
|
'echo IMPORTANT: fully quit DeepSeek Harness first (window + tray).',
|
|
64
|
+
'echo If it hangs at step 2: close this window, turn off any proxy, then double-click again.',
|
|
64
65
|
'echo ============================================================',
|
|
65
66
|
'echo.',
|
|
66
67
|
`powershell -NoProfile -ExecutionPolicy Bypass -File "${pkgInstall}"`,
|