@echo off title Installing & Launching SovereignDoc AI™ echo =================================================================== echo SOVEREIGN RUNTIME INSTALLER: SovereignDoc AI™ echo Zero Cloud Tokens - Zero Subscriptions - 100%% Local Hardware echo =================================================================== echo. :: 1. Verify or create application directory set INSTALL_DIR=%USERPROFILE%\SovereignApps\sovereigndoc if not exist "%INSTALL_DIR%" mkdir "%INSTALL_DIR%" echo [1/3] Setting up local tokenless runtime at: echo %INSTALL_DIR% echo. :: 2. Create local Python micro-server runner echo [2/3] Writing local loopback server (engine.py)... ( echo import sys echo import time echo from http.server import HTTPServer, SimpleHTTPRequestHandler echo import urllib.request echo. echo PORT = 8098 echo. echo class SovereignLocalHandler(SimpleHTTPRequestHandler): echo def end_headers(self): echo self.send_header('Access-Control-Allow-Origin', '*') echo self.send_header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS') echo self.send_header('Access-Control-Allow-Headers', '*') echo super().end_headers() echo def do_OPTIONS(self): echo self.send_response(200) echo self.end_headers() echo def do_GET(self): echo if self.path == '/ping' or self.path == '/api/status': echo self.send_response(200) echo self.send_header('Content-Type', 'application/json') echo self.end_headers() echo self.wfile.write(b'{"status":"ONLINE","engine":"Sovereign Localhost Core","port":8098,"tokens_burned":0,"privacy":"100%% Air-Gapped"}') echo return echo super().do_GET() echo. echo if __name__ == '__main__': echo print(f'[OK] Sovereign Engine active on http://127.0.0.1:{PORT}') echo server = HTTPServer(('127.0.0.1', PORT), SovereignLocalHandler) echo server.serve_forever() ) > "%INSTALL_DIR%\engine.py" :: 3. Create desktop launcher shortcut script set SHORTCUT_SCRIPT=%USERPROFILE%\Desktop\LAUNCH_SOVEREIGNDOC.bat ( echo @echo off echo title SovereignDoc AI™ - Sovereign Local Engine echo echo Starting local tokenless engine on http://127.0.0.1:8098 ... echo start /B python "%INSTALL_DIR%\engine.py" echo timeout /t 2 /nobreak >nul echo echo Opening application in your default web browser... echo start https://creatorwharehouse.com/sovereigndoc?engine=localhost:8098 echo echo. echo echo Engine is running in the background. Press any key to stop. echo pause ) > "%SHORTCUT_SCRIPT%" echo [3/3] Created 1-Click Launcher on your Desktop: echo %SHORTCUT_SCRIPT% echo. echo =================================================================== echo INSTALLATION COMPLETE! Launching SovereignDoc AI™ now... echo =================================================================== start "" "%SHORTCUT_SCRIPT%" exit /b 0