dsh-snowbreak-heimdall 3.0.6 → 3.1.5

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 雪境 Heimdall Terminal
1
+ # 雪境 Heimdall Terminal
2
2
 
3
3
  > 《尘白禁区》风格的 DeepSeek Harness **源码层皮肤**。
4
4
  > 加载画面、主题、菜单、品牌、图标、欢迎页/更新页与主界面文案由 `app.asar` 和安装目录负责;插件只保留启动动画。
@@ -7,7 +7,7 @@
7
7
 
8
8
  ## 当前状态
9
9
 
10
- - 插件:`dsh-snowbreak-heimdall@3.0.6`,profile `desktop` 已启用。
10
+ - 插件:`dsh-snowbreak-heimdall@3.1.5`,profile `desktop` 已启用。
11
11
  - 当前运行:`142164e9…9555`
12
12
  - `reapply=false`,这一版已经应用完成;**不需要再退出或重写 asar**。
13
13
  - **安装/启用后先确认再重启**:Host 检测到源码层未接入时弹「现在重启 DSH?」,选「是」才关闭当前 DSH、等待 helper 写入源码层,再自动启动 DSH;选「否」不重启。重启过程不弹进度窗。
@@ -100,7 +100,7 @@ DSH 完全退出后,helper 启动 **PowerShell WPF WS_POPUP**:
100
100
  不是“复制文件夹后双击即用”。对方需要:
101
101
 
102
102
  1. 同版本 DSH `0.2.2-rc.1`(补丁锚点按该版本校验,其他版本会拒绝写入)。
103
- 2. 在 DSH 插件管理器/安装指令中安装 npm 包 `dsh-snowbreak-heimdall@3.0.6`;安装后启用插件。
103
+ 2. 在 DSH 插件管理器/安装指令中安装 npm 包 `dsh-snowbreak-heimdall@3.1.5`;安装后启用插件。
104
104
  也可以手动把包安装到 profile 后加入 `dsh.profile.bundles`。
105
105
  3. 启用插件,然后完整退出 DSH;helper 才会写入源码层。
106
106
  4. Windows 用户;DSH 安装目录可写(默认 `%LOCALAPPDATA%\Programs\DeepSeek Harness`,自定义路径可设 `HEIMDALL_TARGET` / `HEIMDALL_RESOURCES`)。
@@ -179,5 +179,5 @@ snowbreak-heimdall/
179
179
 
180
180
 
181
181
 
182
-
183
-
182
+
183
+
package/SHA256SUMS.txt CHANGED
@@ -31,6 +31,7 @@ b7326e8f747b124547f19b8bbbf16ecb8d020778b360df28a7fec14efc55624c *assets\source\
31
31
  0a2e1c9c2a82487f414aaa68dbc01a59d9b1bbec973732bb32d08d90cc2ea982 *assets\source\mark-alpha.png
32
32
  ff37ef4ee56454e42d2d47cdbbdc634c6b0b34e43817d4139ef7831b049714ec *assets\source\mark-color.png
33
33
  105b2913a0232daf52793edf7531b27b1fa2830aa861d1e6c97e60e4f5bbd7d7 *assets\source\progress.ps1
34
+ 44bc35879e98c8b73b170d35deabdc2e43e80bce4d0dfb166cd58a2fb4aa30c8 *assets\source\restart-confirm.hta
34
35
  c82cfaafcb317919e117d7f9983bb6230a69adf5356d78c2bb3f2bf2016b79df *assets\source\shell.css
35
36
  724f25bb1908f43180c7330669767dca05cbd61d3aee4b65401949a16e3c4a2d *assets\source\shell.js
36
37
  f39417379634fd601613323bf56c0226bf135a41e153b90929627edc89b1edfe *assets\source\update.css
@@ -42,14 +43,14 @@ aef34c1fed4a009a78955f5316b999bbd157fd082d7441d34852d32f0a481c28 *assets\source\
42
43
  2a0b4b9c68d5f4b87bb8fbb768a1933c40394fe4e6f23c144fae88052ebe4a02 *cordis.patch.yml
43
44
  065af22a9be00dc76ce08bc647814d33da2779e937db6c5fa4ea0dcb8c65caa9 *icon.svg
44
45
  7370fd8aafe94e11442f61b8f4c2f272ef8f817adf217ee1f460516bec1f4067 *lib\client.js
45
- bacd3564b098bbd3ae49f73a99fdd958ef7813b8c240c7339fecd475d73f4755 *lib\index.js
46
+ 4544a13a98dbc610609c2191a482382e54f8df0ba5473b86970f735451570911 *lib\index.js
46
47
  0794a24c333ef529e56c6eb7b1dee62f4f5b8da1c56fe001885824ce2a3f8b2f *LICENSE
