- install/DEPLOYMENT-WALKTHROUGH.md: full verified runbook (operator + headless methods) from an actual deploy — PHP 8.5.5 + MariaDB 11.4.10 + Apache, app at www/pqs, DB provisioned via installer, registration/commit verified, zero PHP 8.5 warnings from app code. - install/start-pqs.bat: one-command launcher (starts MariaDB + Apache, sets the XAMPP_LITE_ROOT/SRVROOT placeholders, provisions the DB on first run). - install/README.md: aligned to this stack's layout (apps/, www/, control panel); corrected the installer 'safe to re-run' note (seed inserts are not idempotent). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
59 lines
2.0 KiB
Batchfile
59 lines
2.0 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
REM =====================================================================
|
|
REM PQS on-demand launcher for XAMPP Lite 8.5
|
|
REM Copy this file to the XAMPP Lite root (next to XL-Control-Panel.x64.exe)
|
|
REM and run it. It starts MariaDB + Apache and provisions the pqs database
|
|
REM on first run. The app must already be deployed to www\pqs .
|
|
REM =====================================================================
|
|
|
|
set "ROOT=%~dp0"
|
|
if "%ROOT:~-1%"=="\" set "ROOT=%ROOT:~0,-1%"
|
|
set "MYSQLBIN=%ROOT%\apps\mysql\bin"
|
|
set "APACHEBIN=%ROOT%\apps\apache\bin"
|
|
set "APP=%ROOT%\www\pqs"
|
|
|
|
if not exist "%MYSQLBIN%\mysqld.exe" (
|
|
echo [PQS] ERROR: run this from the XAMPP Lite root ^(apps\ not found next to it^).
|
|
goto :end
|
|
)
|
|
|
|
REM Apache reads these two placeholders from the environment (forward slashes).
|
|
set "XAMPP_LITE_ROOT=%ROOT:\=/%"
|
|
set "SRVROOT=%XAMPP_LITE_ROOT%/apps/apache"
|
|
|
|
echo [PQS] Starting MariaDB...
|
|
start "" /B "%MYSQLBIN%\mysqld.exe" --defaults-file="%MYSQLBIN%\my.ini" --datadir="%ROOT%\apps\mysql\data"
|
|
|
|
echo [PQS] Waiting for MariaDB...
|
|
set /a TRIES=0
|
|
:waitdb
|
|
"%MYSQLBIN%\mysql.exe" -u root -h 127.0.0.1 -e "SELECT 1" >nul 2>&1
|
|
if not errorlevel 1 goto dbready
|
|
set /a TRIES+=1
|
|
if !TRIES! GEQ 30 ( echo [PQS] ERROR: MariaDB did not come up. & goto :end )
|
|
ping -n 2 127.0.0.1 >nul
|
|
goto waitdb
|
|
:dbready
|
|
echo [PQS] MariaDB is up.
|
|
|
|
"%MYSQLBIN%\mysql.exe" -u root -h 127.0.0.1 -e "USE pqs" >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo [PQS] Provisioning pqs database from installer...
|
|
"%MYSQLBIN%\mysql.exe" -u root -h 127.0.0.1 < "%APP%\install\pqs_install.sql"
|
|
) else (
|
|
echo [PQS] pqs database already present; skipping provisioning.
|
|
)
|
|
|
|
echo [PQS] Starting Apache...
|
|
start "" /B "%APACHEBIN%\httpd.exe" -f "%ROOT%\apps\apache\conf\httpd.conf"
|
|
|
|
echo.
|
|
echo [PQS] Ready.
|
|
echo Kiosk : http://localhost/pqs/callsign.php
|
|
echo Ops : http://localhost/pqs/console.php
|
|
echo Wall : http://localhost/pqs/combinedqueue.php
|
|
echo Stop : taskkill /IM httpd.exe /F ^&^& taskkill /IM mysqld.exe /F
|
|
:end
|
|
endlocal
|