FPVSIM Chrome Performance Launcher for macOS
===========================================

1. Install Google Chrome in Applications (or your user's Applications folder).
2. Double-click the ZIP to extract it. Keep the src folder beside the two shortcuts.
3. Double-click Launch FPVSIM.command. A Terminal window opens with instructions.
4. If prompted, save your Chrome work and choose C to close the selected Chrome
   session and open FPVSIM. Enter retries; E exits without closing Chrome.
5. After flying, save your work and double-click Quit Chrome.command.

Uses macOS's built-in Bash and JavaScript for Automation. No Python, Node,
Homebrew, compiler or installer is required. Supports Intel and Apple Silicon
through your installed Chrome. A native macOS launch has not yet been verified.

If macOS blocks the downloaded script, review the files and Apple's guidance:
https://support.apple.com/en-us/102445
macOS may require approval in System Settings > Privacy & Security > Open Anyway.
The launcher does not remove quarantine or disable Gatekeeper.

How it works
------------
Opens https://fpvsim.com/sim in a normal Chrome window with tabs and an address
bar. The outer window starts at 1296 x 815, allowing roughly 1280 x 720 (16:9)
for the page. Toolbars, browser zoom, display scaling and desktop limits can
change the actual page area. You can resize the window normally.

Reuses a Chrome profile whose display name is FPVSIM, preserving its login and
controller settings. If none exists, reuses or creates a separate FPVSIM profile.
It never copies cookies, merges profiles, deletes data, or changes another
profile's saved preferences. Duplicate FPVSIM names or unreadable metadata stop
the launcher rather than silently creating another profile.

Chrome starts with:
  --window-size=1296,815
  --disable-frame-rate-limit
  --disable-gpu-vsync
  --disable-extensions
  --disable-sync
  --disk-cache-dir=<separate cache for this profile>
  --user-data-dir=<selected profile's Chrome data directory>
  --profile-directory=<existing directory, e.g. Profile 2>

These settings apply to the whole Chrome process. If FPVSIM is in your regular
Chrome, all profiles/windows in that session share the settings. Save your
work before choosing Close Chrome or running Quit Chrome. These Unix launchers
send SIGTERM to the selected Chrome browser process, including background work;
page save/leave prompts are not guaranteed. There is no extra confirmation and
no forced SIGKILL. Independent Chrome processes with other data directories are
left alone. If Chrome does not exit, close it yourself and retry.

After flying, run Quit Chrome, then open Chrome from your usual shortcut to
restore normal extensions and sync. Your installed extensions remain installed.

The launcher verifies the selected process's startup flags after launch.
The page size, GPU acceleration, FPS and latency are not measured. A brief
configuration record is saved under FPVSIM/Launcher/last-launch.txt in your
application settings folder; no URLs, cookies or credentials are logged.

The performance flags reproduce the Windows benchmark configuration. macOS and
Linux may behave differently; these versions have not been latency-benchmarked.
Disabling VSync can increase tearing and power use. No fixed FPS is promised.
The simulator's optimized renderer is already the default on the website.
The launcher does not change your camera, track, physics or collision settings.
It does not disable browser security, request administrator access, download
software, send telemetry or contact VelociDrone servers.

Developers: pass --print-only for a read-only preview. Pass
--url http://localhost:9000/sim to open a local development server instead.
Keep the repository's launcher/ copy and sim/tools/chrome-launcher/ in sync.
The website build automatically creates separate Windows, macOS and Ubuntu ZIPs.
Profile locations follow Chromium's documented user-data directory conventions:
https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md

FOLDER LAYOUT
-------------
Only the Launch FPVSIM and Quit Chrome shortcuts are at the top level.
All supporting files, including this README, are in src/. Keep that folder
next to the shortcuts; extract the complete ZIP before starting.