47
48
  de949631618eb48bf5cd6c06698a28214c8e9cb4bca23d298cd89462f4fb260e *locale\en.json
48
49
  e931cfb8c9b64aa4e01363e603537afee392e8309fe07daaff3e07e028ab8010 *locale\zh.json
49
- e2b3a39819f86948d2fc277ef46382f591432bfec2d3a92482290a111ceae259 *package.json
50
+ b9a679a61c010ee9cbaf64838a412b65060508f03ba6fdc43629b33e91e75480 *package.json
50
51
  8fa6aff9fa2ab7eb11cc813c7ed9cda2b9ae7757c039aad8d71d5b56b5b683d9 *patch\asar.py
51
52
  c9400731101b46a609b9318b8da85e2dfb00ceaa2d65c7e69f7d513c549b0e3c *patch\patcher.py
52
- 133d4811a854085f2e919319962154741041754e2d9d90ff615e3318b0543401 *README.md
53
+ bf2a302700994af5ff4c999ce3b6972d301beebecafe32e41d15a046a79cf3af *README.md
53
54
  8978acd5618d9148ca20804d823af6decb0b20af4569b39e8a641f559277db0c *TEST-REPORT.md
54
55
  73ac5fa42ee7de25615deb7315de7e2609f76b52e636b6a03397c7203bf17bc2 *tools\build_assets.py
55
56
  a8c0badcd2e0cac12cf03528a892c51ec1e6cbde0352ebfb5d5243cbe1f59f8e *tools\build_client.py
