diff --git a/portable/config-server/public/index.html b/portable/config-server/public/index.html index e3b1b0b..9a970c4 100644 --- a/portable/config-server/public/index.html +++ b/portable/config-server/public/index.html @@ -499,7 +499,7 @@ function togglePw(id) { // --- Build OpenClaw config --- function buildConfig(provider, base, model, apiKey) { var baseConfig = { - gateway: { auth: { mode: 'token', token: 'uclaw' }, remote: { token: 'uclaw' } }, + gateway: { mode: 'local', auth: { mode: 'token', token: 'uclaw' }, remote: { token: 'uclaw' } }, commands: { native: 'auto', nativeSkills: 'auto', restart: true, ownerDisplay: 'raw' }, meta: { lastTouchedVersion: '2026.3.13', lastTouchedAt: new Date().toISOString() } }; diff --git a/portable/setup.bat b/portable/setup.bat index 7acfbf2..6103fd4 100644 --- a/portable/setup.bat +++ b/portable/setup.bat @@ -105,8 +105,9 @@ if exist "%CORE_DIR%\node_modules\openclaw" goto skip_openclaw_install echo [INSTALL] Installing OpenClaw... if not exist "%CORE_DIR%" mkdir "%CORE_DIR%" 2>nul -REM Read pinned OpenClaw version from repo root -set "OPENCLAW_VERSION_FILE=%~dp0..\OPENCLAW_VERSION" +REM Read pinned OpenClaw version from portable root, then repo root in dev checkouts +set "OPENCLAW_VERSION_FILE=%~dp0OPENCLAW_VERSION" +if not exist "%OPENCLAW_VERSION_FILE%" set "OPENCLAW_VERSION_FILE=%~dp0..\OPENCLAW_VERSION" set "OPENCLAW_VERSION=2026.4.29" if exist "%OPENCLAW_VERSION_FILE%" ( for /f "usebackq delims=" %%v in ("%OPENCLAW_VERSION_FILE%") do set "OPENCLAW_VERSION=%%v" diff --git a/portable/setup.ps1 b/portable/setup.ps1 index c27d462..3b949cd 100644 --- a/portable/setup.ps1 +++ b/portable/setup.ps1 @@ -204,7 +204,10 @@ if ($AllPlatforms) { $packageJsonPath = Join-Path $coreDir "package.json" if (-not (Test-Path -Path $packageJsonPath -PathType Leaf)) { - $openclawVersionFile = Join-Path $PSScriptRoot "..\OPENCLAW_VERSION" + $openclawVersionFile = Join-Path $PSScriptRoot "OPENCLAW_VERSION" + if (-not (Test-Path -Path $openclawVersionFile -PathType Leaf)) { + $openclawVersionFile = Join-Path $PSScriptRoot "..\OPENCLAW_VERSION" + } $openclawVersion = "2026.4.29" if (Test-Path -Path $openclawVersionFile -PathType Leaf) { $openclawVersion = (Get-Content -Path $openclawVersionFile -Raw).Trim() diff --git a/portable/setup.sh b/portable/setup.sh index 3907326..cb06154 100755 --- a/portable/setup.sh +++ b/portable/setup.sh @@ -110,7 +110,10 @@ else mkdir -p "$CORE_DIR" # Init package.json if not exists (pinned OpenClaw version from OPENCLAW_VERSION) - OPENCLAW_VERSION_FILE="$(dirname "$0")/../OPENCLAW_VERSION" + OPENCLAW_VERSION_FILE="$(dirname "$0")/OPENCLAW_VERSION" + if [ ! -f "$OPENCLAW_VERSION_FILE" ]; then + OPENCLAW_VERSION_FILE="$(dirname "$0")/../OPENCLAW_VERSION" + fi OPENCLAW_VERSION="2026.4.29" if [ -f "$OPENCLAW_VERSION_FILE" ]; then OPENCLAW_VERSION="$(tr -d '[:space:]' < "$OPENCLAW_VERSION_FILE")"