Files
paseo/packages/desktop/bin/paseo.cmd
Mohamed Boudra 3d3e327378 feat(cli): support paseo . to open desktop app with project (#189)
* fix(app): reorder settings sections for better grouping

* feat(app): add setup hint and paseo.sh link on mobile welcome screen

New app store users land on the welcome screen with no context. Show a
brief explanation that the desktop app or server is needed, plus a link
to paseo.sh — only on mobile (iOS/Android), hidden on web/desktop.

* docs(release): add pre-release sanity check and clarify changelog scope

Add a Codex 5.4 review step before cutting releases to catch breaking
changes and backward-compatibility issues (mobile apps lag behind
desktop/daemon updates). Clarify that the changelog always covers the
delta from the previous stable release, not from the last RC.

* feat(cli): support `paseo .` to open desktop app with project directory

Similar to VS Code's `code .`, users can now type `paseo .` or
`paseo <path>` to open the Paseo desktop app with that directory as
the active project.

- Desktop shims detect path-like first args and launch Electron in GUI
  mode with --open-project instead of CLI passthrough mode
- Electron main process parses --open-project, sends IPC event to
  renderer, and forwards via second-instance for the already-running case
- Renderer OpenProjectListener reuses existing openProject() RPC flow
- Standalone CLI discovers the desktop app per platform and spawns it
2026-04-04 15:30:25 +08:00

42 lines
1.3 KiB
Batchfile

@echo off
setlocal
set "SCRIPT_DIR=%~dp0"
set "RESOURCES_DIR=%SCRIPT_DIR%.."
set "APP_EXECUTABLE=%RESOURCES_DIR%\..\Paseo.exe"
if not exist "%APP_EXECUTABLE%" (
echo Bundled Paseo executable not found at %APP_EXECUTABLE% 1>&2
exit /b 1
)
set "FIRST_ARG=%~1"
if "%FIRST_ARG%"=="." goto :open_project
if "%FIRST_ARG%"==".." goto :open_project
if "%FIRST_ARG:~0,2%"==".\" goto :open_project
if "%FIRST_ARG:~0,2%"=="./" goto :open_project
if "%FIRST_ARG:~0,3%"=="..\" goto :open_project
if "%FIRST_ARG:~0,3%"=="../" goto :open_project
if "%FIRST_ARG:~0,1%"=="\" goto :open_project
if "%FIRST_ARG:~0,1%"=="/" goto :open_project
if "%FIRST_ARG:~1,2%"==":\" goto :open_project
if "%FIRST_ARG:~1,2%"==":/" goto :open_project
goto :cli_mode
:open_project
for %%I in ("%~1") do set "RESOLVED_PATH=%%~fI"
if not exist "%RESOLVED_PATH%" (
echo Path does not exist: %RESOLVED_PATH% 1>&2
exit /b 1
)
if not exist "%RESOLVED_PATH%\NUL" (
echo Not a directory: %RESOLVED_PATH% 1>&2
exit /b 1
)
"%APP_EXECUTABLE%" --open-project "%RESOLVED_PATH%"
exit /b %errorlevel%
:cli_mode
set "ELECTRON_RUN_AS_NODE=1"
"%APP_EXECUTABLE%" "%RESOURCES_DIR%\app.asar\dist\daemon\node-entrypoint-runner.js" bare "%RESOURCES_DIR%\app.asar\node_modules\@getpaseo\cli\dist\index.js" %*
exit /b %errorlevel%