Expand description
§sharing
Shared primitives consumed by every binary and package in the workspace.
The crate is intentionally a grab-bag of small utilities that would create a dependency cycle if they lived in any one binary:
paths— canonical locations (install dir, bin dir, log dir,.envpath).utils—utils::ConfigEnv, env-file round-trip, install helpers.service— IPCservice::Actioncodec used by the tray → service channel.natives::api— OS-specific primitives (single-instance lock, logged user, service name).crypto,fs,string,download_file— small, focused helpers.
This crate also exports constants that are baked into binaries and consumed
by installer-side code and scripts, so they must stay the single source of
truth. The most important ones are PNA_ALLOWED_ORIGINS (Chrome/Edge
allow-list for the local WebSocket) and CLOUDFLARE_ORIGIN_CA (the CA
PEM filename written at install time).
§Windows specifics
The installer and the elevator rely on create_registry_entries and
remove_registry_entries to register the app under
HKLM\SOFTWARE\... for auto-start, the Run key, and uninstall metadata.
Writing to HKLM requires admin rights, so these must be invoked from a
code path that has already passed through pispas-elevator.exe.
Re-exports§
pub use natives::api::Lock;pub use natives::api::SingleInstance;
Modules§
Constants§
- APP_
DEV_ HOST - APP_
PRO_ HOST - BASE_
FOLDER - BEEPER_
PDF_ FILE - BINARIES_
PATH - CHANNEL_
NAME - CHANNEL_
NAME_ CFG - CHANNEL_
NAME_ OLD - CLOUDFLARE_
ORIGIN_ CA - Filename used for the Cloudflare Origin CA when the installer writes the
embedded PEM to disk before calling
certutil -addstore -f Root. - CONFIG_
FILE_ NAME - CONF_
PATH - DATA_
DELIMITER - DATA_
VALUES_ DELIMITER - ENVIRONMENT
- ENV_
FILE_ NAME - ICON_
PISPAS - LIBRARIES_
PATH - LOGS_
PATH - MYPOS_
SERVER_ FILE - NAME_
LEGAL - NAME_
SHORTCUT_ DESKTOP - OLD_
SERVICE_ PYTHON_ NAME - ORDER_
KITCHEN - PDF_
INFO_ FILE - PERSISTANCE_
FILE_ NAME - Filename of the on-disk persistence blob used by the
persistencemodule inpispas-modules. Lives under the installbin/directory. - PISPAS_
CONFIGURATOR - PISPAS_
ELEVATOR - PISPAS_
INSTALLER - PNA_
ALLOWED_ ORIGINS - Origins allowed to make Local Network Access requests to the local WebSocket service.
- POS_
DRIVER_ FILE - PRINTER_
TEST_ FILE - PRINTSVC_
PYTHON_ NAME - PRINTSVC_
PYTHON_ NAME_ NEW - PRINT_
SERVICE - PROGRAM_
FILES_ KEY - PYTHON_
FOLDER - SERVICE_
NAME - SERVICE_
NAME_ EXE - SERVICE_
PYTHON_ NAME - SUMATRA_
FILE - TMP_KEY
- TRAY_
ICON_ FOLDER - TRAY_
ICON_ NAME - USER_
PROFILE_ KEY - VERSION
- VOLATILE_
ENVIRONMENT - WKHTMLTOPDF_
FILE
Functions§
- add_
envs - create_
registry_ entries - get_
info_ parent - get_
path_ env - get_
path_ mypos_ server - get_
persistance_ path - get_
python_ path_ install - get_
version - is_
windows_ 7 - launch_
tray_ icon - remove_
registry_ entries - stop_
pispas_ modules