installer v1 (C+D): Windows EXE installer trio + build script + local Hub E2E
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"""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())
|
||||
Reference in New Issue
Block a user