Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d41af033f | ||
|
|
1090320c7f | ||
|
|
5f95a8d47d | ||
|
|
ad8d74f400 | ||
|
|
4dcb8a29f5 | ||
|
|
880915bf01 |
No files matched your search
@@ -0,0 +1,59 @@
|
|||||||
|
name: auto-release
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 3 * * 1' # 每周一 03:00 UTC
|
||||||
|
workflow_dispatch: {} # 手动触发
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
|
||||||
|
- name: Get latest dsh version
|
||||||
|
id: version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
LATEST=$(npm view @deepseek-ai/dsh version)
|
||||||
|
echo "latest=$LATEST"
|
||||||
|
echo "latest=$LATEST" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Assemble online package
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p pkg/app/src
|
||||||
|
cp app/dsh-app.exe pkg/app/
|
||||||
|
cp app/Microsoft.Web.WebView2.Core.dll app/Microsoft.Web.WebView2.WinForms.dll app/WebView2Loader.dll pkg/app/
|
||||||
|
cp app/src/dsh-app.cs app/src/app.manifest pkg/app/src/
|
||||||
|
cp dsh.ico README.md install.cmd uninstall.vbs register-uninstall.ps1 pkg/
|
||||||
|
cd pkg && python ../scripts/build-online.py ../dsh-desktop-online.zip
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
id: release
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
VER="${{ steps.version.outputs.latest }}"
|
||||||
|
BODY="Auto-built by Gitea Actions. dsh version: ${VER}. Online install package (run install.cmd, requires network)."
|
||||||
|
curl -s -X POST \
|
||||||
|
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\":\"v${VER}\",\"name\":\"DeepSeek Harness v${VER}\",\"body\":\"${BODY}\",\"draft\":false,\"prerelease\":false}" \
|
||||||
|
"https://git.vanusys.com/api/v1/repos/${{ github.repository }}/releases" > release.json
|
||||||
|
python -c "import json; print(json.load(open('release.json'))['id'])" > release_id.txt
|
||||||
|
echo "release_id=$(cat release_id.txt)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Upload asset
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
ID="${{ steps.release.outputs.release_id }}"
|
||||||
|
curl -s -X POST \
|
||||||
|
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
|
-F "attachment=@dsh-desktop-online.zip" \
|
||||||
|
"https://git.vanusys.com/api/v1/repos/${{ github.repository }}/releases/${ID}/assets"
|
||||||
@@ -9,3 +9,6 @@ start-error.log
|
|||||||
|
|
||||||
# WebView2 用户数据(仓库根下的缓存目录)
|
# WebView2 用户数据(仓库根下的缓存目录)
|
||||||
EBWebView/
|
EBWebView/
|
||||||
|
|
||||||
|
# runner 凭据(勿提交)
|
||||||
|
runtime/
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
title DeepSeek Harness Installer (Online)
|
||||||
|
|
||||||
|
echo ============================================
|
||||||
|
echo DeepSeek Harness Desktop - Online Install
|
||||||
|
echo ============================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
REM ---- 1. Node.js ----
|
||||||
|
where node >nul 2>nul
|
||||||
|
if %errorlevel%==0 (
|
||||||
|
echo [1/5] Node.js detected
|
||||||
|
goto node_ok
|
||||||
|
)
|
||||||
|
echo [1/5] Node.js not found, installing via winget...
|
||||||
|
winget install --id OpenJS.NodeJS.LTS -e --accept-source-agreements --accept-package-agreements
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo.
|
||||||
|
echo [ERROR] Node.js install failed. Please install manually from https://nodejs.org (LTS), then run this script again.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
set "PATH=%PATH%;C:\Program Files\nodejs;%APPDATA%\npm"
|
||||||
|
:node_ok
|
||||||
|
|
||||||
|
REM ---- 2. npm registry (mirror for speed) ----
|
||||||
|
echo [2/5] Setting npm mirror registry...
|
||||||
|
call npm config set registry https://registry.npmmirror.com
|
||||||
|
|
||||||
|
REM ---- 3. Install dsh ----
|
||||||
|
echo [3/5] Installing DeepSeek Harness (dsh)...
|
||||||
|
call npm install -g @deepseek-ai/dsh
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo.
|
||||||
|
echo [ERROR] dsh install failed. Check network and retry.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM ---- 4. Deploy app ----
|
||||||
|
echo [4/5] Deploying application...
|
||||||
|
set "DEST=%LOCALAPPDATA%\DeepSeekHarness"
|
||||||
|
if not exist "%DEST%" mkdir "%DEST%"
|
||||||
|
xcopy /E /I /Y app "%DEST%\app" >nul
|
||||||
|
copy /Y dsh.ico "%DEST%\" >nul
|
||||||
|
copy /Y README.md "%DEST%\" >nul
|
||||||
|
|
||||||
|
REM ---- 5. Register uninstall (Apps & Features) ----
|
||||||
|
echo [5/5] Registering uninstall entry...
|
||||||
|
copy /Y uninstall.vbs "%DEST%\" >nul
|
||||||
|
copy /Y register-uninstall.ps1 "%DEST%\" >nul
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -File "%DEST%\register-uninstall.ps1"
|
||||||
|
|
||||||
|
REM ---- 6. Desktop shortcut ----
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -Command "$s=(New-Object -ComObject WScript.Shell).CreateShortcut([Environment]::GetFolderPath('Desktop')+'\DeepSeek Harness.lnk');$s.TargetPath='%DEST%\app\dsh-app.exe';$s.IconLocation='%DEST%\dsh.ico,0';$s.WorkingDirectory='%DEST%\app';$s.Save()"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Install complete! Launching...
|
||||||
|
start "" "%DEST%\app\dsh-app.exe"
|
||||||
|
pause
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Register DeepSeek Harness in Windows Apps & Features (uninstall entry)
|
||||||
|
# DisplayName built via [char] codes to avoid file-encoding issues
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\DeepSeekHarness'
|
||||||
|
$install = "$env:LOCALAPPDATA\DeepSeekHarness"
|
||||||
|
$uninst = "$install\uninstall.vbs"
|
||||||
|
|
||||||
|
if (-not (Test-Path $uninst)) { Write-Output "MISSING uninstall.vbs at $uninst"; exit 1 }
|
||||||
|
|
||||||
|
# 'DeepSeek Harness ' + 桌面客户端 (U+684C U+9762 U+5BA2 U+6237 U+7AEF)
|
||||||
|
$name = 'DeepSeek Harness ' + [char]0x684C + [char]0x9762 + [char]0x5BA2 + [char]0x6237 + [char]0x7AEF
|
||||||
|
|
||||||
|
New-Item -Path $key -Force | Out-Null
|
||||||
|
Set-ItemProperty -Path $key -Name 'DisplayName' -Value $name -Type String
|
||||||
|
Set-ItemProperty -Path $key -Name 'DisplayVersion' -Value '1.0.0' -Type String
|
||||||
|
Set-ItemProperty -Path $key -Name 'Publisher' -Value 'VanuSystems' -Type String
|
||||||
|
Set-ItemProperty -Path $key -Name 'InstallLocation' -Value $install -Type String
|
||||||
|
Set-ItemProperty -Path $key -Name 'DisplayIcon' -Value "$install\dsh.ico" -Type String
|
||||||
|
Set-ItemProperty -Path $key -Name 'UninstallString' -Value ('"' + "$env:SystemRoot\System32\wscript.exe" + '" "' + $uninst + '"') -Type String
|
||||||
|
Set-ItemProperty -Path $key -Name 'NoModify' -Value 1 -Type DWord
|
||||||
|
Set-ItemProperty -Path $key -Name 'NoRepair' -Value 1 -Type DWord
|
||||||
|
Set-ItemProperty -Path $key -Name 'EstimatedSize' -Value 343000 -Type DWord
|
||||||
|
Write-Output 'Registered OK'
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
"""Build dsh-desktop-online.zip from the current working directory."""
|
||||||
|
import zipfile, os, sys
|
||||||
|
|
||||||
|
out = sys.argv[1] if len(sys.argv) > 1 else '../dsh-desktop-online.zip'
|
||||||
|
count = 0
|
||||||
|
with zipfile.ZipFile(out, 'w', zipfile.ZIP_DEFLATED) as z:
|
||||||
|
for r, _, fs in os.walk('.'):
|
||||||
|
for f in fs:
|
||||||
|
p = os.path.join(r, f)
|
||||||
|
z.write(p, os.path.relpath(p, '.'))
|
||||||
|
count += 1
|
||||||
|
print('ZIP:', out, '%.1f MB' % (os.path.getsize(out) / 1048576), count, 'files')
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
' DeepSeek Harness uninstaller (silent)
|
||||||
|
' Invoked from Windows Apps & Features via UninstallString
|
||||||
|
Set ws = CreateObject("WScript.Shell")
|
||||||
|
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||||
|
|
||||||
|
' 1. stop app and backend service
|
||||||
|
ws.Run "taskkill /F /IM dsh-app.exe /T", 0, True
|
||||||
|
ws.Run "taskkill /F /IM node.exe /T", 0, True
|
||||||
|
|
||||||
|
' 2. remove autostart registry entry
|
||||||
|
On Error Resume Next
|
||||||
|
ws.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\DeepSeekHarnessService"
|
||||||
|
Err.Clear
|
||||||
|
|
||||||
|
' 3. remove desktop shortcuts
|
||||||
|
Dim desktop
|
||||||
|
desktop = ws.SpecialFolders("Desktop")
|
||||||
|
On Error Resume Next
|
||||||
|
If fso.FileExists(desktop & "\DeepSeek Harness.lnk") Then fso.DeleteFile desktop & "\DeepSeek Harness.lnk"
|
||||||
|
If fso.FileExists("C:\Users\VanuSystems-Mu\DeskBox\AI\DeepSeek Harness.lnk") Then fso.DeleteFile "C:\Users\VanuSystems-Mu\DeskBox\AI\DeepSeek Harness.lnk"
|
||||||
|
Err.Clear
|
||||||
|
|
||||||
|
' 4. remove uninstall registry key
|
||||||
|
On Error Resume Next
|
||||||
|
ws.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\DeepSeekHarness"
|
||||||
|
Err.Clear
|
||||||
|
|
||||||
|
' 5. remove install directory
|
||||||
|
On Error Resume Next
|
||||||
|
Dim installDir
|
||||||
|
installDir = ws.ExpandEnvironmentStrings("%LOCALAPPDATA%\DeepSeekHarness")
|
||||||
|
If fso.FolderExists(installDir) Then fso.DeleteFolder installDir, True
|
||||||
|
Err.Clear
|
||||||
Reference in new issue
Block a user