feat: update preinstalled skills and CLI scripts, enhance packaging process, and add configuration for Windows and macOS

This commit is contained in:
DEV_DSW
2026-04-27 14:21:23 +08:00
parent 1667688931
commit 90e02636c7
16 changed files with 733 additions and 16 deletions

View File

@@ -0,0 +1,37 @@
@echo off
setlocal
if /i "%1"=="update" (
echo openclaw is managed by NIANXX ^(bundled version^).
echo.
echo To update openclaw, update NIANXX:
echo Open NIANXX ^> Settings ^> Check for Updates
exit /b 0
)
rem Switch console to UTF-8 so Unicode box-drawing and CJK text render correctly
rem on non-English Windows (e.g. Chinese CP936). Save the previous codepage to restore later.
for /f "tokens=2 delims=:." %%a in ('chcp') do set /a "_CP=%%a" 2>nul
chcp 65001 >nul 2>&1
set OPENCLAW_EMBEDDED_IN=NIANXX
set "NODE_EXE=%~dp0..\bin\node.exe"
set "OPENCLAW_ENTRY=%~dp0..\openclaw\openclaw.mjs"
set "_USE_BUNDLED_NODE=0"
if exist "%NODE_EXE%" (
"%NODE_EXE%" -e "const [maj,min]=process.versions.node.split('.').map(Number);process.exit((maj>22||maj===22&&min>=16)?0:1)" >nul 2>&1
if not errorlevel 1 set "_USE_BUNDLED_NODE=1"
)
if "%_USE_BUNDLED_NODE%"=="1" (
"%NODE_EXE%" "%OPENCLAW_ENTRY%" %*
) else (
set ELECTRON_RUN_AS_NODE=1
"%~dp0..\..\NIANXX.exe" "%OPENCLAW_ENTRY%" %*
)
set _EXIT=%ERRORLEVEL%
if defined _CP chcp %_CP% >nul 2>&1
endlocal & exit /b %_EXIT%