
Project Overview
DeepSeek Harness Easy-Setup is a Windows packaging project. It combines the @deepseek-ai/dsh command-line program, a portable Node.js runtime, a launcher, and a stopper into one installer.
End users do not need to install Node.js, npm, or other dependencies in advance. After installation, they can launch dsh web through the shortcut on the desktop or in the Start menu. The browser opens automatically once the service is ready.
Features After Installation
- Creates “DeepSeek Harness” shortcuts on the desktop and in the Start menu.
- Creates a “Stop DeepSeek Harness” shortcut to terminate the running service.
- The launcher runs
dsh weband opens the browser automatically after the service starts. - The Start menu provides an uninstall entry, and the program also appears in the Windows Apps list.
- Uses the whale favicon included with the dsh frontend as the application icon.
- Installs for the current user without triggering UAC elevation.
The default installation directory is:
%LOCALAPPDATA%\Programs\DeepSeekHarnessUsers can also choose another directory in the installation wizard.
Understanding the Project Directory
Before starting the build, review the purpose of these key directories and files:
build\build.ps1: The main build entry point. It fetches dsh, downloads portable Node.js, generates the icon, compiles the launcher and stopper, and creates the installer.build\fetch-nsis.ps1: Downloads portable NSIS 3.11 and tries other mirrors if the SourceForge mirror is unavailable.src\Launcher.cs: Launcher source code, compiled intoDeepSeekHarness.exe.src\Stopper.cs: Stopper source code, compiled intoDeepSeekHarnessStop.exe.src\installer.nsi: The NSIS installer script.src\icon\build-icon.js: Uses the sharp package included with dsh to convert the whale SVG into a multi-size ICO file.test\test-install.ps1: Runs silent installation, file checks, launch, stop, HTTP, and uninstall tests.work\: Stores intermediate files such as the Node.js archive, NSIS, and staging files. It can be deleted or retained to speed up later builds.out\: Stores the final single-file installer.
Prepare the Build Environment
The build machine must meet these requirements:
- Windows 10 or Windows 11 x64.
- PowerShell 5.1.
- .NET Framework 4.x.
- Node.js installed, with
node.exeavailable on PATH, or an explicit path specified during the build. - Access to
nodejs.organd SourceForge.
The project uses the system C# compiler to compile two executables. Its default path is:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exeIf NSIS 3.x is not installed, the build script automatically downloads the portable version to work\nsis.
Important: The project path must not contain spaces because
makensiscommand-line definition parameters cannot correctly handle paths containing spaces.
Step 1: Install dsh
The build script reads @deepseek-ai/dsh from the global npm directory by default. Run this on the build machine first:
npm i -g @deepseek-ai/dshThe default package directory is:
%APPDATA%\npm\node_modules\@deepseek-ai\dshIf dsh is located elsewhere, specify its location later with the -DshSource parameter.
Step 2: Build the Single-File Installer
From the project root, run:
powershell -ExecutionPolicy Bypass -File build\build.ps1The script prepares the dsh files, portable Node.js, application icon, C# launcher, stopper, and NSIS installer in sequence. The default output is similar to:
out\DeepSeekHarness-Setup-0.1.1.exeThe README reports that the example installer is approximately 44 MB.
Common Build Parameters
-DshSource <directory>: Specifies the dsh package directory.-NodeExe <path>: Specifies thenode.exeon the build machine.-AppVersion <version>: Overrides the installer version.-WorkDir <directory>: Changes the intermediate file directory.-OutDir <directory>: Changes the installer output directory.
For example, to use custom dsh and Node.js paths and a custom version:
powershell -ExecutionPolicy Bypass -File build\build.ps1 -DshSource C:\dev\dsh -NodeExe C:\nodejs\node.exe -AppVersion 0.1.1 -OutDir C:\dsh-outputBy default, the version is taken from dsh's package.json. Prerelease versions are converted to the base version; for example, 0.1.1-rc.2 produces 0.1.1.
Files in work\ are retained and reused. The Node.js archive is not downloaded again after the initial download, and the extracted NSIS directory is reused as well.
Step 3: Install and Use the Application
After the build completes, double-click the installer in the out\ directory and complete the installation wizard. Because it uses per-user installation, it does not normally display a UAC elevation prompt.
- Double-click “DeepSeek Harness” on the desktop or in the Start menu.
- The launcher runs
dsh web. - When the service becomes available, the default browser opens the corresponding page automatically.
- To stop the service, run “Stop DeepSeek Harness”.
- To remove the program, use the uninstall entry in the Start menu or the Windows Apps list.
You can also install silently to the default directory:
out\DeepSeekHarness-Setup-0.1.1.exe /SStep 4: Run the Automated Tests
The project provides a test script covering the complete installation process:
powershell -ExecutionPolicy Bypass -File test\test-install.ps1The test script performs these operations:
- Silently installs to
testinstall\under the project directory. - Checks the installation files and shortcuts individually.
- Uses simulated entry points to verify launcher and stopper behavior.
- Uses the portable Node.js in the installation directory to actually start
dsh webonce. - Checks for an HTTP 200 response on the default test port
3999, avoiding the commonly used3080port. - Uninstalls the program and checks the result.
The output includes multiple check messages beginning with ###. The final line should be:
ALL CHECKS PASSEDIf a test fails, the number of failed items is shown at the end.
Note: The shortcuts created by the test use exactly the same names as those created by a regular installation. Therefore, while the test is running, the shortcuts on the current user's desktop and in the Start menu temporarily point to
testinstall\and are deleted during uninstallation. To restore the regular installation afterward, run the installer's silent installation command again.
Runtime Logs and Troubleshooting
Important runtime state files are stored at:
%LOCALAPPDATA%\DeepSeekHarness\pid.txt
%LOCALAPPDATA%\DeepSeekHarness\run.logpid.txtstores the process ID of the running dsh process. The stopper uses it to locate the target process.run.logstores dsh standard output and standard error.
If startup fails, the launcher displays the location of run.log in a dialog box. During troubleshooting, check this log first to identify port conflicts, dependency-loading problems, or service startup errors.
Advanced Tips and Implementation Notes
Keep the Node.js Version Compatible with Native Modules
dsh dependencies include native modules such as node-pty, sharp, and koffi. Portable Node.js must be compatible with these modules, so the build script defaults to the same Node.js version as the build machine. When changing -NodeExe, verify again that the installer starts normally.
Avoid Starting Duplicate Services
When dsh is already running on the default 3080 port, double-clicking the launcher again does not create a second instance. The launcher checks whether the process in the PID file is still running and opens the existing service page directly.
Keep the Launcher Running
After starting dsh, the launcher remains in the background as the host process, continuously writing standard output and standard error to run.log until dsh exits. If the launcher ends immediately, the output pipes are closed and dsh may encounter EPIPE when it writes subsequent log entries.
Wait Properly for NSIS Uninstallation to Finish
The NSIS uninstaller first copies itself to %TEMP% and then continues running from the temporary directory. The original uninstall process exits shortly afterward. Therefore, automation scripts cannot simply wait for the original process to end; they should poll until the installation directory disappears. The project's test-install.ps1 already provides this implementation.
Pay Attention to Installer Script Encoding
installer.nsi must use UTF-8 BOM or UTF-16LE. Otherwise, NSIS reports Bad text encoding. The source file in the repository is UTF-8 without a BOM, and build.ps1 converts it to UTF-16LE before invoking makensis.
Control the Installer Size
The packaging process removes files that are not loaded in a Windows x64 environment, including the Darwin, Linux, and ARM64 prebuilt files for node-pty and the WASM version of sharp. The README states that this saves approximately 30 MB.
License
dsh is licensed under the MIT License. See the LICENSE file in the dsh package for details. The installer scripts in this project are also released under the MIT License. The whale icon comes from dsh frontend assets and is copyrighted by DeepSeek.
Summary
DeepSeek Harness Easy-Setup combines dsh, portable Node.js, Windows start and stop programs, and the NSIS installation process. After preparing the environment, install dsh globally and run build\build.ps1 to generate a single-file installer that does not require Node.js to be preinstalled on the target machine. Before release, run the complete test script and pay particular attention to the logs, Node.js version compatibility, and shortcut restoration.
