dsh-windows-tray 1.0.7 → 1.0.8
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/launcher/dsh-lib.ps1 +1 -1
- package/launcher/dsh-update.ps1 +4 -3
- package/package.json +1 -1
package/launcher/dsh-lib.ps1
CHANGED
|
@@ -12,7 +12,7 @@ $URL = "http://127.0.0.1:$PORT"
|
|
|
12
12
|
$LOG_DIR = Join-Path (Join-Path $env:USERPROFILE '.dsh\logs') 'dsh-windows-tray' # 本插件专属日志目录 (logs\<插件名>\, 边界规则见 release-standards §3.1)
|
|
13
13
|
$WT = "$env:LOCALAPPDATA\Microsoft\WindowsApps\wt.exe"
|
|
14
14
|
$PWSH = 'D:\Program Files (x86)\PowerShell-7.6.4\pwsh.exe'
|
|
15
|
-
$TRAY_VERSION = '1.0.
|
|
15
|
+
$TRAY_VERSION = '1.0.8' # 托盘版本 (与 npm 包版本同步, 用于日志/排查)
|
|
16
16
|
$TRAY_PKG = 'dsh-windows-tray' # npm 包名 (托盘自更新)
|
|
17
17
|
$TRAY_SCRIPT = Join-Path $PSScriptRoot 'dsh-tray.ps1'
|
|
18
18
|
|
package/launcher/dsh-update.ps1
CHANGED
|
@@ -119,14 +119,15 @@ if (-not (Test-Path $newInstall)) {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
# 3) 运行新包 install.ps1 (重新部署 + 快捷方式, 不启动托盘; -Auto=隐藏窗口非交互)
|
|
122
|
-
# v1.0.
|
|
122
|
+
# v1.0.8: 改用全流合并 *>&1 — 2>&1 捕不到 Write-Host 信息流, 中文经隐形控制台编码变 '?';
|
|
123
|
+
# $InformationPreference='Continue' 让信息流进管道, Out-File 统一 UTF-8
|
|
123
124
|
# v1.0.5: 显式传本机适配值 (取自点源的 dsh-lib, install 不必重新探测; 自定义安装位置必需)
|
|
124
125
|
$dshRoot = Split-Path $DSH_CMD -Parent
|
|
125
126
|
$deployLog = Join-Path $LOG_DIR 'dsh-update-deploy.log'
|
|
126
127
|
Remove-Item $deployLog -Force -ErrorAction SilentlyContinue
|
|
127
|
-
$deployPwsh = '-ExecutionPolicy Bypass -Command "$ErrorActionPreference=''Continue''; try { & ''' + $newInstall + ''' -Auto -NoTrayStart' +
|
|
128
|
+
$deployPwsh = '-ExecutionPolicy Bypass -Command "$InformationPreference=''Continue''; $ErrorActionPreference=''Continue''; try { & ''' + $newInstall + ''' -Auto -NoTrayStart' +
|
|
128
129
|
' -DshRoot ''' + $dshRoot + ''' -Port ' + $PORT +
|
|
129
|
-
' -NodePath ''' + $NODE + ''' -PwshPath ''' + $PWSH + '''
|
|
130
|
+
' -NodePath ''' + $NODE + ''' -PwshPath ''' + $PWSH + ''' *>&1 |' +
|
|
130
131
|
' Out-File -FilePath ''' + $deployLog + ''' -Encoding utf8 } catch {' +
|
|
131
132
|
' $_ | Out-File -FilePath ''' + $deployLog + ''' -Append -Encoding utf8; exit 1 }; exit 0'
|
|
132
133
|
$code = Run-HiddenPwsh $PWSH $deployPwsh 120000
|