Fix frozen-build SSL certs, taskbar icon, and rename _internal to psp-preserve
- config: point SSL at certifi bundle when frozen (fixes store/NPS/TMDB SSL errors) - gui: set app name + window icon for the taskbar - spec: contents_directory=psp-preserve; bundle a .desktop file for Wayland launchers
This commit is contained in:
@@ -11,6 +11,19 @@ _BUNDLE_DIR = getattr(sys, "_MEIPASS", None)
|
||||
|
||||
PROJECT_ROOT = Path(_BUNDLE_DIR).resolve() if _BUNDLE_DIR else Path(__file__).resolve().parent.parent
|
||||
|
||||
# Frozen bundles don't ship the system CA store, so Python's urllib would fail
|
||||
# TLS verification against the store server / NoPayStation / TMDB / archive.org.
|
||||
# Point OpenSSL at the certifi bundle (a curl_cffi dependency) when frozen only;
|
||||
# source runs keep using the OS CA store.
|
||||
if IS_FROZEN:
|
||||
try:
|
||||
import certifi
|
||||
_CA_BUNDLE = certifi.where()
|
||||
os.environ.setdefault("SSL_CERT_FILE", _CA_BUNDLE)
|
||||
os.environ.setdefault("REQUESTS_CA_BUNDLE", _CA_BUNDLE)
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
|
||||
|
||||
def resource_path(*parts):
|
||||
"""Absolute path to a read-only bundled resource (works when frozen)."""
|
||||
|
||||
Reference in New Issue
Block a user