24 lines
867 B
Python
24 lines
867 B
Python
"""GTIFiscalAgentService.exe — frozen Windows Service host.
|
|
|
|
A thin entry that hands control to the already-bundled
|
|
`gti_agent_windows_service` wrapper (which reuses run_agent_service.run()).
|
|
It only guarantees the service locates `agent.env` and the DPAPI credential in
|
|
the install directory used by Setup.exe, regardless of how SCM launches it.
|
|
|
|
Built as a PyInstaller onedir; Setup.exe extracts this binary + its
|
|
`_internal/` dir into C:\Program Files\GTI\FiscalAgent\.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
INSTALL_DIR = Path(os.environ.get("PROGRAMFILES", r"C:\Program Files")) / "GTI" / "FiscalAgent"
|
|
os.environ.setdefault("GTI_AGENT_ENV_FILE", str(INSTALL_DIR / "agent.env"))
|
|
|
|
from gti_agent_windows_service import main # noqa: E402 (bundled by PyInstaller)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main()) |