docs: reescreve o manual e registra o JAR instalado no catálogo

O texto explica o núcleo, a rede e o tutorial do ping como o código está hoje. Instalar ou remover um JAR atualiza plugins.registry.json para o próximo run não perder o plugin.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Gabriel Felipe Souza SantosandCursor committed 2026-11-04 14:14:18 -03:00
1 parent 61753c421a
commit 8338936251
47 files changed
+1423 -1712

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ del /q "%CD%\.pitiupi\plugins\*.jar" 2>nul
set "PITIUPI_REPO=%CD%"
set "PITIUPI_PLUGINS=%CD%\.pitiupi\plugins"
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$repo = $env:PITIUPI_REPO; $dest = $env:PITIUPI_PLUGINS; $reg = Get-Content -Raw (Join-Path $repo 'plugins.registry.json') | ConvertFrom-Json; foreach ($p in @($reg.plugins)) { $dir = Join-Path $repo ($p.dir -replace '/','\'); $marker = Join-Path $dir 'build.xml'; if ($p.build -eq 'make') { $marker = Join-Path $dir 'Makefile' }; if (-not (Test-Path -LiteralPath $marker)) { Write-Host ('Plugin ' + $p.id + ' ausente nesta maquina; nao sera carregado.'); continue }; if ($p.build -ne 'ant') { Write-Error ('build nao suportado neste prompt: ' + $p.build); exit 1 }; & ant -f (Join-Path $dir 'build.xml') jar; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }; $src = Join-Path $dir ($p.jar -replace '/','\'); if (-not (Test-Path -LiteralPath $src)) { Write-Error ('JAR ausente: ' + $src); exit 1 }; Copy-Item -LiteralPath $src -Destination (Join-Path $dest ($p.id + '.jar')) -Force }"
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$repo = $env:PITIUPI_REPO; $dest = $env:PITIUPI_PLUGINS; $reg = Get-Content -Raw (Join-Path $repo 'plugins.registry.json') | ConvertFrom-Json; foreach ($p in @($reg.plugins)) { $dir = Join-Path $repo ($p.dir -replace '/','\'); $src = Join-Path $dir ($p.jar -replace '/','\'); if ($p.build -eq 'jar') { if (-not (Test-Path -LiteralPath $src)) { Write-Error ('JAR ausente: ' + $src); exit 1 }; Copy-Item -LiteralPath $src -Destination (Join-Path $dest ($p.id + '.jar')) -Force; continue }; $marker = Join-Path $dir 'build.xml'; if ($p.build -eq 'make') { $marker = Join-Path $dir 'Makefile' }; if (-not (Test-Path -LiteralPath $marker)) { Write-Host ('Plugin ' + $p.id + ' ausente nesta maquina; nao sera carregado.'); continue }; if ($p.build -ne 'ant') { Write-Error ('build nao suportado neste prompt: ' + $p.build); exit 1 }; & ant -f (Join-Path $dir 'build.xml') jar; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }; if (-not (Test-Path -LiteralPath $src)) { Write-Error ('JAR ausente: ' + $src); exit 1 }; Copy-Item -LiteralPath $src -Destination (Join-Path $dest ($p.id + '.jar')) -Force }"
if errorlevel 1 exit /b 1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0lib\launch-windows.ps1" -PitiupiHome "%CD%\.pitiupi" -Jar "%CD%\pitiupi\dist\pitiupi.jar"
+10
View File
@@ -70,6 +70,9 @@ if mode == "validate":
if key not in p:
print(f"ERRO: campo ausente {key} em {p}", file=sys.stderr)
sys.exit(1)
if p["build"] not in ("ant", "make", "jar"):
print(f"ERRO: build desconhecido {p['build']} em {p['id']}", file=sys.stderr)
sys.exit(1)
sys.exit(0)
if mode == "list":
@@ -183,6 +186,9 @@ build_one_plugin() {
local dir build_cmd marker
dir="$(registry_python field "$id" dir)"
build_cmd="$(registry_python field "$id" build)"
if [[ "$build_cmd" == "jar" ]]; then
return 0
fi
case "$build_cmd" in
ant) marker="${REPO_ROOT}/${dir}/build.xml" ;;
make) marker="${REPO_ROOT}/${dir}/Makefile" ;;
@@ -244,6 +250,10 @@ link_plugins_from_selection() {
local marker=""
local build_cmd
build_cmd="$(registry_python field "$id" build)"
if [[ "$build_cmd" == "jar" ]]; then
printf 'ERRO: JAR ausente: %s\n' "${src_abs}" >&2
exit 1
fi
case "$build_cmd" in
ant) marker="${REPO_ROOT}/${dir}/build.xml" ;;
make) marker="${REPO_ROOT}/${dir}/Makefile" ;;