diff options
| author | Kostya <mail@sartin.in> | 2026-10-13 10:42:15 +0300 |
|---|---|---|
| committer | Kostya <mail@sartin.in> | 2026-10-13 10:42:40 +0300 |
| commit | a8bc9dce528abb6340315f7daa61ad76be4a8739 (patch) | |
| tree | 23395c6cc47adc04419ff7591f4e1b095329cd1a /tools | |
| parent | afefb6d1c4099fbedef39de5fc0cebabe44895fc (diff) | |
| download | guess-market-a8bc9dce528abb6340315f7daa61ad76be4a8739.tar.gz guess-market-a8bc9dce528abb6340315f7daa61ad76be4a8739.tar.xz guess-market-a8bc9dce528abb6340315f7daa61ad76be4a8739.zip | |
ui-client: add desktop client that talks to the server
New module for the Ex3 desktop app. It reuses the ui-fx views and
depends on the api only, never on the engine.
ServerClient owns the OkHttp session and the last snapshot pulled from
/api/sync. RemoteCatalogContext, RemoteGuessMarketContext and
RemoteAccountContext implement the api interfaces on top of it: reads
are answered from the snapshot, so AppState never waits on the network,
and writes go over HTTP and pull a fresh snapshot before returning.
A daemon thread polls once a second with blocking calls and refreshes
AppState through Platform.runLater only when the server's version
moved. AppState reselects the event and user by id, so a refresh keeps
the selection.
Server and user name come from --server= and --user= until the login
screen exists.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/_util.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/_util.sh b/tools/_util.sh index 7351e62..65cba8c 100644 --- a/tools/_util.sh +++ b/tools/_util.sh | |||
| @@ -5,7 +5,7 @@ case "$(uname -s)" in | |||
| 5 | *) SEP=":" ;; | 5 | *) SEP=":" ;; |
| 6 | esac | 6 | esac |
| 7 | 7 | ||
| 8 | MODULES="api service server ui-fx ui-console ui-desktop" | 8 | MODULES="api service server ui-fx ui-console ui-desktop ui-client" |
| 9 | 9 | ||
| 10 | DEPS_api="" | 10 | DEPS_api="" |
| 11 | DEPS_service="api" | 11 | DEPS_service="api" |
| @@ -13,12 +13,14 @@ DEPS_server="api service" | |||
| 13 | DEPS_ui_console="api service" | 13 | DEPS_ui_console="api service" |
| 14 | DEPS_ui_fx="api" | 14 | DEPS_ui_fx="api" |
| 15 | DEPS_ui_desktop="api service ui-fx" | 15 | DEPS_ui_desktop="api service ui-fx" |
| 16 | DEPS_ui_client="api ui-fx" | ||
| 16 | 17 | ||
| 17 | RUNTIME_LIB_DIRS="pico jaxb gson openjfx" | 18 | RUNTIME_LIB_DIRS="pico jaxb gson openjfx okhttp" |
| 18 | 19 | ||
| 19 | EXECUTABLES="ui-console ui-desktop" | 20 | EXECUTABLES="ui-console ui-desktop ui-client" |
| 20 | MAINCLASS_ui_console="market.guess.ui.console.App" | 21 | MAINCLASS_ui_console="market.guess.ui.console.App" |
| 21 | MAINCLASS_ui_desktop="market.guess.ui.desktop.Launcher" | 22 | MAINCLASS_ui_desktop="market.guess.ui.desktop.Launcher" |
| 23 | MAINCLASS_ui_client="market.guess.ui.client.Launcher" | ||
| 22 | 24 | ||
| 23 | JAVA_HOME_DIR=$(java -XshowSettings:properties -version 2>&1 | tr -d '\r' | sed -n 's/^ *java\.home = //p') | 25 | JAVA_HOME_DIR=$(java -XshowSettings:properties -version 2>&1 | tr -d '\r' | sed -n 's/^ *java\.home = //p') |
| 24 | case "$(uname -s)" in | 26 | case "$(uname -s)" in |