BroadSQL Desk
=============

BroadSQL Desk is an optional extension of BroadSQL, still in development: it opens BroadSQL in your
web browser, on this computer only. It runs the same commands, with the same engine and the same
Production safeguards, as the BroadSQL console. BroadSQL Desk is not included in the free BroadSQL
distribution; you install it separately.

Do not publish BroadSQL Desk on a network or on the Internet: it is a local, single-user interface.

BroadSQL Desk has no web server of its own: it is shown by ShaWeR, the free web runtime of BroadSQL.
This package holds both, as two separate extensions:
  extensions\broadsql-desk.jar     BroadSQL Desk (README-BroadSQL-Desk.txt, docs\BroadSQL-Desk)
  extensions\broadsql-shawer.jar   ShaWeR, free, no licence (README-ShaWeR.txt, docs\ShaWeR)
ShaWeR does not need BroadSQL Desk. Neither starts anything when it is installed.

Install
-------
1. Stop BroadSQL.
2. Extract this ZIP into the folder of your BroadSQL installation: both JAR files go to its
   extensions folder.
3. Start BroadSQL. Install your licence:
     DESK LICENCE INSTALL "C:\path\to\BroadSQL-Desk-DL-....licence"
4. Type DESK to open BroadSQL Desk. WEB and GUI are other names of DESK. If ShaWeR is not running,
   DESK says so and starts it with SHAWER START: that is when the port opens. Without ShaWeR,
   DESK tells you to install it and opens nothing.
BroadSQL Desk runs in BroadSQL's own Java (included in BroadSQL since 5.6.0, in its runtime folder):
nothing else to install. This package contains no Java of its own.

BroadSQL Desk has its own version numbers, and works with the BroadSQL releases it was tested
with, which are recorded in its JAR file. With another BroadSQL release it is not loaded at startup
(BroadSQL works as usual); SHOW EXTENSION ERRORS tells why and lists the supported releases.

Licence
-------
DESK LICENCE                    shows your licence: holder, dates, valid or not, and its file
DESK LICENCE INSTALL "<file>"   installs or replaces it (checked first; an invalid file changes nothing)
The licence is kept as BroadSQL-Desk.licence in the conf folder of the installation, where
broadsql.ini is. The LicencesPath setting of broadsql.ini names another folder (a folder, never a
file name), Eg: LicencesPath=C:\DataCenter\BroadSQL-Licences. When the licence expires, BroadSQL
Desk no longer starts, but a window already open keeps working until DESK STOP, LOGOUT or EXIT.
Install a licence file valid today; nothing else to do.

Start and stop
--------------
DESK          opens BroadSQL Desk in your browser (the link works once, within two minutes)
DESK STATUS   tells whether it is open, how ShaWeR is doing, and shows the licence
DESK STOP     closes it; ShaWeR keeps running (SHAWER STOP closes it); LOGOUT and EXIT stop both
The port, HTTP or HTTPS, the sign-in (users, passwords, two-factor codes) and the sessions are
ShaWeR's: see its guide and HELP SHAWER.

Update or remove
----------------
Stop BroadSQL, then extract the new package over the old files, or delete extensions\broadsql-desk.jar
(and extensions\broadsql-shawer.jar if no other extension uses ShaWeR), then start BroadSQL again.
Without the JARs, BroadSQL has no browser interface at all and DESK is an unknown command.

More: docs\BroadSQL-Desk\BROADSQL_DESK.md and https://www.broadsql.com/docs/extensions/desk.html