@@ -0,0 +1,64 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>海姆达尔终端 // 需要重启</title>
6
+ <hta:application id="hm" applicationname="Heimdall" caption="no" border="none" scroll="no" maximizebutton="no" minimizebutton="no" sysmenu="no"/>
7
+ <style>
8
+ html, body { margin: 0; padding: 0; width: 760px; height: 520px; overflow: hidden; }
9
+ body {
10
+ background: #0B1118; color: #E6EEF5; border: 1px solid #2C3A46;
11
+ box-sizing: border-box; position: relative;
12
+ font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
13
+ user-select: none;
14
+ }
15
+ .head {
16
+ position: absolute; left: 0; right: 0; top: 0; height: 40px;
17
+ padding: 0 26px; border-bottom: 1px solid #263440;
18
+ font: 11px "Bahnschrift", "Segoe UI", sans-serif; letter-spacing: .18em; color: #7E8E9E;
19
+ }
20
+ .body {
21
+ position: absolute; left: 0; right: 0; top: 40px; bottom: 0;
22
+ padding: 28px 30px; box-sizing: border-box;
23
+ }
24
+ .kicker { font: 12px "Bahnschrift", "Segoe UI", sans-serif; letter-spacing: .2em; color: #7FB2D0; }
25
+ .title { margin: 8px 0 0; font-size: 32px; font-weight: 600; line-height: 1.35; }
26
+ .text { margin: 10px 0 0; font-size: 16px; line-height: 1.75; color: #AAB8C5; }
27
+ .env {
28
+ margin-top: 18px; padding: 12px 14px; border: 1px solid #263440;
29
+ background: #0F1720; font-size: 14px; color: #7E8E9E;
30
+ }
31
+ .env b { color: #D97745; font-weight: 500; }
32
+ .actions { position: absolute; right: 30px; bottom: 22px; }
33
+ button {
34
+ height: 44px; padding: 0 28px; border-radius: 1px; cursor: pointer;
35
+ font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; font-size: 16px;
36
+ }
37
+ #later { background: #141D27; color: #AAB8C5; border: 1px solid #2C3A46; margin-right: 8px; }
38
+ #restart { background: #D97745; color: #0A0F14; border: 1px solid #D97745; font-weight: 600; }
39
+ </style>
40
+ </head>
41
+ <body>
42
+ <div class="head">HEIMDALL // RESTART REQUIRED</div>
43
+ <div class="body">
44
+ <div class="kicker">环境检测:源码层尚未接入</div>
45
+ <div class="title">安装完成,需要完全退出 DSH</div>
46
+ <div class="text">当前 DSH 仍在运行,皮肤还没有写入。现在重启并应用海姆达尔终端吗?</div>
47
+ <div class="env">平台:<b>Windows</b> · 源码层:<b>未接入</b> · 操作:<b>完全退出并重启</b></div>
48
+ </div>
49
+ <div class="actions">
50
+ <button id="later">稍后</button>
51
+ <button id="restart">现在重启</button>
52
+ </div>
53
+ <script>
54
+ window.resizeTo(760, 520);
55
+ window.moveTo(340, 190);
56
+ document.getElementById('later').onclick = function () { window.close(); };
57
+ document.getElementById('restart').onclick = function () {
58
+ var sh = new ActiveXObject('WScript.Shell');
59
+ sh.Run('__RESTART_COMMAND__', 0, false);
60
+ window.close();
61
+ };
62
+ </script>
63
+ </body>
64
+ </html>
package/lib/index.js CHANGED
@@ -17,7 +17,8 @@ import { fileURLToPath } from 'node:url';
17
17
  const requireFromHere = createRequire(import.meta.url);
18
18
 
19
19
  const ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
20
- const VERSION = '3.0.6';
20
+ const VERSION = '3.1.5';
21
+ let restartPrompted = false;
21
22
  const INSTALL = path.join(process.env.LOCALAPPDATA || '', 'Programs', 'DeepSeek Harness');
22
23
  const DEFAULT_RESOURCES = process.env.HEIMDALL_RESOURCES
23
24
  || (typeof process.resourcesPath === 'string' && /[\\/]resources$/i.test(process.resourcesPath)
@@ -368,35 +369,19 @@ function writeRestartScript() {
368
369
  function askRestartConfirmation(restartScript) {
369
370
  if (!restartScript) return;
370
371
  try {
371
- const text = [
372
- '安装/启用完成。',
373
- '',
374
- '平台:' + process.platform + ' ' + process.arch,
375
- '源码层:尚未接入',
376
- '',
377
- '需要重启 DSH 才能应用皮肤。现在重启吗?',
378
- '重启会关闭当前窗口,写入完成后自动启动。',
379
- ].join('\r\n');
380
- const lines = text.split('\r\n').map((line) => vbsQuote(line)).join(' & vbCrLf & ');
381
- const command = 'powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "' + restartScript + '"';
382
- const vbs = [
383
- 'Option Explicit',
384
- 'Dim shell, answer',
385
- 'Set shell = CreateObject("WScript.Shell")',
386
- 'answer = MsgBox ' + lines + ', 4132, "海姆达尔终端 // 需要重启"',
387
- 'If answer = 6 Then',
388
- ' shell.Run ' + vbsQuote(command) + ', 0, False',
389
- 'End If',
390
- '',
391
- ].join('\r\n');
392
- const file = path.join(STATE_DIR, 'restart-confirm.vbs');
393
- fs.writeFileSync(file, '\ufeff' + vbs, 'utf16le');
394
- const wscript = path.join(
372
+ const templatePath = path.join(ROOT, 'assets', 'source', 'restart-confirm.hta');
373
+ let html = fs.readFileSync(templatePath, 'utf8').replace(/^\uFEFF/, '');
374
+ const command = 'powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "'
375
+ + restartScript.replace(/\\/g, '/') + '"';
376
+ html = html.replace('__RESTART_COMMAND__', command.replace(/'/g, "\\'"));
377
+ const file = path.join(STATE_DIR, 'restart-confirm.hta');
378
+ fs.writeFileSync(file, '\ufeff' + html, 'utf8');
379
+ const mshta = path.join(
395
380
  process.env.SystemRoot || 'C:\\Windows',
396
- 'System32', 'wscript.exe',
381
+ 'System32', 'mshta.exe',
397
382
  );
398
- const child = spawn(wscript, [file], {
399
- detached: true, stdio: 'ignore', windowsHide: false,
383
+ const child = spawn(mshta, [file], {
384
+ detached: true, stdio: 'ignore',
400
385
  });
401
386
  child.unref();
402
387
  log('restart confirmation shown');
@@ -411,11 +396,8 @@ export function apply(ctx) {
411
396
  writeState({ desired: 'on', pluginVersion: VERSION });
412
397
  const state = readState();
413
398
  const isPatched = state.status === 'patched';
414
- const marker = path.join(STATE_DIR, 'restart-confirm.pid');
415
- const alreadyAsked = fs.existsSync(marker)
416
- && fs.readFileSync(marker, 'utf8').trim() === String(process.pid);
417
- if (!isPatched && !alreadyAsked) {
418
- fs.writeFileSync(marker, String(process.pid), 'utf8');
399
+ if (!isPatched && !restartPrompted) {
400
+ restartPrompted = true;
419
401
  arm(true);
420
402
  askRestartConfirmation(writeRestartScript());
421
403
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-snowbreak-heimdall",
3
- "version": "3.0.6",
3
+ "version": "3.1.5",
4
4
  "description": "《尘白禁区》海姆达尔终端 / 世界树公司源码级皮肤:加载画面、双主题、菜单/侧栏/图标,插件仅在加载后播放启动动画。Windows / DSH 0.2.2-rc.1。",
5
5
  "type": "module",
6
6
  "license": "MIT",