PHP stays the program: JumPHP\Tauri\App starts the Tauri runtime (tauri/, a Rust C library loaded with FFI) from its main thread; Tauri runs its native loop there and calls PHP back at every frame, like the browser engine. Pages talk to PHP with window.jumphp (invoke / send / on); PHP drives windows, dialogs, notifications and decides what closing does. Native only, Linux for now. - tauri/: libjumphp_tauri (jt_run / jt_poll / jt_send / jt_version), pages served from the app's folder at run time - engine: JumPHP\Tauri (App, Window, AppMain, TauriRuntime, FakeRuntime, NativeCommands), JumPHP\Native (Dialog, FilePicker, Notification, Shell; providers tauri / sdl / browser / none), Testing\AppTestCase (no window) - bin/jumphp app:new / app:run / app:test / app:shot / app:export, tauri:setup / tauri:build (tools/app-commands.sh); run / test / shot hand over to them for an app, pages skips apps - app:export: export:standalone with optional settings (extension list with FFI, boot class, native library, injected php.ini); unset, games build and find the same micro as before (same key) - skeleton-app/, games/hello-desktop (a notepad), docker/tauri, docs/tauri.md + docs/tauri.fr.md, AGENTS.md §16 Nothing changes for SDL games (desktop, browser, standalone, Android, Apple). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JkYTqpYNZKwTnRZHQRD5HP
1.2 KiB
1.2 KiB
hello-desktop — notes for agents
This is a JumPHP desktop app (not an SDL game). Read ../../AGENTS.md §16 and ../../docs/tauri.md first.
Checklist
bin/jumphp app:test hello-desktop # php -l + phpunit (AppTestCase, no window) + the app on Xvfb (must pass)
bin/jumphp app:shot hello-desktop # -> games/hello-desktop/var/screenshots/app.png: open it and look
bin/jumphp app:export hello-desktop # -> games/hello-desktop/dist/standalone/hello-desktop-linux-x86_64
This app
- What it is: the example desktop app of JumPHP (Tauri): a notepad. The page is HTML (
ui/), the logic is PHP (src/Main.php): open / save with the system dialogs, a PHP clock pushed to the page, dropped files described by PHP, a question before quitting with unsaved text, the built-innative.*commands (message, confirm, folder, notification). - PHP side:
src/Main.php(AppMain::boot(): commands, listeners, timers). - Pages:
ui/(index.html,style.css,app.js);window.jumphpis injected in every page. - Commands the pages call:
info,greet,notes.changed,notes.open,notes.save,notes.saveAs,notify; plus the built-innative.*(JumPHP\Tauri\NativeCommands).